diff --git a/.vscode/launch.json b/.vscode/launch.json index 1fbffed..2f65643 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -19,9 +19,9 @@ "args": [ "${workspaceFolder}/lib/index.ts", "-i", - "${workspaceFolder}/test/cyclos.json", + "${workspaceFolder}/test/all-types.json", "-o", - "${workspaceFolder}/out/cyclos", + "${workspaceFolder}/out/all-types", "--fetch-timeout", "2000" ] diff --git a/.vscode/settings.json b/.vscode/settings.json index 5d5206e..feabcbd 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -15,7 +15,8 @@ "[handlebars]": { "editor.formatOnSave": false, "editor.formatOnPaste": false, - "editor.suggest.insertMode": "replace" + "editor.suggest.insertMode": "replace", + "files.insertFinalNewline": false, }, "files.insertFinalNewline": true, "prettier.requireConfig": true diff --git a/README.md b/README.md index 7cc958d..7c83836 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,8 @@ For a generator for [Swagger 2.0](https://github.com/OAI/OpenAPI-Specification/b - It should be possible to specify a subset of services to generate. Only the models actually used by that subset should be generated; - It should be easy to specify a root URL for the web service endpoints; -- Generated files should compile using strict `TypeScript` compiler flags, such as `noUnusedLocals` and `noUnusedParameters`. +- Generated files should compile using strict `TypeScript` compiler flags, such as `noUnusedLocals` and `noUnusedParameters`; +- For large APIs it is possible to generate only functions for each API operation, and not entire services. This allows for tree-shakable code to be generated, resulting in lower bundle sizes. ## Limitations @@ -59,7 +60,7 @@ $ npm install -g ng-openapi-gen $ ng-openapi-gen --input my-api.yaml --output my-app/src/app/api ``` -Alternativly you can use the generator directly from within your build-script: +Alternatively you can use the generator directly from within your build-script: ```typescript import $RefParser from 'json-schema-ref-parser'; @@ -126,6 +127,55 @@ export class AppModule { } Alternatively, you can inject the `ApiConfiguration` instance in some service or component, such as the `AppComponent` and set the `rootUrl` property there. +## Using functional API calls + +Starting with version 0.50.0, `ng-openapi-gen` generates a function with the implementation of each actual API call. +The generated services delegate to such functions. + +However, it is possible to disable the entire services generation, which will avoid the need to include all such services in the application. +As a result, the application will be more tree-shakable, resulting in smaller bundle sizes. +This is specially true for large 3rd party APIs, in which, for example, a single service (OpenAPI tag) has many methods, but only a few are actually used. +Combined with the option `"enumStyle": "alias"`, the footprint of the API generation will be minimal. + +Each generated function receives the following arguments: + +- Angular's `HttpClient` instance; +- The API `rootUrl` (the operation knowns the relative URL, and will use this root URL to build the full endpoint path); +- The actual operation parameters. If it has no parameters or all parameters are optional, the params option will be optional as well; +- The optional http context. + +Clients can directly call the function providing the given parameters. +However, to make the process smoother, it is also possible to generate a general service specifically to invoke such functions. +Its generation is disabled by default, but can be enabled by setting the option `"apiService": "ApiService"` (or another name your prefer). +With this, a single `@Injectable` service is generated. It will provide the functions with the `HttpClient` and `rootUrl` (from `ApiConfiguration`). + +It then provides 2 methods for invoking the functions: + +- `invoke`: Calls the function and returns the response body; +- `invoke$Response`: Calls the function and returns the entire response, so additional metadata can be read, such as status code or headers. + +Here is an example class using the `ApiService`: + +```typescript +import { Directive, OnInit, inject } from '@angular/core'; +import { ApiService } from 'src/api/api.service'; +import { getResults } from 'src/api/fn/api/get-results'; +import { Result } from 'src/api/models'; +import { Observable } from 'rxjs'; + +@Directive() +export class ApiFnComponent implements OnInit { + results$!: Observable; + + apiService = inject(ApiService); + + ngOnInit() { + // getResults is the operation function. The second argument is the actual parameters passed to the function + this.results$ = this.apiService.invoke(getResults, { limit: 10 }); + } +} +``` + ## Passing request headers / customizing the request To pass request headers, such as authorization or API keys, as well as having a diff --git a/lib/gen-type.ts b/lib/gen-type.ts index 6ae6bb9..4b3c2d8 100644 --- a/lib/gen-type.ts +++ b/lib/gen-type.ts @@ -1,5 +1,6 @@ import { ReferenceObject, SchemaObject } from 'openapi3-ts'; import { fileName, namespace, simpleName, typeName } from './gen-utils'; +import { Importable } from './importable'; import { Import, Imports } from './imports'; import { Options } from './options'; @@ -23,6 +24,8 @@ export abstract class GenType { /** TypeScript comments for this type */ tsComments: string; + pathToRoot: string; + imports: Import[]; private _imports: Imports; @@ -32,7 +35,6 @@ export abstract class GenType { constructor( public name: string, typeNameTransform: (typeName: string, options: Options) => string, - /** Generation options */ public options: Options) { this.typeName = typeNameTransform(name, options); @@ -46,17 +48,22 @@ export abstract class GenType { this._imports = new Imports(options); } - protected addImport(name: string) { - if (!this.skipImport(name)) { - // Don't have to import to this own file - this._imports.add(name, this.pathToModels()); + protected addImport(param: string | Importable | null | undefined) { + if (param && !this.skipImport(param)) { + this._imports.add(param); } } - protected abstract skipImport(name: string): boolean; + protected abstract skipImport(name: string | Importable): boolean; + + protected abstract initPathToRoot(): string; protected updateImports() { + this.pathToRoot = this.initPathToRoot(); this.imports = this._imports.toArray(); + for (const imp of this.imports) { + imp.path = this.pathToRoot + imp.path; + } this.additionalDependencies = [...this._additionalDependencies]; } @@ -93,9 +100,4 @@ export abstract class GenType { } } } - - /** - * Must be implemented to return the relative path to the models, ending with `/` - */ - protected abstract pathToModels(): string; } diff --git a/lib/gen-utils.ts b/lib/gen-utils.ts index 425a240..f7d3445 100644 --- a/lib/gen-utils.ts +++ b/lib/gen-utils.ts @@ -36,19 +36,16 @@ export function qualifiedName(name: string, options: Options): string { } /** - * Returns the file to import for a given model + * Returns the filename where to write a model with the given name */ -export function modelFile(pathToModels: string, name: string, options: Options): string { - let dir = pathToModels || ''; - if (dir.endsWith('/')) { - dir = dir.substr(0, dir.length - 1); - } +export function modelFile(name: string, options: Options): string { + let result = ''; const ns = namespace(name); if (ns) { - dir += `/${ns}`; + result += `/${ns}`; } const file = unqualifiedName(name, options); - return dir += '/' + fileName(file); + return result += '/' + fileName(file); } /** @@ -108,7 +105,7 @@ export function fileName(text: string): string { */ export function toBasicChars(text: string, firstNonDigit = false): string { text = deburr((text || '').trim()); - text = text.replace(/[^\w]+/g, '_'); + text = text.replace(/[^\w$]+/g, '_'); if (firstNonDigit && /[0-9]/.test(text.charAt(0))) { text = '_' + text; } diff --git a/lib/globals.ts b/lib/globals.ts index 66c257d..0b6ef22 100644 --- a/lib/globals.ts +++ b/lib/globals.ts @@ -11,6 +11,8 @@ export class Globals { configurationParams: string; baseServiceClass: string; baseServiceFile: string; + apiServiceClass?: string; + apiServiceFile?: string; requestBuilderClass: string; requestBuilderFile: string; responseClass: string; @@ -27,6 +29,13 @@ export class Globals { this.configurationParams = `${this.configurationClass}Params`; this.baseServiceClass = options.baseService || 'BaseService'; this.baseServiceFile = fileName(this.baseServiceClass); + this.apiServiceClass = options.apiService || ''; + if (this.apiServiceClass === '') { + this.apiServiceClass = undefined; + } else { + // Angular's best practices demands xxx.service.ts, not xxx-service.ts + this.apiServiceFile = fileName(this.apiServiceClass).replace(/\-service$/, '.service'); + } this.requestBuilderClass = options.requestBuilder || 'RequestBuilder'; this.requestBuilderFile = fileName(this.requestBuilderClass); this.responseClass = options.response || 'StrictHttpResponse'; diff --git a/lib/importable.ts b/lib/importable.ts new file mode 100644 index 0000000..f173523 --- /dev/null +++ b/lib/importable.ts @@ -0,0 +1,10 @@ +/** + * An artifact that can be imported + */ +export interface Importable { + importName: string; + importPath: string; + importFile: string; + importTypeName?: string; + importQualifiedName?: string; +} diff --git a/lib/imports.ts b/lib/imports.ts index 86594b2..aeaa3f5 100644 --- a/lib/imports.ts +++ b/lib/imports.ts @@ -1,18 +1,38 @@ -import { unqualifiedName, qualifiedName, modelFile } from './gen-utils'; +import { modelFile, qualifiedName, unqualifiedName } from './gen-utils'; +import { Importable } from './importable'; import { Options } from './options'; -export class Import { +/** A general import */ +export class Import implements Importable { name: string; typeName: string; qualifiedName: string; + path: string; file: string; useAlias: boolean; - constructor(name: string, pathToModels: string, options: Options) { + fullPath: string; + + // Fields from Importable + importName: string; + importPath: string; + importFile: string; + importTypeName?: string; + importQualifiedName?: string; + + constructor(name: string, typeName: string, qName: string, path: string, file: string) { this.name = name; - this.typeName = unqualifiedName(name, options); - this.qualifiedName = qualifiedName(name, options); + this.typeName = typeName; + this.qualifiedName = qName; this.useAlias = this.typeName !== this.qualifiedName; - this.file = modelFile(pathToModels, name, options); + this.path = path; + this.file = file; + this.fullPath = `${this.path.split('/').filter(p => p.length).join('/')}/${this.file.split('/').filter(p => p.length).join('/')}`; + + this.importName = name; + this.importPath = path; + this.importFile = file; + this.importTypeName = typeName; + this.importQualifiedName = qName; } } @@ -28,13 +48,25 @@ export class Imports { /** * Adds an import */ - add(name: string, pathToModels: string) { - this._imports.set(name, new Import(name, pathToModels, this.options)); + add(param: string | Importable) { + let imp: Import; + if (typeof param === 'string') { + // A model + imp = new Import(param, unqualifiedName(param, this.options), qualifiedName(param, this.options), 'models/', modelFile(param, this.options)); + } else { + // An Importable + imp = new Import(param.importName, param.importTypeName ?? param.importName, param.importQualifiedName ?? param.importName, `${param.importPath}`, param.importFile); + } + this._imports.set(imp.name, imp); } toArray(): Import[] { - const keys = [...this._imports.keys()]; - keys.sort(); - return keys.map(k => this._imports.get(k) as Import); + const array = [...this._imports.values()]; + array.sort((a, b) => a.importName.localeCompare(b.importName)); + return array; + } + + get size() { + return this._imports.size; } } diff --git a/lib/model-index.ts b/lib/model-index.ts new file mode 100644 index 0000000..c011f49 --- /dev/null +++ b/lib/model-index.ts @@ -0,0 +1,23 @@ +import { GenType } from './gen-type'; +import { Model } from './model'; +import { Options } from './options'; + +/** + * Represents the model index + */ +export class ModelIndex extends GenType { + + constructor(models: Model[], options: Options) { + super('models', n => n, options); + models.forEach(model => this.addImport(model.name)); + this.updateImports(); + } + + protected skipImport(): boolean { + return false; + } + + protected initPathToRoot(): string { + return './'; + } +} diff --git a/lib/model.ts b/lib/model.ts index 61b089f..72b3a54 100644 --- a/lib/model.ts +++ b/lib/model.ts @@ -1,4 +1,4 @@ -import { SchemaObject, OpenAPIObject } from 'openapi3-ts'; +import { OpenAPIObject, SchemaObject } from 'openapi3-ts'; import { EnumValue } from './enum-value'; import { GenType } from './gen-type'; import { tsComments, tsType, unqualifiedName } from './gen-utils'; @@ -68,16 +68,13 @@ export class Model extends GenType { this.updateImports(); } - protected pathToModels(): string { + protected initPathToRoot(): string { if (this.namespace) { - const depth = this.namespace.split('/').length; - let path = ''; - for (let i = 0; i < depth; i++) { - path += '../'; - } - return path; + // for each namespace level go one directory up + // plus the "models" directory + return this.namespace.split('/').map(() => '../').join('').concat('../'); } - return './'; + return '../'; } protected skipImport(name: string): boolean { @@ -97,7 +94,7 @@ export class Model extends GenType { const appendType = (type: string) => { if (type.startsWith('null | ')) { propTypes.add('null'); - propTypes.add(type.substr('null | '.length)); + propTypes.add(type.substring('null | '.length)); } else { propTypes.add(type); } diff --git a/lib/ng-openapi-gen.ts b/lib/ng-openapi-gen.ts index 7d46ad8..429f63a 100644 --- a/lib/ng-openapi-gen.ts +++ b/lib/ng-openapi-gen.ts @@ -8,13 +8,13 @@ import { parseOptions } from './cmd-args'; import { HTTP_METHODS, deleteDirRecursive, methodName, simpleName, syncDirs } from './gen-utils'; import { Globals } from './globals'; import { HandlebarsManager } from './handlebars-manager'; -import { Import } from './imports'; import { Logger } from './logger'; import { Model } from './model'; import { Operation } from './operation'; import { Options } from './options'; import { Service } from './service'; import { Templates } from './templates'; +import { ModelIndex } from './model-index'; /** * Main generator class @@ -39,7 +39,7 @@ export class NgOpenApiGen { this.outDir = this.options.output || 'src/app/api'; // Make sure the output path doesn't end with a slash if (this.outDir.endsWith('/') || this.outDir.endsWith('\\')) { - this.outDir = this.outDir.substr(0, this.outDir.length - 1); + this.outDir = this.outDir.substring(0, this.outDir.length - 1); } this.tempDir = this.outDir + '$'; @@ -80,10 +80,18 @@ export class NgOpenApiGen { this.write('model', model, model.fileName, 'models'); } - // Generate each service + // Generate each service and function + const generateServices = this.options.services ?? true; const services = [...this.services.values()]; for (const service of services) { - this.write('service', service, service.fileName, 'services'); + if (generateServices) { + this.write('service', service, service.fileName, 'services'); + } + for (const op of service.operations) { + for (const variant of op.variants) { + this.write('fn', variant, variant.importFile, variant.importPath); + } + } } // Context object passed to general templates @@ -96,21 +104,26 @@ export class NgOpenApiGen { this.write('configuration', general, this.globals.configurationFile); this.write('response', general, this.globals.responseFile); this.write('requestBuilder', general, this.globals.requestBuilderFile); - this.write('baseService', general, this.globals.baseServiceFile); - if (this.globals.moduleClass && this.globals.moduleFile) { + if (generateServices) { + this.write('baseService', general, this.globals.baseServiceFile); + } + if (this.globals.apiServiceFile) { + this.write('apiService', general, this.globals.apiServiceFile); + } + if (generateServices && this.globals.moduleClass && this.globals.moduleFile) { this.write('module', general, this.globals.moduleFile); } - const modelImports = this.globals.modelIndexFile || this.options.indexFile - ? models.map(m => new Import(m.name, './models', m.options)) : null; + + const modelIndex = this.globals.modelIndexFile || this.options.indexFile ? new ModelIndex(models, this.options) : null; if (this.globals.modelIndexFile) { - this.write('modelIndex', { ...general, modelImports }, this.globals.modelIndexFile); + this.write('modelIndex', { ...general, modelIndex }, this.globals.modelIndexFile); } - if (this.globals.serviceIndexFile) { + if (generateServices && this.globals.serviceIndexFile) { this.write('serviceIndex', general, this.globals.serviceIndexFile); } if (this.options.indexFile) { - this.write('index', { ...general, modelImports }, 'index'); + this.write('index', { ...general, modelIndex }, 'index'); } // Now synchronize the temp to the output folder @@ -249,7 +262,18 @@ export class NgOpenApiGen { const usedNames = new Set(); for (const service of this.services.values()) { for (const imp of service.imports) { - usedNames.add(imp.name); + if (imp.path.includes('/models/')) { + usedNames.add(imp.typeName); + } + } + for (const op of service.operations) { + for (const variant of op.variants) { + for (const imp of variant.imports) { + if (imp.path.includes('/models/')) { + usedNames.add(imp.typeName); + } + } + } } for (const imp of service.additionalDependencies) { usedNames.add(imp); diff --git a/lib/operation-variant.ts b/lib/operation-variant.ts index 2f0a5d1..81f8f51 100644 --- a/lib/operation-variant.ts +++ b/lib/operation-variant.ts @@ -1,13 +1,16 @@ +import { upperFirst } from 'lodash'; +import { SchemaObject } from 'openapi3-ts'; import { Content } from './content'; +import { GenType } from './gen-type'; +import { fileName, resolveRef, tsComments } from './gen-utils'; +import { Importable } from './importable'; import { Operation } from './operation'; import { Options } from './options'; -import { resolveRef, tsComments } from './gen-utils'; -import { SchemaObject } from 'openapi3-ts'; /** * An operation has a variant per distinct possible body content */ -export class OperationVariant { +export class OperationVariant extends GenType implements Importable { responseMethodName: string; resultType: string; responseType: string; @@ -19,12 +22,22 @@ export class OperationVariant { responseMethodTsComments: string; bodyMethodTsComments: string; + paramsType: string; + paramsImport: Importable; + + importName: string; + importPath: string; + importFile: string; + constructor( public operation: Operation, public methodName: string, public requestBody: Content | null, public successResponse: Content | null, public options: Options) { + + super(methodName, n => n, options); + this.responseMethodName = `${methodName}$Response`; if (successResponse) { this.resultType = successResponse.type; @@ -41,6 +54,29 @@ export class OperationVariant { this.isOther = !this.isVoid && !this.isNumber && !this.isBoolean; this.responseMethodTsComments = tsComments(this.responseMethodDescription(), 1, operation.deprecated); this.bodyMethodTsComments = tsComments(this.bodyMethodDescription(), 1, operation.deprecated); + + this.importPath = 'fn/' + fileName(this.operation.tags[0] || options.defaultTag || 'operations'); + this.importName = methodName; + this.importFile = fileName(methodName); + + this.paramsType = `${upperFirst(methodName)}$Params`; + this.paramsImport = { + importName: this.paramsType, + importFile: this.importFile, + importPath: this.importPath + }; + + // Collect parameter imports + for (const parameter of this.operation.parameters) { + this.collectImports(parameter.spec.schema, false, true); + } + // Collect the request body imports + this.collectImports(this.requestBody?.spec?.schema); + // Collect the response imports + this.collectImports(this.successResponse?.spec?.schema); + + // Finally, update the imports + this.updateImports(); } private inferResponseType(successResponse: Content, operation: Operation, { customizedResponseType = {} }: Pick): string { @@ -101,4 +137,12 @@ To access the full response (for headers, for example), \`${this.responseMethodN : 'doesn\'t expect any request body'; return `\n\nThis method ${sends}${handles}.`; } + + protected skipImport(): boolean { + return false; + } + + protected initPathToRoot(): string { + return this.importPath.split(/\//g).map(() => '..').join('/') + '/'; + } } diff --git a/lib/operation.ts b/lib/operation.ts index dfaac9b..6249568 100644 --- a/lib/operation.ts +++ b/lib/operation.ts @@ -2,13 +2,13 @@ import { last, upperFirst } from 'lodash'; import { ContentObject, MediaTypeObject, OpenAPIObject, OperationObject, ParameterObject, PathItemObject, ReferenceObject, RequestBodyObject, ResponseObject, SecurityRequirementObject, SecuritySchemeObject } from 'openapi3-ts'; import { Content } from './content'; import { resolveRef, typeName } from './gen-utils'; +import { Logger } from './logger'; import { OperationVariant } from './operation-variant'; import { Options } from './options'; import { Parameter } from './parameter'; import { RequestBody } from './request-body'; import { Response } from './response'; import { Security } from './security'; -import { Logger } from './logger'; /** * An operation descriptor @@ -79,6 +79,11 @@ export class Operation { this.calculateVariants(); } + protected skipImport(): boolean { + // All models are imported + return false; + } + private collectParameters(params: (ParameterObject | ReferenceObject)[] | undefined): Parameter[] { const result: Parameter[] = []; if (params) { @@ -225,7 +230,7 @@ export class Operation { type = last(type.split('/')) as string; const plus = type.lastIndexOf('+'); if (plus >= 0) { - type = type.substr(plus + 1); + type = type.substring(plus + 1); } return this.options.skipJsonSuffix && type === 'json' ? '' : `$${typeName(type)}`; } else { diff --git a/lib/options.ts b/lib/options.ts index 8a056e4..475e782 100644 --- a/lib/options.ts +++ b/lib/options.ts @@ -35,6 +35,9 @@ export interface Options { /** When true, an 'index.ts' file will be generated, exporting all generated files */ indexFile?: boolean; + /** When false, no services will be generated (clients will use functions directly) */ + services?: boolean; + /** Prefix for generated service classes. Defaults to empty. */ servicePrefix?: string; @@ -56,6 +59,9 @@ export interface Options { /** Name for the base service class to generate. Defaults to 'BaseService'. */ baseService?: string; + /** Name for the service to call functions directly. Defaults to 'ApiService'. */ + apiService?: string; + /** Name for the request builder class to generate. Defaults to 'RequestBuilder'. */ requestBuilder?: string; diff --git a/lib/parameter.ts b/lib/parameter.ts index 3b2bf76..d5febc7 100644 --- a/lib/parameter.ts +++ b/lib/parameter.ts @@ -22,7 +22,7 @@ export class Parameter { this.name = spec.name; this.var = escapeId(this.name); this.varAccess = this.var.includes('\'') ? `[${this.var}]` : `.${this.var}`; - this.tsComments = tsComments(spec.description || '', 2, spec.deprecated); + this.tsComments = tsComments(spec.description || '', 0, spec.deprecated); this.in = spec.in || 'query'; this.required = this.in === 'path' || spec.required || false; this.type = tsType(spec.schema, options, openApi); diff --git a/lib/service.ts b/lib/service.ts index 9783c7a..df17949 100644 --- a/lib/service.ts +++ b/lib/service.ts @@ -20,33 +20,42 @@ export class Service extends GenType { // Collect the imports for (const operation of operations) { + operation.variants.forEach(variant => { + // Import the variant fn + this.addImport(variant); + // Import the variant parameters + this.addImport(variant.paramsImport); + // Import the variant result type + this.collectImports(variant.successResponse?.spec?.schema); + // Add the request body additional dependencies + this.collectImports(variant.requestBody?.spec?.schema, true); + }); + + // Add the parameters as additional dependencies for (const parameter of operation.parameters) { - this.collectImports(parameter.spec.schema, false, true); - } - for (const securityGroup of operation.security) { - securityGroup.forEach(security => this.collectImports(security.spec.schema)); + this.collectImports(parameter.spec.schema, true); } - if (operation.requestBody) { - for (const content of operation.requestBody.content) { - this.collectImports(content.spec.schema); + + // Add the responses imports as additional dependencies + for (const resp of operation.allResponses) { + for (const content of resp.content ?? []) { + this.collectImports(content.spec?.schema, true); } } - for (const response of operation.allResponses) { - const additional = response !== operation.successResponse; - for (const content of response.content) { - this.collectImports(content.spec.schema, additional, true); - } + + // Add the security group imports + for (const securityGroup of operation.security) { + securityGroup.forEach(security => this.collectImports(security.spec.schema)); } } this.updateImports(); } - protected pathToModels(): string { - return '../models/'; - } - protected skipImport(): boolean { - // All models are imported return false; } + + protected initPathToRoot(): string { + return '../'; + } } diff --git a/ng-openapi-gen-schema.json b/ng-openapi-gen-schema.json index 0a76fb4..fff54c4 100644 --- a/ng-openapi-gen-schema.json +++ b/ng-openapi-gen-schema.json @@ -64,6 +64,11 @@ } ] }, + "services": { + "description": "When set to false, no services will be generated, only operation functions. Disabling services also disables the module and service index.", + "default": true, + "type": "boolean" + }, "serviceIndex": { "description": "Typescript file, without '.ts' extension that exports all services. Set to false to skip. Defaults to `services`.", "default": "services", @@ -106,6 +111,11 @@ "type": "string", "default": "BaseService" }, + "apiService": { + "description": "Name for the service to call functions directly. By default is not generated.", + "type": "string", + "default": "" + }, "requestBuilder": { "description": "Name for the request builder class to generate. Defaults to 'RequestBuilder'.", "type": "string", diff --git a/package-lock.json b/package-lock.json index 7a594be..9770701 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,15 @@ { "name": "ng-openapi-gen", - "version": "0.25.1", + "version": "0.50.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "ng-openapi-gen", - "version": "0.25.1", + "version": "0.50.2", "license": "MIT", "dependencies": { - "@apidevtools/json-schema-ref-parser": "~9.1.2", + "@apidevtools/json-schema-ref-parser": "~9.0.9", "argparse": "^2.0.1", "eol": "^0.9.1", "fs-extra": "^10.0.1", @@ -42,7 +42,7 @@ "jasmine-ts": "^0.4.0", "mem": "^9.0.2", "ncp": "^2.0.0", - "nodemon": "^1.14.9", + "nodemon": "^3.0.1", "replace-in-file": "^7.0.1", "rimraf": "^5.0.1", "ts-node": "^10.9.1", @@ -79,9 +79,9 @@ } }, "node_modules/@apidevtools/json-schema-ref-parser": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-9.1.2.tgz", - "integrity": "sha512-r1w81DpR+KyRWd3f+rk6TNqMgedmAxZP5v5KWlXQWlgMUUtyEJch0DKEci1SorPMiSeM8XPl7MZ3miJ60JIpQg==", + "version": "9.0.9", + "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-9.0.9.tgz", + "integrity": "sha512-GBD2Le9w2+lVFoc4vswGI/TjkNIZSVp7+9xPf+X3uidBfWnAeUWmquteSyt0+VCrhNMWj/FTABISQrD3Z/YA+w==", "dependencies": { "@jsdevtools/ono": "^7.1.3", "@types/json-schema": "^7.0.6", @@ -843,15 +843,6 @@ "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/ansi-align": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-2.0.0.tgz", - "integrity": "sha512-TdlOggdA/zURfMYa7ABC66j+oqfMew58KpJMbUlH3bcZP1b+cBHIHDDn5uH9INsxrHBPjsqM0tDB4jPTF/vgJA==", - "dev": true, - "dependencies": { - "string-width": "^2.0.0" - } - }, "node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -877,155 +868,16 @@ } }, "node_modules/anymatch": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", - "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", - "dev": true, - "dependencies": { - "micromatch": "^3.1.4", - "normalize-path": "^2.1.1" - } - }, - "node_modules/anymatch/node_modules/braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "dev": true, - "dependencies": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/anymatch/node_modules/braces/node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", - "dev": true, - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/anymatch/node_modules/fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha512-VcpLTWqWDiTerugjj8e3+esbg+skS3M9e54UuR3iCeIDMXCLTsAH8hTSzDQU/X6/6t3eYkOKoZSef2PlU6U1XQ==", - "dev": true, - "dependencies": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/anymatch/node_modules/fill-range/node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", - "dev": true, - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/anymatch/node_modules/is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/anymatch/node_modules/is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg==", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/anymatch/node_modules/is-number/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/anymatch/node_modules/micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "dev": true, - "dependencies": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/anymatch/node_modules/normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha512-3pKJwH184Xo/lnH6oyP1q2pMd7HcypqqmRs91/6/i2CGtWwIKGCkOOMTm/zXbgTEWHw1uNpNi/igc3ePOYHb6w==", - "dev": true, - "dependencies": { - "remove-trailing-separator": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/anymatch/node_modules/to-regex-range": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha512-ZZWNfCjUokXXDGXFpZehJIkZqq91BcULFq/Pi7M5i4JnxXdhMKAK682z8bCW3o8Hj1wuuzoKcW3DfVzaP6VuNg==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, "dependencies": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" }, "engines": { - "node": ">=0.10.0" + "node": ">= 8" } }, "node_modules/are-docs-informative": { @@ -1048,33 +900,6 @@ "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" }, - "node_modules/arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/arr-union": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/array-union": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", @@ -1084,190 +909,19 @@ "node": ">=8" } }, - "node_modules/array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/assign-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/async-each": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.6.tgz", - "integrity": "sha512-c646jH1avxr+aVpndVMeAfYw7wAa6idufrlN3LPA4PmKS0QEGp6PIC9nwz0WQkkvBGAMEki3pFdtxaF39J9vvg==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ] - }, - "node_modules/atob": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", - "dev": true, - "bin": { - "atob": "bin/atob.js" - }, - "engines": { - "node": ">= 4.5.0" - } - }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, - "node_modules/base": { - "version": "0.11.2", - "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", - "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", - "dev": true, - "dependencies": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/base/node_modules/define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", - "dev": true, - "dependencies": { - "is-descriptor": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/binary-extensions": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", - "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/bindings": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", - "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", - "dev": true, - "optional": true, - "dependencies": { - "file-uri-to-path": "1.0.0" - } - }, - "node_modules/boxen": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-1.3.0.tgz", - "integrity": "sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw==", - "dev": true, - "dependencies": { - "ansi-align": "^2.0.0", - "camelcase": "^4.0.0", - "chalk": "^2.0.1", - "cli-boxes": "^1.0.0", - "string-width": "^2.0.0", - "term-size": "^1.2.0", - "widest-line": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/boxen/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/boxen/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/boxen/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/boxen/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "node_modules/boxen/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", "dev": true, "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/boxen/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/boxen/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" + "node": ">=8" } }, "node_modules/brace-expansion": { @@ -1304,26 +958,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/cache-base": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", - "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", - "dev": true, - "dependencies": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/call-me-maybe": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.2.tgz", @@ -1338,27 +972,6 @@ "node": ">=6" } }, - "node_modules/camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha512-FxAv7HpHrXbh3aPo4o2qxHay2lkLY3x5Mw3KeE4KQE8ysVfziWeRZDwcjauvwBSGEC/nXUPzZy8zeh4HokqOnw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/capture-stack-trace": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.2.tgz", - "integrity": "sha512-X/WM2UQs6VMHUtjUDnZTRI+i1crWteJySFzr9UpGoQa4WQffXVTTXuekjl7TjZRlcF2XfjgITT0HxZ9RnxeT0w==", - "dev": true, - "engines": { - "node": ">=0.10.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -1376,255 +989,42 @@ } }, "node_modules/chokidar": { - "version": "2.1.8", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", - "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", - "deprecated": "Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies", - "dev": true, - "dependencies": { - "anymatch": "^2.0.0", - "async-each": "^1.0.1", - "braces": "^2.3.2", - "glob-parent": "^3.1.0", - "inherits": "^2.0.3", - "is-binary-path": "^1.0.0", - "is-glob": "^4.0.0", - "normalize-path": "^3.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.2.1", - "upath": "^1.1.1" - }, - "optionalDependencies": { - "fsevents": "^1.2.7" - } - }, - "node_modules/chokidar/node_modules/braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "dev": true, - "dependencies": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/chokidar/node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", - "dev": true, - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/chokidar/node_modules/fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha512-VcpLTWqWDiTerugjj8e3+esbg+skS3M9e54UuR3iCeIDMXCLTsAH8hTSzDQU/X6/6t3eYkOKoZSef2PlU6U1XQ==", - "dev": true, - "dependencies": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/chokidar/node_modules/glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha512-E8Ak/2+dZY6fnzlR7+ueWvhsH1SjHr4jjss4YS/h4py44jY9MhK/VFdaZJAWDz6BbL21KeteKxFSFpq8OS5gVA==", - "dev": true, - "dependencies": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - } - }, - "node_modules/chokidar/node_modules/glob-parent/node_modules/is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha512-UFpDDrPgM6qpnFNI+rh/p3bUaq9hKLZN8bMUWzxmcnZVS3omf4IPK+BrewlnWjO1WmUsMYuSjKh4UJuV4+Lqmw==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/chokidar/node_modules/is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/chokidar/node_modules/is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg==", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/chokidar/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/chokidar/node_modules/to-regex-range": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha512-ZZWNfCjUokXXDGXFpZehJIkZqq91BcULFq/Pi7M5i4JnxXdhMKAK682z8bCW3o8Hj1wuuzoKcW3DfVzaP6VuNg==", - "dev": true, - "dependencies": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/ci-info": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.6.0.tgz", - "integrity": "sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A==", - "dev": true - }, - "node_modules/class-utils": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", - "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", - "dev": true, - "dependencies": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/class-utils/node_modules/define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", - "dev": true, - "dependencies": { - "is-descriptor": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/class-utils/node_modules/is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A==", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/class-utils/node_modules/is-accessor-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/class-utils/node_modules/is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg==", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/class-utils/node_modules/is-data-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], "dependencies": { - "is-buffer": "^1.1.5" + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" }, "engines": { - "node": ">=0.10.0" + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" } }, - "node_modules/class-utils/node_modules/is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "node_modules/chokidar/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" + "is-glob": "^4.0.1" }, "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/class-utils/node_modules/kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/cli-boxes": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-1.0.0.tgz", - "integrity": "sha512-3Fo5wu8Ytle8q9iCzS4D2MWVL2X7JVWRiS1BnXbTFDhS9c/REkM9vd1AmabsoZoY5/dGi5TT9iKL8Kb6DeBRQg==", - "dev": true, - "engines": { - "node": ">=0.10.0" + "node": ">= 6" } }, "node_modules/cliui": { @@ -1664,19 +1064,6 @@ "node": ">=8" } }, - "node_modules/collection-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", - "integrity": "sha512-lNkKvzEeMBBjUGHZ+q6z9pSJla0KWAQPvtzhEV9+iGyQYG+pBpl7xKDhxoNSOZH2hhv0v5k0y2yAM4o4SjoSkw==", - "dev": true, - "dependencies": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -1720,62 +1107,12 @@ "node": ">= 12.0.0" } }, - "node_modules/component-emitter": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", - "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", - "dev": true - }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, - "node_modules/configstore": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.5.tgz", - "integrity": "sha512-nlOhI4+fdzoK5xmJ+NY+1gZK56bwEaWZr8fYuXohZ9Vkc1o3a4T/R3M+yE/w7x/ZVJ1zF8c+oaOvF0dztdUgmA==", - "dev": true, - "dependencies": { - "dot-prop": "^4.2.1", - "graceful-fs": "^4.1.2", - "make-dir": "^1.0.0", - "unique-string": "^1.0.0", - "write-file-atomic": "^2.0.0", - "xdg-basedir": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/copy-descriptor": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha512-XgZ0pFcakEUlbwQEVNg3+QAis1FyTL3Qel9FYy8pSkQqoG3PNoT0bOCQtOXcOkur21r2Eq2kI+IE+gsmAEVlYw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/core-util-is": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", - "dev": true - }, - "node_modules/create-error-class": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz", - "integrity": "sha512-gYTKKexFO3kh200H1Nit76sRwRtOY32vQd3jpAQKpLtZqyNsSQNfI4N7o3eP2wUjV35pTWKRYqFUDBvUha/Pkw==", - "dev": true, - "dependencies": { - "capture-stack-trace": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/create-require": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", @@ -1796,15 +1133,6 @@ "node": ">= 8" } }, - "node_modules/crypto-random-string": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz", - "integrity": "sha512-GsVpkFPlycH7/fRR7Dhcmnoii54gV1nz7y4CWyeFS14N+JVBBhY+r8amRHE4BwSYal7BPTDp8isvAlCxyFt3Hg==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -1822,43 +1150,12 @@ } } }, - "node_modules/decode-uri-component": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", - "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", - "dev": true, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "dev": true, - "engines": { - "node": ">=4.0.0" - } - }, "node_modules/deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, - "node_modules/define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", - "dev": true, - "dependencies": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/diff": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", @@ -1892,24 +1189,6 @@ "node": ">=6.0.0" } }, - "node_modules/dot-prop": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.1.tgz", - "integrity": "sha512-l0p4+mIuJIua0mhxGoh4a+iNL9bmeK5DvnSVQa6T0OhrVmaEa1XScX5Etc673FePCJOArq/4Pa2cLGODUWTPOQ==", - "dev": true, - "dependencies": { - "is-obj": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/duplexer3": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.5.tgz", - "integrity": "sha512-1A8za6ws41LQgv9HrE/66jyC5yuSjQ3L/KOpFtoBilsAK2iA2wuS5rTt1OCzIvtS2V7nVmedsUU+DGRcjBmOYA==", - "dev": true - }, "node_modules/eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", @@ -2168,286 +1447,6 @@ "node": ">=0.10.0" } }, - "node_modules/execa": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", - "integrity": "sha512-RztN09XglpYI7aBBrJCPW95jEH7YF1UEPOoX9yDhUTPdp7mK+CQvnLTuD10BNXZ3byLTu2uehZ8EcKT/4CGiFw==", - "dev": true, - "dependencies": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/execa/node_modules/cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==", - "dev": true, - "dependencies": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "node_modules/execa/node_modules/lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", - "dev": true, - "dependencies": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "node_modules/execa/node_modules/shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", - "dev": true, - "dependencies": { - "shebang-regex": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/execa/node_modules/shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/execa/node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" - } - }, - "node_modules/execa/node_modules/yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==", - "dev": true - }, - "node_modules/expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha512-w/ozOKR9Obk3qoWeY/WDi6MFta9AoMR+zud60mdnbniMcBxRuFJyDt2LdX/14A1UABeqk+Uk+LDfUpvoGKppZA==", - "dev": true, - "dependencies": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/expand-brackets/node_modules/define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", - "dev": true, - "dependencies": { - "is-descriptor": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", - "dev": true, - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A==", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/is-accessor-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg==", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/is-data-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "node_modules/extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", - "dev": true, - "dependencies": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", - "dev": true, - "dependencies": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/extglob/node_modules/define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", - "dev": true, - "dependencies": { - "is-descriptor": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/extglob/node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", - "dev": true, - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/extglob/node_modules/is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -2515,13 +1514,6 @@ "node": "^10.12.0 || >=12.0.0" } }, - "node_modules/file-uri-to-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", - "dev": true, - "optional": true - }, "node_modules/fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -2584,15 +1576,6 @@ "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", "dev": true }, - "node_modules/for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/foreground-child": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", @@ -2621,18 +1604,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha512-GMBAbW9antB8iZRHLoGw0b3HANt57diZYFO/HL1JGIC1MjKrdmhxvrJbupnVvpys0zsz7yBApXdQyfepKly2kA==", - "dev": true, - "dependencies": { - "map-cache": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/fs-extra": { "version": "10.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", @@ -2653,22 +1624,17 @@ "dev": true }, "node_modules/fsevents": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", - "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", - "deprecated": "The v1 package contains DANGEROUS / INSECURE binaries. Upgrade to safe fsevents v2", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, "hasInstallScript": true, "optional": true, "os": [ "darwin" ], - "dependencies": { - "bindings": "^1.5.0", - "nan": "^2.12.1" - }, "engines": { - "node": ">= 4.0" + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, "node_modules/function-bind": { @@ -2687,24 +1653,6 @@ "node": "6.* || 8.* || >= 10.*" } }, - "node_modules/get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha512-GlhdIUuVakc8SJ6kK0zAFbiGzRFzNnY4jUuEbV9UROo4Y+0Ny4fjvcZFVTeDA4odpFyOQzaw6hXukJSq/f28sQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/get-value": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha512-Ln0UQDlxH1BapMu3GPtf7CuYNwRZf2gwCuPqbyG6pB8WfmFpzqcy4xtAaAMUhnNqjMKTiCPZG2oMT3YSx8U2NA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/glob": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", @@ -2737,18 +1685,6 @@ "node": ">=10.13.0" } }, - "node_modules/global-dirs": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz", - "integrity": "sha512-NknMLn7F2J7aflwFOlGdNIuCDpN3VGoSoB+aap3KABFWbHVn1TCgFC+np23J8W2BiZbjfEw3BFBycSMv1AFblg==", - "dev": true, - "dependencies": { - "ini": "^1.3.4" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/globals": { "version": "13.20.0", "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", @@ -2784,28 +1720,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/got": { - "version": "6.7.1", - "resolved": "https://registry.npmjs.org/got/-/got-6.7.1.tgz", - "integrity": "sha512-Y/K3EDuiQN9rTZhBvPRWMLXIKdeD1Rj0nzunfoi0Yyn5WBEbzxXKU9Ub2X41oZBagVWOBU3MuDonFMgPWQFnwg==", - "dev": true, - "dependencies": { - "create-error-class": "^3.0.0", - "duplexer3": "^0.1.4", - "get-stream": "^3.0.0", - "is-redirect": "^1.0.0", - "is-retry-allowed": "^1.0.0", - "is-stream": "^1.0.0", - "lowercase-keys": "^1.0.0", - "safe-buffer": "^5.0.1", - "timed-out": "^4.0.0", - "unzip-response": "^2.0.1", - "url-parse-lax": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", @@ -2865,69 +1779,6 @@ "node": ">=8" } }, - "node_modules/has-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", - "integrity": "sha512-IBXk4GTsLYdQ7Rvt+GRBrFSVEkmuOUy4re0Xjd9kJSUQpnTrWR4/y9RpfexN9vkAPMFuQoeWKwqzPozRTlasGw==", - "dev": true, - "dependencies": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/has-values": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", - "integrity": "sha512-ODYZC64uqzmtfGMEAX/FvZiRyWLpAC3vYnNunURUnkGVTS+mI0smVsWaPydRBsE3g+ok7h960jChO8mFcWlHaQ==", - "dev": true, - "dependencies": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/has-values/node_modules/is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg==", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/has-values/node_modules/is-number/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/has-values/node_modules/kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha512-24XsCxmEbRwEDbz/qz3stgin8TTzZ1ESR56OMCN0ujYg+vRutNSiOj9bHH9u85DKgXguraugV5sFuvbD4FW/hw==", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/ignore": { "version": "5.2.4", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", @@ -2959,15 +1810,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/import-lazy": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", - "integrity": "sha512-m7ZEHgtw69qOGw+jwxXkHlrlIPdTGkyh66zXZ1ajZbxkDBNjSY/LGbmjc7h0s2ELsUDTAhFr55TrPSSqJGPG0A==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", @@ -2993,42 +1835,18 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, - "node_modules/ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "dev": true - }, - "node_modules/is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "dependencies": { - "kind-of": "^6.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-binary-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", - "integrity": "sha512-9fRVlXc0uCxEDj1nQzaWONSpbTfx0FmJfzHF7pwlI8DkWGoHBBea4Pg5Ky0ojwwxQmnSifgbKkI06Qv0Ljgj+Q==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dev": true, "dependencies": { - "binary-extensions": "^1.0.0" + "binary-extensions": "^2.0.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, - "node_modules/is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, "node_modules/is-builtin-module": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.1.tgz", @@ -3044,18 +1862,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-ci": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.2.1.tgz", - "integrity": "sha512-s6tfsaQaQi3JNciBH6shVqEDvhGut0SUXr31ag8Pd8BBbVVlcGfWhpPmEOoM6RJ5TFhbypvf5yyRw/VXW1IiWg==", - "dev": true, - "dependencies": { - "ci-info": "^1.5.0" - }, - "bin": { - "is-ci": "bin.js" - } - }, "node_modules/is-core-module": { "version": "2.12.1", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.1.tgz", @@ -3069,44 +1875,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "dependencies": { - "kind-of": "^6.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "dependencies": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "dependencies": { - "is-plain-object": "^2.0.4" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -3116,15 +1884,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -3137,40 +1896,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-installed-globally": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.1.0.tgz", - "integrity": "sha512-ERNhMg+i/XgDwPIPF3u24qpajVreaiSuvpb1Uu0jugw7KKcxGyCX8cgp8P5fwTmAuXku6beDHHECdKArjlg7tw==", - "dev": true, - "dependencies": { - "global-dirs": "^0.1.0", - "is-path-inside": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/is-installed-globally/node_modules/is-path-inside": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", - "integrity": "sha512-qhsCR/Esx4U4hg/9I19OVUAJkGWtjRYHMRgUMZE2TDdj+Ag+kttZanLupfddNyglzz50cUlmWzUaI37GDfNx/g==", - "dev": true, - "dependencies": { - "path-is-inside": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-npm": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-1.0.0.tgz", - "integrity": "sha512-9r39FIr3d+KD9SbX0sfMsHzb5PP3uimOiwr3YupUaUFG4W0l1U57Rx3utpttV7qz5U3jmrO5auUa04LU9pyHsg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -3180,15 +1905,6 @@ "node": ">=0.12.0" } }, - "node_modules/is-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", - "integrity": "sha512-l4RyHgRqGN4Y3+9JHVrNqO+tN0rV5My76uW5/nuO4K1b6vw5G8d/cmFjP9tRfEsdhZNt0IFdZuK/c2Vr4Nb+Qg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-path-inside": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", @@ -3198,75 +1914,12 @@ "node": ">=8" } }, - "node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-redirect": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz", - "integrity": "sha512-cr/SlUEe5zOGmzvj9bUyC4LVvkNVAXu4GytXLNMr1pny+a65MpQ9IJzFHD5vi7FyJgb4qt27+eS3TuQnqB+RQw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-retry-allowed": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz", - "integrity": "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", - "dev": true - }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "dev": true }, - "node_modules/isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/jackspeak": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.2.1.tgz", @@ -3396,27 +2049,6 @@ "graceful-fs": "^4.1.6" } }, - "node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/latest-version": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-3.1.0.tgz", - "integrity": "sha512-Be1YRHWWlZaSsrz2U+VInk+tO0EwLIyV+23RhWLINJYwg/UIikxjlj3MhH37/6/EDCAusjajvMkMMUXRaMWl/w==", - "dev": true, - "dependencies": { - "package-json": "^4.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", @@ -3462,15 +2094,6 @@ "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, - "node_modules/lowercase-keys": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", - "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -3483,18 +2106,6 @@ "node": ">=10" } }, - "node_modules/make-dir": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", - "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", - "dev": true, - "dependencies": { - "pify": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/make-error": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", @@ -3513,27 +2124,6 @@ "node": ">=6" } }, - "node_modules/map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/map-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", - "integrity": "sha512-4y7uGv8bd2WdM9vpQsiQNo41Ln1NvhvDRuVt0k2JZQ+ezN2uaQes7lZeZ+QQUHOLQAtDaBJ+7wCbi+ab/KFs+w==", - "dev": true, - "dependencies": { - "object-visit": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/mem": { "version": "9.0.2", "resolved": "https://registry.npmjs.org/mem/-/mem-9.0.2.tgz", @@ -3613,19 +2203,6 @@ "node": ">=16 || 14 >=14.17" } }, - "node_modules/mixin-deep": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", - "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", - "dev": true, - "dependencies": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/mkdirp": { "version": "0.5.6", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", @@ -3645,35 +2222,6 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, - "node_modules/nan": { - "version": "2.17.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz", - "integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==", - "dev": true, - "optional": true - }, - "node_modules/nanomatch": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", - "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", - "dev": true, - "dependencies": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -3701,28 +2249,31 @@ "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" }, "node_modules/nodemon": { - "version": "1.19.4", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-1.19.4.tgz", - "integrity": "sha512-VGPaqQBNk193lrJFotBU8nvWZPqEZY2eIzymy2jjY0fJ9qIsxA0sxQ8ATPl0gZC645gijYEc1jtZvpS8QWzJGQ==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.0.1.tgz", + "integrity": "sha512-g9AZ7HmkhQkqXkRc20w+ZfQ73cHLbE8hnPbtaFbFtCumZsjyMhKk9LajQ07U5Ux28lvFjZ5X7HvWR1xzU8jHVw==", "dev": true, - "hasInstallScript": true, "dependencies": { - "chokidar": "^2.1.8", - "debug": "^3.2.6", + "chokidar": "^3.5.2", + "debug": "^3.2.7", "ignore-by-default": "^1.0.1", - "minimatch": "^3.0.4", - "pstree.remy": "^1.1.7", - "semver": "^5.7.1", + "minimatch": "^3.1.2", + "pstree.remy": "^1.1.8", + "semver": "^7.5.3", + "simple-update-notifier": "^2.0.0", "supports-color": "^5.5.0", "touch": "^3.1.0", - "undefsafe": "^2.0.2", - "update-notifier": "^2.5.0" + "undefsafe": "^2.0.5" }, "bin": { "nodemon": "bin/nodemon.js" }, "engines": { - "node": ">=4" + "node": ">=10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/nodemon" } }, "node_modules/nodemon/node_modules/debug": { @@ -3743,15 +2294,6 @@ "node": ">=4" } }, - "node_modules/nodemon/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, "node_modules/nodemon/node_modules/supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -3788,136 +2330,6 @@ "node": ">=0.10.0" } }, - "node_modules/npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha512-lJxZYlT4DW/bRUtFh1MQIWqmLwQfAxnqWG4HhEdjMlkrJYnJn0Jrr2u3mgxqaWsdiBc76TYkTG/mhrnYTuzfHw==", - "dev": true, - "dependencies": { - "path-key": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/npm-run-path/node_modules/path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/object-copy": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", - "integrity": "sha512-79LYn6VAb63zgtmAteVOWo9Vdj71ZVBy3Pbse+VqxDpEP83XuujMrGqHIwAXJ5I/aM0zU7dIyIAhifVTPrNItQ==", - "dev": true, - "dependencies": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy/node_modules/define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", - "dev": true, - "dependencies": { - "is-descriptor": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy/node_modules/is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A==", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy/node_modules/is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg==", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy/node_modules/is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy/node_modules/is-descriptor/node_modules/kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-visit": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", - "integrity": "sha512-GBaMwwAVK9qbQN3Scdo0OyvgPW7l3lnaVMj84uTOZlswkX0KpF6fyDBJhtTthf7pymztoN36/KEr1DyhF96zEA==", - "dev": true, - "dependencies": { - "isobject": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==", - "dev": true, - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -3959,15 +2371,6 @@ "node": ">=4" } }, - "node_modules/p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -3998,30 +2401,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/package-json": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/package-json/-/package-json-4.0.1.tgz", - "integrity": "sha512-q/R5GrMek0vzgoomq6rm9OX+3PQve8sLwTirmK30YB3Cu0Bbt9OX9M/SIUnroN5BGJkzwGsFwDaRGD9EwBOlCA==", - "dev": true, - "dependencies": { - "got": "^6.7.1", - "registry-auth-token": "^3.0.1", - "registry-url": "^3.0.3", - "semver": "^5.1.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/package-json/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -4034,21 +2413,6 @@ "node": ">=6" } }, - "node_modules/pascalcase": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", - "integrity": "sha512-XHXfu/yOQRy9vYOtUDVMN60OEJjW013GoObG1o+xwQTpB9eYJX/BjXMsdW13ZDPruFhYYn0AG22w0xgQMwl3Nw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-dirname": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", - "integrity": "sha512-ALzNPpyNq9AqXMBjeymIjFDAkAFH06mHJH/cSBHAgU0s4vfpBn6b2nf8tiRLvagKD8RbTpq2FKTBg7cl9l3c7Q==", - "dev": true - }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -4067,12 +2431,6 @@ "node": ">=0.10.0" } }, - "node_modules/path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==", - "dev": true - }, "node_modules/path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", @@ -4135,24 +2493,6 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/posix-character-classes": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -4162,27 +2502,6 @@ "node": ">= 0.8.0" } }, - "node_modules/prepend-http": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", - "integrity": "sha512-PhmXi5XmoyKw1Un4E+opM2KcsJInDvKyuOumcjjw3waw86ZNjHwVUOOWLc4bCzLdcKNaWBH9e99sbWzDQsVaYg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true - }, - "node_modules/pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==", - "dev": true - }, "node_modules/pstree.remy": { "version": "1.1.8", "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", @@ -4218,246 +2537,16 @@ } ] }, - "node_modules/rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "dev": true, - "dependencies": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "bin": { - "rc": "cli.js" - } - }, - "node_modules/rc/node_modules/strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, "node_modules/readdirp": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", - "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.11", - "micromatch": "^3.1.10", - "readable-stream": "^2.0.2" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/readdirp/node_modules/braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "dev": true, - "dependencies": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/readdirp/node_modules/braces/node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", - "dev": true, - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/readdirp/node_modules/fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha512-VcpLTWqWDiTerugjj8e3+esbg+skS3M9e54UuR3iCeIDMXCLTsAH8hTSzDQU/X6/6t3eYkOKoZSef2PlU6U1XQ==", - "dev": true, - "dependencies": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/readdirp/node_modules/fill-range/node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", - "dev": true, - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/readdirp/node_modules/is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/readdirp/node_modules/is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg==", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/readdirp/node_modules/is-number/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/readdirp/node_modules/micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "dev": true, - "dependencies": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/readdirp/node_modules/to-regex-range": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha512-ZZWNfCjUokXXDGXFpZehJIkZqq91BcULFq/Pi7M5i4JnxXdhMKAK682z8bCW3o8Hj1wuuzoKcW3DfVzaP6VuNg==", - "dev": true, - "dependencies": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/regex-not": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", - "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", - "dev": true, - "dependencies": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/registry-auth-token": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.4.0.tgz", - "integrity": "sha512-4LM6Fw8eBQdwMYcES4yTnn2TqIasbXuwDx3um+QRs7S55aMKCBKBxvPXl2RiUjHwuJLTyYfxSpmfSAjQpcuP+A==", - "dev": true, - "dependencies": { - "rc": "^1.1.6", - "safe-buffer": "^5.0.1" - } - }, - "node_modules/registry-url": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz", - "integrity": "sha512-ZbgR5aZEdf4UKZVBPYIgaglBmSF2Hi94s2PcIHhRGFjKYu+chjJdYfHn4rt3hB6eCKLJ8giVIIfgMa1ehDfZKA==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, "dependencies": { - "rc": "^1.0.1" + "picomatch": "^2.2.1" }, "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/remove-trailing-separator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha512-/hS+Y0u3aOfIETiaiirUFwDBDzmXPvO+jAfKTitUngIPzdKc6Z0LoFjM/CK5PL4C+eKwHohlHAb6H0VFfmmUsw==", - "dev": true - }, - "node_modules/repeat-element": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz", - "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", - "dev": true, - "engines": { - "node": ">=0.10" + "node": ">=8.10.0" } }, "node_modules/replace-in-file": { @@ -4553,22 +2642,6 @@ "node": ">=4" } }, - "node_modules/resolve-url": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg==", - "deprecated": "https://github.com/lydell/resolve-url#deprecated", - "dev": true - }, - "node_modules/ret": { - "version": "0.1.15", - "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", - "dev": true, - "engines": { - "node": ">=0.12" - } - }, "node_modules/reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", @@ -4675,21 +2748,6 @@ "tslib": "^2.1.0" } }, - "node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "node_modules/safe-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", - "integrity": "sha512-aJXcif4xnaNUzvUuC5gcb46oTS7zvg4jpMTnuqtrEPlR3vFr4pxtdTwaF1Qs3Enjn9HK+ZlwQui+a7z0SywIzg==", - "dev": true, - "dependencies": { - "ret": "~0.1.10" - } - }, "node_modules/semver": { "version": "7.5.3", "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", @@ -4705,63 +2763,6 @@ "node": ">=10" } }, - "node_modules/semver-diff": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-2.1.0.tgz", - "integrity": "sha512-gL8F8L4ORwsS0+iQ34yCYv///jsOq0ZL7WP55d1HnJ32o7tyFYEFQZQA22mrLIacZdU6xecaBBZ+uEiffGNyXw==", - "dev": true, - "dependencies": { - "semver": "^5.0.3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/semver-diff/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/set-value": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", - "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", - "dev": true, - "dependencies": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/set-value/node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", - "dev": true, - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/set-value/node_modules/is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -4780,408 +2781,66 @@ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, "engines": { - "node": ">=8" - } - }, - "node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true - }, - "node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/snapdragon": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", - "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", - "dev": true, - "dependencies": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", - "dev": true, - "dependencies": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon-node/node_modules/define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", - "dev": true, - "dependencies": { - "is-descriptor": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon-util": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", - "dev": true, - "dependencies": { - "kind-of": "^3.2.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon-util/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/snapdragon/node_modules/define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", - "dev": true, - "dependencies": { - "is-descriptor": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", - "dev": true, - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A==", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/is-accessor-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg==", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/is-data-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "node_modules/snapdragon/node_modules/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-resolve": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", - "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", - "deprecated": "See https://github.com/lydell/source-map-resolve#deprecated", - "dev": true, - "dependencies": { - "atob": "^2.1.2", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } - }, - "node_modules/source-map-url": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", - "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==", - "deprecated": "See https://github.com/lydell/source-map-url#deprecated", - "dev": true - }, - "node_modules/spdx-exceptions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", - "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", - "dev": true - }, - "node_modules/spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", - "dev": true, - "dependencies": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-license-ids": { - "version": "3.0.13", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.13.tgz", - "integrity": "sha512-XkD+zwiqXHikFZm4AX/7JSCXA98U5Db4AFd5XUg/+9UNtnH75+Z9KxtpYiJZx36mUDVOwH83pl7yvCer6ewM3w==", - "dev": true - }, - "node_modules/split-string": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", - "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", - "dev": true, - "dependencies": { - "extend-shallow": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true, - "peer": true - }, - "node_modules/static-extend": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", - "integrity": "sha512-72E9+uLc27Mt718pMHt9VMNiAL4LMsmDbBva8mxWUCkT07fSzEGMYUCk0XWY6lp0j6RBAG4cJ3mWuZv2OE3s0g==", - "dev": true, - "dependencies": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", - "dev": true, - "dependencies": { - "is-descriptor": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A==", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/is-accessor-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg==", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, - "node_modules/static-extend/node_modules/is-data-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "node_modules/simple-update-notifier": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz", + "integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==", "dev": true, "dependencies": { - "is-buffer": "^1.1.5" + "semver": "^7.5.3" }, "engines": { - "node": ">=0.10.0" + "node": ">=10" } }, - "node_modules/static-extend/node_modules/is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true, - "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, - "node_modules/static-extend/node_modules/kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "engines": { "node": ">=0.10.0" } }, - "node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "node_modules/spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", + "dev": true + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", "dev": true, "dependencies": { - "safe-buffer": "~5.1.0" + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" } }, - "node_modules/string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "node_modules/spdx-license-ids": { + "version": "3.0.13", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.13.tgz", + "integrity": "sha512-XkD+zwiqXHikFZm4AX/7JSCXA98U5Db4AFd5XUg/+9UNtnH75+Z9KxtpYiJZx36mUDVOwH83pl7yvCer6ewM3w==", + "dev": true + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", "dev": true, - "dependencies": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - }, - "engines": { - "node": ">=4" - } + "peer": true }, "node_modules/string-width-cjs": { "name": "string-width", @@ -5207,27 +2866,6 @@ "node": ">=8" } }, - "node_modules/string-width/node_modules/ansi-regex": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", - "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/string-width/node_modules/strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", - "dev": true, - "dependencies": { - "ansi-regex": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -5253,15 +2891,6 @@ "node": ">=8" } }, - "node_modules/strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha512-7FCwGGmx8mD5xQd3RPUvnSpUXHM3BWuzjtpD4TXsfcZ9EL4azvVVUscFYwD9nx8Kh+uCBC00XBtAykoMHwTh8Q==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -5299,72 +2928,12 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/term-size": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/term-size/-/term-size-1.2.0.tgz", - "integrity": "sha512-7dPUZQGy/+m3/wjVz3ZW5dobSoD/02NxJpoXUX0WIyjfVS3l0c+b/+9phIDFA7FHzkYtwtMFgeGZ/Y8jVTeqQQ==", - "dev": true, - "dependencies": { - "execa": "^0.7.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true }, - "node_modules/timed-out": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", - "integrity": "sha512-G7r3AhovYtr5YKOWQkta8RKAPb+J9IsO4uVmzjl8AZwfhs8UcUwTiD6gcJYSgOtzyjvQKrKYn41syHbUWMkafA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/to-object-path": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", - "integrity": "sha512-9mWHdnGRuh3onocaHzukyvCZhzvr6tiflAy/JRFXcJX0TjgfWA9pk9t8CMbzmBE4Jfw58pXbkngtBtqYxzNEyg==", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/to-object-path/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/to-regex": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", - "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", - "dev": true, - "dependencies": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -5570,9 +3139,9 @@ } }, "node_modules/tslint/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, "peer": true, "bin": { @@ -5679,246 +3248,51 @@ "lodash-es": "^4.17.10", "tslib": "^1.9.3", "typescript": "^3.0.3" - } - }, - "node_modules/typescript-parser/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - }, - "node_modules/typescript-parser/node_modules/typescript": { - "version": "3.9.10", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz", - "integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "node_modules/uglify-js": { - "version": "3.17.4", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", - "integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==", - "optional": true, - "bin": { - "uglifyjs": "bin/uglifyjs" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/undefsafe": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", - "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", - "dev": true - }, - "node_modules/union-value": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", - "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", - "dev": true, - "dependencies": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^2.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/union-value/node_modules/is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/unique-string": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-1.0.0.tgz", - "integrity": "sha512-ODgiYu03y5g76A1I9Gt0/chLCzQjvzDy7DsZGsLOE/1MrF6wriEskSncj1+/C58Xk/kPZDppSctDybCwOSaGAg==", - "dev": true, - "dependencies": { - "crypto-random-string": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", - "engines": { - "node": ">= 10.0.0" - } - }, - "node_modules/unset-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", - "integrity": "sha512-PcA2tsuGSF9cnySLHTLSh2qrQiJ70mn+r+Glzxv2TWZblxsxCC52BDlZoPCsz7STd9pN7EZetkWZBAvk4cgZdQ==", - "dev": true, - "dependencies": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/unset-value/node_modules/has-value": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", - "integrity": "sha512-gpG936j8/MzaeID5Yif+577c17TxaDmhuyVgSwtnL/q8UUTySg8Mecb+8Cf1otgLoD7DDH75axp86ER7LFsf3Q==", - "dev": true, - "dependencies": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/unset-value/node_modules/has-value/node_modules/isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha512-+OUdGJlgjOBZDfxnDjYYG6zp487z0JGNQq3cYQYg5f5hKR+syHMsaztzGeml/4kGG55CSpKSpWTY+jYGgsHLgA==", - "dev": true, - "dependencies": { - "isarray": "1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/unset-value/node_modules/has-values": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", - "integrity": "sha512-J8S0cEdWuQbqD9//tlZxiMuMNmxB8PlEwvYwuxsTmR1G5RXUePEX/SJn7aD0GMLieuZYSwNH0cQuJGwnYunXRQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/unzip-response": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/unzip-response/-/unzip-response-2.0.1.tgz", - "integrity": "sha512-N0XH6lqDtFH84JxptQoZYmloF4nzrQqqrAymNj+/gW60AO2AZgOcf4O/nUXJcYfyQkqvMo9lSupBZmmgvuVXlw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/upath": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", - "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==", - "dev": true, - "engines": { - "node": ">=4", - "yarn": "*" - } - }, - "node_modules/update-notifier": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-2.5.0.tgz", - "integrity": "sha512-gwMdhgJHGuj/+wHJJs9e6PcCszpxR1b236igrOkUofGhqJuG+amlIKwApH1IW1WWl7ovZxsX49lMBWLxSdm5Dw==", - "dev": true, - "dependencies": { - "boxen": "^1.2.1", - "chalk": "^2.0.1", - "configstore": "^3.0.0", - "import-lazy": "^2.1.0", - "is-ci": "^1.0.10", - "is-installed-globally": "^0.1.0", - "is-npm": "^1.0.0", - "latest-version": "^3.0.0", - "semver-diff": "^2.0.0", - "xdg-basedir": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/update-notifier/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/update-notifier/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/update-notifier/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/update-notifier/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + } + }, + "node_modules/typescript-parser/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", "dev": true }, - "node_modules/update-notifier/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "node_modules/typescript-parser/node_modules/typescript": { + "version": "3.9.10", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz", + "integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==", "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, "engines": { - "node": ">=0.8.0" + "node": ">=4.2.0" } }, - "node_modules/update-notifier/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, + "node_modules/uglify-js": { + "version": "3.17.4", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", + "integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==", + "optional": true, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, "engines": { - "node": ">=4" + "node": ">=0.8.0" } }, - "node_modules/update-notifier/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, + "node_modules/undefsafe": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", + "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", + "dev": true + }, + "node_modules/universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", "engines": { - "node": ">=4" + "node": ">= 10.0.0" } }, "node_modules/uri-js": { @@ -5930,40 +3304,6 @@ "punycode": "^2.1.0" } }, - "node_modules/urix": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg==", - "deprecated": "Please see https://github.com/lydell/urix#deprecated", - "dev": true - }, - "node_modules/url-parse-lax": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", - "integrity": "sha512-BVA4lR5PIviy2PMseNd2jbFQ+jwSwQGdJejf5ctd1rEXt0Ypd7yanUK9+lYechVlN5VaTJGsu2U/3MDDu6KgBA==", - "dev": true, - "dependencies": { - "prepend-http": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/use": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", - "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true - }, "node_modules/v8-compile-cache-lib": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", @@ -5985,18 +3325,6 @@ "node": ">= 8" } }, - "node_modules/widest-line": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-2.0.1.tgz", - "integrity": "sha512-Ba5m9/Fa4Xt9eb2ELXt77JxVDV8w7qQrH0zS/TWSJdLyAwQjWoOzpzj5lwVftDz6n/EOu3tNACS84v509qwnJA==", - "dev": true, - "dependencies": { - "string-width": "^2.1.1" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", @@ -6089,26 +3417,6 @@ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true }, - "node_modules/write-file-atomic": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz", - "integrity": "sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.11", - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.2" - } - }, - "node_modules/xdg-basedir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz", - "integrity": "sha512-1Dly4xqlulvPD3fZUQJLY+FUIeqN3N2MM3uqe4rCJftAvOjFa3jFGfctOgluGx4ahPbUCsZkmJILiP0Vi4T6lQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", @@ -6222,9 +3530,9 @@ } }, "@apidevtools/json-schema-ref-parser": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-9.1.2.tgz", - "integrity": "sha512-r1w81DpR+KyRWd3f+rk6TNqMgedmAxZP5v5KWlXQWlgMUUtyEJch0DKEci1SorPMiSeM8XPl7MZ3miJ60JIpQg==", + "version": "9.0.9", + "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-9.0.9.tgz", + "integrity": "sha512-GBD2Le9w2+lVFoc4vswGI/TjkNIZSVp7+9xPf+X3uidBfWnAeUWmquteSyt0+VCrhNMWj/FTABISQrD3Z/YA+w==", "requires": { "@jsdevtools/ono": "^7.1.3", "@types/json-schema": "^7.0.6", @@ -6769,15 +4077,6 @@ "uri-js": "^4.2.2" } }, - "ansi-align": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-2.0.0.tgz", - "integrity": "sha512-TdlOggdA/zURfMYa7ABC66j+oqfMew58KpJMbUlH3bcZP1b+cBHIHDDn5uH9INsxrHBPjsqM0tDB4jPTF/vgJA==", - "dev": true, - "requires": { - "string-width": "^2.0.0" - } - }, "ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -6794,321 +4093,50 @@ } }, "anymatch": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", - "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", - "dev": true, - "requires": { - "micromatch": "^3.1.4", - "normalize-path": "^2.1.1" - }, - "dependencies": { - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "dev": true, - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha512-VcpLTWqWDiTerugjj8e3+esbg+skS3M9e54UuR3iCeIDMXCLTsAH8hTSzDQU/X6/6t3eYkOKoZSef2PlU6U1XQ==", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", - "dev": true - }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg==", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - } - }, - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha512-3pKJwH184Xo/lnH6oyP1q2pMd7HcypqqmRs91/6/i2CGtWwIKGCkOOMTm/zXbgTEWHw1uNpNi/igc3ePOYHb6w==", - "dev": true, - "requires": { - "remove-trailing-separator": "^1.0.1" - } - }, - "to-regex-range": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha512-ZZWNfCjUokXXDGXFpZehJIkZqq91BcULFq/Pi7M5i4JnxXdhMKAK682z8bCW3o8Hj1wuuzoKcW3DfVzaP6VuNg==", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - } - } - } - }, - "are-docs-informative": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/are-docs-informative/-/are-docs-informative-0.0.2.tgz", - "integrity": "sha512-ixiS0nLNNG5jNQzgZJNoUpBKdo9yTYZMGJ+QgT2jmjR7G7+QHRCc4v6LQ3NgE7EBJq+o0ams3waJwkrlBom8Ig==", - "dev": true - }, - "arg": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", - "dev": true - }, - "argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" - }, - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA==", - "dev": true - }, - "arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", - "dev": true - }, - "arr-union": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q==", - "dev": true - }, - "array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true - }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ==", - "dev": true - }, - "assign-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw==", - "dev": true - }, - "async-each": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.6.tgz", - "integrity": "sha512-c646jH1avxr+aVpndVMeAfYw7wAa6idufrlN3LPA4PmKS0QEGp6PIC9nwz0WQkkvBGAMEki3pFdtxaF39J9vvg==", - "dev": true - }, - "atob": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", - "dev": true - }, - "balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "base": { - "version": "0.11.2", - "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", - "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", - "dev": true, - "requires": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - } - } - }, - "binary-extensions": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", - "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", - "dev": true - }, - "bindings": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", - "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", - "dev": true, - "optional": true, - "requires": { - "file-uri-to-path": "1.0.0" - } - }, - "boxen": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-1.3.0.tgz", - "integrity": "sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw==", - "dev": true, - "requires": { - "ansi-align": "^2.0.0", - "camelcase": "^4.0.0", - "chalk": "^2.0.1", - "cli-boxes": "^1.0.0", - "string-width": "^2.0.0", - "term-size": "^1.2.0", - "widest-line": "^2.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" } }, + "are-docs-informative": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/are-docs-informative/-/are-docs-informative-0.0.2.tgz", + "integrity": "sha512-ixiS0nLNNG5jNQzgZJNoUpBKdo9yTYZMGJ+QgT2jmjR7G7+QHRCc4v6LQ3NgE7EBJq+o0ams3waJwkrlBom8Ig==", + "dev": true + }, + "arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true + }, + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, + "array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -7134,23 +4162,6 @@ "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==", "dev": true }, - "cache-base": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", - "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", - "dev": true, - "requires": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" - } - }, "call-me-maybe": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.2.tgz", @@ -7162,18 +4173,6 @@ "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true }, - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha512-FxAv7HpHrXbh3aPo4o2qxHay2lkLY3x5Mw3KeE4KQE8ysVfziWeRZDwcjauvwBSGEC/nXUPzZy8zeh4HokqOnw==", - "dev": true - }, - "capture-stack-trace": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.2.tgz", - "integrity": "sha512-X/WM2UQs6VMHUtjUDnZTRI+i1crWteJySFzr9UpGoQa4WQffXVTTXuekjl7TjZRlcF2XfjgITT0HxZ9RnxeT0w==", - "dev": true - }, "chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -7185,213 +4184,32 @@ } }, "chokidar": { - "version": "2.1.8", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", - "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", "dev": true, "requires": { - "anymatch": "^2.0.0", - "async-each": "^1.0.1", - "braces": "^2.3.2", - "fsevents": "^1.2.7", - "glob-parent": "^3.1.0", - "inherits": "^2.0.3", - "is-binary-path": "^1.0.0", - "is-glob": "^4.0.0", - "normalize-path": "^3.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.2.1", - "upath": "^1.1.1" + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "fsevents": "~2.3.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" }, "dependencies": { - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "dev": true, - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha512-VcpLTWqWDiTerugjj8e3+esbg+skS3M9e54UuR3iCeIDMXCLTsAH8hTSzDQU/X6/6t3eYkOKoZSef2PlU6U1XQ==", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - } - }, "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha512-E8Ak/2+dZY6fnzlR7+ueWvhsH1SjHr4jjss4YS/h4py44jY9MhK/VFdaZJAWDz6BbL21KeteKxFSFpq8OS5gVA==", - "dev": true, - "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - }, - "dependencies": { - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha512-UFpDDrPgM6qpnFNI+rh/p3bUaq9hKLZN8bMUWzxmcnZVS3omf4IPK+BrewlnWjO1WmUsMYuSjKh4UJuV4+Lqmw==", - "dev": true, - "requires": { - "is-extglob": "^2.1.0" - } - } - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", - "dev": true - }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg==", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - }, - "to-regex-range": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha512-ZZWNfCjUokXXDGXFpZehJIkZqq91BcULFq/Pi7M5i4JnxXdhMKAK682z8bCW3o8Hj1wuuzoKcW3DfVzaP6VuNg==", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - } - } - } - }, - "ci-info": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.6.0.tgz", - "integrity": "sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A==", - "dev": true - }, - "class-utils": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", - "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A==", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg==", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" + "is-glob": "^4.0.1" } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true } } }, - "cli-boxes": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-1.0.0.tgz", - "integrity": "sha512-3Fo5wu8Ytle8q9iCzS4D2MWVL2X7JVWRiS1BnXbTFDhS9c/REkM9vd1AmabsoZoY5/dGi5TT9iKL8Kb6DeBRQg==", - "dev": true - }, "cliui": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", @@ -7422,16 +4240,6 @@ } } }, - "collection-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", - "integrity": "sha512-lNkKvzEeMBBjUGHZ+q6z9pSJla0KWAQPvtzhEV9+iGyQYG+pBpl7xKDhxoNSOZH2hhv0v5k0y2yAM4o4SjoSkw==", - "dev": true, - "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" - } - }, "color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -7466,53 +4274,12 @@ "integrity": "sha512-B52sN2VNghyq5ofvUsqZjmk6YkihBX5vMSChmSK9v4ShjKf3Vk5Xcmgpw4o+iIgtrnM/u5FiMpz9VKb8lpBveA==", "dev": true }, - "component-emitter": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", - "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", - "dev": true - }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, - "configstore": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.5.tgz", - "integrity": "sha512-nlOhI4+fdzoK5xmJ+NY+1gZK56bwEaWZr8fYuXohZ9Vkc1o3a4T/R3M+yE/w7x/ZVJ1zF8c+oaOvF0dztdUgmA==", - "dev": true, - "requires": { - "dot-prop": "^4.2.1", - "graceful-fs": "^4.1.2", - "make-dir": "^1.0.0", - "unique-string": "^1.0.0", - "write-file-atomic": "^2.0.0", - "xdg-basedir": "^3.0.0" - } - }, - "copy-descriptor": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha512-XgZ0pFcakEUlbwQEVNg3+QAis1FyTL3Qel9FYy8pSkQqoG3PNoT0bOCQtOXcOkur21r2Eq2kI+IE+gsmAEVlYw==", - "dev": true - }, - "core-util-is": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", - "dev": true - }, - "create-error-class": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz", - "integrity": "sha512-gYTKKexFO3kh200H1Nit76sRwRtOY32vQd3jpAQKpLtZqyNsSQNfI4N7o3eP2wUjV35pTWKRYqFUDBvUha/Pkw==", - "dev": true, - "requires": { - "capture-stack-trace": "^1.0.0" - } - }, "create-require": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", @@ -7530,12 +4297,6 @@ "which": "^2.0.1" } }, - "crypto-random-string": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz", - "integrity": "sha512-GsVpkFPlycH7/fRR7Dhcmnoii54gV1nz7y4CWyeFS14N+JVBBhY+r8amRHE4BwSYal7BPTDp8isvAlCxyFt3Hg==", - "dev": true - }, "debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -7545,34 +4306,12 @@ "ms": "2.1.2" } }, - "decode-uri-component": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", - "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", - "dev": true - }, - "deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "dev": true - }, "deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, - "define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", - "dev": true, - "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - } - }, "diff": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", @@ -7597,21 +4336,6 @@ "esutils": "^2.0.2" } }, - "dot-prop": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.1.tgz", - "integrity": "sha512-l0p4+mIuJIua0mhxGoh4a+iNL9bmeK5DvnSVQa6T0OhrVmaEa1XScX5Etc673FePCJOArq/4Pa2cLGODUWTPOQ==", - "dev": true, - "requires": { - "is-obj": "^1.0.0" - } - }, - "duplexer3": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.5.tgz", - "integrity": "sha512-1A8za6ws41LQgv9HrE/66jyC5yuSjQ3L/KOpFtoBilsAK2iA2wuS5rTt1OCzIvtS2V7nVmedsUU+DGRcjBmOYA==", - "dev": true - }, "eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", @@ -7775,267 +4499,34 @@ } }, "esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "requires": { - "estraverse": "^5.2.0" - }, - "dependencies": { - "estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true - } - } - }, - "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true - }, - "esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true - }, - "execa": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", - "integrity": "sha512-RztN09XglpYI7aBBrJCPW95jEH7YF1UEPOoX9yDhUTPdp7mK+CQvnLTuD10BNXZ3byLTu2uehZ8EcKT/4CGiFw==", - "dev": true, - "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - }, - "dependencies": { - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==", - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", - "dev": true, - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", - "dev": true - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==", - "dev": true - } - } - }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha512-w/ozOKR9Obk3qoWeY/WDi6MFta9AoMR+zud60mdnbniMcBxRuFJyDt2LdX/14A1UABeqk+Uk+LDfUpvoGKppZA==", - "dev": true, - "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A==", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg==", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", - "dev": true - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - } - } - }, - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", - "dev": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - } - }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", - "dev": true, - "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "requires": { + "estraverse": "^5.2.0" + }, + "dependencies": { + "estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true } } }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true + }, "fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -8096,13 +4587,6 @@ "flat-cache": "^3.0.4" } }, - "file-uri-to-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", - "dev": true, - "optional": true - }, "fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -8149,12 +4633,6 @@ "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", "dev": true }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==", - "dev": true - }, "foreground-child": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", @@ -8173,15 +4651,6 @@ } } }, - "fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha512-GMBAbW9antB8iZRHLoGw0b3HANt57diZYFO/HL1JGIC1MjKrdmhxvrJbupnVvpys0zsz7yBApXdQyfepKly2kA==", - "dev": true, - "requires": { - "map-cache": "^0.2.2" - } - }, "fs-extra": { "version": "10.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", @@ -8199,15 +4668,11 @@ "dev": true }, "fsevents": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", - "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, - "optional": true, - "requires": { - "bindings": "^1.5.0", - "nan": "^2.12.1" - } + "optional": true }, "function-bind": { "version": "1.1.1", @@ -8222,18 +4687,6 @@ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true }, - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha512-GlhdIUuVakc8SJ6kK0zAFbiGzRFzNnY4jUuEbV9UROo4Y+0Ny4fjvcZFVTeDA4odpFyOQzaw6hXukJSq/f28sQ==", - "dev": true - }, - "get-value": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha512-Ln0UQDlxH1BapMu3GPtf7CuYNwRZf2gwCuPqbyG6pB8WfmFpzqcy4xtAaAMUhnNqjMKTiCPZG2oMT3YSx8U2NA==", - "dev": true - }, "glob": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", @@ -8257,15 +4710,6 @@ "is-glob": "^4.0.3" } }, - "global-dirs": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz", - "integrity": "sha512-NknMLn7F2J7aflwFOlGdNIuCDpN3VGoSoB+aap3KABFWbHVn1TCgFC+np23J8W2BiZbjfEw3BFBycSMv1AFblg==", - "dev": true, - "requires": { - "ini": "^1.3.4" - } - }, "globals": { "version": "13.20.0", "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", @@ -8289,25 +4733,6 @@ "slash": "^3.0.0" } }, - "got": { - "version": "6.7.1", - "resolved": "https://registry.npmjs.org/got/-/got-6.7.1.tgz", - "integrity": "sha512-Y/K3EDuiQN9rTZhBvPRWMLXIKdeD1Rj0nzunfoi0Yyn5WBEbzxXKU9Ub2X41oZBagVWOBU3MuDonFMgPWQFnwg==", - "dev": true, - "requires": { - "create-error-class": "^3.0.0", - "duplexer3": "^0.1.4", - "get-stream": "^3.0.0", - "is-redirect": "^1.0.0", - "is-retry-allowed": "^1.0.0", - "is-stream": "^1.0.0", - "lowercase-keys": "^1.0.0", - "safe-buffer": "^5.0.1", - "timed-out": "^4.0.0", - "unzip-response": "^2.0.1", - "url-parse-lax": "^1.0.0" - } - }, "graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", @@ -8353,58 +4778,6 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, - "has-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", - "integrity": "sha512-IBXk4GTsLYdQ7Rvt+GRBrFSVEkmuOUy4re0Xjd9kJSUQpnTrWR4/y9RpfexN9vkAPMFuQoeWKwqzPozRTlasGw==", - "dev": true, - "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" - } - }, - "has-values": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", - "integrity": "sha512-ODYZC64uqzmtfGMEAX/FvZiRyWLpAC3vYnNunURUnkGVTS+mI0smVsWaPydRBsE3g+ok7h960jChO8mFcWlHaQ==", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "dependencies": { - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg==", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha512-24XsCxmEbRwEDbz/qz3stgin8TTzZ1ESR56OMCN0ujYg+vRutNSiOj9bHH9u85DKgXguraugV5sFuvbD4FW/hw==", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, "ignore": { "version": "5.2.4", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", @@ -8427,12 +4800,6 @@ "resolve-from": "^4.0.0" } }, - "import-lazy": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", - "integrity": "sha512-m7ZEHgtw69qOGw+jwxXkHlrlIPdTGkyh66zXZ1ajZbxkDBNjSY/LGbmjc7h0s2ELsUDTAhFr55TrPSSqJGPG0A==", - "dev": true - }, "imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", @@ -8455,36 +4822,15 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, - "ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "dev": true - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, "is-binary-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", - "integrity": "sha512-9fRVlXc0uCxEDj1nQzaWONSpbTfx0FmJfzHF7pwlI8DkWGoHBBea4Pg5Ky0ojwwxQmnSifgbKkI06Qv0Ljgj+Q==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dev": true, "requires": { - "binary-extensions": "^1.0.0" + "binary-extensions": "^2.0.0" } }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, "is-builtin-module": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.1.tgz", @@ -8494,15 +4840,6 @@ "builtin-modules": "^3.3.0" } }, - "is-ci": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.2.1.tgz", - "integrity": "sha512-s6tfsaQaQi3JNciBH6shVqEDvhGut0SUXr31ag8Pd8BBbVVlcGfWhpPmEOoM6RJ5TFhbypvf5yyRw/VXW1IiWg==", - "dev": true, - "requires": { - "ci-info": "^1.5.0" - } - }, "is-core-module": { "version": "2.12.1", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.1.tgz", @@ -8513,47 +4850,12 @@ "has": "^1.0.3" } }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - }, "is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", - "dev": true - }, "is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -8563,102 +4865,24 @@ "is-extglob": "^2.1.1" } }, - "is-installed-globally": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.1.0.tgz", - "integrity": "sha512-ERNhMg+i/XgDwPIPF3u24qpajVreaiSuvpb1Uu0jugw7KKcxGyCX8cgp8P5fwTmAuXku6beDHHECdKArjlg7tw==", - "dev": true, - "requires": { - "global-dirs": "^0.1.0", - "is-path-inside": "^1.0.0" - }, - "dependencies": { - "is-path-inside": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", - "integrity": "sha512-qhsCR/Esx4U4hg/9I19OVUAJkGWtjRYHMRgUMZE2TDdj+Ag+kttZanLupfddNyglzz50cUlmWzUaI37GDfNx/g==", - "dev": true, - "requires": { - "path-is-inside": "^1.0.1" - } - } - } - }, - "is-npm": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-1.0.0.tgz", - "integrity": "sha512-9r39FIr3d+KD9SbX0sfMsHzb5PP3uimOiwr3YupUaUFG4W0l1U57Rx3utpttV7qz5U3jmrO5auUa04LU9pyHsg==", - "dev": true - }, "is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true }, - "is-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", - "integrity": "sha512-l4RyHgRqGN4Y3+9JHVrNqO+tN0rV5My76uW5/nuO4K1b6vw5G8d/cmFjP9tRfEsdhZNt0IFdZuK/c2Vr4Nb+Qg==", - "dev": true - }, "is-path-inside": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", "dev": true }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "is-redirect": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz", - "integrity": "sha512-cr/SlUEe5zOGmzvj9bUyC4LVvkNVAXu4GytXLNMr1pny+a65MpQ9IJzFHD5vi7FyJgb4qt27+eS3TuQnqB+RQw==", - "dev": true - }, - "is-retry-allowed": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz", - "integrity": "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==", - "dev": true - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==", - "dev": true - }, - "is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "dev": true - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", - "dev": true - }, "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "dev": true }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", - "dev": true - }, "jackspeak": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.2.1.tgz", @@ -8755,21 +4979,6 @@ "universalify": "^2.0.0" } }, - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true - }, - "latest-version": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-3.1.0.tgz", - "integrity": "sha512-Be1YRHWWlZaSsrz2U+VInk+tO0EwLIyV+23RhWLINJYwg/UIikxjlj3MhH37/6/EDCAusjajvMkMMUXRaMWl/w==", - "dev": true, - "requires": { - "package-json": "^4.0.0" - } - }, "levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", @@ -8806,12 +5015,6 @@ "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, - "lowercase-keys": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", - "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", - "dev": true - }, "lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -8821,15 +5024,6 @@ "yallist": "^4.0.0" } }, - "make-dir": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", - "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", - "dev": true, - "requires": { - "pify": "^3.0.0" - } - }, "make-error": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", @@ -8845,21 +5039,6 @@ "p-defer": "^1.0.0" } }, - "map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==", - "dev": true - }, - "map-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", - "integrity": "sha512-4y7uGv8bd2WdM9vpQsiQNo41Ln1NvhvDRuVt0k2JZQ+ezN2uaQes7lZeZ+QQUHOLQAtDaBJ+7wCbi+ab/KFs+w==", - "dev": true, - "requires": { - "object-visit": "^1.0.0" - } - }, "mem": { "version": "9.0.2", "resolved": "https://registry.npmjs.org/mem/-/mem-9.0.2.tgz", @@ -8912,16 +5091,6 @@ "integrity": "sha512-MzWSV5nYVT7mVyWCwn2o7JH13w2TBRmmSqSRCKzTw+lmft9X4z+3wjvs06Tzijo5z4W/kahUCDpRXTF+ZrmF/w==", "dev": true }, - "mixin-deep": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", - "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", - "dev": true, - "requires": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - } - }, "mkdirp": { "version": "0.5.6", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", @@ -8938,32 +5107,6 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, - "nan": { - "version": "2.17.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz", - "integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==", - "dev": true, - "optional": true - }, - "nanomatch": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", - "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - } - }, "natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -8988,172 +5131,63 @@ "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" }, "nodemon": { - "version": "1.19.4", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-1.19.4.tgz", - "integrity": "sha512-VGPaqQBNk193lrJFotBU8nvWZPqEZY2eIzymy2jjY0fJ9qIsxA0sxQ8ATPl0gZC645gijYEc1jtZvpS8QWzJGQ==", - "dev": true, - "requires": { - "chokidar": "^2.1.8", - "debug": "^3.2.6", - "ignore-by-default": "^1.0.1", - "minimatch": "^3.0.4", - "pstree.remy": "^1.1.7", - "semver": "^5.7.1", - "supports-color": "^5.5.0", - "touch": "^3.1.0", - "undefsafe": "^2.0.2", - "update-notifier": "^2.5.0" - }, - "dependencies": { - "debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "nopt": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", - "integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==", - "dev": true, - "requires": { - "abbrev": "1" - } - }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true - }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha512-lJxZYlT4DW/bRUtFh1MQIWqmLwQfAxnqWG4HhEdjMlkrJYnJn0Jrr2u3mgxqaWsdiBc76TYkTG/mhrnYTuzfHw==", - "dev": true, - "requires": { - "path-key": "^2.0.0" - }, - "dependencies": { - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", - "dev": true - } - } - }, - "object-copy": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", - "integrity": "sha512-79LYn6VAb63zgtmAteVOWo9Vdj71ZVBy3Pbse+VqxDpEP83XuujMrGqHIwAXJ5I/aM0zU7dIyIAhifVTPrNItQ==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.0.1.tgz", + "integrity": "sha512-g9AZ7HmkhQkqXkRc20w+ZfQ73cHLbE8hnPbtaFbFtCumZsjyMhKk9LajQ07U5Ux28lvFjZ5X7HvWR1xzU8jHVw==", "dev": true, "requires": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A==", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg==", + "chokidar": "^3.5.2", + "debug": "^3.2.7", + "ignore-by-default": "^1.0.1", + "minimatch": "^3.1.2", + "pstree.remy": "^1.1.8", + "semver": "^7.5.3", + "simple-update-notifier": "^2.0.0", + "supports-color": "^5.5.0", + "touch": "^3.1.0", + "undefsafe": "^2.0.5" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, "requires": { - "kind-of": "^3.0.2" + "ms": "^2.1.1" } }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, "requires": { - "is-buffer": "^1.1.5" + "has-flag": "^3.0.0" } } } }, - "object-visit": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", - "integrity": "sha512-GBaMwwAVK9qbQN3Scdo0OyvgPW7l3lnaVMj84uTOZlswkX0KpF6fyDBJhtTthf7pymztoN36/KEr1DyhF96zEA==", + "nopt": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", + "integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==", "dev": true, "requires": { - "isobject": "^3.0.0" + "abbrev": "1" } }, - "object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true }, "once": { "version": "1.4.0", @@ -9190,12 +5224,6 @@ "integrity": "sha512-wB3wfAxZpk2AzOfUMJNL+d36xothRSyj8EXOa4f6GMqYDN9BJaaSISbsk+wS9abmnebVw95C2Kb5t85UmpCxuw==", "dev": true }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==", - "dev": true - }, "p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -9214,26 +5242,6 @@ "p-limit": "^3.0.2" } }, - "package-json": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/package-json/-/package-json-4.0.1.tgz", - "integrity": "sha512-q/R5GrMek0vzgoomq6rm9OX+3PQve8sLwTirmK30YB3Cu0Bbt9OX9M/SIUnroN5BGJkzwGsFwDaRGD9EwBOlCA==", - "dev": true, - "requires": { - "got": "^6.7.1", - "registry-auth-token": "^3.0.1", - "registry-url": "^3.0.3", - "semver": "^5.1.0" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } - } - }, "parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -9243,18 +5251,6 @@ "callsites": "^3.0.0" } }, - "pascalcase": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", - "integrity": "sha512-XHXfu/yOQRy9vYOtUDVMN60OEJjW013GoObG1o+xwQTpB9eYJX/BjXMsdW13ZDPruFhYYn0AG22w0xgQMwl3Nw==", - "dev": true - }, - "path-dirname": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", - "integrity": "sha512-ALzNPpyNq9AqXMBjeymIjFDAkAFH06mHJH/cSBHAgU0s4vfpBn6b2nf8tiRLvagKD8RbTpq2FKTBg7cl9l3c7Q==", - "dev": true - }, "path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -9267,12 +5263,6 @@ "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "dev": true }, - "path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==", - "dev": true - }, "path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", @@ -9316,42 +5306,12 @@ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", - "dev": true - }, - "posix-character-classes": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg==", - "dev": true - }, "prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true }, - "prepend-http": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", - "integrity": "sha512-PhmXi5XmoyKw1Un4E+opM2KcsJInDvKyuOumcjjw3waw86ZNjHwVUOOWLc4bCzLdcKNaWBH9e99sbWzDQsVaYg==", - "dev": true - }, - "process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true - }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==", - "dev": true - }, "pstree.remy": { "version": "1.1.8", "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", @@ -9370,210 +5330,15 @@ "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true }, - "rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "dev": true, - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", - "dev": true - } - } - }, - "readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, "readdirp": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", - "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.11", - "micromatch": "^3.1.10", - "readable-stream": "^2.0.2" - }, - "dependencies": { - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "dev": true, - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha512-VcpLTWqWDiTerugjj8e3+esbg+skS3M9e54UuR3iCeIDMXCLTsAH8hTSzDQU/X6/6t3eYkOKoZSef2PlU6U1XQ==", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", - "dev": true - }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg==", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - } - }, - "to-regex-range": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha512-ZZWNfCjUokXXDGXFpZehJIkZqq91BcULFq/Pi7M5i4JnxXdhMKAK682z8bCW3o8Hj1wuuzoKcW3DfVzaP6VuNg==", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - } - } - } - }, - "regex-not": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", - "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", - "dev": true, - "requires": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" - } - }, - "registry-auth-token": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.4.0.tgz", - "integrity": "sha512-4LM6Fw8eBQdwMYcES4yTnn2TqIasbXuwDx3um+QRs7S55aMKCBKBxvPXl2RiUjHwuJLTyYfxSpmfSAjQpcuP+A==", - "dev": true, - "requires": { - "rc": "^1.1.6", - "safe-buffer": "^5.0.1" - } - }, - "registry-url": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz", - "integrity": "sha512-ZbgR5aZEdf4UKZVBPYIgaglBmSF2Hi94s2PcIHhRGFjKYu+chjJdYfHn4rt3hB6eCKLJ8giVIIfgMa1ehDfZKA==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, "requires": { - "rc": "^1.0.1" + "picomatch": "^2.2.1" } }, - "remove-trailing-separator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha512-/hS+Y0u3aOfIETiaiirUFwDBDzmXPvO+jAfKTitUngIPzdKc6Z0LoFjM/CK5PL4C+eKwHohlHAb6H0VFfmmUsw==", - "dev": true - }, - "repeat-element": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz", - "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==", - "dev": true - }, - "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", - "dev": true - }, "replace-in-file": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/replace-in-file/-/replace-in-file-7.0.1.tgz", @@ -9642,18 +5407,6 @@ "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true }, - "resolve-url": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg==", - "dev": true - }, - "ret": { - "version": "0.1.15", - "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", - "dev": true - }, "reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", @@ -9703,306 +5456,67 @@ } }, "run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, - "requires": { - "queue-microtask": "^1.2.2" - } - }, - "rxjs": { - "version": "7.8.1", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", - "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", - "peer": true, - "requires": { - "tslib": "^2.1.0" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "safe-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", - "integrity": "sha512-aJXcif4xnaNUzvUuC5gcb46oTS7zvg4jpMTnuqtrEPlR3vFr4pxtdTwaF1Qs3Enjn9HK+ZlwQui+a7z0SywIzg==", - "dev": true, - "requires": { - "ret": "~0.1.10" - } - }, - "semver": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", - "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - }, - "semver-diff": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-2.1.0.tgz", - "integrity": "sha512-gL8F8L4ORwsS0+iQ34yCYv///jsOq0ZL7WP55d1HnJ32o7tyFYEFQZQA22mrLIacZdU6xecaBBZ+uEiffGNyXw==", - "dev": true, - "requires": { - "semver": "^5.0.3" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } - } - }, - "set-value": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", - "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", - "dev": true - } - } - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true - }, - "signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true - }, - "slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true - }, - "snapdragon": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", - "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", - "dev": true, - "requires": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A==", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg==", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", - "dev": true - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", - "dev": true - } + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "requires": { + "queue-microtask": "^1.2.2" } }, - "snapdragon-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "rxjs": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "peer": true, + "requires": { + "tslib": "^2.1.0" + } + }, + "semver": { + "version": "7.5.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", + "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", "dev": true, "requires": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - } + "lru-cache": "^6.0.0" } }, - "snapdragon-util": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, "requires": { - "kind-of": "^3.2.0" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } + "shebang-regex": "^3.0.0" } }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true }, - "source-map-resolve": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", - "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", + "simple-update-notifier": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz", + "integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==", "dev": true, "requires": { - "atob": "^2.1.2", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" + "semver": "^7.5.3" } }, - "source-map-url": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", - "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==", + "slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + }, "spdx-exceptions": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", @@ -10025,15 +5539,6 @@ "integrity": "sha512-XkD+zwiqXHikFZm4AX/7JSCXA98U5Db4AFd5XUg/+9UNtnH75+Z9KxtpYiJZx36mUDVOwH83pl7yvCer6ewM3w==", "dev": true }, - "split-string": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", - "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", - "dev": true, - "requires": { - "extend-shallow": "^3.0.0" - } - }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -10041,120 +5546,6 @@ "dev": true, "peer": true }, - "static-extend": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", - "integrity": "sha512-72E9+uLc27Mt718pMHt9VMNiAL4LMsmDbBva8mxWUCkT07fSzEGMYUCk0XWY6lp0j6RBAG4cJ3mWuZv2OE3s0g==", - "dev": true, - "requires": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A==", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg==", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", - "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", - "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, "string-width-cjs": { "version": "npm:string-width@4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -10192,12 +5583,6 @@ "ansi-regex": "^5.0.1" } }, - "strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha512-7FCwGGmx8mD5xQd3RPUvnSpUXHM3BWuzjtpD4TXsfcZ9EL4azvVVUscFYwD9nx8Kh+uCBC00XBtAykoMHwTh8Q==", - "dev": true - }, "strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -10220,59 +5605,12 @@ "dev": true, "peer": true }, - "term-size": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/term-size/-/term-size-1.2.0.tgz", - "integrity": "sha512-7dPUZQGy/+m3/wjVz3ZW5dobSoD/02NxJpoXUX0WIyjfVS3l0c+b/+9phIDFA7FHzkYtwtMFgeGZ/Y8jVTeqQQ==", - "dev": true, - "requires": { - "execa": "^0.7.0" - } - }, "text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true }, - "timed-out": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", - "integrity": "sha512-G7r3AhovYtr5YKOWQkta8RKAPb+J9IsO4uVmzjl8AZwfhs8UcUwTiD6gcJYSgOtzyjvQKrKYn41syHbUWMkafA==", - "dev": true - }, - "to-object-path": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", - "integrity": "sha512-9mWHdnGRuh3onocaHzukyvCZhzvr6tiflAy/JRFXcJX0TjgfWA9pk9t8CMbzmBE4Jfw58pXbkngtBtqYxzNEyg==", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "to-regex": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", - "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", - "dev": true, - "requires": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" - } - }, "to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -10422,9 +5760,9 @@ } }, "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, "peer": true }, @@ -10532,168 +5870,11 @@ "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", "dev": true }, - "union-value": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", - "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^2.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", - "dev": true - } - } - }, - "unique-string": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-1.0.0.tgz", - "integrity": "sha512-ODgiYu03y5g76A1I9Gt0/chLCzQjvzDy7DsZGsLOE/1MrF6wriEskSncj1+/C58Xk/kPZDppSctDybCwOSaGAg==", - "dev": true, - "requires": { - "crypto-random-string": "^1.0.0" - } - }, "universalify": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==" }, - "unset-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", - "integrity": "sha512-PcA2tsuGSF9cnySLHTLSh2qrQiJ70mn+r+Glzxv2TWZblxsxCC52BDlZoPCsz7STd9pN7EZetkWZBAvk4cgZdQ==", - "dev": true, - "requires": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" - }, - "dependencies": { - "has-value": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", - "integrity": "sha512-gpG936j8/MzaeID5Yif+577c17TxaDmhuyVgSwtnL/q8UUTySg8Mecb+8Cf1otgLoD7DDH75axp86ER7LFsf3Q==", - "dev": true, - "requires": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "dependencies": { - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha512-+OUdGJlgjOBZDfxnDjYYG6zp487z0JGNQq3cYQYg5f5hKR+syHMsaztzGeml/4kGG55CSpKSpWTY+jYGgsHLgA==", - "dev": true, - "requires": { - "isarray": "1.0.0" - } - } - } - }, - "has-values": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", - "integrity": "sha512-J8S0cEdWuQbqD9//tlZxiMuMNmxB8PlEwvYwuxsTmR1G5RXUePEX/SJn7aD0GMLieuZYSwNH0cQuJGwnYunXRQ==", - "dev": true - } - } - }, - "unzip-response": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/unzip-response/-/unzip-response-2.0.1.tgz", - "integrity": "sha512-N0XH6lqDtFH84JxptQoZYmloF4nzrQqqrAymNj+/gW60AO2AZgOcf4O/nUXJcYfyQkqvMo9lSupBZmmgvuVXlw==", - "dev": true - }, - "upath": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", - "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==", - "dev": true - }, - "update-notifier": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-2.5.0.tgz", - "integrity": "sha512-gwMdhgJHGuj/+wHJJs9e6PcCszpxR1b236igrOkUofGhqJuG+amlIKwApH1IW1WWl7ovZxsX49lMBWLxSdm5Dw==", - "dev": true, - "requires": { - "boxen": "^1.2.1", - "chalk": "^2.0.1", - "configstore": "^3.0.0", - "import-lazy": "^2.1.0", - "is-ci": "^1.0.10", - "is-installed-globally": "^0.1.0", - "is-npm": "^1.0.0", - "latest-version": "^3.0.0", - "semver-diff": "^2.0.0", - "xdg-basedir": "^3.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, "uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -10703,33 +5884,6 @@ "punycode": "^2.1.0" } }, - "urix": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg==", - "dev": true - }, - "url-parse-lax": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", - "integrity": "sha512-BVA4lR5PIviy2PMseNd2jbFQ+jwSwQGdJejf5ctd1rEXt0Ypd7yanUK9+lYechVlN5VaTJGsu2U/3MDDu6KgBA==", - "dev": true, - "requires": { - "prepend-http": "^1.0.1" - } - }, - "use": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", - "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", - "dev": true - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true - }, "v8-compile-cache-lib": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", @@ -10745,15 +5899,6 @@ "isexe": "^2.0.0" } }, - "widest-line": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-2.0.1.tgz", - "integrity": "sha512-Ba5m9/Fa4Xt9eb2ELXt77JxVDV8w7qQrH0zS/TWSJdLyAwQjWoOzpzj5lwVftDz6n/EOu3tNACS84v509qwnJA==", - "dev": true, - "requires": { - "string-width": "^2.1.1" - } - }, "wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", @@ -10825,23 +5970,6 @@ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true }, - "write-file-atomic": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz", - "integrity": "sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.11", - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.2" - } - }, - "xdg-basedir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz", - "integrity": "sha512-1Dly4xqlulvPD3fZUQJLY+FUIeqN3N2MM3uqe4rCJftAvOjFa3jFGfctOgluGx4ahPbUCsZkmJILiP0Vi4T6lQ==", - "dev": true - }, "y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", diff --git a/package.json b/package.json index 2123a8a..8abd9e1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ng-openapi-gen", - "version": "0.25.1", + "version": "0.50.2", "license": "MIT", "author": "Cyclos development team", "description": "An OpenAPI 3 codegen for Angular 12+", @@ -26,7 +26,7 @@ "test:watch": "nodemon --watch './**/*' --exec 'npm run test'" }, "dependencies": { - "@apidevtools/json-schema-ref-parser": "~9.1.2", + "@apidevtools/json-schema-ref-parser": "~9.0.9", "argparse": "^2.0.1", "eol": "^0.9.1", "fs-extra": "^10.0.1", @@ -60,7 +60,7 @@ "jasmine-ts": "^0.4.0", "mem": "^9.0.2", "ncp": "^2.0.0", - "nodemon": "^1.14.9", + "nodemon": "^3.0.1", "replace-in-file": "^7.0.1", "rimraf": "^5.0.1", "ts-node": "^10.9.1", diff --git a/templates/apiService.handlebars b/templates/apiService.handlebars new file mode 100644 index 0000000..e39405f --- /dev/null +++ b/templates/apiService.handlebars @@ -0,0 +1,62 @@ +/* tslint:disable */ +/* eslint-disable */ +import { Injectable } from '@angular/core'; +import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http'; +import { Observable } from 'rxjs'; +import { filter, map } from 'rxjs/operators'; +import { {{configurationClass}} } from './{{configurationFile}}'; +import { {{responseClass}} } from './{{responseFile}}'; + +export type ApiFnOptional = (http: HttpClient, rootUrl: string, params?: P, context?: HttpContext) => Observable>; +export type ApiFnRequired = (http: HttpClient, rootUrl: string, params: P, context?: HttpContext) => Observable>; + +/** + * Helper service to call API functions directly + */ +@Injectable({ providedIn: 'root' }) +export class {{apiServiceClass}} { + constructor( + private config: {{configurationClass}}, + private http: HttpClient + ) { + } + + private _rootUrl?: string; + + /** + * Returns the root url for API operations. If not set directly here, + * will fallback to `{{configurationClass}}.rootUrl`. + */ + get rootUrl(): string { + return this._rootUrl || this.config.rootUrl; + } + + /** + * Sets the root URL for API operations + */ + set rootUrl(rootUrl: string) { + this._rootUrl = rootUrl; + } + + /** + * Executes an API call, returning the response body only + */ + invoke(fn: ApiFnRequired, params: P, context?: HttpContext): Observable; + invoke(fn: ApiFnOptional, params?: P, context?: HttpContext): Observable; + invoke(fn: ApiFnRequired | ApiFnOptional, params?: P, context?: HttpContext): Observable { + return this.invoke$Response(fn, params, context) + .pipe(map(r => r.body)); + } + + /** + * Executes an API call, returning the entire response + */ + invoke$Response(fn: ApiFnRequired, params: P, context?: HttpContext): Observable>; + invoke$Response(fn: ApiFnOptional, params?: P, context?: HttpContext): Observable>; + invoke$Response(fn: ApiFnRequired | ApiFnOptional, params?: P, context?: HttpContext): Observable> { + return fn(this.http, this.rootUrl, params, context) + .pipe( + filter(r => r instanceof HttpResponse), + map(r => r as StrictHttpResponse)); + } +} diff --git a/templates/baseService.handlebars b/templates/baseService.handlebars index 0f8ff8a..278a9f0 100644 --- a/templates/baseService.handlebars +++ b/templates/baseService.handlebars @@ -15,7 +15,7 @@ export class {{baseServiceClass}} { ) { } - private _rootUrl: string = ''; + private _rootUrl?: string; /** * Returns the root url for all operations in this service. If not set directly in this diff --git a/templates/fn.handlebars b/templates/fn.handlebars new file mode 100644 index 0000000..83fadb5 --- /dev/null +++ b/templates/fn.handlebars @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http'; +import { Observable } from 'rxjs'; +import { filter, map } from 'rxjs/operators'; +import { {{@root.responseClass}} } from '{{pathToRoot}}{{@root.responseFile}}'; +import { {{@root.requestBuilderClass}} } from '{{pathToRoot}}{{@root.requestBuilderFile}}'; + +{{#imports}}import { {{{typeName}}}{{#useAlias}} as {{{qualifiedName}}}{{/useAlias}} } from '{{{@root.pathToRoot}}}{{{fullPath}}}'; +{{/imports}} + +export interface {{paramsType}} { +{{#operation.parameters}} +{{{tsComments}}} {{{var}}}{{^required}}?{{/required}}: {{{type}}};{{#tsComments}}{{/tsComments}} +{{/operation.parameters}} +{{#requestBody}} + {{{../operation.requestBody.tsComments}}}body{{^../operation.requestBody.required}}?{{/../operation.requestBody.required}}: {{{type}}} +{{/requestBody}} +} + +export function {{methodName}}(http: HttpClient, rootUrl: string, params{{^operation.parametersRequired}}?{{/operation.parametersRequired}}: {{paramsType}}, context?: HttpContext): Observable<{{@root.responseClass}}<{{{resultType}}}>> { + const rb = new {{@root.requestBuilderClass}}(rootUrl, {{methodName}}.PATH, '{{operation.method}}'); + if (params) { +{{#operation.parameters}} + rb.{{in}}('{{{name}}}', params{{{varAccess}}}, {{{parameterOptions}}}); +{{/operation.parameters}} +{{#requestBody}} + rb.body(params.body, '{{{mediaType}}}'); +{{/requestBody}} + } + + return http.request( + rb.build({ responseType: '{{responseType}}', accept: '{{accept}}', context }) + ).pipe( + filter((r: any): r is HttpResponse => r instanceof HttpResponse), + map((r: HttpResponse) => { + {{> handleResponse}} + }) + ); +} + +{{methodName}}.PATH = '{{{operation.path}}}'; diff --git a/templates/index.handlebars b/templates/index.handlebars index 3450df7..769e5e4 100644 --- a/templates/index.handlebars +++ b/templates/index.handlebars @@ -3,7 +3,7 @@ export { {{baseServiceClass}} } from './{{{baseServiceFile}}}'; export { {{requestBuilderClass}} } from './{{{requestBuilderFile}}}'; export { {{responseClass}} } from './{{{responseFile}}}'; export { {{moduleClass}} } from './{{{moduleFile}}}'; -{{#modelImports}}export { {{{typeName}}}{{#useAlias}} as {{{qualifiedName}}}{{/useAlias}} } from '{{{file}}}'; -{{/modelImports}} +{{#modelIndex.imports}}export { {{{typeName}}}{{#useAlias}} as {{{qualifiedName}}}{{/useAlias}} } from '{{{file}}}'; +{{/modelIndex.imports}} {{#services}}export { {{typeName}} } from './services/{{{fileName}}}'; {{/services}} diff --git a/templates/model.handlebars b/templates/model.handlebars index 4506c85..dcfb464 100644 --- a/templates/model.handlebars +++ b/templates/model.handlebars @@ -1,6 +1,6 @@ /* tslint:disable */ /* eslint-disable */ -{{#imports}}import { {{{typeName}}}{{#useAlias}} as {{{qualifiedName}}}{{/useAlias}} } from '{{{file}}}'; +{{#imports}}import { {{{typeName}}}{{#useAlias}} as {{{qualifiedName}}}{{/useAlias}} } from '{{{@root.pathToRoot}}}{{{fullPath}}}'; {{/imports}} {{{tsComments}}}{{#isObject}}{{>object}}{{/isObject }}{{#isEnum}}{{>enum}}{{/isEnum diff --git a/templates/modelIndex.handlebars b/templates/modelIndex.handlebars index eb517f5..d765fc0 100644 --- a/templates/modelIndex.handlebars +++ b/templates/modelIndex.handlebars @@ -1,4 +1,4 @@ /* tslint:disable */ /* eslint-disable */ -{{#modelImports}}export { {{{typeName}}}{{#useAlias}} as {{{qualifiedName}}}{{/useAlias}} } from '{{{file}}}'; -{{/modelImports}} +{{#modelIndex.imports}}export { {{{typeName}}}{{#useAlias}} as {{{qualifiedName}}}{{/useAlias}} } from '{{{@root.modelIndex.pathToRoot}}}{{{fullPath}}}'; +{{/modelIndex.imports}} diff --git a/templates/operationParameters.handlebars b/templates/operationParameters.handlebars index d35e516..78cfa7e 100644 --- a/templates/operationParameters.handlebars +++ b/templates/operationParameters.handlebars @@ -1,11 +1 @@ - - params{{^operation.parametersRequired}}?{{/operation.parametersRequired}}: { -{{#operation.parameters}} -{{{tsComments}}} {{{var}}}{{^required}}?{{/required}}: {{{type}}};{{#tsComments}}{{/tsComments}} -{{/operation.parameters}} -{{#requestBody}} - {{{../operation.requestBody.tsComments}}}body{{^../operation.requestBody.required}}?{{/../operation.requestBody.required}}: {{{type}}} -{{/requestBody}} - }, - context?: HttpContext - \ No newline at end of file +params{{^operation.parametersRequired}}?{{/operation.parametersRequired}}: {{paramsType}}, context?: HttpContext \ No newline at end of file diff --git a/templates/operationResponse.handlebars b/templates/operationResponse.handlebars index 8387849..29e962e 100644 --- a/templates/operationResponse.handlebars +++ b/templates/operationResponse.handlebars @@ -1,20 +1,3 @@ {{{responseMethodTsComments}}}{{responseMethodName}}({{>operationParameters}}): Observable<{{@root.responseClass}}<{{{resultType}}}>> { - const rb = new {{@root.requestBuilderClass}}(this.rootUrl, {{@root.typeName}}.{{operation.pathVar}}, '{{operation.method}}'); - if (params) { -{{#operation.parameters}} - rb.{{in}}('{{{name}}}', params{{{varAccess}}}, {{{parameterOptions}}}); -{{/operation.parameters}} -{{#requestBody}} - rb.body(params.body, '{{{mediaType}}}'); -{{/requestBody}} - } - - return this.http.request( - rb.build({ responseType: '{{responseType}}', accept: '{{accept}}', context }) - ).pipe( - filter((r: any): r is HttpResponse => r instanceof HttpResponse), - map((r: HttpResponse) => { - {{> handleResponse}} - }) - ); + return {{importName}}(this.http, this.rootUrl, params, context); } diff --git a/templates/service.handlebars b/templates/service.handlebars index 67176fd..50db184 100644 --- a/templates/service.handlebars +++ b/templates/service.handlebars @@ -1,16 +1,15 @@ /* tslint:disable */ /* eslint-disable */ -import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http'; +import { HttpClient, HttpContext } from '@angular/common/http'; import { Injectable } from '@angular/core'; import { Observable } from 'rxjs'; -import { filter, map } from 'rxjs/operators'; +import { map } from 'rxjs/operators'; import { {{baseServiceClass}} } from '../{{baseServiceFile}}'; import { {{configurationClass}} } from '../{{configurationFile}}'; import { {{responseClass}} } from '../{{responseFile}}'; -import { {{requestBuilderClass}} } from '../{{requestBuilderFile}}'; -{{#imports}}import { {{{typeName}}}{{#useAlias}} as {{{qualifiedName}}}{{/useAlias}} } from '{{{file}}}'; +{{#imports}}import { {{{typeName}}}{{#useAlias}} as {{{qualifiedName}}}{{/useAlias}} } from '{{{@root.pathToRoot}}}{{{fullPath}}}'; {{/imports}} {{{tsComments}}}@Injectable({ providedIn: 'root' }) diff --git a/test/all-operations.spec.ts b/test/all-operations.spec.ts index 8047751..e9e61b3 100644 --- a/test/all-operations.spec.ts +++ b/test/all-operations.spec.ts @@ -1,12 +1,20 @@ +import { upperFirst } from 'lodash'; import { OpenAPIObject } from 'openapi3-ts'; -import { ClassDeclaration, TypescriptParser } from 'typescript-parser'; +import { ClassDeclaration, FunctionDeclaration, TypescriptParser } from 'typescript-parser'; import { Content } from '../lib/content'; import { NgOpenApiGen } from '../lib/ng-openapi-gen'; import { Options } from '../lib/options'; import options from './all-operations.config.json'; import allOperationsSpec from './all-operations.json'; +jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000; +function paramsName(name: string) { + if (name.endsWith('$Response')) { + name = name.substring(0, name.length - '$Response'.length); + } + return `${upperFirst(name)}$Params`; +} describe('Generation tests using all-operations.json', () => { let gen: NgOpenApiGen; @@ -41,11 +49,7 @@ describe('Generation tests using all-operations.json', () => { if (method) { expect(method.parameters.length).toBe(2); const type = method.parameters[0].type; - expect(type).toContain('common1?: RefString'); - expect(type).toContain('common2: RefObject'); - expect(type).toContain('get1?: RefString'); - expect(type).toContain('get2?: number'); - expect(type).toContain('get3?: boolean'); + expect(type).toEqual(paramsName(name)); } } assertPath1Get('path1Get$Json$Response'); @@ -59,9 +63,7 @@ describe('Generation tests using all-operations.json', () => { if (method) { expect(method.parameters.length).toBe(2); const type = method.parameters[0].type; - expect(type).toContain('param1?: RefString'); - expect(type).toContain('param2?: string'); - expect(type).not.toContain('param3'); // Cookie parameter ignored + expect(type).toEqual(paramsName(name)); } } assertPath2Get('path2Get$Response'); @@ -83,22 +85,19 @@ describe('Generation tests using all-operations.json', () => { expect(ast.declarations.length).toBe(1); expect(ast.declarations[0]).toEqual(jasmine.any(ClassDeclaration)); const cls = ast.declarations[0] as ClassDeclaration; - function assertPath1Post(name: string, bodyType: string) { + function assertPath1Post(name: string) { const method = cls.methods.find(m => m.name === name); expect(method).withContext(`method ${name}`).toBeDefined(); if (method) { expect(method.parameters.length).toBe(2); const type = method.parameters[0].type; - expect(type).toContain('common1?: RefString'); - expect(type).toContain('common2: RefObject'); - expect(type).toContain('post1?: number'); - expect(type).toContain('body: ' + bodyType); + expect(type).toEqual(paramsName(name)); } } - assertPath1Post('path1Post$Json$Response', 'RefObject'); - assertPath1Post('path1Post$Json', 'RefObject'); - assertPath1Post('path1Post$Plain$Response', 'string'); - assertPath1Post('path1Post$Plain', 'string'); + assertPath1Post('path1Post$Json$Response'); + assertPath1Post('path1Post$Json'); + assertPath1Post('path1Post$Plain$Response'); + assertPath1Post('path1Post$Plain'); done(); }); @@ -130,37 +129,64 @@ describe('Generation tests using all-operations.json', () => { if (method) { expect(method.parameters.length).toBe(2); const type = method.parameters[0].type; - expect(type).toContain('id: number'); + expect(type).toEqual(paramsName(name)); } } assertPath3Del('path3Del$Response'); assertPath3Del('path3Del'); - function assertPath4Put(name: string, bodyType: string) { + function assertPath4Put(name: string) { const method = cls.methods.find(m => m.name === name); expect(method).withContext(`method ${name}`).toBeDefined(); if (method) { expect(method.parameters.length).toBe(2); const type = method.parameters[0].type; - expect(type).toContain('body?: ' + bodyType); + expect(type).toEqual(paramsName(name)); } } - assertPath4Put('path4Put$Json$Plain$Response', 'RefObject'); - assertPath4Put('path4Put$Json$Plain', 'RefObject'); - assertPath4Put('path4Put$Plain$Plain$Response', 'string'); - assertPath4Put('path4Put$Plain$Plain', 'string'); - assertPath4Put('path4Put$Any$Plain$Response', 'Blob'); - assertPath4Put('path4Put$Any$Plain', 'Blob'); - - assertPath4Put('path4Put$Json$Image$Response', 'RefObject'); - assertPath4Put('path4Put$Json$Image', 'RefObject'); - assertPath4Put('path4Put$Plain$Image$Response', 'string'); - assertPath4Put('path4Put$Plain$Image', 'string'); - assertPath4Put('path4Put$Any$Image$Response', 'Blob'); - assertPath4Put('path4Put$Any$Image', 'Blob'); + assertPath4Put('path4Put$Json$Plain$Response'); + assertPath4Put('path4Put$Json$Plain'); + assertPath4Put('path4Put$Plain$Plain$Response'); + assertPath4Put('path4Put$Plain$Plain'); + assertPath4Put('path4Put$Any$Plain$Response'); + assertPath4Put('path4Put$Any$Plain'); + + assertPath4Put('path4Put$Json$Image$Response'); + assertPath4Put('path4Put$Json$Image'); + assertPath4Put('path4Put$Plain$Image$Response'); + assertPath4Put('path4Put$Plain$Image'); + assertPath4Put('path4Put$Any$Image$Response'); + assertPath4Put('path4Put$Any$Image'); const withQuotes = cls.methods.find(m => m.name === 'withQuotes'); - expect(withQuotes).withContext(`method withQuotes`).toBeDefined(); + expect(withQuotes).withContext('method withQuotes').toBeDefined(); + + done(); + }); + }); + + it('NoTag-path-3-del', done => { + const noTag = gen.services.get('noTag'); + const path3Del = noTag?.operations?.find(op => op.id === 'path3Del'); + expect(path3Del).toBeDefined(); + if (!path3Del) return; + const ts = gen.templates.apply('fn', path3Del); + const parser = new TypescriptParser(); + parser.parseSource(ts).then(ast => { + expect(ast.declarations.length).toBe(1); + expect(ast.declarations[0]).toEqual(jasmine.any(FunctionDeclaration)); + const fn = ast.declarations[0] as FunctionDeclaration; + expect(fn?.name).toEqual('path3Del'); + expect(fn?.parameters?.length).toEqual(4); + expect(fn?.parameters?.[0]?.name).toEqual('http'); + expect(fn?.parameters?.[0]?.type).toEqual('HttpClient'); + expect(fn?.parameters?.[1]?.name).toEqual('rootUrl'); + expect(fn?.parameters?.[1]?.type).toEqual('string'); + expect(fn?.parameters?.[2]?.name).toEqual('params'); + // This is a limitation of the typescript-parser library: the params type is returned as empty!!! + expect(fn?.parameters?.[2]?.type).toEqual(''); + expect(fn?.parameters?.[3]?.name).toEqual('context'); + expect(fn?.parameters?.[3]?.type).toEqual('HttpContext'); done(); }); @@ -481,6 +507,7 @@ describe('Generation tests using all-operations.json', () => { it('GET /path6', () => { const optionsWithCustomizedResponseType = { ...options } as Options; optionsWithCustomizedResponseType.customizedResponseType = { + // eslint-disable-next-line @typescript-eslint/naming-convention '/path6': { toUse: 'arraybuffer' } diff --git a/test/all-types.spec.ts b/test/all-types.spec.ts index 6b96b52..7bf764a 100644 --- a/test/all-types.spec.ts +++ b/test/all-types.spec.ts @@ -20,11 +20,10 @@ it('Api', done => { const cls = ast.declarations[0] as ClassDeclaration; expect(cls.methods.length).toEqual(3 * 2); // foo, bar, baz, in 2 variants each // Should have imported referenced-in-service-one-of-1/2 - expect(ast.imports.find(i => i.libraryName === '../models/referenced-in-service-one-of-1')).withContext('ref1 import').toBeDefined(); - expect(ast.imports.find(i => i.libraryName === '../models/referenced-in-service-one-of-2')).withContext('ref2 import').toBeDefined(); - expect(ast.imports.find(i => i.libraryName === '../models/a/b/ref-object')).withContext('a.b.RefObject import').toBeDefined(); + expect(ast.imports.find(i => i.libraryName.endsWith('/models/referenced-in-service-one-of-1'))).withContext('ref1 import').toBeDefined(); + expect(ast.imports.find(i => i.libraryName.endsWith('/models/referenced-in-service-one-of-2'))).withContext('ref2 import').toBeDefined(); // But not referenced-in-one-of, as it is nested within an object schema - expect(ast.imports.find(i => i.libraryName === '../models/referenced-in-one-of')).withContext('ref import').toBeUndefined(); + expect(ast.imports.find(i => i.libraryName.endsWith('/models/referenced-in-one-of'))).withContext('ref import').toBeUndefined(); done(); }); } @@ -125,7 +124,7 @@ describe('Generation tests using all-types.json', () => { const parser = new TypescriptParser(); parser.parseSource(ts).then(ast => { expect(ast.imports.length).toBe(1); - expect(ast.imports.find(i => i.libraryName === '../../a/b/ref-object')).withContext('a/b/ref-object import').toBeDefined(); + expect(ast.imports.find(i => i.libraryName.endsWith('/a/b/ref-object'))).withContext('a/b/ref-object import').toBeDefined(); expect(ast.declarations.length).toBe(1); expect(ast.declarations[0]).toEqual(jasmine.any(TypeAliasDeclaration)); const decl = ast.declarations[0] as TypeAliasDeclaration; @@ -142,8 +141,8 @@ describe('Generation tests using all-types.json', () => { const ts = gen.templates.apply('model', union); const parser = new TypescriptParser(); parser.parseSource(ts).then(ast => { - expect(ast.imports.find(i => i.libraryName === './ref-enum')).withContext('ref-enum import').toBeDefined(); - expect(ast.imports.find(i => i.libraryName === './container')).withContext('container import').toBeDefined(); + expect(ast.imports.find(i => i.libraryName.endsWith('/ref-enum'))).withContext('ref-enum import').toBeDefined(); + expect(ast.imports.find(i => i.libraryName.endsWith('/container'))).withContext('container import').toBeDefined(); expect(ast.declarations.length).toBe(1); expect(ast.declarations[0]).toEqual(jasmine.any(TypeAliasDeclaration)); const decl = ast.declarations[0] as TypeAliasDeclaration; @@ -160,7 +159,7 @@ describe('Generation tests using all-types.json', () => { const parser = new TypescriptParser(); parser.parseSource(ts).then(ast => { expect(ast.imports.length).toBe(5); - expect(ast.imports.find(i => i.libraryName === './referenced-in-nullable-one-of')).withContext('referenced-in-nullable-one-of import').toBeDefined(); + expect(ast.imports.find(i => i.libraryName.endsWith('/referenced-in-nullable-one-of'))).withContext('referenced-in-nullable-one-of import').toBeDefined(); expect(ast.declarations.length).toBe(1); expect(ast.declarations[0]).toEqual(jasmine.any(TypeAliasDeclaration)); const decl = ast.declarations[0] as TypeAliasDeclaration; @@ -279,7 +278,7 @@ describe('Generation tests using all-types.json', () => { const parser = new TypescriptParser(); parser.parseSource(ts).then(ast => { expect(ast.imports.length).toBe(1); - expect(ast.imports.find(i => i.libraryName === './a/b/ref-object')).withContext('a/b/ref-object import').toBeDefined(); + expect(ast.imports.find(i => i.libraryName.endsWith('/a/b/ref-object'))).withContext('a/b/ref-object import').toBeDefined(); expect(ast.declarations.length).toBe(1); expect(ast.declarations[0]).toEqual(jasmine.any(InterfaceDeclaration)); const decl = ast.declarations[0] as InterfaceDeclaration; @@ -304,7 +303,7 @@ describe('Generation tests using all-types.json', () => { const parser = new TypescriptParser(); parser.parseSource(ts).then(ast => { expect(ast.imports.length).toBe(1); - expect(ast.imports.find(i => i.libraryName === './nullable-object')).withContext('nullable-object import').toBeDefined(); + expect(ast.imports.find(i => i.libraryName.endsWith('/nullable-object'))).withContext('nullable-object import').toBeDefined(); expect(ast.declarations.length).toBe(1); expect(ast.declarations[0]).toEqual(jasmine.any(InterfaceDeclaration)); const decl = ast.declarations[0] as InterfaceDeclaration; @@ -330,7 +329,7 @@ describe('Generation tests using all-types.json', () => { const parser = new TypescriptParser(); parser.parseSource(ts).then(ast => { expect(ast.imports.length).toBe(1); - expect(ast.imports.find(i => i.libraryName === './ref-enum')).withContext('ref-enum import').toBeDefined(); + expect(ast.imports.find(i => i.libraryName.endsWith('/ref-enum'))).withContext('ref-enum import').toBeDefined(); expect(ast.declarations.length).toBe(1); expect(ast.declarations[0]).toEqual(jasmine.any(InterfaceDeclaration)); const decl = ast.declarations[0] as InterfaceDeclaration; @@ -350,12 +349,12 @@ describe('Generation tests using all-types.json', () => { const parser = new TypescriptParser(); parser.parseSource(ts).then(ast => { expect(ast.imports.length).toBe(6); - expect(ast.imports.find(i => i.libraryName === './ref-enum')).withContext('ref-enum import').toBeDefined(); - expect(ast.imports.find(i => i.libraryName === './a/b/ref-object')).withContext('a/b/ref-object import').toBeDefined(); - expect(ast.imports.find(i => i.libraryName === './x/y/ref-object')).withContext('x/y/ref-object import').toBeDefined(); - expect(ast.imports.find(i => i.libraryName === './union')).withContext('union import').toBeDefined(); - expect(ast.imports.find(i => i.libraryName === './disjunct')).withContext('disjunct import').toBeDefined(); - expect(ast.imports.find(i => i.libraryName === './nullable-object')).withContext('nullable-object import').toBeDefined(); + expect(ast.imports.find(i => i.libraryName.endsWith('/ref-enum'))).withContext('ref-enum import').toBeDefined(); + expect(ast.imports.find(i => i.libraryName.endsWith('/a/b/ref-object'))).withContext('a/b/ref-object import').toBeDefined(); + expect(ast.imports.find(i => i.libraryName.endsWith('/x/y/ref-object'))).withContext('x/y/ref-object import').toBeDefined(); + expect(ast.imports.find(i => i.libraryName.endsWith('/union'))).withContext('union import').toBeDefined(); + expect(ast.imports.find(i => i.libraryName.endsWith('/disjunct'))).withContext('disjunct import').toBeDefined(); + expect(ast.imports.find(i => i.libraryName.endsWith('/nullable-object'))).withContext('nullable-object import').toBeDefined(); expect(ast.declarations.length).toBe(1); expect(ast.declarations[0]).toEqual(jasmine.any(TypeAliasDeclaration)); @@ -440,7 +439,7 @@ describe('Generation tests using all-types.json', () => { const ts = gen.templates.apply('model', containers); const parser = new TypescriptParser(); parser.parseSource(ts).then(ast => { - expect(ast.imports.find(i => i.libraryName === './container')).withContext('container import').toBeDefined(); + expect(ast.imports.find(i => i.libraryName.endsWith('/container'))).withContext('container import').toBeDefined(); expect(ast.declarations.length).toBe(1); expect(ast.declarations[0]).toEqual(jasmine.any(TypeAliasDeclaration)); const decl = ast.declarations[0] as TypeAliasDeclaration; @@ -495,7 +494,7 @@ describe('Generation tests using all-types.json', () => { const parser = new TypescriptParser(); parser.parseSource(ts).then(ast => { expect(ast.imports.length).toBe(1); - expect(ast.imports.find(i => i.libraryName === './audit-log')).withContext('audit-log import').toBeDefined(); + expect(ast.imports.find(i => i.libraryName.endsWith('/audit-log'))).withContext('audit-log import').toBeDefined(); expect(ast.declarations.length).toBe(1); expect(ast.declarations[0]).toEqual(jasmine.any(TypeAliasDeclaration)); const decl = ast.declarations[0] as TypeAliasDeclaration; @@ -516,7 +515,7 @@ describe('Generation tests using all-types.json', () => { const parser = new TypescriptParser(); parser.parseSource(ts).then(ast => { expect(ast.imports.length).toBe(1); - expect(ast.imports.find(i => i.libraryName === './shape')).withContext('shape import').toBeDefined(); + expect(ast.imports.find(i => i.libraryName.endsWith('/shape'))).withContext('shape import').toBeDefined(); expect(ast.declarations.length).toBe(1); expect(ast.declarations[0]).toEqual(jasmine.any(TypeAliasDeclaration)); const decl = ast.declarations[0] as TypeAliasDeclaration; diff --git a/test/cyclos.json b/test/cyclos.json index 0ae6910..3be5167 100644 --- a/test/cyclos.json +++ b/test/cyclos.json @@ -1,298 +1,387 @@ { - "openapi" : "3.0.0", - "info" : { - "title" : "Cyclos @cyclosVersion API", - "description" : "The Cyclos REST API is described using OpenAPI 3.0. The descriptor for the api can be downloaded in both [YAML](http://root/api/cyclos-openapi.yaml) or [JSON](http://root/api/cyclos-openapi.json) formats. These files can be used in tools that support the OpenAPI specification, such as the [OpenAPI Generator](https://openapi-generator.tech).\n\nIn the API, whenever some data is referenced, for example, a group, or payment type, either id or internal name can be used. When an user is to be referenced, the special word 'self' (sans quotes) always refers to the currently authenticated user, and any identification method (login name, e-mail, mobile phone, account number or custom field) that can be used on keywords search (as configured in the products) can also be used to identify users. Some specific data types have other identification fields, like accounts can have a number and payments can have a transaction number. This all depends on the current configuration.\n\n-----------\n\nMost of the operations that return data allow selecting which fields to include in the response. This is useful for reducing the data to be download over the network. If nothing is set, all object fields are returned. Fields are handled in 3 modes. Given an example object `{\"a\": {\"x\": 1, \"y\": 2, \"z\": 3}, \"b\": 0}`, the modes are:\n- **Include**: the field is unprefixed or prefixed with `+`. All fields which\n are not explicitly included are excluded from the result. Examples:\n - `[\"a\"]` results in `{\"a\": {\"x\": 1, \"y\": 2, \"z\": 3}}`\n - `[\"+b\"]` results in `{\"b\": 0}`\n - `[\"a.x\"]` results in `{\"a\": {\"x\": 1}}`. This is a nested include. At root\n level, includes only `a` then, on `a`'s level, includes only `x`.\n\n- **Exclude**: the field is prefixed by `-` (or, for compatibility purposes,\n `!`). Only explicitly excluded fields\n are excluded from the result. Examples:\n - `[\"-a\"]` results in `{\"b\": 0}`\n - `[\"-b\"]` results in `{\"a\": {\"x\": 1, \"y\": 2, \"z\": 3}}`\n - `[\"a.-x\"]` results in `{\"a\": {\"y\": 2, \"z\": 3}}`. In this example, `a` is\n actually an include at the root level, hence, excludes `b`.\n\n- **Nested only**: when a field is prefixed by `*` and has a nested path,\n it only affects includes / excludes for the nested fields, without affecting\n the current level. Only nested fields are configured.\n Examples:\n - `[\"*a.x\"]` results in `{\"a\": {\"x\": 1}, \"b\": 0}`. In this example, `a` is\n configured to include only `x`. `b` is also included because, there is no\n explicit includes at root level.\n - `[\"*a.-x\"]` results in `{\"a\": {\"y\": 2, \"z\": 3}, \"b\": 0}`. In this example,\n `a` is configured to exclude only `x`. `b` is also included because there\n is no explicit includes at the root level.\n For backwards compatibility, this can also be expressed in a special\n syntax `-a.x`. Also, keep in mind that `-x.y.z` is equivalent to `*x.*y.-z`.\n\nYou cannot have the same field included and excluded at the same time - a HTTP `422` status will be returned. Also, when mixing nested excludes with explicit includes or excludes, the nested exclude will be ignored. For example, using `[\"-a.x\", \"a.y\"]` will ignore the `-a.x` definition, resulting in `{\"a\": {\"y\": 2}}`.\n\n-----------\n\nFor details of the deprecated elements (operations and model) please visit the [deprecation notes page](https://documentation.cyclos.org/@cyclosVersion/api-deprecation.html) for this version.", - "version" : "@cyclosVersion" + "openapi": "3.0.0", + "info": { + "title": "Cyclos @cyclosVersion API", + "description": "The Cyclos REST API is described using OpenAPI 3.0. The descriptor for the api can be downloaded in both [YAML](http://root/api/cyclos-openapi.yaml) or [JSON](http://root/api/cyclos-openapi.json) formats. These files can be used in tools that support the OpenAPI specification, such as the [OpenAPI Generator](https://openapi-generator.tech).\n\nIn the API, whenever some data is referenced, for example, a group, or payment type, either id or internal name can be used. When an user is to be referenced, the special word 'self' (sans quotes) always refers to the currently authenticated user, and any identification method (login name, e-mail, mobile phone, account number or custom field) that can be used on keywords search (as configured in the products) can also be used to identify users. Some specific data types have other identification fields, like accounts can have a number and payments can have a transaction number. This all depends on the current configuration.\n\n-----------\n\nMost of the operations that return data allow selecting which fields to include in the response. This is useful to avoid calculating data that finally won't be needed and also for reducing the transfer over the network. If nothing is set, all object fields are returned. Fields are handled in 3 modes. Given an example object `{\"a\": {\"x\": 1, \"y\": 2, \"z\": 3}, \"b\": 0}`, the modes are:\n- **Include**: the field is unprefixed or prefixed with `+`. All fields which\n are not explicitly included are excluded from the result. Examples:\n - `[\"a\"]` results in `{\"a\": {\"x\": 1, \"y\": 2, \"z\": 3}}`\n - `[\"+b\"]` results in `{\"b\": 0}`\n - `[\"a.x\"]` results in `{\"a\": {\"x\": 1}}`. This is a nested include. At root\n level, includes only `a` then, on `a`'s level, includes only `x`.\n\n- **Exclude**: the field is prefixed by `-` (or, for compatibility purposes,\n `!`). Only explicitly excluded fields\n are excluded from the result. Examples:\n - `[\"-a\"]` results in `{\"b\": 0}`\n - `[\"-b\"]` results in `{\"a\": {\"x\": 1, \"y\": 2, \"z\": 3}}`\n - `[\"a.-x\"]` results in `{\"a\": {\"y\": 2, \"z\": 3}}`. In this example, `a` is\n actually an include at the root level, hence, excludes `b`.\n\n- **Nested only**: when a field is prefixed by `*` and has a nested path,\n it only affects includes / excludes for the nested fields, without affecting\n the current level. Only nested fields are configured.\n Examples:\n - `[\"*a.x\"]` results in `{\"a\": {\"x\": 1}, \"b\": 0}`. In this example, `a` is\n configured to include only `x`. `b` is also included because, there is no\n explicit includes at root level.\n - `[\"*a.-x\"]` results in `{\"a\": {\"y\": 2, \"z\": 3}, \"b\": 0}`. In this example,\n `a` is configured to exclude only `x`. `b` is also included because there\n is no explicit includes at the root level.\n For backwards compatibility, this can also be expressed in a special\n syntax `-a.x`. Also, keep in mind that `-x.y.z` is equivalent to `*x.*y.-z`.\n\nYou cannot have the same field included and excluded at the same time - a HTTP `422` status will be returned. Also, when mixing nested excludes with explicit includes or excludes, the nested exclude will be ignored. For example, using `[\"*a.x\", \"a.y\"]` will ignore the `*a.x` definition, resulting in `{\"a\": {\"y\": 2}}`.\n\n-----------\n\nFor details of the deprecated elements (operations and model) please visit the [deprecation notes page](https://documentation.cyclos.org/@cyclosVersion/api-deprecation.html) for this version.", + "version": "@cyclosVersion" }, - "servers" : [ { - "url" : "http://root/api" - } ], - "tags" : [ { - "name" : "Auth", - "description" : "Operations regarding the user authentication, such as login / logout, activating / deactivating an access client and obtaining the current authenticated user information." - }, { - "name" : "Sessions", - "description" : "Operations for administrators managing sessions of other users." - }, { - "name" : "Captcha", - "description" : "Generate new captcha challenges, which are required for some operations performed as guest, in order to make it harder for bots to abuse the api." - }, { - "name" : "IdentityProviders", - "description" : "Provides access operations using identity providers such as Google or Facebook. The operations involving the user consent cannot be implemented solely with this API, because a browser window must be opened for the user to consent with the operation. Such operations need first to be prepared, which will store validate and store all the context in Cyclos, and then the popup must be opened. After finishing, the resulting data is sent via push notifications. For more information, see the corresponding section in the [Cyclos Wiki](https://wiki4.cyclos.org/index.php/External_identity_providers#Using_identity_providers_together_with_the_REST_API)." - }, { - "name" : "Users", - "description" : "User searching, registration and profile modification. Also provides access to the user map directory." - }, { - "name" : "Operators", - "description" : "Operations over operators, which are users created by other users to manage their data. The registration of operators is performed in this tag, but the view and edition of profile fields or full profile is performed in the `Users` tag, within `/users/{user}/...` paths. This is because operators are a special kind of users." - }, { - "name" : "OperatorGroups", - "description" : "Operations over operator groups, which users can create to define which permissions their operators will have." - }, { - "name" : "UserStatus", - "description" : "Viewing and setting the status of a user / operator. Examples of statuses are active, blocked, disabled, removed and purged." - }, { - "name" : "Phones", - "description" : "Management of user phones, which is done separatedly from the raw user profile fields." - }, { - "name" : "Addresses", - "description" : "Management of user addresses, which is done separatedly from the raw user profile fields." - }, { - "name" : "ContactInfos", - "description" : "Management of user's additional contact information, which can either represent contact information for specific employees (e.g. a salesman) or distinct subsidiary offices of the same company." - }, { - "name" : "Images", - "description" : "Provides access to images of all kinds, for getting metadata, content and management operations." - }, { - "name" : "Files", - "description" : "Provides access to raw files, maily used to interact with custom field values of type file." - }, { - "name" : "Documents", - "description" : "Provides access to documents, which can be shared or individual." - }, { - "name" : "GroupMembership", - "description" : "Viewing and setting the group of a user / operator." - }, { - "name" : "ProductAssignment", - "description" : "Viewing and managing the assigned products to a user." - }, { - "name" : "Brokering", - "description" : "Viewing and manage the brokers of a user." - }, { - "name" : "Passwords", - "description" : "Management of a user's passwords." - }, { - "name" : "Contacts", - "description" : "Management of a user contact list." - }, { - "name" : "Agreements", - "description" : "Provides access to agreements the authenticated user must accept in order to use the system." - }, { - "name" : "Devices", - "description" : "Operations regarding trusted devices." - }, { - "name" : "DeviceConfirmations", - "description" : "Allows confirmation of operations using trusted devices." - }, { - "name" : "DevicePins", - "description" : "A PIN is an easier way to login to the system instead of using the principal / password. When a PIN is defined, it will be associated to the current channel and to the user identification method / password type that was used when authenticating, thus inheriting its security restrictions. E.g. if the user identification method associated to the PIN is removed from the list of methods defined to access the channel, then the PIN will not work either. Enabling a PIN must be done through the corresponding channel configuration." - }, { - "name" : "Accounts", - "description" : "Provides access to account information, such as the status (balance, credit limit and so on) and account history (list of balance transfers between accounts)." - }, { - "name" : "AccountVisibility", - "description" : "Provides access for the personal settings of users to show or hide particular accounts." - }, { - "name" : "BalanceLimits", - "description" : "Provides access to the balance limits of user accounts, as well as setting them." - }, { - "name" : "PaymentLimits", - "description" : "Provides access to the payment limits of user accounts, as well as setting them." - }, { - "name" : "Transfers", - "description" : "Provides access to balance transfers (also called transfers). A transfer represents the actual and definitive transfer of funds between two accounts." - }, { - "name" : "Transactions", - "description" : "Provides access to transactions. A transaction is an intent to transfer balance between accounts. A transaction will generate zero or more balance transfers between accounts. For example, a direct payment beween 2 users can initially be pending administration authorization. Until it is authorized, no transfer will be generated. Once authorized, a transfer will be created. Another kind of transaction, a scheduled payment, will generate one transfer per processed installment. The kinds of transactions are:\n\n- __Direct payment__: A simple payment from / to a user or system\n account. Depending on the configuration, can require authorization\n to be processed.\n\n- __Scheduled payment__: A payment processed either on a single future\n date or in several installments. Depending on the configuration, can\n require authorization to be processed.\n\n- __Recurring payment__: A payment which is repeated for a fixed number\n of occurrences or until manually canceled. Depending on the\nconfiguration,\n can require authorization to be processed.\n\n- __Chargeback__: A chargeback triggers a transfer with the same origin\n and destination as an original transfer, but with negative amount,\n effectively returning the balance to the original account.\n\n- __Payment request__: A payment filled-in by the payee. Once the payer\n accepts the reqiest, either a direct or scheduled payment is created\n (which could, depending on the configuration, be pending authorization).\n\n- __External payment__: A payment to a user not yet registered on the\n system. The payment amount is reserved to either an e-mail address or\n mobile phone number. Once a user registers using either data, the\npayment\n will be performed.\n\n- __Import__: A transaction that was imported from file.\n- __Ticket__: A payment filled-in by the payee but without a defined\n payer. Once a user (the payer) approces the ticket and the ticket owner\n (receiver) processes it, a direct payment is created (which could,\n depending on the configuration, be pending authorization).\n\n- __Order__: Payment generated by finishing the shopping cart checkout\n or confirming a webshop order. Depending on the configuration, can\nrequire\n authorization to be processed." - }, { - "name" : "EasyInvoices", - "description" : "Provides access for performing direct payments from easy invoices." - }, { - "name" : "Payments", - "description" : "Provides access for performing payments or scheduled payments." - }, { - "name" : "ScheduledPayments", - "description" : "Provides actions specific to scheduled payments and installments. Performing a scheduled payment is done via `Payments`, while searching or viewing details, via `Transactions`." - }, { - "name" : "Installments", - "description" : "Provides search and actions over scheduled payment installments and recurring payment occurrences. Both are generically treated as `Installments`." - }, { - "name" : "RecurringPayments", - "description" : "Provides actions specific to recurring payments and their occurrences. Performing a recurring payment is done via `Payments`, while searching or viewing details, via `Transactions`." - }, { - "name" : "PendingPayments", - "description" : "Provides actions for payments that are still pending authorization." - }, { - "name" : "PaymentRequests", - "description" : "Provide access to payment requests. A payment request is created by the payee with a defined payer. Once the payer (i.e the request's recipient) accepts the request, either a direct or scheduled payment is created (which could, depending on the configuration, be pending authorization)." - }, { - "name" : "ExternalPayments", - "description" : "Provides actions specific to external payments. Searching or viewing details are done via `Transactions`." - }, { - "name" : "POS", - "description" : "Provides access for receiving payments or scheduled payments in Point-Of-Sale (POS) operations." - }, { - "name" : "Clients", - "description" : "Access clients provide a token for user authentication without decoupled from the login name and password." - }, { - "name" : "Vouchers", - "description" : "Vouchers are the way by which a user (possibly not registered in the system) can buy at places that accepts tickets. The shop / seller will then redeem the voucher." - }, { - "name" : "VoucherInfo", - "description" : "Provides services to get information about vouchers. Operations in this tag, as well as returned data, are subject to change without further notice." - }, { - "name" : "Tickets", - "description" : "Provide access to tickets. A ticket represents a payment with a destinatary but possibly without a defined payer. They allow to a user (e.g a shop) generate a ticket for himself and send it to another user to allow pay it." - }, { - "name" : "Mobile", - "description" : "Contains operations used by the Cyclos mobile application. Operations in this tag, as well as returned data, are subject to change without further notice." - }, { - "name" : "Frontend", - "description" : "Contains operations used by the new Cyclos frontend. Operations in this tag, as well as returned data, are subject to change without further notice." - }, { - "name" : "Notifications", - "description" : "Provides access to the notifications the authenticated user has received." - }, { - "name" : "NotificationSettings", - "description" : "Provides access to the notifications settings, where users can choose which kinds of notifications they want to receive, and via which mediums (internal / e-mail / sms)." - }, { - "name" : "Messages", - "description" : "Provides access to send messages between users." - }, { - "name" : "Records", - "description" : "Provides access to custom records" - }, { - "name" : "Tokens", - "description" : "Provides access to tokens, which are commonly used as cards, but are more generic. Tokens are user identifications whose status can be managed." - }, { - "name" : "Operations", - "description" : "Provides access to custom operations" - }, { - "name" : "Wizards", - "description" : "Provides access to custom wizards" - }, { - "name" : "Marketplace", - "description" : "Provides access to the marketplace, that is, searching or managing advertisements. The name `marketplace` is used on paths instead of `ads` or `advertisements` because one of the use cases of this API is to be used directly by pages from the browser, and ad-blocking browser extensions would normally deny such requests." - }, { - "name" : "AdQuestions", - "description" : "Provides access to advertisement questions." - }, { - "name" : "ShoppingCarts", - "description" : "Provides access to shopping carts. Users can add webshop advertisements to the shopping cart, and then check-out them, performing the payment. For each user, one shopping cart is created per currency and seller. A shopping cart is an early stage or an `Order`. once checked out, use the operations in the `Orders` tag to access it." - }, { - "name" : "Orders", - "description" : "An order contains a set of items from a seller, to a buyer in a certain currency. Orders can be created in 2 ways: either via a shopping cart checkout (by the buyer, using the operations in the `ShoppingCarts` tag to access it. ) or directly by the seller. Once created, the order must be approved by the other party until its payment is finally performed." - }, { - "name" : "DeliveryMethods", - "description" : "Provides access to webshop delivery methods, which must be selected for an order to be created. A delivery method can have either a fixed amount or be negotiated between the seller and the buyer." - }, { - "name" : "WebshopSettings", - "description" : "Provides access to general webshop settings for sellers." - }, { - "name" : "AdInterests", - "description" : "Provides access to advertisement interests, which are criteria registered by users to be notified when new matching advertisements are published." - }, { - "name" : "NFC", - "description" : "Contains operations regarding NFC tags" - }, { - "name" : "Push", - "description" : "Provides a way for clients to subscribe for push notifications" - }, { - "name" : "UI", - "description" : "Provides data used to create alternative user interfaces" - }, { - "name" : "Validation", - "description" : "Provides access to complete pending actions waiting for validation." - }, { - "name" : "Localization", - "description" : "Provides access to different languages and localization settings." - }, { - "name" : "Alerts", - "description" : "Provides access to alerts generated in the system. Currently only user alerts are supported (system alerts are not)." - }, { - "name" : "References", - "description" : "Provides access to (general) references, which are given from a user to another to show the satisfaction level." - }, { - "name" : "PaymentFeedbacks", - "description" : "Provides access to feedbacks given to user-to-user payments." - }, { - "name" : "OIDC", - "description" : "Provides the delegation of data and operations via OAuth2 / OpenID Connect. These are standard protocols which enables logging-in on other services with Cyclos, as well as allowing external services to perform operations in behalf of users." - }, { - "name" : "PrivacySettings", - "description" : "Provides a way to define how the personal data can be accessed." - }, { - "name" : "Firebase", - "description" : "Provides integration with Firebase products, e.g. FCM." - }, { - "name" : "Invite", - "description" : "Provides operations to invite external users to join the system." - } ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "paths" : { - "/auth" : { - "get" : { - "operationId" : "getCurrentAuth", - "summary" : "Returns data about the currently authenticated user", - "description" : "Returns the logged user information.", - "tags" : [ "Auth" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "An object containing the authenticated user information", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Auth" - } - } - } - }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } - } - } - }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" - } - } - } - }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" - } - } - } - }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "servers": [ + { + "url": "http://root/api" + } + ], + "tags": [ + { + "name": "Auth", + "description": "Operations regarding the user authentication, such as login / logout, activating / deactivating an access client and obtaining the current authenticated user information." + }, + { + "name": "Sessions", + "description": "Operations for administrators managing sessions of other users." + }, + { + "name": "Captcha", + "description": "Generate new captcha challenges, which are required for some operations performed as guest, in order to make it harder for bots to abuse the api." + }, + { + "name": "IdentityProviders", + "description": "Provides access operations using identity providers such as Google or Facebook. The operations involving the user consent cannot be implemented solely with this API, because a browser window must be opened for the user to consent with the operation. Such operations need first to be prepared, which will store validate and store all the context in Cyclos, and then the popup must be opened. After finishing, the resulting data is sent via push notifications. For more information, see the corresponding section in the [Cyclos Wiki](https://wiki4.cyclos.org/index.php/External_identity_providers#Using_identity_providers_together_with_the_REST_API)." + }, + { + "name": "Users", + "description": "User searching, registration and profile modification. Also provides access to the user map directory." + }, + { + "name": "Operators", + "description": "Operations over operators, which are users created by other users to manage their data. The registration of operators is performed in this tag, but the view and edition of profile fields or full profile is performed in the `Users` tag, within `/users/{user}/...` paths. This is because operators are a special kind of users." + }, + { + "name": "OperatorGroups", + "description": "Operations over operator groups, which users can create to define which permissions their operators will have." + }, + { + "name": "UserStatus", + "description": "Viewing and setting the status of a user / operator. Examples of statuses are active, blocked, disabled, removed and purged." + }, + { + "name": "Phones", + "description": "Management of user phones, which is done separatedly from the raw user profile fields." + }, + { + "name": "Addresses", + "description": "Management of user addresses, which is done separatedly from the raw user profile fields." + }, + { + "name": "ContactInfos", + "description": "Management of user's additional contact information, which can either represent contact information for specific employees (e.g. a salesman) or distinct subsidiary offices of the same company." + }, + { + "name": "Images", + "description": "Provides access to images of all kinds, for getting metadata, content and management operations." + }, + { + "name": "Files", + "description": "Provides access to raw files, maily used to interact with custom field values of type file." + }, + { + "name": "Documents", + "description": "Provides access to documents, which can be shared or individual." + }, + { + "name": "GroupMembership", + "description": "Viewing and setting the group of a user / operator." + }, + { + "name": "ProductAssignment", + "description": "Viewing and managing the assigned products to a user." + }, + { + "name": "Brokering", + "description": "Viewing and manage the brokers of a user." + }, + { + "name": "Passwords", + "description": "Management of a user's passwords." + }, + { + "name": "TOTP", + "description": "Management of a user's TOTP secret. TOTPs are defined by [RFC 6238](https://www.rfc-editor.org/rfc/rfc6238), and use an authenticator app (such as Google Authenticator or Microsoft Authenticator) to generate passwords to confirm operations." + }, + { + "name": "Contacts", + "description": "Management of a user contact list." + }, + { + "name": "Agreements", + "description": "Provides access to agreements the authenticated user must accept in order to use the system." + }, + { + "name": "Devices", + "description": "Operations regarding trusted devices." + }, + { + "name": "DeviceConfirmations", + "description": "Allows confirmation of operations using trusted devices." + }, + { + "name": "DevicePins", + "description": "A PIN is an easier way to login to the system instead of using the principal / password. When a PIN is defined, it will be associated to the current channel and to the user identification method / password type that was used when authenticating, thus inheriting its security restrictions. E.g. if the user identification method associated to the PIN is removed from the list of methods defined to access the channel, then the PIN will not work either. Enabling a PIN must be done through the corresponding channel configuration." + }, + { + "name": "Accounts", + "description": "Provides access to account information, such as the status (balance, credit limit and so on) and account history (list of balance transfers between accounts)." + }, + { + "name": "AccountVisibility", + "description": "Provides access for the personal settings of users to show or hide particular accounts." + }, + { + "name": "BalanceLimits", + "description": "Provides access to the balance limits of user accounts, as well as setting them." + }, + { + "name": "PaymentLimits", + "description": "Provides access to the payment limits of user accounts, as well as setting them." + }, + { + "name": "Transfers", + "description": "Provides access to balance transfers (also called transfers). A transfer represents the actual and definitive transfer of funds between two accounts." + }, + { + "name": "Transactions", + "description": "Provides access to transactions. A transaction is an intent to transfer balance between accounts. A transaction will generate zero or more balance transfers between accounts. For example, a direct payment beween 2 users can initially be pending administration authorization. Until it is authorized, no transfer will be generated. Once authorized, a transfer will be created. Another kind of transaction, a scheduled payment, will generate one transfer per processed installment. The kinds of transactions are:\n\n- __Direct payment__: A simple payment from / to a user or system\n account. Depending on the configuration, can require authorization\n to be processed.\n\n- __Scheduled payment__: A payment processed either on a single future\n date or in several installments. Depending on the configuration, can\n require authorization to be processed.\n\n- __Recurring payment__: A payment which is repeated for a fixed number\n of occurrences or until manually canceled. Depending on the\nconfiguration,\n can require authorization to be processed.\n\n- __Chargeback__: A chargeback triggers a transfer with the same origin\n and destination as an original transfer, but with negative amount,\n effectively returning the balance to the original account.\n\n- __Payment request__: A payment filled-in by the payee. Once the payer\n accepts the reqiest, either a direct or scheduled payment is created\n (which could, depending on the configuration, be pending authorization).\n\n- __External payment__: A payment to a user not yet registered on the\n system. The payment amount is reserved to either an e-mail address or\n mobile phone number. Once a user registers using either data, the\npayment\n will be performed.\n\n- __Import__: A transaction that was imported from file.\n- __Ticket__: A payment filled-in by the payee but without a defined\n payer. Once a user (the payer) approces the ticket and the ticket owner\n (receiver) processes it, a direct payment is created (which could,\n depending on the configuration, be pending authorization).\n\n- __Order__: Payment generated by finishing the shopping cart checkout\n or confirming a webshop order. Depending on the configuration, can\nrequire\n authorization to be processed." + }, + { + "name": "EasyInvoices", + "description": "Provides access for performing direct payments from easy invoices." + }, + { + "name": "Payments", + "description": "Provides access for performing payments or scheduled payments." + }, + { + "name": "ScheduledPayments", + "description": "Provides actions specific to scheduled payments and installments. Performing a scheduled payment is done via `Payments`, while searching or viewing details, via `Transactions`." + }, + { + "name": "Installments", + "description": "Provides search and actions over scheduled payment installments and recurring payment occurrences. Both are generically treated as `Installments`." + }, + { + "name": "RecurringPayments", + "description": "Provides actions specific to recurring payments and their occurrences. Performing a recurring payment is done via `Payments`, while searching or viewing details, via `Transactions`." + }, + { + "name": "PendingPayments", + "description": "Provides actions for payments that are still pending authorization." + }, + { + "name": "PaymentRequests", + "description": "Provide access to payment requests. A payment request is created by the payee with a defined payer. Once the payer (i.e the request's recipient) accepts the request, either a direct or scheduled payment is created (which could, depending on the configuration, be pending authorization)." + }, + { + "name": "ExternalPayments", + "description": "Provides actions specific to external payments. Searching or viewing details are done via `Transactions`." + }, + { + "name": "POS", + "description": "Provides access for receiving payments or scheduled payments in Point-Of-Sale (POS) operations." + }, + { + "name": "Clients", + "description": "Access clients provide a token for user authentication without decoupled from the login name and password." + }, + { + "name": "Vouchers", + "description": "Vouchers are the way by which a user (possibly not registered in the system) can buy at places that accepts tickets. The shop / seller will then redeem the voucher." + }, + { + "name": "VoucherInfo", + "description": "Provides services to get information about vouchers. Operations in this tag, as well as returned data, are subject to change without further notice." + }, + { + "name": "Tickets", + "description": "Provide access to tickets. A ticket represents a payment with a destinatary but possibly without a defined payer. They allow to a user (e.g a shop) generate a ticket for himself and send it to another user to allow pay it." + }, + { + "name": "Mobile", + "description": "Contains operations used by the Cyclos mobile application. Operations in this tag, as well as returned data, are subject to change without further notice." + }, + { + "name": "Frontend", + "description": "Contains operations used by the new Cyclos frontend. Operations in this tag, as well as returned data, are subject to change without further notice." + }, + { + "name": "Notifications", + "description": "Provides access to the notifications the authenticated user has received." + }, + { + "name": "NotificationSettings", + "description": "Provides access to the notifications settings, where users can choose which kinds of notifications they want to receive, and via which mediums (internal / e-mail / sms)." + }, + { + "name": "Messages", + "description": "Provides access to send messages between users." + }, + { + "name": "Records", + "description": "Provides access to custom records" + }, + { + "name": "Tokens", + "description": "Provides access to tokens, which are commonly used as cards, but are more generic. Tokens are user identifications whose status can be managed." + }, + { + "name": "Operations", + "description": "Provides access to custom operations" + }, + { + "name": "Wizards", + "description": "Provides access to custom wizards" + }, + { + "name": "Marketplace", + "description": "Provides access to the marketplace, that is, searching or managing advertisements. The name `marketplace` is used on paths instead of `ads` or `advertisements` because one of the use cases of this API is to be used directly by pages from the browser, and ad-blocking browser extensions would normally deny such requests." + }, + { + "name": "AdQuestions", + "description": "Provides access to advertisement questions." + }, + { + "name": "ShoppingCarts", + "description": "Provides access to shopping carts. Users can add webshop advertisements to the shopping cart, and then check-out them, performing the payment. For each user, one shopping cart is created per currency and seller. A shopping cart is an early stage or an `Order`. once checked out, use the operations in the `Orders` tag to access it." + }, + { + "name": "Orders", + "description": "An order contains a set of items from a seller, to a buyer in a certain currency. Orders can be created in 2 ways: either via a shopping cart checkout (by the buyer, using the operations in the `ShoppingCarts` tag to access it. ) or directly by the seller. Once created, the order must be approved by the other party until its payment is finally performed." + }, + { + "name": "DeliveryMethods", + "description": "Provides access to webshop delivery methods, which must be selected for an order to be created. A delivery method can have either a fixed amount or be negotiated between the seller and the buyer." + }, + { + "name": "WebshopSettings", + "description": "Provides access to general webshop settings for sellers." + }, + { + "name": "AdInterests", + "description": "Provides access to advertisement interests, which are criteria registered by users to be notified when new matching advertisements are published." + }, + { + "name": "NFC", + "description": "Contains operations regarding NFC tags" + }, + { + "name": "Push", + "description": "Provides a way for clients to subscribe for push notifications" + }, + { + "name": "UI", + "description": "Provides data used to create alternative user interfaces" + }, + { + "name": "Validation", + "description": "Provides access to complete pending actions waiting for validation." + }, + { + "name": "Localization", + "description": "Provides access to different languages and localization settings." + }, + { + "name": "Alerts", + "description": "Provides access to alerts generated in the system. Currently only user alerts are supported (system alerts are not)." + }, + { + "name": "References", + "description": "Provides access to (general) references, which are given from a user to another to show the satisfaction level." + }, + { + "name": "PaymentFeedbacks", + "description": "Provides access to feedbacks given to user-to-user payments." + }, + { + "name": "OIDC", + "description": "Provides the delegation of data and operations via OAuth2 / OpenID Connect. These are standard protocols which enables logging-in on other services with Cyclos, as well as allowing external services to perform operations in behalf of users." + }, + { + "name": "PrivacySettings", + "description": "Provides a way to define how the personal data can be accessed." + }, + { + "name": "Firebase", + "description": "Provides integration with Firebase products, e.g. FCM." + }, + { + "name": "Invite", + "description": "Provides operations to invite external users to join the system." + }, + { + "name": "Imports", + "description": "Provides operations to import varios database entities from CSV files." + } + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "paths": { + "/auth": { + "get": { + "operationId": "getCurrentAuth", + "summary": "Returns data about the currently authenticated user", + "description": "Returns the logged user information.", + "tags": [ + "Auth" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "An object containing the authenticated user information", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Auth" + } + } + } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } + } + }, + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } + } + }, + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -300,91 +389,97 @@ } } }, - "/auth/data-for-login" : { - "get" : { - "operationId" : "getDataForLogin", - "summary" : "Returns data containing the configuration for logging-in", - "description" : "Contains data useful for login, such as the allowed user identification methods, the password type and data for the forgot password request.", - "tags" : [ "Auth" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "deviceId", - "in" : "query", - "required" : false, - "description" : "Trusted device identification. If given and the device is active then a pending device confirmation will be created that will be validated after the user logs-in. If the validation passes then no confirmation password will be used only for that session.", - "schema" : { - "type" : "string" - } - }, { - "name" : "pinPrincipal", - "in" : "query", - "required" : false, - "description" : "Device PIN principal. If given then the information about whether it is active or not will be given in the returned `dataForLogin`.", - "schema" : { - "type" : "string" + "/auth/data-for-login": { + "get": { + "operationId": "getDataForLogin", + "summary": "Returns data containing the configuration for logging-in", + "description": "Contains data useful for login, such as the allowed user identification methods, the password type and data for the forgot password request.", + "tags": [ + "Auth" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "deviceId", + "in": "query", + "required": false, + "description": "Trusted device identification. If given and the device is active then a pending device confirmation will be created that will be validated after the user logs-in. If the validation passes then no confirmation password will be used only for that session.", + "schema": { + "type": "string" + } + }, + { + "name": "pinPrincipal", + "in": "query", + "required": false, + "description": "Device PIN principal. If given then the information about whether it is active or not will be given in the returned `dataForLogin`.", + "schema": { + "type": "string" + } } - } ], - "responses" : { - "200" : { - "description" : "Data for the login functionality", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DataForLogin" + ], + "responses": { + "200": { + "description": "Data for the login functionality", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DataForLogin" } } } }, - "204" : { - "description" : "If there is an authenticated user already" + "204": { + "description": "If there is an authenticated user already" }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -392,370 +487,404 @@ } } }, - "/auth/session" : { - "get" : { - "operationId" : "getSessionProperties", - "summary" : "Returns properties of the current session", - "description" : "Only when there's an authenticated user via session (`Session-Token` header). Otherwise, nothing is returned.", - "tags" : [ "Auth" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "Properties of the current session", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SessionPropertiesView" + "/auth/session": { + "get": { + "operationId": "getSessionProperties", + "summary": "Returns properties of the current session", + "description": "Only when there's an authenticated user via session (`Session-Token` header). Otherwise, nothing is returned.", + "tags": [ + "Auth" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "Properties of the current session", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SessionPropertiesView" } } } }, - "204" : { - "description" : "If not authenticated with a session" + "204": { + "description": "If not authenticated with a session" }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } }, - "put" : { - "operationId" : "setSessionProperties", - "summary" : "Sets properties of the current session", - "description" : "Currently the only property that can be set is `source`. However, in order to do it, the current session must be trusted.", - "tags" : [ "Auth" ], - "security" : [ { - "session" : [ ] - } ], - "requestBody" : { - "description" : "The new properties", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SessionPropertiesEdit" + "put": { + "operationId": "setSessionProperties", + "summary": "Sets properties of the current session", + "description": "Currently the only property that can be set is `source`. However, in order to do it, the current session must be trusted.", + "tags": [ + "Auth" + ], + "security": [ + { + "session": [] + } + ], + "requestBody": { + "description": "The new properties", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SessionPropertiesEdit" } } } }, - "responses" : { - "204" : { - "description" : "The session properties are updated and nothing is returned." + "responses": { + "204": { + "description": "The session properties are updated and nothing is returned." }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } - }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + }, + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } }, - "post" : { - "operationId" : "login", - "summary" : "Logs-in the currently authenticated user or perform a login through a trusted device.", - "description" : "Logs-in the currently authenticated user (if any) or the user owner of the given deviceId only if the device confirmation (returned in /auth/data-for-login) can be approved. If the login was successful then the session token is returned. This token can then be used on subsequent requests. After finishing the session, the user can then logout by sending an HTTP DELETE to /auth.", - "tags" : [ "Auth" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "cookie", - "in" : "query", - "required" : false, - "description" : "If true then the server adds the `Session-Token` cookie to the response containing only the second half of the session token. The returned `sessionToken` field will contain the first half.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "timeoutInSeconds", - "in" : "query", - "required" : false, - "description" : "The timeout in seconds for the created session. If this value is not given or it is greater than that for the channel then the timeout for the channel will be used.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "deviceConfirmationId", - "in" : "query", - "required" : false, - "description" : "The id of the confirmation (returned in the DataForLogin)", - "schema" : { - "type" : "string" - } - }, { - "name" : "deviceId", - "in" : "query", - "required" : false, - "description" : "The id of the device used to confirm the session as trusted.", - "schema" : { - "type" : "string" - } - }, { - "name" : "hmac", - "in" : "query", - "required" : false, - "description" : "The HMAC-SHA256 calculated for the QR-code of the confirmation using the secret key stored in the device.", - "schema" : { - "type" : "string" - } - }, { - "name" : "identityProviderRequestId", - "in" : "query", - "required" : false, - "description" : "When using an [external identity provider](https://wiki4.cyclos.org/index.php/External_identity_providers), this is the request id used to automatically link the user to the provider. Is only needed when no user was matched, that is, no user in Cyclos was linked to the identifier returned by the provider, and no user was found in Cyclos with the same e-mail address as returned by the provider.", - "schema" : { - "type" : "string" - } - }, { - "name" : "fcmDeviceToken", - "in" : "query", - "required" : false, - "description" : "When using firebase, this is the token assigned to the device. It will be used to associate it to the user being logged in. This will allow the user receive platform notifications.", - "schema" : { - "type" : "string" + "post": { + "operationId": "login", + "summary": "Logs-in the currently authenticated user or perform a login through a trusted device.", + "description": "Logs-in the currently authenticated user (if any) or the user owner of the given deviceId only if the device confirmation (returned in /auth/data-for-login) can be approved. If the login was successful then the session token is returned. This token can then be used on subsequent requests. After finishing the session, the user can then logout by sending an HTTP DELETE to /auth.", + "tags": [ + "Auth" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "cookie", + "in": "query", + "required": false, + "description": "If true then the server adds the `Session-Token` cookie to the response containing only the second half of the session token. The returned `sessionToken` field will contain the first half.", + "schema": { + "type": "boolean" + } + }, + { + "name": "timeoutInSeconds", + "in": "query", + "required": false, + "description": "The timeout in seconds for the created session. If this value is not given or it is greater than that for the channel then the timeout for the channel will be used.", + "schema": { + "type": "integer" + } + }, + { + "name": "deviceConfirmationId", + "in": "query", + "required": false, + "description": "The id of the confirmation (returned in the DataForLogin)", + "schema": { + "type": "string" + } + }, + { + "name": "userAgentId", + "in": "query", + "required": false, + "description": "A stable client-side generated id which will be used to identify when the user has logged-in from a previously unknown device, and then notify the user.", + "schema": { + "type": "string" + } + }, + { + "name": "deviceId", + "in": "query", + "required": false, + "description": "The id of the device used to confirm the session as trusted.", + "schema": { + "type": "string" + } + }, + { + "name": "hmac", + "in": "query", + "required": false, + "description": "The HMAC-SHA256 calculated for the QR-code of the confirmation using the secret key stored in the device.", + "schema": { + "type": "string" + } + }, + { + "name": "identityProviderRequestId", + "in": "query", + "required": false, + "description": "When using an [external identity provider](https://wiki4.cyclos.org/index.php/External_identity_providers), this is the request id used to automatically link the user to the provider. Is only needed when no user was matched, that is, no user in Cyclos was linked to the identifier returned by the provider, and no user was found in Cyclos with the same e-mail address as returned by the provider.", + "schema": { + "type": "string" + } + }, + { + "name": "fcmDeviceToken", + "in": "query", + "required": false, + "description": "When using firebase, this is the token assigned to the device. It will be used to associate it to the user being logged in. This will allow the user receive platform notifications.", + "schema": { + "type": "string" + } } - } ], - "responses" : { - "200" : { - "description" : "Information about the authenticated user. Is the same data returned on GET /auth", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/LoginAuth" + ], + "responses": { + "200": { + "description": "Information about the authenticated user. Is the same data returned on GET /auth", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LoginAuth" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } }, - "delete" : { - "operationId" : "logout", - "summary" : "Log-out the current session", - "description" : "Invalidates the session used for authentication", - "tags" : [ "Auth" ], - "parameters" : [ { - "name" : "cookie", - "in" : "query", - "required" : false, - "description" : "If true then the server adds the `Session-Token` cookie to the response containing only the second half of the session token. The returned `sessionToken` field will contain the first half.", - "schema" : { - "type" : "boolean" + "delete": { + "operationId": "logout", + "summary": "Log-out the current session", + "description": "Invalidates the session used for authentication", + "tags": [ + "Auth" + ], + "parameters": [ + { + "name": "cookie", + "in": "query", + "required": false, + "description": "If true then the server adds the `Session-Token` cookie to the response containing only the second half of the session token. The returned `sessionToken` field will contain the first half.", + "schema": { + "type": "boolean" + } } - } ], - "security" : [ { - "session" : [ ] - } ], - "responses" : { - "200" : { - "description" : "The session was invalidated" + ], + "security": [ + { + "session": [] + } + ], + "responses": { + "200": { + "description": "The session was invalidated" }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -763,86 +892,91 @@ } } }, - "/auth/session/replace/{sessionToken}" : { - "post" : { - "operationId" : "replaceSession", - "summary" : "Replaces a session token previously obtained", - "description" : "This operation is intended to be used by custom frontends which log-in users externally. In those cases, the full session token is obtained. This operation replaces that session token, assuming it could be compromised by being sent through other mediums (e-mail, etc) by a new session token. The given session token is validated and removed, and a new session is created. Also accepts the `cookie` parameter with the same meaning as the `login` / `logout` operations.\n\nThis operation can only be invoked as guest.", - "tags" : [ "Auth" ], - "parameters" : [ { - "name" : "sessionToken", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - }, - "description" : "The full session token obtained externally" - }, { - "name" : "cookie", - "in" : "query", - "required" : false, - "schema" : { - "type" : "boolean" + "/auth/session/replace/{sessionToken}": { + "post": { + "operationId": "replaceSession", + "summary": "Replaces a session token previously obtained", + "description": "This operation is intended to be used by custom frontends which log-in users externally. In those cases, the full session token is obtained. This operation replaces that session token, assuming it could be compromised by being sent through other mediums (e-mail, etc) by a new session token. The given session token is validated and removed, and a new session is created. Also accepts the `cookie` parameter with the same meaning as the `login` / `logout` operations.\n\nThis operation can only be invoked as guest.", + "tags": [ + "Auth" + ], + "parameters": [ + { + "name": "sessionToken", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The full session token obtained externally" }, - "description" : "If true then the server adds the `Session-Token` cookie to the response containing only the second half of the session token. The returned `sessionToken` field will contain the first half." - } ], - "responses" : { - "200" : { - "description" : "The new session token, either just half of it or full, according to the `cookie` parameter.", - "content" : { - "text/plain" : { - "schema" : { - "type" : "string" + { + "name": "cookie", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + }, + "description": "If true then the server adds the `Session-Token` cookie to the response containing only the second half of the session token. The returned `sessionToken` field will contain the first half." + } + ], + "responses": { + "200": { + "description": "The new session token, either just half of it or full, according to the `cookie` parameter.", + "content": { + "text/plain": { + "schema": { + "type": "string" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -850,253 +984,268 @@ } } }, - "/auth/session/secondary-password" : { - "get" : { - "security" : [ { - "session" : [ ] - } ], - "operationId" : "getSecondaryPasswordInput", - "summary" : "Returns the data for a secondary access password input", - "description" : "Returns the data for a secondary access password input. Only if there is a secondary access password configured for the channel.", - "tags" : [ "Auth" ], - "responses" : { - "200" : { - "description" : "Data for a secondary access password input", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PasswordInput" + "/auth/session/login-confirmation": { + "get": { + "security": [ + { + "session": [] + } + ], + "operationId": "getLoginConfirmation", + "summary": "Returns the data for entering the login confirmation.", + "description": "Only if login confirmation is used for the currently logged user.", + "tags": [ + "Auth" + ], + "responses": { + "200": { + "description": "Data for entering the login confirmation credential", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PasswordInput" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } }, - "post" : { - "security" : [ { - "session" : [ ] - } ], - "operationId" : "validateSecondaryPassword", - "summary" : "Validates the current pending session", - "description" : "Validates a pending session using the secondary access password (if any) configured for the current channel.", - "tags" : [ "Auth" ], - "parameters" : [ ], - "responses" : { - "204" : { - "description" : "The session was validated correctly and the user has logged in successfully." + "post": { + "security": [ + { + "session": [] + } + ], + "operationId": "confirmLogin", + "summary": "Confirms the login in the current session.", + "description": "Validates the login in the current session.", + "tags": [ + "Auth" + ], + "parameters": [], + "responses": { + "204": { + "description": "The session was validated correctly and the user login was finished." }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } }, - "requestBody" : { - "description" : "The secondary access password", - "required" : true, - "content" : { - "text/plain" : { - "schema" : { - "type" : "string" - } - } - } - } - } - }, - "/auth/session/secondary-password/otp" : { - "post" : { - "security" : [ { - "session" : [ ] - } ], - "operationId" : "newOtpForSecondaryPassword", - "summary" : "Generates a new One-Time-Password (OTP) for the secondary password", - "description" : "Sends a new OTP for the authenticated user. Used when the secondary password for the channel access has `PasswordInput.mode` = `otp`.", - "tags" : [ "Auth" ], - "parameters" : [ { - "name" : "medium", - "in" : "query", - "required" : true, - "description" : "The medium the user wants to receive the OTP", - "schema" : { - "$ref" : "#/components/schemas/SendMediumEnum" - } - }, { - "name" : "mobilePhones", - "description" : "The mobile phones (comma-separated list of identifiers) to send the otp when the medium is `sms`. If not given, the sms will be sent to all mobiles phones enabled for sms.", - "in" : "query", - "schema" : { - "type" : "array", - "items" : { - "type" : "string" - } - } - } ], - "responses" : { - "200" : { - "description" : "The OTP is sent to the user, and the e-mail or list of normalized mobile phone numbers that received the OTP are returned.", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "type" : "string" + "requestBody": { + "description": "The confirmation credential, as configured. When using a device confirmation, should be `confirmation:`, and when using a TOTP from an authenticator app, should be `totp:`.", + "required": true, + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + } + } + }, + "/auth/session/login-confirmation/otp": { + "post": { + "security": [ + { + "session": [] + } + ], + "operationId": "newOtpForLoginConfirmation", + "summary": "Generates a new One-Time-Password (OTP) for the login confirmation.", + "description": "Used when the channel is configured to use a password with `PasswordInput.mode` = `otp`.", + "tags": [ + "Auth" + ], + "parameters": [ + { + "name": "medium", + "in": "query", + "required": true, + "description": "The medium the user wants to receive the OTP", + "schema": { + "$ref": "#/components/schemas/SendMediumEnum" + } + }, + { + "name": "mobilePhones", + "description": "The mobile phones (comma-separated list of identifiers) to send the otp when the medium is `sms`. If not given, the sms will be sent to all mobiles phones enabled for sms.", + "in": "query", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "The OTP is sent to the user, and the e-mail or list of normalized mobile phone numbers that received the OTP are returned.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" } } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -1104,78 +1253,84 @@ } } }, - "/auth/access-client" : { - "delete" : { - "operationId" : "disconnectCurrentClient", - "summary" : "Disconnect the current access client", - "description" : "Changes the status of the access client used for authentication, disconnecting it. To be reused, it has to be activated again.", - "tags" : [ "Auth" ], - "security" : [ { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/confirmationPassword" - } ], - "responses" : { - "200" : { - "description" : "The access client was disconnected" + "/auth/access-client": { + "delete": { + "operationId": "disconnectCurrentClient", + "summary": "Disconnect the current access client", + "description": "Changes the status of the access client used for authentication, disconnecting it. To be reused, it has to be activated again.", + "tags": [ + "Auth" + ], + "security": [ + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/confirmationPassword" + } + ], + "responses": { + "200": { + "description": "The access client was disconnected" }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -1183,116 +1338,126 @@ } } }, - "/auth/otp" : { - "post" : { - "operationId" : "newOtp", - "summary" : "Generates a new One-Time-Password (OTP) for the authenticated user", - "description" : "Sends a new OTP for the authenticated user. Used when the confirmation password of a specific action is required and `PasswordInput.mode` is `otp`.", - "tags" : [ "Auth" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "name" : "otpChannel", - "in" : "query", - "required" : false, - "description" : "The channel name in which the OTP will be used to confirm the operation. Please do not confuse with the parameter used to specify the channel through the client is connecting with Cyclos. The configuration for the given channel will be used to validate the request. E.g. when confirming an easy invoice / ticket through a custom front using a channel other than `easyInvoice` / `ticket` then the channel `easyInvoice` / `ticket` must be set at the moment of requesting an OTP.", - "schema" : { - "type" : "string" - } - }, { - "name" : "medium", - "in" : "query", - "required" : true, - "description" : "The medium the user wants to receive the OTP", - "schema" : { - "$ref" : "#/components/schemas/SendMediumEnum" - } - }, { - "name" : "mobilePhones", - "description" : "The mobile phones (comma-separated list of identifiers) to send the otp when the medium is `sms`. If not given, the sms will be sent to all mobiles phones enabled for sms.", - "in" : "query", - "schema" : { - "type" : "array", - "items" : { - "type" : "string" - } - } - } ], - "responses" : { - "200" : { - "description" : "The OTP is sent to the user, and the e-mail or list of normalized mobile phone numbers that received the OTP are returned.", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "type" : "string" + "/auth/otp": { + "post": { + "operationId": "newOtp", + "summary": "Generates a new One-Time-Password (OTP) for the authenticated user", + "description": "Sends a new OTP for the authenticated user. Used when the confirmation password of a specific action is required and `PasswordInput.mode` is `otp`.", + "tags": [ + "Auth" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "name": "otpChannel", + "in": "query", + "required": false, + "description": "The channel name in which the OTP will be used to confirm the operation. Please do not confuse with the parameter used to specify the channel through the client is connecting with Cyclos. The configuration for the given channel will be used to validate the request. E.g. when confirming an easy invoice / ticket through a custom front using a channel other than `easyInvoice` / `ticket` then the channel `easyInvoice` / `ticket` must be set at the moment of requesting an OTP.", + "schema": { + "type": "string" + } + }, + { + "name": "medium", + "in": "query", + "required": true, + "description": "The medium the user wants to receive the OTP", + "schema": { + "$ref": "#/components/schemas/SendMediumEnum" + } + }, + { + "name": "mobilePhones", + "description": "The mobile phones (comma-separated list of identifiers) to send the otp when the medium is `sms`. If not given, the sms will be sent to all mobiles phones enabled for sms.", + "in": "query", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "The OTP is sent to the user, and the e-mail or list of normalized mobile phone numbers that received the OTP are returned.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" } } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -1300,180 +1465,188 @@ } } }, - "/auth/forgotten-password/request" : { - "post" : { - "operationId" : "forgottenPasswordRequest", - "summary" : "Requests a forgotten password, notifying the user with instructions to reset it", - "description" : "Sends a verification code to the user, either by e-mail or SMS, so that they can change the password if it was forgotten. For it to work, the Cyclos configuration must allow the forgotten password operation.", - "tags" : [ "Auth" ], - "parameters" : [ ], - "responses" : { - "200" : { - "description" : "The verification code is sent", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForgottenPasswordResponse" + "/auth/forgotten-password/request": { + "post": { + "operationId": "forgottenPasswordRequest", + "summary": "Requests a forgotten password, notifying the user with instructions to reset it", + "description": "Sends a verification code to the user, either by e-mail or SMS, so that they can change the password if it was forgotten. For it to work, the Cyclos configuration must allow the forgotten password operation.", + "tags": [ + "Auth" + ], + "parameters": [], + "responses": { + "200": { + "description": "The verification code is sent", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForgottenPasswordResponse" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } }, - "requestBody" : { - "description" : "The parameters for requesting a forgotten password reset", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForgottenPasswordRequest" + "requestBody": { + "description": "The parameters for requesting a forgotten password reset", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForgottenPasswordRequest" } } } } } }, - "/auth/forgotten-password/data-for-change" : { - "get" : { - "operationId" : "getDataForChangeForgottenPassword", - "summary" : "Returns configuration data used to change a forgotten password after the initial request", - "description" : "After the user has requested a forgotten password reset, using the `POST /auth/forgotten-password/request` path, the received e-mail or sms will contain the verification code which can be used to actually change the password. This code and the user must be passed to this operation in order to request input on the new password, and maybe confirm the security question, depending on the Cyclos configuration.", - "tags" : [ "Auth" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "user", - "in" : "query", - "required" : true, - "description" : "The user identification for password change", - "schema" : { - "type" : "string" - } - }, { - "name" : "code", - "in" : "query", - "required" : true, - "description" : "The verification code which was sent to the user", - "schema" : { - "type" : "string" + "/auth/forgotten-password/data-for-change": { + "get": { + "operationId": "getDataForChangeForgottenPassword", + "summary": "Returns configuration data used to change a forgotten password after the initial request", + "description": "After the user has requested a forgotten password reset, using the `POST /auth/forgotten-password/request` path, the received e-mail or sms will contain the verification code which can be used to actually change the password. This code and the user must be passed to this operation in order to request input on the new password, and maybe confirm the security question, depending on the Cyclos configuration.", + "tags": [ + "Auth" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "user", + "in": "query", + "required": true, + "description": "The user identification for password change", + "schema": { + "type": "string" + } + }, + { + "name": "code", + "in": "query", + "required": true, + "description": "The verification code which was sent to the user", + "schema": { + "type": "string" + } } - } ], - "responses" : { - "200" : { - "description" : "The data for proceeding with the forgot password reset", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DataForChangeForgottenPassword" + ], + "responses": { + "200": { + "description": "The data for proceeding with the forgot password reset", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DataForChangeForgottenPassword" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -1481,892 +1654,725 @@ } } }, - "/auth/forgotten-password" : { - "post" : { - "operationId" : "changeForgottenPassword", - "summary" : "Changes the a forgotten password after have completed the request", - "description" : "Changes the password (if manual), or sends a new one by e-mail (if generated) after the forgotten password reset process is completed.", - "tags" : [ "Auth" ], - "parameters" : [ ], - "responses" : { - "204" : { - "description" : "The password is changed (if manual) or reset and sent by e-mail (if generated) and nothing is returned." + "/auth/forgotten-password": { + "post": { + "operationId": "changeForgottenPassword", + "summary": "Changes the a forgotten password after have completed the request", + "description": "Changes the password (if manual), or sends a new one by e-mail (if generated) after the forgotten password reset process is completed.", + "tags": [ + "Auth" + ], + "parameters": [], + "responses": { + "204": { + "description": "The password is changed (if manual) or reset and sent by e-mail (if generated) and nothing is returned." }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "There was an error when changing the forgotten password", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForgottenPasswordError" - } - } - } - } - }, - "requestBody" : { - "description" : "The parameters for changing the password", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ChangeForgottenPassword" - } - } - } - } - } - }, - "/oidc/authorize" : { - "get" : { - "operationId" : "oidcAuthorize", - "summary" : "The standard OAuth2 / OpenID Connect authorization endpoint.", - "description" : "Creates a new authorization request. A redirect in HTML format is returne, which should be followed for the user to identify himself and grant the consent to the requested resources.\nFor more information, see also:\n\n- [OAuth 2.0 authorization endpoint](http://tools.ietf.org/html/rfc6749#section-3.1)\n- [OIDC authentication request](http://openid.net/specs/openid-connect-core-1_0.html#AuthRequest)\n- [OIDC successful authentication response](http://openid.net/specs/openid-connect-core-1_0.html#AuthResponse)\n- [OIDC authentication error response](http://openid.net/specs/openid-connect-core-1_0.html#AuthError)\n\nThe following standard optional parameters are not supported by Cyclos, and thus, ignored:\n\n- `claims`\n- `claims_locales`\n- `max_age`\n- `id_token_hint`\n- `ui_locales`\n- `acr_value`.", - "tags" : [ "OIDC" ], - "parameters" : [ { - "name" : "scope", - "in" : "query", - "required" : true, - "description" : "A space-delimited list of requested scopes. Scopes are permissions to view user data and to perform operations in behalf of the user.\n\nThe OpenID standard scopes are supported:\n- `openid` for enabling the OpenID Connect id tokens. When not\n requested, standard OAuth2 will be used;\n\n- `profile` for basic profile data access;\n- `email` for e-mail access;\n- `phone` for phone number access;\n- `address` for address access;\n- `offline_access` for refresh tokens to be issued.\n\nOther scopes are defined in Cyclos which represent permissions. These scopes are listed in http://root/.well-known/openid-configuration.", - "schema" : { - "type" : "string" - } - }, { - "name" : "response_type", - "in" : "query", - "required" : true, - "description" : "A space-delimited list of response types for this authentication. Accepted avalues are:\n\n- `code`: returing the Authorization code\n- `id_token`: returns the Id token\n- `token`: returns the access token", - "schema" : { - "type" : "string" - } - }, { - "name" : "client_id", - "in" : "query", - "required" : true, - "description" : "The client id as registered in the Cyclos, in OpenID Connect client.", - "schema" : { - "type" : "string" - } - }, { - "name" : "redirect_uri", - "in" : "query", - "required" : true, - "description" : "The URI to which users will be redirected after authentication. Must match one of the registered redirect URIs in Cyclos, in OpenID Connect client.\n", - "schema" : { - "type" : "string" - } - }, { - "name" : "state", - "in" : "query", - "required" : false, - "description" : "A client-state string, which is opaque to the server. Will be passed back to the redirect URL as well as in the generated tokens. Can be used to prevent CSRF attacks by clients.\n", - "schema" : { - "type" : "string" - } - }, { - "name" : "response_mode", - "in" : "query", - "required" : false, - "description" : "How to pass parameters in the redirect URL. Accepted values are:\n\n- `query`: Uses the query string, such as `https://example.com/result?param1=value1¶m2=value2`\n- `fragment`: Uses fragments / hash, such as `https://example.com/result#param1=value1¶m2=value2`\n- `form_post`: Renders an HTML that immediately performs a FORM POST with the parameters\n", - "schema" : { - "type" : "string" - } - }, { - "name" : "nonce", - "in" : "query", - "required" : false, - "description" : "A nonce provided by the client, which will be included in any ID token generated for this session. This is a opaque string for the server, but clients should use it to mitigate replay attacks.\n", - "schema" : { - "type" : "string" - } - }, { - "name" : "display", - "in" : "query", - "required" : false, - "description" : "How the consent page should be displayed. Though currently the consent page is responsive, and as such, doesn't depend on this value, the accepted values are the standard `page`, `popup` and `touch`.\n", - "schema" : { - "type" : "string" - } - }, { - "name" : "prompt", - "in" : "query", - "required" : false, - "description" : "Space-delimited string that determines how the consent page is displayed to the end user.\n\nCyclos currently presents the login and consent page together, so any value other than `none` will actually present the page to the end user to login and consent. There is no such state as a 'previously logged-in' user that would only consent, or first login and then consent. As such, whenever `prompt=none`, Cyclos always replies with `login_required`.\n", - "schema" : { - "type" : "string" - } - }, { - "name" : "login_hint", - "in" : "query", - "required" : false, - "description" : "A principal value (username, e-mail, phone number) for the user that will be initially presented in the authentication page.\n", - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "302" : { - "description" : "Either the request succeeded and the referred location is the user login / consent page, or an error was found, and the referred location is the requested `redirect_uri` with the `error` parameter.", - "headers" : { - "Location" : { - "description" : "The URI to follow", - "schema" : { - "type" : "string" - } - } - } - }, - "400" : { - "description" : "Either the `client_id` parameter was invalid, the `redirect_uri` parameter was not set or doesn't match a valid redirect URI as defined in Cyclos. In this case, both `error` and `error_description` are sent encoded in the response body.", - "content" : { - "application/x-www-form-urlencoded" : { - "schema" : { - "type" : "string" - } - } - } - } - } - } - }, - "/oidc/token" : { - "post" : { - "operationId" : "oidcToken", - "summary" : "The standard OAuth2 / OpenID Connect token endpoint.", - "description" : "Exchanges an authorization code for an id token and / or access token. The client id / secret can either be passed in via a basic authentication or via the `client_id` and `client_secret` parameters.\n\nAlthough the OpenID Connect Core specification doesn't mandate a format for access tokens, Cyclos issues them as signed JSON Web Tokens (JWTs). So, clients can, for instance, check for the expiration date in advance, without having to attempt using an expired token. Clients can verify the signature, which makes it easy to detect whether the token has been tampered with.\n\nFor more information, see also:\n\n- [OAuth 2.0 access token request](https://tools.ietf.org/html/rfc6749#section-4.1.3)\n- [OIDC token request](https://openid.net/specs/openid-connect-core-1_0.html#TokenRequest)\n- [OIDC successful token response](https://openid.net/specs/openid-connect-core-1_0.html#TokenResponse)\n- [OIDC token error response](https://openid.net/specs/openid-connect-core-1_0.html#TokenErrorResponse)", - "tags" : [ "OIDC" ], - "requestBody" : { - "required" : true, - "content" : { - "application/x-www-form-urlencoded" : { - "schema" : { - "type" : "object", - "required" : [ "grant_type" ], - "properties" : { - "client_id" : { - "description" : "The client id when not using an HTTP Basic authentication.", - "type" : "string" - }, - "client_secret" : { - "description" : "The client secret when not using an HTTP Basic authentication.", - "type" : "string" - }, - "grant_type" : { - "description" : "The supported values are `authorization_code` and `refresh_token`.", - "type" : "string" - }, - "code" : { - "description" : "The authorization code received in the authorize endpoint. Required when `grant_type` is `authorization_code`.", - "type" : "string" - }, - "redirect_uri" : { - "description" : "The same `redirect_uri` passed in the `authorize` request. Required when `grant_type` is `authorization_code`.", - "type" : "string" - }, - "refresh_token" : { - "description" : "The refresh token requested authorization code received in the authorize endpoint. Required when `grant_type` is `refresh_token`.", - "type" : "string" - } + "500": { + "description": "There was an error when changing the forgotten password", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForgottenPasswordError" } } } } }, - "responses" : { - "200" : { - "description" : "The object containing the access token and the ID token", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/OidcTokenResult" - } - } - } - }, - "400" : { - "description" : "Error validating the request", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/OidcError" - } - } - } - }, - "500" : { - "description" : "Internal server error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/OidcError" - } + "requestBody": { + "description": "The parameters for changing the password", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeForgottenPassword" } } } } } }, - "/oidc/revoke" : { - "post" : { - "operationId" : "oidcRevoke", - "summary" : "The standard OAuth2 token revocation endpoint.", - "description" : "Revokes a refresh token or access token.\nFor more information, see also:\n\n- [OAuth 2.0 token revocation](https://tools.ietf.org/html/rfc7009#section-2)", - "tags" : [ "OIDC" ], - "requestBody" : { - "required" : true, - "content" : { - "application/x-www-form-urlencoded" : { - "schema" : { - "type" : "object", - "required" : [ "token" ], - "properties" : { - "client_id" : { - "description" : "The client id when not using an HTTP Basic authentication.", - "type" : "string" - }, - "client_secret" : { - "description" : "The client secret when not using an HTTP Basic authentication.", - "type" : "string" - }, - "token" : { - "description" : "The token to revoke. May correspond to either a refresh token or an access token.", - "type" : "string" - } - } - } - } - } - }, - "responses" : { - "200" : { - "description" : "Either the token was successfully revoked or the token isn't valid. As per spec, errors shouldn't be returned on either case." + "/auth/session/secondary-password": { + "get": { + "deprecated": true, + "x-remove-version": 4.18, + "security": [ + { + "session": [] } - } - } - }, - "/oidc/userinfo" : { - "get" : { - "operationId" : "oidcUserInfoGet", - "summary" : "The standard OpenID Connect UserInfo endpoint, using the `GET` method.", - "description" : "Returns all granted claims about the identified user. The OpenID Connect specification requires both `GET` and `POST` methods to be available for this endpoint. This is the implementation via `GET` method.\n\nFor more information, see also:\n\n- [OIDC UserInfo Endpoint](https://openid.net/specs/openid-connect-core-1_0.html#UserInfo)", - "tags" : [ "OIDC" ], - "security" : [ { - "oidc" : [ "openid" ] - } ], - "responses" : { - "200" : { - "description" : "The user claims encoded as JSON", - "content" : { - "application/json" : { - "schema" : { - "type" : "object" - } - } - } - }, - "401" : { - "description" : "The provided access token is invalid", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/OidcError" + ], + "operationId": "getSecondaryPasswordInput", + "summary": "Use `GET /auth/session/login-confirmation` instead.", + "description": "DEPRECATED", + "tags": [ + "Auth" + ], + "responses": { + "200": { + "description": "Data for a secondary access password input", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PasswordInput" } } } }, - "403" : { - "description" : "The `openid` scope was not granted for this access token", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/OidcError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "500" : { - "description" : "Internal server error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/OidcError" - } - } - } - } - } - }, - "post" : { - "operationId" : "oidcUserInfoPost", - "summary" : "The standard OpenID Connect UserInfo endpoint, using the `POST` method.", - "description" : "Returns all granted claims about the identified user. The OpenID Connect specification requires both `GET` and `POST` methods to be available for this endpoint. This is the implementation via `POST` method.\n\nFor more information, see also:\n\n- [OIDC UserInfo Endpoint](https://openid.net/specs/openid-connect-core-1_0.html#UserInfo)", - "tags" : [ "OIDC" ], - "security" : [ { - "oidc" : [ "openid" ] - } ], - "responses" : { - "200" : { - "description" : "The user claims encoded as JSON", - "content" : { - "application/json" : { - "schema" : { - "type" : "object" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "401" : { - "description" : "The provided access token is invalid", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/OidcError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "403" : { - "description" : "The `openid` scope was not granted for this access token", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/OidcError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Internal server error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/OidcError" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - } - }, - "/oidc/jwks" : { - "get" : { - "operationId" : "oidcJwks", - "summary" : "The standard OpenID Connect JWKS endpoint.", - "description" : "Returns the keys used to sign issued JSON Web Tokens (JWT).\n\n- [JSON Web Key (JWK)](https://tools.ietf.org/html/draft-ietf-jose-json-web-key-41)", - "tags" : [ "OIDC" ], - "responses" : { - "200" : { - "description" : "The object describing the JWKS", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/JWKSResponse" - } - } - } + }, + "post": { + "deprecated": true, + "x-remove-version": 4.18, + "security": [ + { + "session": [] } - } - } - }, - "/sessions/data-for-search" : { - "get" : { - "operationId" : "getSessionDataForSearch", - "summary" : "Returns data for searching user sessions", - "description" : "Returns data for searching connected users", - "tags" : [ "Sessions" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The data for searching sessions", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SessionDataForSearch" - } - } - } + ], + "operationId": "validateSecondaryPassword", + "summary": "Use `POST /auth/session/login-confirmation` instead.", + "description": "DEPRECATED", + "tags": [ + "Auth" + ], + "parameters": [], + "responses": { + "204": { + "description": "The session was validated correctly and the user has logged in successfully." }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } - } - } - } - }, - "/sessions" : { - "get" : { - "operationId" : "searchSessions", - "summary" : "Search for sessions", - "description" : "Returns the sessions matching a given criteria.", - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "broker", - "in" : "query", - "required" : false, - "description" : "Either id or a principal (login name, e-mail, etc) of a broker. Used to filter the sessions of users brokered by the given broker.", - "schema" : { - "type" : "string" - } - }, { - "name" : "channels", - "in" : "query", - "required" : false, - "description" : "Internal names of the sessions channels that can be returned.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "excludeCurrentSession", - "in" : "query", - "required" : false, - "description" : "Whether to exclude or not the current session.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "operatorsOf", - "in" : "query", - "required" : false, - "description" : "Either id or a principal (login name, e-mail, etc) of a user. The owner member of the operators sessions Used to filter the operator sessions of the given user.", - "schema" : { - "type" : "string" - } - }, { - "name" : "page", - "in" : "query", - "required" : false, - "description" : "The page number (zero-based) of the search. The default value is zero.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "pageSize", - "in" : "query", - "required" : false, - "description" : "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "roles", - "in" : "query", - "required" : false, - "description" : "The role of the logged user in the sessions.", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/RoleEnum" - } - } - }, { - "name" : "skipTotalCount", - "in" : "query", - "required" : false, - "description" : "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "user", - "in" : "query", - "required" : false, - "description" : "Either id or a principal (login name, e-mail, etc) of the sessions owner.", - "schema" : { - "type" : "string" - } - } ], - "tags" : [ "Sessions" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "200" : { - "description" : "The filtered sessions", - "headers" : { - "X-Total-Count" : { - "schema" : { - "type" : "integer" - }, - "description" : "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." - }, - "X-Page-Size" : { - "schema" : { - "type" : "integer" - }, - "description" : "The maximum number of results per page" - }, - "X-Current-Page" : { - "schema" : { - "type" : "integer" - }, - "description" : "The current page the results are in" - }, - "X-Has-Next-Page" : { - "schema" : { - "type" : "boolean" - }, - "description" : "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." + } + }, + "requestBody": { + "description": "The secondary access password", + "required": true, + "content": { + "text/plain": { + "schema": { + "type": "string" } - }, - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/SessionResult" + } + } + } + } + }, + "/auth/session/secondary-password/otp": { + "post": { + "deprecated": true, + "x-remove-version": 4.18, + "security": [ + { + "session": [] + } + ], + "operationId": "newOtpForSecondaryPassword", + "summary": "Use `POST /auth/session/login-confirmation/otp` instead.", + "description": "DEPRECATED", + "tags": [ + "Auth" + ], + "parameters": [ + { + "name": "medium", + "in": "query", + "required": true, + "description": "The medium the user wants to receive the OTP", + "schema": { + "$ref": "#/components/schemas/SendMediumEnum" + } + }, + { + "name": "mobilePhones", + "description": "The mobile phones (comma-separated list of identifiers) to send the otp when the medium is `sms`. If not given, the sms will be sent to all mobiles phones enabled for sms.", + "in": "query", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "The OTP is sent to the user, and the e-mail or list of normalized mobile phone numbers that received the OTP are returned.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" } } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - }, - "post" : { - "operationId" : "loginUser", - "summary" : "Logins a user, returning data from the new session", - "description" : "Creates a session for a given user. Must be executed as administrator with permissions. A channel can be specified (defaults to `main`) so the user can be logged in by some external actor (like an website) and then redirected to `?sessionToken=`. It is also recommended to set in Cyclos the login and logout URLs in the configuration, so, when the user logs out, he will be redirected back to the previous website. If the administrator performing the login has no visible profile fields, only a few fields are returned:\n- `sessionToken` - `group` - `configuration`\nStarting with Cyclos 4.17 only these fields will be retured, regardless of the authenticated administrator permissions.", - "tags" : [ "Sessions" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "An object containing the authenticated user information", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UserAuth" + } + }, + "/oidc/authorize": { + "get": { + "operationId": "oidcAuthorize", + "summary": "The standard OAuth2 / OpenID Connect authorization endpoint.", + "description": "Creates a new authorization request. A redirect in HTML format is returne, which should be followed for the user to identify himself and grant the consent to the requested resources.\nFor more information, see also:\n\n- [OAuth 2.0 authorization endpoint](http://tools.ietf.org/html/rfc6749#section-3.1)\n- [OIDC authentication request](http://openid.net/specs/openid-connect-core-1_0.html#AuthRequest)\n- [OIDC successful authentication response](http://openid.net/specs/openid-connect-core-1_0.html#AuthResponse)\n- [OIDC authentication error response](http://openid.net/specs/openid-connect-core-1_0.html#AuthError)\n\nThe following standard optional parameters are not supported by Cyclos, and thus, ignored:\n\n- `claims`\n- `claims_locales`\n- `max_age`\n- `id_token_hint`\n- `ui_locales`\n- `acr_value`.", + "tags": [ + "OIDC" + ], + "parameters": [ + { + "name": "scope", + "in": "query", + "required": true, + "description": "A space-delimited list of requested scopes. Scopes are permissions to view user data and to perform operations in behalf of the user.\n\nThe OpenID standard scopes are supported:\n- `openid` for enabling the OpenID Connect id tokens. When not\n requested, standard OAuth2 will be used;\n\n- `profile` for basic profile data access;\n- `email` for e-mail access;\n- `phone` for phone number access;\n- `address` for address access;\n- `offline_access` for refresh tokens to be issued.\n\nOther scopes are defined in Cyclos which represent permissions. These scopes are listed in http://root/.well-known/openid-configuration.", + "schema": { + "type": "string" + } + }, + { + "name": "response_type", + "in": "query", + "required": true, + "description": "A space-delimited list of response types for this authentication. Accepted avalues are:\n\n- `code`: returing the Authorization code\n- `id_token`: returns the Id token\n- `token`: returns the access token", + "schema": { + "type": "string" + } + }, + { + "name": "client_id", + "in": "query", + "required": true, + "description": "The client id as registered in the Cyclos, in OpenID Connect client.", + "schema": { + "type": "string" + } + }, + { + "name": "redirect_uri", + "in": "query", + "required": true, + "description": "The URI to which users will be redirected after authentication. Must match one of the registered redirect URIs in Cyclos, in OpenID Connect client.\n", + "schema": { + "type": "string" + } + }, + { + "name": "state", + "in": "query", + "required": false, + "description": "A client-state string, which is opaque to the server. Will be passed back to the redirect URL as well as in the generated tokens. Can be used to prevent CSRF attacks by clients.\n", + "schema": { + "type": "string" + } + }, + { + "name": "response_mode", + "in": "query", + "required": false, + "description": "How to pass parameters in the redirect URL. Accepted values are:\n\n- `query`: Uses the query string, such as `https://example.com/result?param1=value1¶m2=value2`\n- `fragment`: Uses fragments / hash, such as `https://example.com/result#param1=value1¶m2=value2`\n- `form_post`: Renders an HTML that immediately performs a FORM POST with the parameters\n", + "schema": { + "type": "string" + } + }, + { + "name": "nonce", + "in": "query", + "required": false, + "description": "A nonce provided by the client, which will be included in any ID token generated for this session. This is a opaque string for the server, but clients should use it to mitigate replay attacks.\n", + "schema": { + "type": "string" + } + }, + { + "name": "display", + "in": "query", + "required": false, + "description": "How the consent page should be displayed. Though currently the consent page is responsive, and as such, doesn't depend on this value, the accepted values are the standard `page`, `popup` and `touch`.\n", + "schema": { + "type": "string" + } + }, + { + "name": "prompt", + "in": "query", + "required": false, + "description": "Space-delimited string that determines how the consent page is displayed to the end user.\n\nCyclos currently presents the login and consent page together, so any value other than `none` will actually present the page to the end user to login and consent. There is no such state as a 'previously logged-in' user that would only consent, or first login and then consent. As such, whenever `prompt=none`, Cyclos always replies with `login_required`.\n", + "schema": { + "type": "string" + } + }, + { + "name": "login_hint", + "in": "query", + "required": false, + "description": "A principal value (username, e-mail, phone number) for the user that will be initially presented in the authentication page.\n", + "schema": { + "type": "string" + } + } + ], + "responses": { + "302": { + "description": "Either the request succeeded and the referred location is the user login / consent page, or an error was found, and the referred location is the requested `redirect_uri` with the `error` parameter.", + "headers": { + "Location": { + "description": "The URI to follow", + "schema": { + "type": "string" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "400": { + "description": "Either the `client_id` parameter was invalid, the `redirect_uri` parameter was not set or doesn't match a valid redirect URI as defined in Cyclos. In this case, both `error` and `error_description` are sent encoded in the response body.", + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "type": "string" } } } - }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + } + } + } + }, + "/oidc/token": { + "post": { + "operationId": "oidcToken", + "summary": "The standard OAuth2 / OpenID Connect token endpoint.", + "description": "Exchanges an authorization code for an id token and / or access token. The client id / secret can either be passed in via a basic authentication or via the `client_id` and `client_secret` parameters.\n\nAlthough the OpenID Connect Core specification doesn't mandate a format for access tokens, Cyclos issues them as signed JSON Web Tokens (JWTs). So, clients can, for instance, check for the expiration date in advance, without having to attempt using an expired token. Clients can verify the signature, which makes it easy to detect whether the token has been tampered with.\n\nFor more information, see also:\n\n- [OAuth 2.0 access token request](https://tools.ietf.org/html/rfc6749#section-4.1.3)\n- [OIDC token request](https://openid.net/specs/openid-connect-core-1_0.html#TokenRequest)\n- [OIDC successful token response](https://openid.net/specs/openid-connect-core-1_0.html#TokenResponse)\n- [OIDC token error response](https://openid.net/specs/openid-connect-core-1_0.html#TokenErrorResponse)", + "tags": [ + "OIDC" + ], + "requestBody": { + "required": true, + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "type": "object", + "required": [ + "grant_type" + ], + "properties": { + "client_id": { + "description": "The client id when not using an HTTP Basic authentication.", + "type": "string" + }, + "client_secret": { + "description": "The client secret when not using an HTTP Basic authentication.", + "type": "string" + }, + "grant_type": { + "description": "The supported values are `authorization_code` and `refresh_token`.", + "type": "string" + }, + "code": { + "description": "The authorization code received in the authorize endpoint. Required when `grant_type` is `authorization_code`.", + "type": "string" + }, + "redirect_uri": { + "description": "The same `redirect_uri` passed in the `authorize` request. Required when `grant_type` is `authorization_code`.", + "type": "string" + }, + "refresh_token": { + "description": "The refresh token requested authorization code received in the authorize endpoint. Required when `grant_type` is `refresh_token`.", + "type": "string" + } } } } - }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + } + }, + "responses": { + "200": { + "description": "The object containing the access token and the ID token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OidcTokenResult" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "400": { + "description": "Error validating the request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OidcError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OidcError" } } } } - }, - "requestBody" : { - "description" : "Information about the user being logged in", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/LoginUser" + } + } + }, + "/oidc/revoke": { + "post": { + "operationId": "oidcRevoke", + "summary": "The standard OAuth2 token revocation endpoint.", + "description": "Revokes a refresh token or access token.\nFor more information, see also:\n\n- [OAuth 2.0 token revocation](https://tools.ietf.org/html/rfc7009#section-2)", + "tags": [ + "OIDC" + ], + "requestBody": { + "required": true, + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "client_id": { + "description": "The client id when not using an HTTP Basic authentication.", + "type": "string" + }, + "client_secret": { + "description": "The client secret when not using an HTTP Basic authentication.", + "type": "string" + }, + "token": { + "description": "The token to revoke. May correspond to either a refresh token or an access token.", + "type": "string" + } + } } } } + }, + "responses": { + "200": { + "description": "Either the token was successfully revoked or the token isn't valid. As per spec, errors shouldn't be returned on either case." + } } } }, - "/{user}/sessions" : { - "delete" : { - "operationId" : "disconnectUserSessions", - "summary" : "Disconnects all sessions of a user.", - "description" : "Disconnects all sessions of the given user.", - "tags" : [ "Sessions" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/user" - } ], - "responses" : { - "200" : { - "description" : "The number of disconnected sessions.", - "content" : { - "plain/text" : { - "schema" : { - "type" : "string" + "/oidc/userinfo": { + "get": { + "operationId": "oidcUserInfoGet", + "summary": "The standard OpenID Connect UserInfo endpoint, using the `GET` method.", + "description": "Returns all granted claims about the identified user. The OpenID Connect specification requires both `GET` and `POST` methods to be available for this endpoint. This is the implementation via `GET` method.\n\nFor more information, see also:\n\n- [OIDC UserInfo Endpoint](https://openid.net/specs/openid-connect-core-1_0.html#UserInfo)", + "tags": [ + "OIDC" + ], + "security": [ + { + "oidc": [ + "openid" + ] + } + ], + "responses": { + "200": { + "description": "The user claims encoded as JSON", + "content": { + "application/json": { + "schema": { + "type": "object" } } } }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" + "401": { + "description": "The provided access token is invalid", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OidcError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "The `openid` scope was not granted for this access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OidcError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OidcError" + } + } + } + } + } + }, + "post": { + "operationId": "oidcUserInfoPost", + "summary": "The standard OpenID Connect UserInfo endpoint, using the `POST` method.", + "description": "Returns all granted claims about the identified user. The OpenID Connect specification requires both `GET` and `POST` methods to be available for this endpoint. This is the implementation via `POST` method.\n\nFor more information, see also:\n\n- [OIDC UserInfo Endpoint](https://openid.net/specs/openid-connect-core-1_0.html#UserInfo)", + "tags": [ + "OIDC" + ], + "security": [ + { + "oidc": [ + "openid" + ] + } + ], + "responses": { + "200": { + "description": "The user claims encoded as JSON", + "content": { + "application/json": { + "schema": { + "type": "object" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "401": { + "description": "The provided access token is invalid", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OidcError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "403": { + "description": "The `openid` scope was not granted for this access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OidcError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OidcError" } } } @@ -2374,88 +2380,73 @@ } } }, - "/sessions/{sessionToken}" : { - "delete" : { - "operationId" : "disconnectSession", - "summary" : "Disconnects a session.", - "description" : "Disconnects a session by its session token", - "tags" : [ "Sessions" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "name" : "sessionToken", - "required" : true, - "in" : "path", - "schema" : { - "type" : "string" - }, - "description" : "The session token" - } ], - "responses" : { - "204" : { - "description" : "The session was disconnected" - }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" + "/oidc/jwks": { + "get": { + "operationId": "oidcJwks", + "summary": "The standard OpenID Connect JWKS endpoint.", + "description": "Returns the keys used to sign issued JSON Web Tokens (JWT).\n\n- [JSON Web Key (JWK)](https://tools.ietf.org/html/draft-ietf-jose-json-web-key-41)", + "tags": [ + "OIDC" + ], + "responses": { + "200": { + "description": "The object describing the JWKS", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JWKSResponse" } } } - }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } - } - } - }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" - } + } + } + } + }, + "/oidc/register": { + "post": { + "operationId": "oidcRegister", + "summary": "The standard OAuth2 / OpenID dynamic client registration endpoint.", + "description": "This needs to be enabled in Cyclos configuration.\nAllows OAuth2 / OIDC clients to be dynamically registered.\n\nFor more information, see also:\n\n- [OpenID Connect Dynamic Client Registration 1.0](https://openid.net/specs/openid-connect-registration-1_0.html)", + "tags": [ + "OIDC" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OidcRegisterParams" } } - }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + } + }, + "responses": { + "200": { + "description": "The client was registered", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OidcRegisterResult" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "400": { + "description": "Error validating the request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OidcError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OidcError" } } } @@ -2463,94 +2454,87 @@ } } }, - "/captcha" : { - "post" : { - "operationId" : "newCaptcha", - "summary" : "Returns a new captcha challenge", - "description" : "Only allowed when internal captchas are in use.", - "tags" : [ "Captcha" ], - "parameters" : [ { - "name" : "group", - "required" : false, - "in" : "query", - "description" : "On public / user registration, it is possible to specify a destination group, so the captcha background image will be taken from this new group's configured theme.", - "schema" : { - "type" : "string" + "/sessions/data-for-search": { + "get": { + "operationId": "getSessionDataForSearch", + "summary": "Returns data for searching user sessions", + "description": "Returns data for searching connected users", + "tags": [ + "Sessions" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] } - }, { - "name" : "previousChallenge", - "required" : false, - "in" : "query", - "description" : "The previous requested challenge, so it will be removed before generate a new one.", - "schema" : { - "type" : "string" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" } - } ], - "responses" : { - "201" : { - "headers" : { - "Location" : { - "description" : "URL for the image to get the captcha challenge", - "schema" : { - "type" : "string" - } - } - }, - "description" : "A new captcha challenge has been created. The captcha id is returned on the body", - "content" : { - "text/plain" : { - "schema" : { - "type" : "string" + ], + "responses": { + "200": { + "description": "The data for searching sessions", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SessionDataForSearch" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -2558,254 +2542,409 @@ } } }, - "/captcha/{id}" : { - "get" : { - "operationId" : "getCaptchaContent", - "summary" : "Returns a captcha image content", - "description" : "Returns the image content of a captcha text. When neither `width` nor `height` are specified, returns the original size. The original ratio is always maintained. When only of one of the dimensions is specified, it is used as maximum, and the other is calculated. When both are informed, the maximum size with the original ratio that fits both dimensions is used.", - "tags" : [ "Captcha" ], - "parameters" : [ { - "$ref" : "#/components/parameters/id" - }, { - "name" : "group", - "required" : false, - "in" : "query", - "description" : "On public / user registration, it is possible to specify a destination group, so the captcha background image will be taken from this new group's configured theme.", - "schema" : { - "type" : "string" - } - }, { - "name" : "width", - "in" : "query", - "required" : false, - "description" : "The requested image width", - "schema" : { - "type" : "integer" - } - }, { - "name" : "height", - "in" : "query", - "required" : false, - "description" : "The requested file height", - "schema" : { - "type" : "integer" - } - } ], - "responses" : { - "200" : { - "description" : "The image content", - "content" : { - "image/*" : { - "schema" : { - "type" : "string", - "format" : "binary" + "/sessions": { + "get": { + "operationId": "searchSessions", + "summary": "Search for sessions", + "description": "Returns the sessions matching a given criteria.", + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "broker", + "in": "query", + "required": false, + "description": "Either id or a principal (login name, e-mail, etc) of a broker. Used to filter the sessions of users brokered by the given broker.", + "schema": { + "type": "string" + } + }, + { + "name": "channels", + "in": "query", + "required": false, + "description": "Internal names of the sessions channels that can be returned.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "excludeCurrentSession", + "in": "query", + "required": false, + "description": "Whether to exclude or not the current session.", + "schema": { + "type": "boolean" + } + }, + { + "name": "operatorsOf", + "in": "query", + "required": false, + "description": "Either id or a principal (login name, e-mail, etc) of a user. The owner member of the operators sessions Used to filter the operator sessions of the given user.", + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number (zero-based) of the search. The default value is zero.", + "schema": { + "type": "integer" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", + "schema": { + "type": "integer" + } + }, + { + "name": "roles", + "in": "query", + "required": false, + "description": "The role of the logged user in the sessions.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RoleEnum" + } + } + }, + { + "name": "skipTotalCount", + "in": "query", + "required": false, + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", + "schema": { + "type": "boolean" + } + }, + { + "name": "user", + "in": "query", + "required": false, + "description": "Either id or a principal (login name, e-mail, etc) of the sessions owner.", + "schema": { + "type": "string" + } + } + ], + "tags": [ + "Sessions" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "responses": { + "200": { + "description": "The filtered sessions", + "headers": { + "X-Total-Count": { + "schema": { + "type": "integer" + }, + "description": "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." + }, + "X-Page-Size": { + "schema": { + "type": "integer" + }, + "description": "The maximum number of results per page" + }, + "X-Current-Page": { + "schema": { + "type": "integer" + }, + "description": "The current page the results are in" + }, + "X-Has-Next-Page": { + "schema": { + "type": "boolean" + }, + "description": "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." + } + }, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SessionResult" + } + } + } + } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } }, - "delete" : { - "operationId" : "deleteCaptcha", - "summary" : "Deletes a previously generated captcha.", - "description" : "Deletes a previously generated captcha used for registration or login.", - "tags" : [ "Captcha" ], - "parameters" : [ { - "$ref" : "#/components/parameters/id" - } ], - "responses" : { - "204" : { - "description" : "The captcha was removed." + "post": { + "operationId": "loginUser", + "summary": "Logins a user, returning data from the new session", + "description": "Creates a session for a given user. Must be executed as administrator with permissions. A channel can be specified (defaults to `main`) so the user can be logged in by some external actor (like an website) and then redirected to `?sessionToken=`. It is also recommended to set in Cyclos the login and logout URLs in the configuration, so, when the user logs out, he will be redirected back to the previous website. If the administrator performing the login has no visible profile fields, only a few fields are returned:\n- `sessionToken` - `group` - `configuration`\nStarting with Cyclos 4.17 only these fields will be retured, regardless of the authenticated administrator permissions.", + "tags": [ + "Sessions" + ], + "security": [ + { + "basic": [] }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "An object containing the authenticated user information", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserAuth" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } + }, + "requestBody": { + "description": "Information about the user being logged in", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LoginUser" + } + } + } } } }, - "/{user}/identity-providers/list-data" : { - "parameters" : [ { - "$ref" : "#/components/parameters/user" - } ], - "get" : { - "operationId" : "getUserIdentityProvidersListData", - "summary" : "Returns data for identity providers links of the given user.", - "description" : "Returns data for identity providers links of the given user, plus additional data related to them.", - "tags" : [ "IdentityProviders" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The data for listing identity provider links", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UserIdentityProvidersListData" + "/{user}/sessions": { + "delete": { + "operationId": "disconnectUserSessions", + "summary": "Disconnects all sessions of a user.", + "description": "Disconnects all sessions of the given user.", + "tags": [ + "Sessions" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/user" + } + ], + "responses": { + "200": { + "description": "The number of disconnected sessions.", + "content": { + "plain/text": { + "schema": { + "type": "string" + } + } + } + }, + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -2813,99 +2952,96 @@ } } }, - "/{user}/identity-providers/{identityProvider}" : { - "parameters" : [ { - "$ref" : "#/components/parameters/user" - }, { - "name" : "identityProvider", - "in" : "path", - "required" : true, - "description" : "Either the id or internal name of the identity provider", - "schema" : { - "type" : "string" - } - } ], - "delete" : { - "operationId" : "deleteUserIdentityProvider", - "summary" : "Removes the link between a user and an identity provider, optionally disabling it", - "description" : "The link between the user and identity provider is removed. If the user attempts to login with the same provider again and the same e-mail address is used a new link will be automatically create. However, if the `disable` parameter is set to `true`, the provider will be disabled for the user, meaning that any subsequent attempts to login the user with that provider will fail, even if the e-mail addres match.", - "tags" : [ "IdentityProviders" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "name" : "disable", - "in" : "query", - "required" : false, - "description" : "When set to true will disable the link between the user and the provider, preventing a new link to be created on login even if the regitered e-mail address matches the on in the identity provider.", - "schema" : { - "type" : "boolean" + "/sessions/{sessionToken}": { + "delete": { + "operationId": "disconnectSession", + "summary": "Disconnects a session.", + "description": "Disconnects a session by its session token", + "tags": [ + "Sessions" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "name": "sessionToken", + "required": true, + "in": "path", + "schema": { + "type": "string" + }, + "description": "The session token" } - } ], - "responses" : { - "204" : { - "description" : "The link between the user and the identity provider was removed and optionally disabled." + ], + "responses": { + "204": { + "description": "The session was disconnected" }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -2913,78 +3049,99 @@ } } }, - "/identity-providers/{identityProvider}/login" : { - "parameters" : [ { - "name" : "identityProvider", - "in" : "path", - "required" : true, - "description" : "Either the id or internal name of the identity provider", - "schema" : { - "type" : "string" - } - } ], - "post" : { - "operationId" : "prepareIdentityProviderLogin", - "summary" : "Prepares an operation to login a user from an identity provider.", - "description" : "Several validations are performed, and the result contains the URL which should be used to open a browser window to get the user consent.", - "tags" : [ "IdentityProviders" ], - "responses" : { - "200" : { - "description" : "Contains both the request identifier and the URL.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/IdentityProviderRequestResult" + "/captcha": { + "post": { + "operationId": "newCaptcha", + "summary": "Returns a new captcha challenge", + "description": "Only allowed when internal captchas are in use.", + "tags": [ + "Captcha" + ], + "parameters": [ + { + "name": "group", + "required": false, + "in": "query", + "description": "On public / user registration, it is possible to specify a destination group, so the captcha background image will be taken from this new group's configured theme.", + "schema": { + "type": "string" + } + }, + { + "name": "previousChallenge", + "required": false, + "in": "query", + "description": "The previous requested challenge, so it will be removed before generate a new one.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "201": { + "headers": { + "Location": { + "description": "URL for the image to get the captcha challenge", + "schema": { + "type": "string" + } + } + }, + "description": "A new captcha challenge has been created. The captcha id is returned on the body", + "content": { + "text/plain": { + "schema": { + "type": "string" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -2992,175 +3149,182 @@ } } }, - "/identity-providers/{identityProvider}/register" : { - "parameters" : [ { - "name" : "identityProvider", - "in" : "path", - "required" : true, - "description" : "Either the id or internal name of the identity provider", - "schema" : { - "type" : "string" - } - } ], - "post" : { - "operationId" : "prepareIdentityProviderRegistration", - "summary" : "Prepares an operation to register a user from an identity provider.", - "description" : "Several validations are performed, and the result contains the URL which should be used to open a browser window to get the user consent. The channel configuration in Cyclos determines whether registration with identity providers is allowed, and if so, whether a direct registration will be attempted or will just return the profile data to fill-in the registration form.", - "tags" : [ "IdentityProviders" ], - "parameters" : [ { - "name" : "group", - "in" : "query", - "required" : true, - "description" : "The group in which the registration is being requested", - "schema" : { - "type" : "string" + "/captcha/{id}": { + "get": { + "operationId": "getCaptchaContent", + "summary": "Returns a captcha image content", + "description": "Returns the image content of a captcha text. When neither `width` nor `height` are specified, returns the original size. The original ratio is always maintained. When only of one of the dimensions is specified, it is used as maximum, and the other is calculated. When both are informed, the maximum size with the original ratio that fits both dimensions is used.", + "tags": [ + "Captcha" + ], + "parameters": [ + { + "$ref": "#/components/parameters/id" + }, + { + "name": "group", + "required": false, + "in": "query", + "description": "On public / user registration, it is possible to specify a destination group, so the captcha background image will be taken from this new group's configured theme.", + "schema": { + "type": "string" + } + }, + { + "name": "width", + "in": "query", + "required": false, + "description": "The requested image width", + "schema": { + "type": "integer" + } + }, + { + "name": "height", + "in": "query", + "required": false, + "description": "The requested file height", + "schema": { + "type": "integer" + } } - } ], - "responses" : { - "200" : { - "description" : "Contains both the request identifier and the URL.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/IdentityProviderRequestResult" + ], + "responses": { + "200": { + "description": "The image content", + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - } - }, - "/identity-providers/{identityProvider}/wizard" : { - "parameters" : [ { - "name" : "identityProvider", - "in" : "path", - "required" : true, - "description" : "Either the id or internal name of the identity provider", - "schema" : { - "type" : "string" - } - } ], - "post" : { - "operationId" : "prepareIdentityProviderWizard", - "summary" : "Prepares an operation to fill in a registration wizard from an identity provider.", - "description" : "Several validations are performed, and the result contains the URL which should be used to open a browser window to get the user consent. The channel configuration in Cyclos determines whether registration with identity providers is allowed. Direct registration is never done with wizards, even when configured in the channel. The callback result will contain the execution data for the next wizard step.", - "tags" : [ "IdentityProviders" ], - "parameters" : [ { - "name" : "key", - "in" : "query", - "required" : true, - "description" : "The wizard execution key", - "schema" : { - "type" : "string" + }, + "delete": { + "operationId": "deleteCaptcha", + "summary": "Deletes a previously generated captcha.", + "description": "Deletes a previously generated captcha used for registration or login.", + "tags": [ + "Captcha" + ], + "parameters": [ + { + "$ref": "#/components/parameters/id" } - } ], - "responses" : { - "200" : { - "description" : "Contains both the request identifier and the URL.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/IdentityProviderRequestResult" + ], + "responses": { + "204": { + "description": "The captcha was removed." + }, + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -3168,81 +3332,92 @@ } } }, - "/identity-providers/{identityProvider}/link" : { - "parameters" : [ { - "name" : "identityProvider", - "in" : "path", - "required" : true, - "description" : "Either the id or internal name of the identity provider", - "schema" : { - "type" : "string" + "/{user}/identity-providers/list-data": { + "parameters": [ + { + "$ref": "#/components/parameters/user" } - } ], - "post" : { - "operationId" : "prepareIdentityProviderLink", - "summary" : "Prepares an operation to link the authenticated user to an identity provider.", - "description" : "Must be authenticated with a session token (via `Session-Token` request header). Several validations are performed, and the result contains the URL which should be used to open a browser window to get the user consent.", - "tags" : [ "IdentityProviders" ], - "security" : [ { - "session" : [ ] - } ], - "responses" : { - "200" : { - "description" : "Contains both the request identifier and the URL.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/IdentityProviderRequestResult" + ], + "get": { + "operationId": "getUserIdentityProvidersListData", + "summary": "Returns data for identity providers links of the given user.", + "description": "Returns data for identity providers links of the given user, plus additional data related to them.", + "tags": [ + "IdentityProviders" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The data for listing identity provider links", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserIdentityProvidersListData" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -3250,1019 +3425,401 @@ } } }, - "/users/data-for-search" : { - "get" : { - "operationId" : "getUserDataForSearch", - "summary" : "Get configuration data for searching users", - "description" : "Returns data with the current configuration regarding the user search", - "tags" : [ "Users" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "broker", - "in" : "query", - "required" : false, - "description" : "When set, will be data for searching assigned members of the given broker (id, identification method or `self`)", - "schema" : { - "type" : "string" + "/{user}/identity-providers/{identityProvider}": { + "parameters": [ + { + "$ref": "#/components/parameters/user" + }, + { + "name": "identityProvider", + "in": "path", + "required": true, + "description": "Either the id or internal name of the identity provider", + "schema": { + "type": "string" + } + } + ], + "delete": { + "operationId": "deleteUserIdentityProvider", + "summary": "Removes the link between a user and an identity provider, optionally disabling it", + "description": "The link between the user and identity provider is removed. If the user attempts to login with the same provider again and the same e-mail address is used a new link will be automatically create. However, if the `disable` parameter is set to `true`, the provider will be disabled for the user, meaning that any subsequent attempts to login the user with that provider will fail, even if the e-mail addres match.", + "tags": [ + "IdentityProviders" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] } - }, { - "name" : "fromMenu", - "in" : "query", - "required" : false, - "description" : "Set to true if you want to use as group filters those defined in the 'User search in menu' configuration setting. Otherwise the group filters would be those defined in the 'Search users on groups' product setting (or in the configuration in case of guests).", - "schema" : { - "type" : "boolean" + ], + "parameters": [ + { + "name": "disable", + "in": "query", + "required": false, + "description": "When set to true will disable the link between the user and the provider, preventing a new link to be created on login even if the regitered e-mail address matches the on in the identity provider.", + "schema": { + "type": "boolean" + } } - } ], - "responses" : { - "200" : { - "description" : "The configuration data for user search", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UserDataForSearch" + ], + "responses": { + "204": { + "description": "The link between the user and the identity provider was removed and optionally disabled." + }, + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - } - } + } + } }, - "/users" : { - "get" : { - "operationId" : "searchUsers", - "summary" : "Search for users", - "description" : "Returns a page of users that match a given criteria. The fields returned depend on the products, in the profile fields of other users setting. Only fields (both basic or custom) marked to be returned on user list are returned. If no fields are set to be returned, or if the `ignoreProfileFieldsInList` flag is true in the given query then the resulting objects will have the `display` filled in. However, that field is not returned when another profile field is returned, preventing duplicated data to be returned.", - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "acceptedAgreements", - "in" : "query", - "required" : false, - "description" : "Either id or internal names of agreements the user must have accepted. Ignored if the logged user isn't an admin or broker with permission to view the user agreement log.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "activationPeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum user activation date. Only taken into account if searching as administrator or managing broker. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "addressResult", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/UserAddressResultEnum" - } - }, { - "name" : "brokers", - "in" : "query", - "required" : false, - "description" : "Either id or a principal (login name, e-mail, etc) for brokers", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "contactsOwner", - "in" : "query", - "required" : false, - "description" : "Indicates the (managed) user to exclude contacts when `excludecontacts` is set. Defaults to the logged user.", - "schema" : { - "type" : "string" - } - }, { - "name" : "creationPeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum user creation date. Only taken into account if searching as administrator or managing broker. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "excludeContacts", - "in" : "query", - "required" : false, - "description" : "When set to `true` will not return any user that is already a contact of the user indicated on `contactsOwner` (the logged user if not set).", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "fromMenu", - "in" : "query", - "required" : false, - "description" : "When set to true the search will be restricted to those groups defined for the user search menu, if false then for those defined in the 'Search users on groups' product setting (or in the configuration in case of guests).", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "groups", - "in" : "query", - "required" : false, - "description" : "Either id or internal names of groups / group sets", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "hasBroker", - "in" : "query", - "required" : false, - "description" : "When set to `true`, will match only users that have at least one broker. When set to `false`, will will match only users without brokers. Ignored if the logged user isn't an admin.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "ignoreProfileFieldsInList", - "in" : "query", - "required" : false, - "description" : "When set to `true`, instead of returning users with corresponding profile fields set on list, will return them with `display`.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "includeGlobal", - "in" : "query", - "required" : false, - "description" : "Indicates whether global administrators should be returned when searching users in a network. Only usable by global administrators.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "includeGroup", - "in" : "query", - "required" : false, - "description" : "When set to `true` and the logged user has permission to view user groups, will return the `group` property on users.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "includeGroupSet", - "in" : "query", - "required" : false, - "description" : "When set to `true` and the logged user has permission to view user group sets, will return the `groupSet` property on users.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "invitedBy", - "in" : "query", - "required" : false, - "description" : "The user that has invited the returned users. Only used when searching as a manager (admin / broker).", - "schema" : { - "type" : "string" - } - }, { - "name" : "keywords", - "in" : "query", - "required" : false, - "description" : "Textual search keywords. Sometimes, like in user search, the fields matched depends on what is configured on the products.", - "schema" : { - "type" : "string" - } - }, { - "name" : "lastLoginPeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum user last login date. Only taken into account if searching as administrator or managing broker. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "latitude", - "in" : "query", - "required" : false, - "description" : "The reference latitude for distance searches", - "schema" : { - "type" : "number", - "format" : "double" - } - }, { - "name" : "longitude", - "in" : "query", - "required" : false, - "description" : "The reference longitude for distance searches", - "schema" : { - "type" : "number", - "format" : "double" - } - }, { - "name" : "mainBrokerOnly", - "in" : "query", - "required" : false, - "description" : "When set to `true`, will match only users that have the brokers as set in the `brokers` parameter as main broker.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "maxDistance", - "in" : "query", - "required" : false, - "description" : "Maximum straight-line distance between the informed location and the resulting address. Is measured either in kilometers or miles, depending on the configuration. Only accepted if both `longitude` and `latitude` parameters are passed with the actual reference position.", - "schema" : { - "type" : "number", - "format" : "double" - } - }, { - "name" : "notAcceptedAgreements", - "in" : "query", - "required" : false, - "description" : "Either id or internal names of agreements the user must not have accepted. Ignored if the logged user isn't an admin or broker with permission to view the user agreement log.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "orderBy", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/UserOrderByEnum" - } - }, { - "name" : "page", - "in" : "query", - "required" : false, - "description" : "The page number (zero-based) of the search. The default value is zero.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "pageSize", - "in" : "query", - "required" : false, - "description" : "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "products", - "in" : "query", - "required" : false, - "description" : "Either id or internal names of products the users should have assigned. Ignored if the authenticated user isn't an administrator.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "productsIndividuallyAssigned", - "in" : "query", - "required" : false, - "description" : "When set to `true`, the list specifid in `products` will only match users with those products assigned individually, not via group or group set. When set to `false` (default), the products will match any level (individual, group or group set).", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "profileFields", - "in" : "query", - "required" : false, - "description" : "User profile fields, both basic (full name, login name, phone, e-mail, etc) and custom fields, that are used for search. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by `:` (colon). For example, `profileFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, `profileFields=field1:valueA|valueB`. The accepted fields depend on the products the authenticated user has. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `profileFields=rank:bronze|silver,birthDate:2000-01-01|2001-12-31` would match results whose custom field with internal name 'rank' is either bronze or silver, and whose 'birthDate' is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `profileFields=birthDate:|2001-12-31`.\nThe basic profile fields have one of the following identifiers:\n- `name` or `fullName`: Full name; - `username`, `loginName` or `login`: Login name; - `email`: E-mail; - `phone`: Phone; - `accountNumber`, `account`: Account number; - `image`: Image (accepts a boolean value, indicating that either it is required that users either have images or not).\n\nIf address is an allowed profile field for search, specific address fields may be searched. The allowed ones are normally returned as the `addressFieldsInSearch` field in the corresponding result from a data-for-search request. The specific address fields are:\n- `address`: Searches on any address field (not a specific field); - `address.address`: Searches on the fields that represent the street address, which are `addressLine1`, `addressLine2`, `street`, `buildingNumber` and `complement`. Note that normally only a subset of them should be enabled in the configuration (either line 1 / 2 or street + number + complement);\n- `address.zip`: Searches for matching zip (postal) code; - `address.poBox`: Searches for matching postal box; - `address.neighborhood`: Searches by neighborhood; - `address.city`: Searches by city; - `address.region`: Searches by region (or state); - `address.country`: Searches by ISO 3166-1 alpha-2 country code. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `profileFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `profileFields=dynamic:'business`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "roles", - "in" : "query", - "required" : false, - "description" : "", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/RoleEnum" - } - } - }, { - "name" : "skipTotalCount", - "in" : "query", - "required" : false, - "description" : "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "statuses", - "in" : "query", - "required" : false, - "description" : "The possible status of the user. If no status is given, `active` and `blocked` users are returned.", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/UserStatusEnum" - } - } - }, { - "name" : "usersToExclude", - "in" : "query", - "required" : false, - "description" : "Indicated the users to be excluded from the result", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "usersToInclude", - "in" : "query", - "required" : false, - "description" : "Indicated the users to be included in the result. Any other user not present in this list will be excluded from the result.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - } ], - "tags" : [ "Users" ], - "responses" : { - "200" : { - "description" : "The users matching the criteria", - "headers" : { - "X-Total-Count" : { - "schema" : { - "type" : "integer" - }, - "description" : "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." - }, - "X-Page-Size" : { - "schema" : { - "type" : "integer" - }, - "description" : "The maximum number of results per page" - }, - "X-Current-Page" : { - "schema" : { - "type" : "integer" - }, - "description" : "The current page the results are in" - }, - "X-Has-Next-Page" : { - "schema" : { - "type" : "boolean" - }, - "description" : "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." - } - }, - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/UserResult" - } - } - } + "/identity-providers/{identityProvider}/login": { + "parameters": [ + { + "name": "identityProvider", + "in": "path", + "required": true, + "description": "Either the id or internal name of the identity provider", + "schema": { + "type": "string" + } + } + ], + "post": { + "operationId": "prepareIdentityProviderLogin", + "summary": "Prepares an operation to login a user from an identity provider.", + "description": "Several validations are performed, and the result contains the URL which should be used to open a browser window to get the user consent.", + "tags": [ + "IdentityProviders" + ], + "parameters": [ + { + "name": "userAgentId", + "in": "query", + "required": false, + "description": "A stable client-side generated id which will be used to identify when the user has logged-in from a previously unknown device, and then notify the user.", + "schema": { + "type": "string" } - }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + } + ], + "responses": { + "200": { + "description": "Contains both the request identifier and the URL.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IdentityProviderRequestResult" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - }, - "post" : { - "operationId" : "createUser", - "summary" : "Registers a new user", - "description" : "Can either be a public registration, requiring no authorization, or a user registration by an administrator or broker. The public registration normally requires a CAPTCHA challenge to prevent bots. On user registration the following data is also created:\n* Address;\n* Mobile phone;\n* Landline phone;\n* Images.\n\nAfter the registration those data are managed separately than the user profile data.", - "parameters" : [ ], - "tags" : [ "Users" ], - "responses" : { - "201" : { - "description" : "The result of the registration", - "headers" : { - "Location" : { - "description" : "URL for viewing the registered user's profile", - "schema" : { - "type" : "string" - } - } - }, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UserRegistrationResult" - } - } + } + }, + "/identity-providers/{identityProvider}/register": { + "parameters": [ + { + "name": "identityProvider", + "in": "path", + "required": true, + "description": "Either the id or internal name of the identity provider", + "schema": { + "type": "string" + } + } + ], + "post": { + "operationId": "prepareIdentityProviderRegistration", + "summary": "Prepares an operation to register a user from an identity provider.", + "description": "Several validations are performed, and the result contains the URL which should be used to open a browser window to get the user consent. The channel configuration in Cyclos determines whether registration with identity providers is allowed, and if so, whether a direct registration will be attempted or will just return the profile data to fill-in the registration form.", + "tags": [ + "IdentityProviders" + ], + "parameters": [ + { + "name": "group", + "in": "query", + "required": true, + "description": "The group in which the registration is being requested", + "schema": { + "type": "string" } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + { + "name": "userAgentId", + "in": "query", + "required": false, + "description": "A stable client-side generated id which will be used to identify when the user has logged-in from a previously unknown device, and then notify the user.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Contains both the request identifier and the URL.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IdentityProviderRequestResult" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - }, - "requestBody" : { - "description" : "The user to be registered", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UserNew" - } - } - } - } - } - }, - "/users/export/{format}" : { - "parameters" : [ { - "$ref" : "#/components/parameters/format" - } ], - "get" : { - "operationId" : "exportUsers", - "summary" : "Exports the user search results to a file", - "description" : "Generates a file containing the search results. The available export formats are returned in `GET /users/data-for-search`.", - "parameters" : [ { - "name" : "acceptedAgreements", - "in" : "query", - "required" : false, - "description" : "Either id or internal names of agreements the user must have accepted. Ignored if the logged user isn't an admin or broker with permission to view the user agreement log.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "activationPeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum user activation date. Only taken into account if searching as administrator or managing broker. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "addressResult", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/UserAddressResultEnum" - } - }, { - "name" : "brokers", - "in" : "query", - "required" : false, - "description" : "Either id or a principal (login name, e-mail, etc) for brokers", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "contactsOwner", - "in" : "query", - "required" : false, - "description" : "Indicates the (managed) user to exclude contacts when `excludecontacts` is set. Defaults to the logged user.", - "schema" : { - "type" : "string" - } - }, { - "name" : "creationPeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum user creation date. Only taken into account if searching as administrator or managing broker. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "excludeContacts", - "in" : "query", - "required" : false, - "description" : "When set to `true` will not return any user that is already a contact of the user indicated on `contactsOwner` (the logged user if not set).", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "fromMenu", - "in" : "query", - "required" : false, - "description" : "When set to true the search will be restricted to those groups defined for the user search menu, if false then for those defined in the 'Search users on groups' product setting (or in the configuration in case of guests).", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "groups", - "in" : "query", - "required" : false, - "description" : "Either id or internal names of groups / group sets", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "hasBroker", - "in" : "query", - "required" : false, - "description" : "When set to `true`, will match only users that have at least one broker. When set to `false`, will will match only users without brokers. Ignored if the logged user isn't an admin.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "ignoreProfileFieldsInList", - "in" : "query", - "required" : false, - "description" : "When set to `true`, instead of returning users with corresponding profile fields set on list, will return them with `display`.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "includeGlobal", - "in" : "query", - "required" : false, - "description" : "Indicates whether global administrators should be returned when searching users in a network. Only usable by global administrators.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "includeGroup", - "in" : "query", - "required" : false, - "description" : "When set to `true` and the logged user has permission to view user groups, will return the `group` property on users.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "includeGroupSet", - "in" : "query", - "required" : false, - "description" : "When set to `true` and the logged user has permission to view user group sets, will return the `groupSet` property on users.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "invitedBy", - "in" : "query", - "required" : false, - "description" : "The user that has invited the returned users. Only used when searching as a manager (admin / broker).", - "schema" : { - "type" : "string" - } - }, { - "name" : "keywords", - "in" : "query", - "required" : false, - "description" : "Textual search keywords. Sometimes, like in user search, the fields matched depends on what is configured on the products.", - "schema" : { - "type" : "string" - } - }, { - "name" : "lastLoginPeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum user last login date. Only taken into account if searching as administrator or managing broker. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "latitude", - "in" : "query", - "required" : false, - "description" : "The reference latitude for distance searches", - "schema" : { - "type" : "number", - "format" : "double" - } - }, { - "name" : "longitude", - "in" : "query", - "required" : false, - "description" : "The reference longitude for distance searches", - "schema" : { - "type" : "number", - "format" : "double" - } - }, { - "name" : "mainBrokerOnly", - "in" : "query", - "required" : false, - "description" : "When set to `true`, will match only users that have the brokers as set in the `brokers` parameter as main broker.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "maxDistance", - "in" : "query", - "required" : false, - "description" : "Maximum straight-line distance between the informed location and the resulting address. Is measured either in kilometers or miles, depending on the configuration. Only accepted if both `longitude` and `latitude` parameters are passed with the actual reference position.", - "schema" : { - "type" : "number", - "format" : "double" - } - }, { - "name" : "notAcceptedAgreements", - "in" : "query", - "required" : false, - "description" : "Either id or internal names of agreements the user must not have accepted. Ignored if the logged user isn't an admin or broker with permission to view the user agreement log.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "orderBy", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/UserOrderByEnum" - } - }, { - "name" : "page", - "in" : "query", - "required" : false, - "description" : "The page number (zero-based) of the search. The default value is zero.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "pageSize", - "in" : "query", - "required" : false, - "description" : "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "products", - "in" : "query", - "required" : false, - "description" : "Either id or internal names of products the users should have assigned. Ignored if the authenticated user isn't an administrator.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "productsIndividuallyAssigned", - "in" : "query", - "required" : false, - "description" : "When set to `true`, the list specifid in `products` will only match users with those products assigned individually, not via group or group set. When set to `false` (default), the products will match any level (individual, group or group set).", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "profileFields", - "in" : "query", - "required" : false, - "description" : "User profile fields, both basic (full name, login name, phone, e-mail, etc) and custom fields, that are used for search. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by `:` (colon). For example, `profileFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, `profileFields=field1:valueA|valueB`. The accepted fields depend on the products the authenticated user has. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `profileFields=rank:bronze|silver,birthDate:2000-01-01|2001-12-31` would match results whose custom field with internal name 'rank' is either bronze or silver, and whose 'birthDate' is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `profileFields=birthDate:|2001-12-31`.\nThe basic profile fields have one of the following identifiers:\n- `name` or `fullName`: Full name; - `username`, `loginName` or `login`: Login name; - `email`: E-mail; - `phone`: Phone; - `accountNumber`, `account`: Account number; - `image`: Image (accepts a boolean value, indicating that either it is required that users either have images or not).\n\nIf address is an allowed profile field for search, specific address fields may be searched. The allowed ones are normally returned as the `addressFieldsInSearch` field in the corresponding result from a data-for-search request. The specific address fields are:\n- `address`: Searches on any address field (not a specific field); - `address.address`: Searches on the fields that represent the street address, which are `addressLine1`, `addressLine2`, `street`, `buildingNumber` and `complement`. Note that normally only a subset of them should be enabled in the configuration (either line 1 / 2 or street + number + complement);\n- `address.zip`: Searches for matching zip (postal) code; - `address.poBox`: Searches for matching postal box; - `address.neighborhood`: Searches by neighborhood; - `address.city`: Searches by city; - `address.region`: Searches by region (or state); - `address.country`: Searches by ISO 3166-1 alpha-2 country code. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `profileFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `profileFields=dynamic:'business`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "roles", - "in" : "query", - "required" : false, - "description" : "", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/RoleEnum" - } - } - }, { - "name" : "skipTotalCount", - "in" : "query", - "required" : false, - "description" : "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "statuses", - "in" : "query", - "required" : false, - "description" : "The possible status of the user. If no status is given, `active` and `blocked` users are returned.", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/UserStatusEnum" - } + } + } + }, + "/identity-providers/{identityProvider}/wizard": { + "parameters": [ + { + "name": "identityProvider", + "in": "path", + "required": true, + "description": "Either the id or internal name of the identity provider", + "schema": { + "type": "string" } - }, { - "name" : "usersToExclude", - "in" : "query", - "required" : false, - "description" : "Indicated the users to be excluded from the result", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" + } + ], + "post": { + "operationId": "prepareIdentityProviderWizard", + "summary": "Prepares an operation to fill in a registration wizard from an identity provider.", + "description": "Several validations are performed, and the result contains the URL which should be used to open a browser window to get the user consent. The channel configuration in Cyclos determines whether registration with identity providers is allowed. Direct registration is never done with wizards, even when configured in the channel. The callback result will contain the execution data for the next wizard step.", + "tags": [ + "IdentityProviders" + ], + "parameters": [ + { + "name": "key", + "in": "query", + "required": true, + "description": "The wizard execution key", + "schema": { + "type": "string" } } - }, { - "name" : "usersToInclude", - "in" : "query", - "required" : false, - "description" : "Indicated the users to be included in the result. Any other user not present in this list will be excluded from the result.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - } ], - "tags" : [ "Users" ], - "responses" : { - "200" : { - "description" : "The file content", - "content" : { - "*/*" : { - "schema" : { - "type" : "string", - "format" : "binary" - } - } - } - }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } - } - } + ], + "responses": { + "200": { + "description": "Contains both the request identifier and the URL.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IdentityProviderRequestResult" + } + } + } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -4270,115 +3827,87 @@ } } }, - "/users/validate/{group}/{field}" : { - "get" : { - "operationId" : "validateUserRegistrationField", - "summary" : "Validates the value of a single field for user registration", - "description" : "Validates the value of a field which will be used for registering a user, returning either `204 No Content` if the field is valid or `200` with the error description if the field is invalid. Notice that the result is the validation error. If a `422` status code is returned it means that either the given `field` is invalid or the given `value` is empty.", - "parameters" : [ { - "name" : "group", - "required" : true, - "in" : "path", - "description" : "The internal name or id of the group in which the user is being registered", - "schema" : { - "type" : "string" - } - }, { - "name" : "field", - "required" : true, - "in" : "path", - "description" : "One of: `name` (full name), `username` (login name), `email`, `mobilePhone`, `landLinePhone` or the internal name of a custom field.", - "schema" : { - "type" : "string" - } - }, { - "name" : "value", - "required" : true, - "in" : "query", - "description" : "The value to be validated", - "schema" : { - "type" : "string" + "/identity-providers/{identityProvider}/link": { + "parameters": [ + { + "name": "identityProvider", + "in": "path", + "required": true, + "description": "Either the id or internal name of the identity provider", + "schema": { + "type": "string" } - }, { - "name" : "asMember", - "required" : false, - "in" : "query", - "description" : "Flag required only when the authenticated user is a member and a broker, in that case we need to distingish between both. If true then the groups returned will be those allowed as member, otherwise will return the goups allowed as broker.", - "schema" : { - "type" : "boolean" + } + ], + "post": { + "operationId": "prepareIdentityProviderLink", + "summary": "Prepares an operation to link the authenticated user to an identity provider.", + "description": "Must be authenticated with a session token (via `Session-Token` request header). Several validations are performed, and the result contains the URL which should be used to open a browser window to get the user consent.", + "tags": [ + "IdentityProviders" + ], + "security": [ + { + "session": [] } - } ], - "tags" : [ "Users" ], - "responses" : { - "200" : { - "description" : "The validation error if the field is invalid", - "content" : { - "text/plain" : { - "schema" : { - "type" : "string" - } - } - } - }, - "204" : { - "description" : "No content if the field is valid" - }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + ], + "responses": { + "200": { + "description": "Contains both the request identifier and the URL.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IdentityProviderRequestResult" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -4386,83 +3915,94 @@ } } }, - "/users/groups-for-registration" : { - "get" : { - "operationId" : "getGroupsForUserRegistration", - "summary" : "Returns the groups the authenticated user or guest can register on", - "description" : "Returns the list of groups the authenticated user can use to perform a new user registration. If authenticated as guest, will return the groups currently set for public registration. When there is an authenticated administrator, broker or member, will be the configured groups for new users.", - "tags" : [ "Users" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "asMember", - "required" : false, - "in" : "query", - "description" : "Flag required only when the authenticated user is a member and a broker, in that case we need to distingish between both. If true then the groups returned will be those allowed as member, otherwise will return the goups allowed as broker.", - "schema" : { - "type" : "boolean" + "/users/data-for-search": { + "get": { + "operationId": "getUserDataForSearch", + "summary": "Get configuration data for searching users", + "description": "Returns data with the current configuration regarding the user search", + "tags": [ + "Users" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "broker", + "in": "query", + "required": false, + "description": "When set, will be data for searching assigned members of the given broker (id, identification method or `self`)", + "schema": { + "type": "string" + } + }, + { + "name": "fromMenu", + "in": "query", + "required": false, + "description": "Set to true if you want to use as group filters those defined in the 'User search in menu' configuration setting. Otherwise the group filters would be those defined in the 'Search users on groups' product setting (or in the configuration in case of guests).", + "schema": { + "type": "boolean" + } } - } ], - "responses" : { - "200" : { - "description" : "The list of groups", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/GroupForRegistration" - } + ], + "responses": { + "200": { + "description": "The configuration data for user search", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserDataForSearch" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -4470,360 +4010,1006 @@ } } }, - "/users/data-for-new" : { - "get" : { - "operationId" : "getUserDataForNew", - "summary" : "Get configuration data for registering new users", - "description" : "Almost every aspect of a user profile is configurable in Cyclos, such as enabled basic profile fields, custom profile fields, address fields, phone configuration and so on. As such, if a front-end needs to be robust to such a dynamic nature, it should get this information in order to create a correct registration form.", - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "group", - "required" : true, - "in" : "query", - "description" : "The intial group for the new user", - "schema" : { - "type" : "string" - } - }, { - "name" : "broker", - "required" : false, - "in" : "query", - "description" : "The broker for the new user. Only used if the authenticated user is an administrator.", - "schema" : { - "type" : "string" - } - }, { - "name" : "inviteToken", - "required" : false, - "in" : "query", - "description" : "When the registration was from a received invitation e-mail, is the token sent by e-mail. Passing this token eases the registration process by pre-filling the e-mail address, and avoiding the need to verify it. Also, if the invitation was sent from a broker, will already assign that broker to the newly registered user.", - "schema" : { - "type" : "string" - } - }, { - "name" : "asMember", - "required" : false, - "in" : "query", - "description" : "Flag required only when the authenticated user is a member and a broker, in that case we need to distingish between both. If true then the configuration data for registering new users as member will be returned, otherwise will return the configuration data for registering as broker.", - "schema" : { - "type" : "boolean" - } - } ], - "tags" : [ "Users" ], - "responses" : { - "200" : { - "description" : "An object containing the data", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UserDataForNew" + "/users": { + "get": { + "operationId": "searchUsers", + "summary": "Search for users", + "description": "Returns a page of users that match a given criteria. The fields returned depend on the products, in the profile fields of other users setting. Only fields (both basic or custom) marked to be returned on user list are returned. If no fields are set to be returned, or if the `ignoreProfileFieldsInList` flag is true in the given query then the resulting objects will have the `display` filled in. However, that field is not returned when another profile field is returned, preventing duplicated data to be returned.", + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "acceptedAgreements", + "in": "query", + "required": false, + "description": "Either id or internal names of agreements the user must have accepted. Ignored if the logged user isn't an admin or broker with permission to view the user agreement log.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "activationPeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum user activation date. Only taken into account if searching as administrator or managing broker. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "addressResult", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/UserAddressResultEnum" + } + }, + { + "name": "brokers", + "in": "query", + "required": false, + "description": "Either id or a principal (login name, e-mail, etc) for brokers", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "contactsOwner", + "in": "query", + "required": false, + "description": "Indicates the (managed) user to exclude contacts when `excludecontacts` is set. Defaults to the logged user.", + "schema": { + "type": "string" + } + }, + { + "name": "creationPeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum user creation date. Only taken into account if searching as administrator or managing broker. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "excludeContacts", + "in": "query", + "required": false, + "description": "When set to `true` will not return any user that is already a contact of the user indicated on `contactsOwner` (the logged user if not set).", + "schema": { + "type": "boolean" + } + }, + { + "name": "fromMenu", + "in": "query", + "required": false, + "description": "When set to true the search will be restricted to those groups defined for the user search menu, if false then for those defined in the 'Search users on groups' product setting (or in the configuration in case of guests).", + "schema": { + "type": "boolean" + } + }, + { + "name": "groups", + "in": "query", + "required": false, + "description": "Either id or internal names of groups / group sets", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "hasBroker", + "in": "query", + "required": false, + "description": "When set to `true`, will match only users that have at least one broker. When set to `false`, will will match only users without brokers. Ignored if the logged user isn't an admin.", + "schema": { + "type": "boolean" + } + }, + { + "name": "ignoreProfileFieldsInList", + "in": "query", + "required": false, + "description": "When set to `true`, instead of returning users with corresponding profile fields set on list, will return them with `display`.", + "schema": { + "type": "boolean" + } + }, + { + "name": "includeGlobal", + "in": "query", + "required": false, + "description": "Indicates whether global administrators should be returned when searching users in a network. Only usable by global administrators.", + "schema": { + "type": "boolean" + } + }, + { + "name": "includeGroup", + "in": "query", + "required": false, + "description": "When set to `true` and the logged user has permission to view user groups, will return the `group` property on users.", + "schema": { + "type": "boolean" + } + }, + { + "name": "includeGroupSet", + "in": "query", + "required": false, + "description": "When set to `true` and the logged user has permission to view user group sets, will return the `groupSet` property on users.", + "schema": { + "type": "boolean" + } + }, + { + "name": "invitedBy", + "in": "query", + "required": false, + "description": "The user that has invited the returned users. Only used when searching as a manager (admin / broker).", + "schema": { + "type": "string" + } + }, + { + "name": "keywords", + "in": "query", + "required": false, + "description": "Textual search keywords. Sometimes, like in user search, the fields matched depends on what is configured on the products.", + "schema": { + "type": "string" + } + }, + { + "name": "lastLoginPeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum user last login date. Only taken into account if searching as administrator or managing broker. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "latitude", + "in": "query", + "required": false, + "description": "The reference latitude for distance searches", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "longitude", + "in": "query", + "required": false, + "description": "The reference longitude for distance searches", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "mainBrokerOnly", + "in": "query", + "required": false, + "description": "When set to `true`, will match only users that have the brokers as set in the `brokers` parameter as main broker.", + "schema": { + "type": "boolean" + } + }, + { + "name": "maxDistance", + "in": "query", + "required": false, + "description": "Maximum straight-line distance between the informed location and the resulting address. Is measured either in kilometers or miles, depending on the configuration. Only accepted if both `longitude` and `latitude` parameters are passed with the actual reference position.", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "notAcceptedAgreements", + "in": "query", + "required": false, + "description": "Either id or internal names of agreements the user must not have accepted. Ignored if the logged user isn't an admin or broker with permission to view the user agreement log.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "orderBy", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/UserOrderByEnum" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number (zero-based) of the search. The default value is zero.", + "schema": { + "type": "integer" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", + "schema": { + "type": "integer" + } + }, + { + "name": "products", + "in": "query", + "required": false, + "description": "Either id or internal names of products the users should have assigned. Ignored if the authenticated user isn't an administrator.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "productsIndividuallyAssigned", + "in": "query", + "required": false, + "description": "When set to `true`, the list specifid in `products` will only match users with those products assigned individually, not via group or group set. When set to `false` (default), the products will match any level (individual, group or group set).", + "schema": { + "type": "boolean" + } + }, + { + "name": "profileFields", + "in": "query", + "required": false, + "description": "User profile fields, both basic (full name, login name, phone, e-mail, etc) and custom fields, that are used for search. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by `:` (colon). For example, `profileFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, `profileFields=field1:valueA|valueB`. The accepted fields depend on the products the authenticated user has. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `profileFields=rank:bronze|silver,birthDate:2000-01-01|2001-12-31` would match results whose custom field with internal name 'rank' is either bronze or silver, and whose 'birthDate' is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `profileFields=birthDate:|2001-12-31`.\nThe basic profile fields have one of the following identifiers:\n- `name` or `fullName`: Full name; - `username`, `loginName` or `login`: Login name; - `email`: E-mail; - `phone`: Phone; - `accountNumber`, `account`: Account number; - `image`: Image (accepts a boolean value, indicating that either it is required that users either have images or not).\n\nIf address is an allowed profile field for search, specific address fields may be searched. The allowed ones are normally returned as the `addressFieldsInSearch` field in the corresponding result from a data-for-search request. The specific address fields are:\n- `address`: Searches on any address field (not a specific field); - `address.address`: Searches on the fields that represent the street address, which are `addressLine1`, `addressLine2`, `street`, `buildingNumber` and `complement`. Note that normally only a subset of them should be enabled in the configuration (either line 1 / 2 or street + number + complement);\n- `address.zip`: Searches for matching zip (postal) code; - `address.poBox`: Searches for matching postal box; - `address.neighborhood`: Searches by neighborhood; - `address.city`: Searches by city; - `address.region`: Searches by region (or state); - `address.country`: Searches by ISO 3166-1 alpha-2 country code. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `profileFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `profileFields=dynamic:'business`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "roles", + "in": "query", + "required": false, + "description": "", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RoleEnum" + } + } + }, + { + "name": "skipTotalCount", + "in": "query", + "required": false, + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", + "schema": { + "type": "boolean" + } + }, + { + "name": "statuses", + "in": "query", + "required": false, + "description": "The possible status of the user. If no status is given, `active` and `blocked` users are returned.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserStatusEnum" + } + } + }, + { + "name": "usersToExclude", + "in": "query", + "required": false, + "description": "Indicated the users to be excluded from the result", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "usersToInclude", + "in": "query", + "required": false, + "description": "Indicated the users to be included in the result. Any other user not present in this list will be excluded from the result.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + } + ], + "tags": [ + "Users" + ], + "responses": { + "200": { + "description": "The users matching the criteria", + "headers": { + "X-Total-Count": { + "schema": { + "type": "integer" + }, + "description": "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." + }, + "X-Page-Size": { + "schema": { + "type": "integer" + }, + "description": "The maximum number of results per page" + }, + "X-Current-Page": { + "schema": { + "type": "integer" + }, + "description": "The current page the results are in" + }, + "X-Has-Next-Page": { + "schema": { + "type": "boolean" + }, + "description": "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." + } + }, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserResult" + } + } + } + } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - } - }, - "/users/{user}" : { - "parameters" : [ { - "$ref" : "#/components/parameters/user" - } ], - "get" : { - "operationId" : "viewUser", - "summary" : "View a user / operator details", - "description" : "Returns the profile information of either a user or operator.", - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "tags" : [ "Users" ], - "responses" : { - "200" : { - "description" : "User / operator details", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UserView" + }, + "post": { + "operationId": "createUser", + "summary": "Registers a new user", + "description": "Can either be a public registration, requiring no authorization, or a user registration by an administrator or broker. The public registration normally requires a CAPTCHA challenge to prevent bots. On user registration the following data is also created:\n* Address;\n* Mobile phone;\n* Landline phone;\n* Images.\n\nAfter the registration those data are managed separately than the user profile data.", + "tags": [ + "Users" + ], + "responses": { + "201": { + "description": "The result of the registration", + "headers": { + "Location": { + "description": "URL for viewing the registered user's profile", + "schema": { + "type": "string" } } - } - }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserRegistrationResult" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } - } - } - }, - "put" : { - "operationId" : "updateUser", - "summary" : "Save a user / operator profile fields", - "description" : "Saves the user / operator profile felds. Only the basic fields (full name, login name, e-mail) and custom fields can be saved with this operation. Addresses, phones and images must be managed either via the full profile (`GET /users/{user}/data-for-edit-profile` / `PUT /users/{user}/profile`) or through their own paths.", - "parameters" : [ { - "$ref" : "#/components/parameters/confirmationPassword" - } ], - "tags" : [ "Users" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "204" : { - "description" : "If the save is correct, nothing is returned" }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } - }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" - } + } + }, + "requestBody": { + "description": "The user to be registered", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserNew" } } - }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" - } + } + } + } + }, + "/users/export/{format}": { + "parameters": [ + { + "$ref": "#/components/parameters/format" + } + ], + "get": { + "operationId": "exportUsers", + "summary": "Exports the user search results to a file", + "description": "Generates a file containing the search results. The available export formats are returned in `GET /users/data-for-search`.", + "parameters": [ + { + "name": "acceptedAgreements", + "in": "query", + "required": false, + "description": "Either id or internal names of agreements the user must have accepted. Ignored if the logged user isn't an admin or broker with permission to view the user agreement log.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "activationPeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum user activation date. Only taken into account if searching as administrator or managing broker. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "addressResult", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/UserAddressResultEnum" + } + }, + { + "name": "brokers", + "in": "query", + "required": false, + "description": "Either id or a principal (login name, e-mail, etc) for brokers", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "contactsOwner", + "in": "query", + "required": false, + "description": "Indicates the (managed) user to exclude contacts when `excludecontacts` is set. Defaults to the logged user.", + "schema": { + "type": "string" + } + }, + { + "name": "creationPeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum user creation date. Only taken into account if searching as administrator or managing broker. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "excludeContacts", + "in": "query", + "required": false, + "description": "When set to `true` will not return any user that is already a contact of the user indicated on `contactsOwner` (the logged user if not set).", + "schema": { + "type": "boolean" + } + }, + { + "name": "fromMenu", + "in": "query", + "required": false, + "description": "When set to true the search will be restricted to those groups defined for the user search menu, if false then for those defined in the 'Search users on groups' product setting (or in the configuration in case of guests).", + "schema": { + "type": "boolean" + } + }, + { + "name": "groups", + "in": "query", + "required": false, + "description": "Either id or internal names of groups / group sets", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "hasBroker", + "in": "query", + "required": false, + "description": "When set to `true`, will match only users that have at least one broker. When set to `false`, will will match only users without brokers. Ignored if the logged user isn't an admin.", + "schema": { + "type": "boolean" + } + }, + { + "name": "ignoreProfileFieldsInList", + "in": "query", + "required": false, + "description": "When set to `true`, instead of returning users with corresponding profile fields set on list, will return them with `display`.", + "schema": { + "type": "boolean" + } + }, + { + "name": "includeGlobal", + "in": "query", + "required": false, + "description": "Indicates whether global administrators should be returned when searching users in a network. Only usable by global administrators.", + "schema": { + "type": "boolean" + } + }, + { + "name": "includeGroup", + "in": "query", + "required": false, + "description": "When set to `true` and the logged user has permission to view user groups, will return the `group` property on users.", + "schema": { + "type": "boolean" + } + }, + { + "name": "includeGroupSet", + "in": "query", + "required": false, + "description": "When set to `true` and the logged user has permission to view user group sets, will return the `groupSet` property on users.", + "schema": { + "type": "boolean" + } + }, + { + "name": "invitedBy", + "in": "query", + "required": false, + "description": "The user that has invited the returned users. Only used when searching as a manager (admin / broker).", + "schema": { + "type": "string" + } + }, + { + "name": "keywords", + "in": "query", + "required": false, + "description": "Textual search keywords. Sometimes, like in user search, the fields matched depends on what is configured on the products.", + "schema": { + "type": "string" + } + }, + { + "name": "lastLoginPeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum user last login date. Only taken into account if searching as administrator or managing broker. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "latitude", + "in": "query", + "required": false, + "description": "The reference latitude for distance searches", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "longitude", + "in": "query", + "required": false, + "description": "The reference longitude for distance searches", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "mainBrokerOnly", + "in": "query", + "required": false, + "description": "When set to `true`, will match only users that have the brokers as set in the `brokers` parameter as main broker.", + "schema": { + "type": "boolean" + } + }, + { + "name": "maxDistance", + "in": "query", + "required": false, + "description": "Maximum straight-line distance between the informed location and the resulting address. Is measured either in kilometers or miles, depending on the configuration. Only accepted if both `longitude` and `latitude` parameters are passed with the actual reference position.", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "notAcceptedAgreements", + "in": "query", + "required": false, + "description": "Either id or internal names of agreements the user must not have accepted. Ignored if the logged user isn't an admin or broker with permission to view the user agreement log.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "orderBy", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/UserOrderByEnum" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number (zero-based) of the search. The default value is zero.", + "schema": { + "type": "integer" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", + "schema": { + "type": "integer" + } + }, + { + "name": "products", + "in": "query", + "required": false, + "description": "Either id or internal names of products the users should have assigned. Ignored if the authenticated user isn't an administrator.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "productsIndividuallyAssigned", + "in": "query", + "required": false, + "description": "When set to `true`, the list specifid in `products` will only match users with those products assigned individually, not via group or group set. When set to `false` (default), the products will match any level (individual, group or group set).", + "schema": { + "type": "boolean" + } + }, + { + "name": "profileFields", + "in": "query", + "required": false, + "description": "User profile fields, both basic (full name, login name, phone, e-mail, etc) and custom fields, that are used for search. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by `:` (colon). For example, `profileFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, `profileFields=field1:valueA|valueB`. The accepted fields depend on the products the authenticated user has. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `profileFields=rank:bronze|silver,birthDate:2000-01-01|2001-12-31` would match results whose custom field with internal name 'rank' is either bronze or silver, and whose 'birthDate' is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `profileFields=birthDate:|2001-12-31`.\nThe basic profile fields have one of the following identifiers:\n- `name` or `fullName`: Full name; - `username`, `loginName` or `login`: Login name; - `email`: E-mail; - `phone`: Phone; - `accountNumber`, `account`: Account number; - `image`: Image (accepts a boolean value, indicating that either it is required that users either have images or not).\n\nIf address is an allowed profile field for search, specific address fields may be searched. The allowed ones are normally returned as the `addressFieldsInSearch` field in the corresponding result from a data-for-search request. The specific address fields are:\n- `address`: Searches on any address field (not a specific field); - `address.address`: Searches on the fields that represent the street address, which are `addressLine1`, `addressLine2`, `street`, `buildingNumber` and `complement`. Note that normally only a subset of them should be enabled in the configuration (either line 1 / 2 or street + number + complement);\n- `address.zip`: Searches for matching zip (postal) code; - `address.poBox`: Searches for matching postal box; - `address.neighborhood`: Searches by neighborhood; - `address.city`: Searches by city; - `address.region`: Searches by region (or state); - `address.country`: Searches by ISO 3166-1 alpha-2 country code. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `profileFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `profileFields=dynamic:'business`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "roles", + "in": "query", + "required": false, + "description": "", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RoleEnum" } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" - } + { + "name": "skipTotalCount", + "in": "query", + "required": false, + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", + "schema": { + "type": "boolean" + } + }, + { + "name": "statuses", + "in": "query", + "required": false, + "description": "The possible status of the user. If no status is given, `active` and `blocked` users are returned.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserStatusEnum" } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" - } + { + "name": "usersToExclude", + "in": "query", + "required": false, + "description": "Indicated the users to be excluded from the result", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" - } + { + "name": "usersToInclude", + "in": "query", + "required": false, + "description": "Indicated the users to be included in the result. Any other user not present in this list will be excluded from the result.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" } } } - }, - "requestBody" : { - "description" : "The user / operator to be saved", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UserEdit" + ], + "tags": [ + "Users" + ], + "responses": { + "200": { + "description": "The file content", + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" + } } } - } - } - }, - "delete" : { - "operationId" : "deletePendingUser", - "summary" : "Permanently removes a pending user", - "description" : "This operation physically removes user pending registration validation, that is, the user `status` is `pending`. If the user registration was ever validated, this operation will fail.", - "tags" : [ "Users" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "204" : { - "description" : "The pending user was deleted" }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -4831,81 +5017,122 @@ } } }, - "/users/{user}/data-for-edit" : { - "get" : { - "operationId" : "getUserDataForEdit", - "summary" : "Get configuration data to edit a user / operator profile", - "description" : "Returns data to edit a user / operator profile fields.", - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/user" - } ], - "tags" : [ "Users" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "200" : { - "description" : "User / operator profile fields details", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UserDataForEdit" + "/users/validate/{group}/{field}": { + "get": { + "operationId": "validateUserRegistrationField", + "summary": "Validates the value of a single field for user registration", + "description": "Validates the value of a field which will be used for registering a user, returning either `204 No Content` if the field is valid or `200` with the error description if the field is invalid. Notice that the result is the validation error. If a `422` status code is returned it means that either the given `field` is invalid or the given `value` is empty.", + "parameters": [ + { + "name": "group", + "required": true, + "in": "path", + "description": "The internal name or id of the group in which the user is being registered", + "schema": { + "type": "string" + } + }, + { + "name": "field", + "required": true, + "in": "path", + "description": "One of: `name` (full name), `username` (login name), `email`, `mobilePhone`, `landLinePhone` or the internal name of a custom field.", + "schema": { + "type": "string" + } + }, + { + "name": "value", + "required": true, + "in": "query", + "description": "The value to be validated", + "schema": { + "type": "string" + } + }, + { + "name": "asMember", + "required": false, + "in": "query", + "description": "Flag required only when the authenticated user is a member and a broker, in that case we need to distingish between both. If true then the groups returned will be those allowed as member, otherwise will return the goups allowed as broker.", + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + "Users" + ], + "responses": { + "200": { + "description": "The validation error if the field is invalid", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "204": { + "description": "No content if the field is valid" + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -4913,75 +5140,88 @@ } } }, - "/users/{user}/locate" : { - "parameters" : [ { - "$ref" : "#/components/parameters/user" - } ], - "get" : { - "operationId" : "locateUser", - "summary" : "View user basic details", - "description" : "Returns the basic information of a user.", - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "tags" : [ "Users" ], - "responses" : { - "200" : { - "description" : "User basic details", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/User" + "/users/groups-for-registration": { + "get": { + "operationId": "getGroupsForUserRegistration", + "summary": "Returns the groups the authenticated user or guest can register on", + "description": "Returns the list of groups the authenticated user can use to perform a new user registration. If authenticated as guest, will return the groups currently set for public registration. When there is an authenticated administrator, broker or member, will be the configured groups for new users.", + "tags": [ + "Users" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "asMember", + "required": false, + "in": "query", + "description": "Flag required only when the authenticated user is a member and a broker, in that case we need to distingish between both. If true then the groups returned will be those allowed as member, otherwise will return the goups allowed as broker.", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "The list of groups", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GroupForRegistration" + } } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -4989,1080 +5229,666 @@ } } }, - "/users/{user}/data-for-edit-profile" : { - "get" : { - "operationId" : "getDataForEditFullProfile", - "summary" : "Returns data for editing the full profile of a user / operator", - "description" : "The returned data contains all profile-related elements of a user or operator - profile fields, phones, addresses, images and additional contact information. Operators cannot have addresses, images or additional contact information, so these will not be sent.", - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/user" - } ], - "tags" : [ "Users" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - }, { - "oidc" : [ "profile_write" ] - } ], - "responses" : { - "200" : { - "description" : "The data for editing the full profile of the user / operator", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DataForEditFullProfile" - } - } + "/users/data-for-new": { + "get": { + "operationId": "getUserDataForNew", + "summary": "Get configuration data for registering new users", + "description": "Almost every aspect of a user profile is configurable in Cyclos, such as enabled basic profile fields, custom profile fields, address fields, phone configuration and so on. As such, if a front-end needs to be robust to such a dynamic nature, it should get this information in order to create a correct registration form.", + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "group", + "required": true, + "in": "query", + "description": "The intial group for the new user", + "schema": { + "type": "string" } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } - } + { + "name": "broker", + "required": false, + "in": "query", + "description": "The broker for the new user. Only used if the authenticated user is an administrator.", + "schema": { + "type": "string" } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" - } - } + { + "name": "inviteToken", + "required": false, + "in": "query", + "description": "When the registration was from a received invitation e-mail, is the token sent by e-mail. Passing this token eases the registration process by pre-filling the e-mail address, and avoiding the need to verify it. Also, if the invitation was sent from a broker, will already assign that broker to the newly registered user.", + "schema": { + "type": "string" + } + }, + { + "name": "externalPaymentToken", + "required": false, + "in": "query", + "description": "When the registration was from a received payment, is the external payment token sent by e-mail. Passing this token eases the registration process by pre-filling the e-mail address and avoiding the need to verify it.", + "schema": { + "type": "string" } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + { + "name": "asMember", + "required": false, + "in": "query", + "description": "Flag required only when the authenticated user is a member and a broker, in that case we need to distingish between both. If true then the configuration data for registering new users as member will be returned, otherwise will return the configuration data for registering as broker.", + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + "Users" + ], + "responses": { + "200": { + "description": "An object containing the data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserDataForNew" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } - } - } - } - }, - "/users/{user}/profile" : { - "post" : { - "operationId" : "saveUserFullProfile", - "summary" : "Saves the full profile at once", - "description" : "Saves in a single, transactional operation, the full user / operator profile: edition of the profile fields and creating / modifying / removing phones, addresses, additional contacts and images. Operators can never have addresses, additional contacts or images, so they don't apply to operators.", - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/user" - }, { - "$ref" : "#/components/parameters/confirmationPassword" - } ], - "tags" : [ "Users" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - }, { - "oidc" : [ "profile_write" ] - } ], - "responses" : { - "200" : { - "description" : "The generated identifiers for created entities", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/FullProfileEditResult" + }, + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "500" : { - "description" : "If a nested error has occurred", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NestedError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } - } - }, - "requestBody" : { - "description" : "The full profile data", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/FullProfileEdit" + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } } } } } } }, - "/users/map/data-for-search" : { - "get" : { - "operationId" : "getDataForMapDirectory", - "summary" : "Get configuration data for searching the user directory (map).", - "description" : "Returns data with the current configuration regarding the user directory (map).", - "tags" : [ "Users" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The configuration data for user directory (map)", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UserDataForMap" + "/users/{user}": { + "parameters": [ + { + "$ref": "#/components/parameters/user" + } + ], + "get": { + "operationId": "viewUser", + "summary": "View a user / operator details", + "description": "Returns the profile information of either a user or operator.", + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "tags": [ + "Users" + ], + "responses": { + "200": { + "description": "User / operator details", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserView" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - } - } - }, - "/users/map" : { - "get" : { - "operationId" : "searchMapDirectory", - "summary" : "Search the user directory (map)", - "description" : "Returns a page of users in the map directory that match a given criteria", - "tags" : [ "Users" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "acceptedAgreements", - "in" : "query", - "required" : false, - "description" : "Either id or internal names of agreements the user must have accepted. Ignored if the logged user isn't an admin or broker with permission to view the user agreement log.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "activationPeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum user activation date. Only taken into account if searching as administrator or managing broker. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "addressResult", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/UserAddressResultEnum" - } - }, { - "name" : "brokers", - "in" : "query", - "required" : false, - "description" : "Either id or a principal (login name, e-mail, etc) for brokers", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "contactsOwner", - "in" : "query", - "required" : false, - "description" : "Indicates the (managed) user to exclude contacts when `excludecontacts` is set. Defaults to the logged user.", - "schema" : { - "type" : "string" - } - }, { - "name" : "creationPeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum user creation date. Only taken into account if searching as administrator or managing broker. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "excludeContacts", - "in" : "query", - "required" : false, - "description" : "When set to `true` will not return any user that is already a contact of the user indicated on `contactsOwner` (the logged user if not set).", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "fromMenu", - "in" : "query", - "required" : false, - "description" : "When set to true the search will be restricted to those groups defined for the user search menu, if false then for those defined in the 'Search users on groups' product setting (or in the configuration in case of guests).", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "groups", - "in" : "query", - "required" : false, - "description" : "Either id or internal names of groups / group sets", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "hasBroker", - "in" : "query", - "required" : false, - "description" : "When set to `true`, will match only users that have at least one broker. When set to `false`, will will match only users without brokers. Ignored if the logged user isn't an admin.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "ignoreProfileFieldsInList", - "in" : "query", - "required" : false, - "description" : "When set to `true`, instead of returning users with corresponding profile fields set on list, will return them with `display`.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "includeGlobal", - "in" : "query", - "required" : false, - "description" : "Indicates whether global administrators should be returned when searching users in a network. Only usable by global administrators.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "includeGroup", - "in" : "query", - "required" : false, - "description" : "When set to `true` and the logged user has permission to view user groups, will return the `group` property on users.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "includeGroupSet", - "in" : "query", - "required" : false, - "description" : "When set to `true` and the logged user has permission to view user group sets, will return the `groupSet` property on users.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "invitedBy", - "in" : "query", - "required" : false, - "description" : "The user that has invited the returned users. Only used when searching as a manager (admin / broker).", - "schema" : { - "type" : "string" - } - }, { - "name" : "keywords", - "in" : "query", - "required" : false, - "description" : "Textual search keywords. Sometimes, like in user search, the fields matched depends on what is configured on the products.", - "schema" : { - "type" : "string" - } - }, { - "name" : "lastLoginPeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum user last login date. Only taken into account if searching as administrator or managing broker. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "latitude", - "in" : "query", - "required" : false, - "description" : "The reference latitude for distance searches", - "schema" : { - "type" : "number", - "format" : "double" - } - }, { - "name" : "longitude", - "in" : "query", - "required" : false, - "description" : "The reference longitude for distance searches", - "schema" : { - "type" : "number", - "format" : "double" - } - }, { - "name" : "mainBrokerOnly", - "in" : "query", - "required" : false, - "description" : "When set to `true`, will match only users that have the brokers as set in the `brokers` parameter as main broker.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "maxDistance", - "in" : "query", - "required" : false, - "description" : "Maximum straight-line distance between the informed location and the resulting address. Is measured either in kilometers or miles, depending on the configuration. Only accepted if both `longitude` and `latitude` parameters are passed with the actual reference position.", - "schema" : { - "type" : "number", - "format" : "double" - } - }, { - "name" : "notAcceptedAgreements", - "in" : "query", - "required" : false, - "description" : "Either id or internal names of agreements the user must not have accepted. Ignored if the logged user isn't an admin or broker with permission to view the user agreement log.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "orderBy", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/UserOrderByEnum" - } - }, { - "name" : "page", - "in" : "query", - "required" : false, - "description" : "The page number (zero-based) of the search. The default value is zero.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "pageSize", - "in" : "query", - "required" : false, - "description" : "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "products", - "in" : "query", - "required" : false, - "description" : "Either id or internal names of products the users should have assigned. Ignored if the authenticated user isn't an administrator.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "productsIndividuallyAssigned", - "in" : "query", - "required" : false, - "description" : "When set to `true`, the list specifid in `products` will only match users with those products assigned individually, not via group or group set. When set to `false` (default), the products will match any level (individual, group or group set).", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "profileFields", - "in" : "query", - "required" : false, - "description" : "User profile fields, both basic (full name, login name, phone, e-mail, etc) and custom fields, that are used for search. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by `:` (colon). For example, `profileFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, `profileFields=field1:valueA|valueB`. The accepted fields depend on the products the authenticated user has. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `profileFields=rank:bronze|silver,birthDate:2000-01-01|2001-12-31` would match results whose custom field with internal name 'rank' is either bronze or silver, and whose 'birthDate' is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `profileFields=birthDate:|2001-12-31`.\nThe basic profile fields have one of the following identifiers:\n- `name` or `fullName`: Full name; - `username`, `loginName` or `login`: Login name; - `email`: E-mail; - `phone`: Phone; - `accountNumber`, `account`: Account number; - `image`: Image (accepts a boolean value, indicating that either it is required that users either have images or not).\n\nIf address is an allowed profile field for search, specific address fields may be searched. The allowed ones are normally returned as the `addressFieldsInSearch` field in the corresponding result from a data-for-search request. The specific address fields are:\n- `address`: Searches on any address field (not a specific field); - `address.address`: Searches on the fields that represent the street address, which are `addressLine1`, `addressLine2`, `street`, `buildingNumber` and `complement`. Note that normally only a subset of them should be enabled in the configuration (either line 1 / 2 or street + number + complement);\n- `address.zip`: Searches for matching zip (postal) code; - `address.poBox`: Searches for matching postal box; - `address.neighborhood`: Searches by neighborhood; - `address.city`: Searches by city; - `address.region`: Searches by region (or state); - `address.country`: Searches by ISO 3166-1 alpha-2 country code. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `profileFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `profileFields=dynamic:'business`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "roles", - "in" : "query", - "required" : false, - "description" : "", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/RoleEnum" - } - } - }, { - "name" : "skipTotalCount", - "in" : "query", - "required" : false, - "description" : "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "statuses", - "in" : "query", - "required" : false, - "description" : "The possible status of the user. If no status is given, `active` and `blocked` users are returned.", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/UserStatusEnum" - } - } - }, { - "name" : "usersToExclude", - "in" : "query", - "required" : false, - "description" : "Indicated the users to be excluded from the result", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "usersToInclude", - "in" : "query", - "required" : false, - "description" : "Indicated the users to be included in the result. Any other user not present in this list will be excluded from the result.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - } ], - "responses" : { - "200" : { - "description" : "The users matching the criteria", - "headers" : { - "X-Total-Count" : { - "schema" : { - "type" : "integer" - }, - "description" : "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." - }, - "X-Page-Size" : { - "schema" : { - "type" : "integer" - }, - "description" : "The maximum number of results per page" - }, - "X-Current-Page" : { - "schema" : { - "type" : "integer" - }, - "description" : "The current page the results are in" - }, - "X-Has-Next-Page" : { - "schema" : { - "type" : "boolean" - }, - "description" : "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." + } + }, + "put": { + "operationId": "updateUser", + "summary": "Save a user / operator profile fields", + "description": "Saves the user / operator profile felds. Only the basic fields (full name, login name, e-mail) and custom fields can be saved with this operation. Addresses, phones and images must be managed either via the full profile (`GET /users/{user}/data-for-edit-profile` / `PUT /users/{user}/profile`) or through their own paths.", + "parameters": [ + { + "$ref": "#/components/parameters/confirmationPassword" + } + ], + "tags": [ + "Users" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "responses": { + "204": { + "description": "If the save is correct, nothing is returned" + }, + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" + } } - }, - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/UserResult" - } + } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } + }, + "requestBody": { + "description": "The user / operator to be saved", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserEdit" + } + } + } } - } - }, - "/{user}/operators/data-for-search" : { - "get" : { - "operationId" : "getUserOperatorsDataForSearch", - "summary" : "Get configuration data for searching operators of the given user", - "description" : "Returns data with the current configuration regarding the operators of the given user", - "tags" : [ "Operators" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/user" - } ], - "responses" : { - "200" : { - "description" : "The configuration data for operators search over a user", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UserOperatorsDataForSearch" + }, + "delete": { + "operationId": "deletePendingUser", + "summary": "Permanently removes a pending user", + "description": "This operation physically removes user pending registration validation, that is, the user `status` is `pending`. If the user registration was ever validated, this operation will fail.", + "tags": [ + "Users" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "responses": { + "204": { + "description": "The pending user was deleted" + }, + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } - } - } - } - } - } + } + } + } + } + } }, - "/{user}/operators" : { - "parameters" : [ { - "$ref" : "#/components/parameters/user" - } ], - "get" : { - "operationId" : "searchUserOperators", - "summary" : "Search the operators of a given user", - "description" : "Returns a page of operators that match a given criteria. To view an operator profile, use `GET /users/{operator}`.", - "tags" : [ "Operators" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "creationPeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum user creation date. Only taken into account if searching as administrator or managing broker. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "ignoreProfileFieldsInList", - "in" : "query", - "required" : false, - "description" : "When set to `true`, instead of returning users with corresponding profile fields set on list, will return them with `display`.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "operatorGroups", - "in" : "query", - "required" : false, - "description" : "An array of operator group ids", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "page", - "in" : "query", - "required" : false, - "description" : "The page number (zero-based) of the search. The default value is zero.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "pageSize", - "in" : "query", - "required" : false, - "description" : "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "skipTotalCount", - "in" : "query", - "required" : false, - "description" : "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "statuses", - "in" : "query", - "required" : false, - "description" : "", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/UserStatusEnum" - } - } - } ], - "responses" : { - "200" : { - "description" : "The operators matching the criteria", - "headers" : { - "X-Total-Count" : { - "schema" : { - "type" : "integer" - }, - "description" : "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." - }, - "X-Page-Size" : { - "schema" : { - "type" : "integer" - }, - "description" : "The maximum number of results per page" - }, - "X-Current-Page" : { - "schema" : { - "type" : "integer" - }, - "description" : "The current page the results are in" - }, - "X-Has-Next-Page" : { - "schema" : { - "type" : "boolean" - }, - "description" : "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." - } - }, - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/OperatorResult" - } + "/users/{user}/data-for-edit": { + "get": { + "operationId": "getUserDataForEdit", + "summary": "Get configuration data to edit a user / operator profile", + "description": "Returns data to edit a user / operator profile fields.", + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/user" + } + ], + "tags": [ + "Users" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "responses": { + "200": { + "description": "User / operator profile fields details", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserDataForEdit" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - }, - "post" : { - "operationId" : "registerOperator", - "summary" : "Registers a new operator", - "description" : "Registers an operator, together with his password and phones.", - "parameters" : [ ], - "tags" : [ "Operators" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "201" : { - "description" : "The result of the registration", - "headers" : { - "Location" : { - "description" : "URL for viewing the registered operator's profile", - "schema" : { - "type" : "string" - } - } - }, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UserRegistrationResult" - } - } - } - }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + } + }, + "/users/{user}/locate": { + "parameters": [ + { + "$ref": "#/components/parameters/user" + } + ], + "get": { + "operationId": "locateUser", + "summary": "View user basic details", + "description": "Returns the basic information of a user.", + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "tags": [ + "Users" + ], + "responses": { + "200": { + "description": "User basic details", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - }, - "requestBody" : { - "description" : "The operator to be registered", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/OperatorNew" - } - } - } } } }, - "/operators/data-for-search" : { - "get" : { - "operationId" : "getGeneralOperatorsDataForSearch", - "summary" : "Get configuration data for searching operators of any managed user", - "description" : "Returns data with the current configuration regarding the search of operators of managed users. This is meant to be used by either administrators or brokers", - "tags" : [ "Operators" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The configuration data for operators search", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/GeneralOperatorsDataForSearch" + "/users/{user}/data-for-edit-profile": { + "get": { + "operationId": "getDataForEditFullProfile", + "summary": "Returns data for editing the full profile of a user / operator", + "description": "The returned data contains all profile-related elements of a user or operator - profile fields, phones, addresses, images and additional contact information. Operators cannot have addresses, images or additional contact information, so these will not be sent.", + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/user" + } + ], + "tags": [ + "Users" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + }, + { + "oidc": [ + "profile_write" + ] + } + ], + "responses": { + "200": { + "description": "The data for editing the full profile of the user / operator", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DataForEditFullProfile" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -6070,153 +5896,146 @@ } } }, - "/operators" : { - "get" : { - "operationId" : "searchGeneralOperators", - "summary" : "Search the visible operators (of any managed user)", - "description" : "Returns a page of operators that match a given criteria. To view an operator profile, use `GET /users/{operator}`.", - "tags" : [ "Operators" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/page" - }, { - "$ref" : "#/components/parameters/pageSize" - }, { - "name" : "userGroups", - "in" : "query", - "required" : false, - "description" : "Either id or internal names of user groups / group sets", - "schema" : { - "type" : "array", - "items" : { - "type" : "string" - } + "/users/{user}/profile": { + "post": { + "operationId": "saveUserFullProfile", + "summary": "Saves the full profile at once", + "description": "Saves in a single, transactional operation, the full user / operator profile: edition of the profile fields and creating / modifying / removing phones, addresses, additional contacts and images. Operators can never have addresses, additional contacts or images, so they don't apply to operators.", + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/user" + }, + { + "$ref": "#/components/parameters/confirmationPassword" } - }, { - "name" : "broker", - "in" : "query", - "required" : false, - "description" : "Either id or a principal (login name, e-mail, etc) of the user broker", - "schema" : { - "type" : "string" + ], + "tags": [ + "Users" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + }, + { + "oidc": [ + "profile_write" + ] } - }, { - "name" : "creationPeriod", - "description" : "The minimum / maximum user creation date. Only taken into account if searching as administrator or managing broker. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "in" : "query", - "required" : false, - "schema" : { - "type" : "array", - "items" : { - "type" : "string", - "format" : "date-time" + ], + "responses": { + "200": { + "description": "The generated identifiers for created entities", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FullProfileEditResult" + } + } + } + }, + "500": { + "description": "If a nested error has occurred", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NestedError" + } + } } } - }, { - "name" : "statuses", - "in" : "query", - "required" : false, - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/UserStatusEnum" - } - } - } ], - "responses" : { - "200" : { - "description" : "The users matching the criteria", - "headers" : { - "X-Total-Count" : { - "schema" : { - "type" : "integer" - }, - "description" : "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." - }, - "X-Page-Size" : { - "schema" : { - "type" : "integer" - }, - "description" : "The maximum number of results per page" - }, - "X-Current-Page" : { - "schema" : { - "type" : "integer" - }, - "description" : "The current page the results are in" - }, - "X-Has-Next-Page" : { - "schema" : { - "type" : "boolean" - }, - "description" : "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." + }, + "requestBody": { + "description": "The full profile data", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FullProfileEdit" } - }, - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/OperatorResult" - } + } + } + } + } + }, + "/users/map/data-for-search": { + "get": { + "operationId": "getDataForMapDirectory", + "summary": "Get configuration data for searching the user directory (map).", + "description": "Returns data with the current configuration regarding the user directory (map).", + "tags": [ + "Users" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The configuration data for user directory (map)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserDataForMap" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -6224,89 +6043,456 @@ } } }, - "/{user}/operators/data-for-new" : { - "get" : { - "operationId" : "getOperatorDataForNew", - "summary" : "Get configuration data for registering a new operator", - "description" : "Contains all configuration needed for registering an operator, such as the enabled profile fields and the password(s).", - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/user" - }, { - "name" : "group", - "required" : false, - "in" : "query", - "description" : "The operator group. If no group is set, will return the list of operator groups for this owner. If a group is pre-set, will return only that group.", - "schema" : { - "type" : "string" - } - } ], - "tags" : [ "Operators" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "200" : { - "description" : "An object containing the data", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/OperatorDataForNew" + "/users/map": { + "get": { + "operationId": "searchMapDirectory", + "summary": "Search the user directory (map)", + "description": "Returns a page of users in the map directory that match a given criteria", + "tags": [ + "Users" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "acceptedAgreements", + "in": "query", + "required": false, + "description": "Either id or internal names of agreements the user must have accepted. Ignored if the logged user isn't an admin or broker with permission to view the user agreement log.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "activationPeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum user activation date. Only taken into account if searching as administrator or managing broker. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "addressResult", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/UserAddressResultEnum" + } + }, + { + "name": "brokers", + "in": "query", + "required": false, + "description": "Either id or a principal (login name, e-mail, etc) for brokers", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "contactsOwner", + "in": "query", + "required": false, + "description": "Indicates the (managed) user to exclude contacts when `excludecontacts` is set. Defaults to the logged user.", + "schema": { + "type": "string" + } + }, + { + "name": "creationPeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum user creation date. Only taken into account if searching as administrator or managing broker. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "excludeContacts", + "in": "query", + "required": false, + "description": "When set to `true` will not return any user that is already a contact of the user indicated on `contactsOwner` (the logged user if not set).", + "schema": { + "type": "boolean" + } + }, + { + "name": "fromMenu", + "in": "query", + "required": false, + "description": "When set to true the search will be restricted to those groups defined for the user search menu, if false then for those defined in the 'Search users on groups' product setting (or in the configuration in case of guests).", + "schema": { + "type": "boolean" + } + }, + { + "name": "groups", + "in": "query", + "required": false, + "description": "Either id or internal names of groups / group sets", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "hasBroker", + "in": "query", + "required": false, + "description": "When set to `true`, will match only users that have at least one broker. When set to `false`, will will match only users without brokers. Ignored if the logged user isn't an admin.", + "schema": { + "type": "boolean" + } + }, + { + "name": "ignoreProfileFieldsInList", + "in": "query", + "required": false, + "description": "When set to `true`, instead of returning users with corresponding profile fields set on list, will return them with `display`.", + "schema": { + "type": "boolean" + } + }, + { + "name": "includeGlobal", + "in": "query", + "required": false, + "description": "Indicates whether global administrators should be returned when searching users in a network. Only usable by global administrators.", + "schema": { + "type": "boolean" + } + }, + { + "name": "includeGroup", + "in": "query", + "required": false, + "description": "When set to `true` and the logged user has permission to view user groups, will return the `group` property on users.", + "schema": { + "type": "boolean" + } + }, + { + "name": "includeGroupSet", + "in": "query", + "required": false, + "description": "When set to `true` and the logged user has permission to view user group sets, will return the `groupSet` property on users.", + "schema": { + "type": "boolean" + } + }, + { + "name": "invitedBy", + "in": "query", + "required": false, + "description": "The user that has invited the returned users. Only used when searching as a manager (admin / broker).", + "schema": { + "type": "string" + } + }, + { + "name": "keywords", + "in": "query", + "required": false, + "description": "Textual search keywords. Sometimes, like in user search, the fields matched depends on what is configured on the products.", + "schema": { + "type": "string" + } + }, + { + "name": "lastLoginPeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum user last login date. Only taken into account if searching as administrator or managing broker. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "latitude", + "in": "query", + "required": false, + "description": "The reference latitude for distance searches", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "longitude", + "in": "query", + "required": false, + "description": "The reference longitude for distance searches", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "mainBrokerOnly", + "in": "query", + "required": false, + "description": "When set to `true`, will match only users that have the brokers as set in the `brokers` parameter as main broker.", + "schema": { + "type": "boolean" + } + }, + { + "name": "maxDistance", + "in": "query", + "required": false, + "description": "Maximum straight-line distance between the informed location and the resulting address. Is measured either in kilometers or miles, depending on the configuration. Only accepted if both `longitude` and `latitude` parameters are passed with the actual reference position.", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "notAcceptedAgreements", + "in": "query", + "required": false, + "description": "Either id or internal names of agreements the user must not have accepted. Ignored if the logged user isn't an admin or broker with permission to view the user agreement log.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "orderBy", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/UserOrderByEnum" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number (zero-based) of the search. The default value is zero.", + "schema": { + "type": "integer" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", + "schema": { + "type": "integer" + } + }, + { + "name": "products", + "in": "query", + "required": false, + "description": "Either id or internal names of products the users should have assigned. Ignored if the authenticated user isn't an administrator.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "productsIndividuallyAssigned", + "in": "query", + "required": false, + "description": "When set to `true`, the list specifid in `products` will only match users with those products assigned individually, not via group or group set. When set to `false` (default), the products will match any level (individual, group or group set).", + "schema": { + "type": "boolean" + } + }, + { + "name": "profileFields", + "in": "query", + "required": false, + "description": "User profile fields, both basic (full name, login name, phone, e-mail, etc) and custom fields, that are used for search. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by `:` (colon). For example, `profileFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, `profileFields=field1:valueA|valueB`. The accepted fields depend on the products the authenticated user has. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `profileFields=rank:bronze|silver,birthDate:2000-01-01|2001-12-31` would match results whose custom field with internal name 'rank' is either bronze or silver, and whose 'birthDate' is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `profileFields=birthDate:|2001-12-31`.\nThe basic profile fields have one of the following identifiers:\n- `name` or `fullName`: Full name; - `username`, `loginName` or `login`: Login name; - `email`: E-mail; - `phone`: Phone; - `accountNumber`, `account`: Account number; - `image`: Image (accepts a boolean value, indicating that either it is required that users either have images or not).\n\nIf address is an allowed profile field for search, specific address fields may be searched. The allowed ones are normally returned as the `addressFieldsInSearch` field in the corresponding result from a data-for-search request. The specific address fields are:\n- `address`: Searches on any address field (not a specific field); - `address.address`: Searches on the fields that represent the street address, which are `addressLine1`, `addressLine2`, `street`, `buildingNumber` and `complement`. Note that normally only a subset of them should be enabled in the configuration (either line 1 / 2 or street + number + complement);\n- `address.zip`: Searches for matching zip (postal) code; - `address.poBox`: Searches for matching postal box; - `address.neighborhood`: Searches by neighborhood; - `address.city`: Searches by city; - `address.region`: Searches by region (or state); - `address.country`: Searches by ISO 3166-1 alpha-2 country code. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `profileFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `profileFields=dynamic:'business`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "roles", + "in": "query", + "required": false, + "description": "", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RoleEnum" + } + } + }, + { + "name": "skipTotalCount", + "in": "query", + "required": false, + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", + "schema": { + "type": "boolean" + } + }, + { + "name": "statuses", + "in": "query", + "required": false, + "description": "The possible status of the user. If no status is given, `active` and `blocked` users are returned.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserStatusEnum" + } + } + }, + { + "name": "usersToExclude", + "in": "query", + "required": false, + "description": "Indicated the users to be excluded from the result", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "usersToInclude", + "in": "query", + "required": false, + "description": "Indicated the users to be included in the result. Any other user not present in this list will be excluded from the result.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "The users matching the criteria", + "headers": { + "X-Total-Count": { + "schema": { + "type": "integer" + }, + "description": "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." + }, + "X-Page-Size": { + "schema": { + "type": "integer" + }, + "description": "The maximum number of results per page" + }, + "X-Current-Page": { + "schema": { + "type": "integer" + }, + "description": "The current page the results are in" + }, + "X-Has-Next-Page": { + "schema": { + "type": "boolean" + }, + "description": "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." + } + }, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserResult" + } } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -6314,81 +6500,90 @@ } } }, - "/{user}/operator-groups/list-data" : { - "get" : { - "operationId" : "getUserOperatorGroupsListData", - "summary" : "Returns data for operator groups listing of the given user", - "description" : "Returns data containing the operator groups beloging to the given user, plus additional data related to them.", - "tags" : [ "OperatorGroups" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/user" - } ], - "responses" : { - "200" : { - "description" : "The data for listing operator groups", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UserOperatorGroupsListData" + "/{user}/operators/data-for-search": { + "get": { + "operationId": "getUserOperatorsDataForSearch", + "summary": "Get configuration data for searching operators of the given user", + "description": "Returns data with the current configuration regarding the operators of the given user", + "tags": [ + "Operators" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/user" + } + ], + "responses": { + "200": { + "description": "The configuration data for operators search over a user", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserOperatorsDataForSearch" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -6396,265 +6591,395 @@ } } }, - "/{user}/operator-groups" : { - "parameters" : [ { - "$ref" : "#/components/parameters/user" - } ], - "get" : { - "operationId" : "listOperatorGroupsByUser", - "summary" : "Lists all operator groups for a given user", - "description" : "Returns a list with the operator groups of the given user.", - "tags" : [ "OperatorGroups" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The list of visible user addresses", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/EntityReference" + "/{user}/operators": { + "parameters": [ + { + "$ref": "#/components/parameters/user" + } + ], + "get": { + "operationId": "searchUserOperators", + "summary": "Search the operators of a given user", + "description": "Returns a page of operators that match a given criteria. To view an operator profile, use `GET /users/{operator}`.", + "tags": [ + "Operators" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "creationPeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum user creation date. Only taken into account if searching as administrator or managing broker. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "ignoreProfileFieldsInList", + "in": "query", + "required": false, + "description": "When set to `true`, instead of returning users with corresponding profile fields set on list, will return them with `display`.", + "schema": { + "type": "boolean" + } + }, + { + "name": "operatorGroups", + "in": "query", + "required": false, + "description": "An array of operator group ids", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number (zero-based) of the search. The default value is zero.", + "schema": { + "type": "integer" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", + "schema": { + "type": "integer" + } + }, + { + "name": "skipTotalCount", + "in": "query", + "required": false, + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", + "schema": { + "type": "boolean" + } + }, + { + "name": "statuses", + "in": "query", + "required": false, + "description": "", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserStatusEnum" + } + } + } + ], + "responses": { + "200": { + "description": "The operators matching the criteria", + "headers": { + "X-Total-Count": { + "schema": { + "type": "integer" + }, + "description": "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." + }, + "X-Page-Size": { + "schema": { + "type": "integer" + }, + "description": "The maximum number of results per page" + }, + "X-Current-Page": { + "schema": { + "type": "integer" + }, + "description": "The current page the results are in" + }, + "X-Has-Next-Page": { + "schema": { + "type": "boolean" + }, + "description": "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." + } + }, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OperatorResult" } } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } }, - "post" : { - "operationId" : "createOperatorGroup", - "summary" : "Creates a new operator group for the given user", - "description" : "Creates a new operator group for the given user", - "tags" : [ "OperatorGroups" ], - "responses" : { - "201" : { - "description" : "Returns the identifier of the new group", - "headers" : { - "Location" : { - "description" : "URL for viewing the operator group details", - "schema" : { - "type" : "string" + "post": { + "operationId": "registerOperator", + "summary": "Registers a new operator", + "description": "Registers an operator, together with his password and phones.", + "parameters": [], + "tags": [ + "Operators" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "responses": { + "201": { + "description": "The result of the registration", + "headers": { + "Location": { + "description": "URL for viewing the registered operator's profile", + "schema": { + "type": "string" } } }, - "content" : { - "text/plain" : { - "schema" : { - "type" : "string" + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserRegistrationResult" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } }, - "requestBody" : { - "description" : "The operator group to be created", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/OperatorGroupNew" + "requestBody": { + "description": "The operator to be registered", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OperatorNew" } } } } } }, - "/{user}/operator-groups/data-for-new" : { - "parameters" : [ { - "$ref" : "#/components/parameters/user" - } ], - "get" : { - "operationId" : "getOperatorGroupDataForNew", - "summary" : "Returns data for creating an operator group", - "description" : "Returns configuration data for creating an operator group, such as which operations are available.", - "tags" : [ "OperatorGroups" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The configuration data", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/OperatorGroupDataForNew" + "/operators/data-for-search": { + "get": { + "operationId": "getGeneralOperatorsDataForSearch", + "summary": "Get configuration data for searching operators of any managed user", + "description": "Returns data with the current configuration regarding the search of operators of managed users. This is meant to be used by either administrators or brokers", + "tags": [ + "Operators" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The configuration data for operators search", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GeneralOperatorsDataForSearch" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -6662,82 +6987,167 @@ } } }, - "/operator-groups/{id}/data-for-edit" : { - "parameters" : [ { - "$ref" : "#/components/parameters/id" - } ], - "get" : { - "operationId" : "getOperatorGroupDataForEdit", - "summary" : "Returns data for editing an operator group", - "description" : "Returns configuration data for editing an operator group, such as which operations are available.", - "tags" : [ "OperatorGroups" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The configuration data", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/OperatorGroupDataForEdit" + "/operators": { + "get": { + "operationId": "searchGeneralOperators", + "summary": "Search the visible operators (of any managed user)", + "description": "Returns a page of operators that match a given criteria. To view an operator profile, use `GET /users/{operator}`.", + "tags": [ + "Operators" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/page" + }, + { + "$ref": "#/components/parameters/pageSize" + }, + { + "name": "userGroups", + "in": "query", + "required": false, + "description": "Either id or internal names of user groups / group sets", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "broker", + "in": "query", + "required": false, + "description": "Either id or a principal (login name, e-mail, etc) of the user broker", + "schema": { + "type": "string" + } + }, + { + "name": "creationPeriod", + "description": "The minimum / maximum user creation date. Only taken into account if searching as administrator or managing broker. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "in": "query", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "statuses", + "in": "query", + "required": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserStatusEnum" + } + } + } + ], + "responses": { + "200": { + "description": "The users matching the criteria", + "headers": { + "X-Total-Count": { + "schema": { + "type": "integer" + }, + "description": "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." + }, + "X-Page-Size": { + "schema": { + "type": "integer" + }, + "description": "The maximum number of results per page" + }, + "X-Current-Page": { + "schema": { + "type": "integer" + }, + "description": "The current page the results are in" + }, + "X-Has-Next-Page": { + "schema": { + "type": "boolean" + }, + "description": "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." + } + }, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OperatorResult" + } } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -6745,777 +7155,853 @@ } } }, - "/operator-groups/{id}" : { - "parameters" : [ { - "$ref" : "#/components/parameters/id" - } ], - "get" : { - "operationId" : "viewOperatorGroup", - "summary" : "Returns details of a specific operator group", - "description" : "Returns information about an operator group, located by id", - "tags" : [ "OperatorGroups" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The operator group data", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/OperatorGroupView" + "/{user}/operators/data-for-new": { + "get": { + "operationId": "getOperatorDataForNew", + "summary": "Get configuration data for registering a new operator", + "description": "Contains all configuration needed for registering an operator, such as the enabled profile fields and the password(s).", + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/user" + }, + { + "name": "group", + "required": false, + "in": "query", + "description": "The operator group. If no group is set, will return the list of operator groups for this owner. If a group is pre-set, will return only that group.", + "schema": { + "type": "string" + } + } + ], + "tags": [ + "Operators" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "responses": { + "200": { + "description": "An object containing the data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OperatorDataForNew" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - }, - "put" : { - "operationId" : "updateOperatorGroup", - "summary" : "Updates an existing operator group.", - "description" : "Updates an existing operator group.", - "tags" : [ "OperatorGroups" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "204" : { - "description" : "The operator group was updated" + } + }, + "/{user}/operator-groups/list-data": { + "get": { + "operationId": "getUserOperatorGroupsListData", + "summary": "Returns data for operator groups listing of the given user", + "description": "Returns data containing the operator groups beloging to the given user, plus additional data related to them.", + "tags": [ + "OperatorGroups" + ], + "security": [ + { + "basic": [] }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" - } - } - } + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + { + "$ref": "#/components/parameters/user" + } + ], + "responses": { + "200": { + "description": "The data for listing operator groups", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserOperatorGroupsListData" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - }, - "requestBody" : { - "description" : "The operator group to be edited", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/OperatorGroupEdit" - } - } - } } - }, - "delete" : { - "operationId" : "deleteOperatorGroup", - "summary" : "Removes an operator group.", - "description" : "Removes an operator group.", - "tags" : [ "OperatorGroups" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "204" : { - "description" : "The operator group was deleted" - }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" + } + }, + "/{user}/operator-groups": { + "parameters": [ + { + "$ref": "#/components/parameters/user" + } + ], + "get": { + "operationId": "listOperatorGroupsByUser", + "summary": "Lists all operator groups for a given user", + "description": "Returns a list with the operator groups of the given user.", + "tags": [ + "OperatorGroups" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The list of visible user addresses", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityReference" + } } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - } - }, - "/{user}/addresses/list-data" : { - "get" : { - "operationId" : "getUserAddressesListData", - "summary" : "Returns data for addresses listing of the given user", - "description" : "Returns data containing the (visible) user addresses, plus additional data related to addresses.", - "tags" : [ "Addresses" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/user" - } ], - "responses" : { - "200" : { - "description" : "The data for listing addresses", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UserAddressesListData" + }, + "post": { + "operationId": "createOperatorGroup", + "summary": "Creates a new operator group for the given user", + "description": "Creates a new operator group for the given user", + "tags": [ + "OperatorGroups" + ], + "responses": { + "201": { + "description": "Returns the identifier of the new group", + "headers": { + "Location": { + "description": "URL for viewing the operator group details", + "schema": { + "type": "string" + } + } + }, + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } + }, + "requestBody": { + "description": "The operator group to be created", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OperatorGroupNew" + } + } + } } } }, - "/{user}/addresses" : { - "get" : { - "operationId" : "listAddressesByUser", - "summary" : "Lists all (visible) user addresses", - "description" : "Returns a list with all addresses of the given user that the currently authenticated user can see.", - "tags" : [ "Addresses" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/user" - } ], - "responses" : { - "200" : { - "description" : "The list of visible user addresses", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/AddressResult" - } + "/{user}/operator-groups/data-for-new": { + "parameters": [ + { + "$ref": "#/components/parameters/user" + } + ], + "get": { + "operationId": "getOperatorGroupDataForNew", + "summary": "Returns data for creating an operator group", + "description": "Returns configuration data for creating an operator group, such as which operations are available.", + "tags": [ + "OperatorGroups" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The configuration data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OperatorGroupDataForNew" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - }, - "post" : { - "operationId" : "createAddress", - "summary" : "Creates a new address for the given user", - "description" : "Creates a new address for the given user. If it is set to be the default one, the previous default (if any) will no longer be the default address for that user.", - "tags" : [ "Addresses" ], - "parameters" : [ { - "$ref" : "#/components/parameters/user" - }, { - "$ref" : "#/components/parameters/confirmationPassword" - } ], - "responses" : { - "201" : { - "description" : "Returns the identifier of the new address", - "headers" : { - "Location" : { - "description" : "URL for viewing the address details", - "schema" : { - "type" : "string" - } - } - }, - "content" : { - "text/plain" : { - "schema" : { - "type" : "string" - } - } - } + } + }, + "/operator-groups/{id}/data-for-edit": { + "parameters": [ + { + "$ref": "#/components/parameters/id" + } + ], + "get": { + "operationId": "getOperatorGroupDataForEdit", + "summary": "Returns data for editing an operator group", + "description": "Returns configuration data for editing an operator group, such as which operations are available.", + "tags": [ + "OperatorGroups" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The configuration data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OperatorGroupDataForEdit" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - }, - "requestBody" : { - "description" : "The address to be created", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AddressNew" - } - } - } } } }, - "/{user}/addresses/primary" : { - "get" : { - "operationId" : "getUserPrimaryAddress", - "summary" : "Returns the primary address of a given user", - "description" : "Returns the primary (default) address of the given user, in case it is visible", - "tags" : [ "Addresses" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/user" - } ], - "responses" : { - "200" : { - "description" : "The primary addresses", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Address" + "/operator-groups/{id}": { + "parameters": [ + { + "$ref": "#/components/parameters/id" + } + ], + "get": { + "operationId": "viewOperatorGroup", + "summary": "Returns details of a specific operator group", + "description": "Returns information about an operator group, located by id", + "tags": [ + "OperatorGroups" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The operator group data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OperatorGroupView" } } } }, - "204" : { - "description" : "No content when no address is primary" - }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - } - }, - "/{user}/addresses/data-for-new" : { - "get" : { - "operationId" : "getAddressDataForNew", - "summary" : "Returns data to create a new address", - "description" : "Returns configuration data for creating an address for the given user", - "tags" : [ "Addresses" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/user" - } ], - "responses" : { - "200" : { - "description" : "The data for creating an address", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AddressDataForNew" + }, + "put": { + "operationId": "updateOperatorGroup", + "summary": "Updates an existing operator group.", + "description": "Updates an existing operator group.", + "tags": [ + "OperatorGroups" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "responses": { + "204": { + "description": "The operator group was updated" + }, + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" + } + } + } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } + }, + "requestBody": { + "description": "The operator group to be edited", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OperatorGroupEdit" + } + } + } } - } - }, - "/addresses/{id}/data-for-edit" : { - "get" : { - "operationId" : "getAddressDataForEdit", - "summary" : "Returns data to edit an existing address", - "description" : "Returns configuration data for editing an address, plus the current AddressEdit object that can be altered and sent back", - "tags" : [ "Addresses" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/id" - } ], - "responses" : { - "200" : { - "description" : "The data for editing an address", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AddressDataForEdit" + }, + "delete": { + "operationId": "deleteOperatorGroup", + "summary": "Removes an operator group.", + "description": "Removes an operator group.", + "tags": [ + "OperatorGroups" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "responses": { + "204": { + "description": "The operator group was deleted" + }, + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -7523,350 +8009,385 @@ } } }, - "/addresses/{id}" : { - "get" : { - "operationId" : "viewAddress", - "summary" : "Returns details of a specific address", - "description" : "Returns information about an address, located by id", - "tags" : [ "Addresses" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/id" - } ], - "responses" : { - "200" : { - "description" : "The address data", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AddressView" + "/{user}/addresses/list-data": { + "get": { + "operationId": "getUserAddressesListData", + "summary": "Returns data for addresses listing of the given user", + "description": "Returns data containing the (visible) user addresses, plus additional data related to addresses.", + "tags": [ + "Addresses" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/user" + } + ], + "responses": { + "200": { + "description": "The data for listing addresses", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserAddressesListData" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - }, - "put" : { - "operationId" : "updateAddress", - "summary" : "Updates an existing address", - "description" : "Updates an existing address", - "tags" : [ "Addresses" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/id" - }, { - "$ref" : "#/components/parameters/confirmationPassword" - } ], - "responses" : { - "204" : { - "description" : "The address was updated" - }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" + } + }, + "/{user}/addresses": { + "get": { + "operationId": "listAddressesByUser", + "summary": "Lists all (visible) user addresses", + "description": "Returns a list with all addresses of the given user that the currently authenticated user can see.", + "tags": [ + "Addresses" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/user" + } + ], + "responses": { + "200": { + "description": "The list of visible user addresses", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AddressResult" + } } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } + } + } + }, + "post": { + "operationId": "createAddress", + "summary": "Creates a new address for the given user", + "description": "Creates a new address for the given user. If it is set to be the default one, the previous default (if any) will no longer be the default address for that user.", + "tags": [ + "Addresses" + ], + "parameters": [ + { + "$ref": "#/components/parameters/user" }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + { + "$ref": "#/components/parameters/confirmationPassword" + } + ], + "responses": { + "201": { + "description": "Returns the identifier of the new address", + "headers": { + "Location": { + "description": "URL for viewing the address details", + "schema": { + "type": "string" } } - } - } - }, - "requestBody" : { - "description" : "The address to be edited", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AddressEdit" + }, + "content": { + "text/plain": { + "schema": { + "type": "string" + } } } - } - } - }, - "delete" : { - "operationId" : "deleteAddress", - "summary" : "Removes an address", - "description" : "Removes an address", - "tags" : [ "Addresses" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/id" - }, { - "$ref" : "#/components/parameters/confirmationPassword" - } ], - "responses" : { - "204" : { - "description" : "The address was deleted" }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } + }, + "requestBody": { + "description": "The address to be created", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddressNew" + } + } + } } } }, - "/addresses/{id}/password-for-remove" : { - "get" : { - "operationId" : "getPasswordInputForRemoveAddress", - "summary" : "Returns a confirmation `PasswordInput` for removing an address, if any", - "description" : "If a confirmation password is required to remove an address, clients should invoke this operation prior to effectively removing the address, which will return the data regarding the confirmation password.", - "tags" : [ "Addresses" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/id" - } ], - "responses" : { - "200" : { - "description" : "The confirmation password input, or null", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PasswordInput" + "/{user}/addresses/primary": { + "get": { + "operationId": "getUserPrimaryAddress", + "summary": "Returns the primary address of a given user", + "description": "Returns the primary (default) address of the given user, in case it is visible", + "tags": [ + "Addresses" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/user" + } + ], + "responses": { + "200": { + "description": "The primary addresses", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Address" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "204": { + "description": "No content when no address is primary" + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -7874,72 +8395,90 @@ } } }, - "/addresses/countries" : { - "get" : { - "operationId" : "listCountries", - "summary" : "Lists all known countries with the ISO code and display name", - "description" : "The country code is the 2-letter, `ISO 3166-1 alpha-2` code, and the display name is returned in the authenticated user's language.", - "tags" : [ "Addresses" ], - "responses" : { - "200" : { - "description" : "The list of countries", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Country" - } + "/{user}/addresses/data-for-new": { + "get": { + "operationId": "getAddressDataForNew", + "summary": "Returns data to create a new address", + "description": "Returns configuration data for creating an address for the given user", + "tags": [ + "Addresses" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/user" + } + ], + "responses": { + "200": { + "description": "The data for creating an address", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddressDataForNew" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -7947,81 +8486,90 @@ } } }, - "/{user}/phones/list-data" : { - "get" : { - "operationId" : "getUserPhonesListData", - "summary" : "Returns data for listing a user's phones", - "description" : "Returns data containing the (visible) user phones, plus additional data related to phones.", - "tags" : [ "Phones" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/user" - } ], - "responses" : { - "200" : { - "description" : "An object containing the phones plus additional information", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UserPhonesListData" + "/addresses/{id}/data-for-edit": { + "get": { + "operationId": "getAddressDataForEdit", + "summary": "Returns data to edit an existing address", + "description": "Returns configuration data for editing an address, plus the current AddressEdit object that can be altered and sent back", + "tags": [ + "Addresses" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/id" + } + ], + "responses": { + "200": { + "description": "The data for editing an address", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddressDataForEdit" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -8029,275 +8577,295 @@ } } }, - "/{user}/phones" : { - "get" : { - "operationId" : "listPhonesByUser", - "summary" : "Lists all (visible) user phones", - "description" : "Returns a list with all phones of the given user that the currently authenticated user can see.", - "tags" : [ "Phones" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/user" - } ], - "responses" : { - "200" : { - "description" : "The list of visible user phones", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PhoneResult" - } + "/addresses/{id}": { + "get": { + "operationId": "viewAddress", + "summary": "Returns details of a specific address", + "description": "Returns information about an address, located by id", + "tags": [ + "Addresses" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/id" + } + ], + "responses": { + "200": { + "description": "The address data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddressView" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } }, - "post" : { - "operationId" : "createPhone", - "summary" : "Creates a new phone for the given user", - "description" : "Creates a new phone for the given user", - "tags" : [ "Phones" ], - "parameters" : [ { - "$ref" : "#/components/parameters/user" - }, { - "$ref" : "#/components/parameters/confirmationPassword" - } ], - "responses" : { - "201" : { - "description" : "Returns the identifier of the new phone", - "headers" : { - "Location" : { - "description" : "URL for viewing the mobile phone details", - "schema" : { - "type" : "string" - } - } - }, - "content" : { - "text/plain" : { - "schema" : { - "type" : "string" + "put": { + "operationId": "updateAddress", + "summary": "Updates an existing address", + "description": "Updates an existing address", + "tags": [ + "Addresses" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/id" + }, + { + "$ref": "#/components/parameters/confirmationPassword" + } + ], + "responses": { + "204": { + "description": "The address was updated" + }, + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } }, - "requestBody" : { - "description" : "The phone to be created", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PhoneNew" + "requestBody": { + "description": "The address to be edited", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddressEdit" } } } } - } - }, - "/{user}/phones/data-for-new" : { - "get" : { - "operationId" : "getPhoneDataForNew", - "summary" : "Returns data to create a new phone", - "description" : "Returns configuration data for creating a phone for the given user", - "tags" : [ "Phones" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/user" - }, { - "name" : "type", - "in" : "query", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/PhoneKind" - } - } ], - "responses" : { - "200" : { - "description" : "The data for creating a phone", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PhoneDataForNew" - } + }, + "delete": { + "operationId": "deleteAddress", + "summary": "Removes an address", + "description": "Removes an address", + "tags": [ + "Addresses" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/id" + }, + { + "$ref": "#/components/parameters/confirmationPassword" + } + ], + "responses": { + "204": { + "description": "The address was deleted" + }, + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" + } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -8305,81 +8873,90 @@ } } }, - "/phones/{id}/data-for-edit" : { - "get" : { - "operationId" : "getPhoneDataForEdit", - "summary" : "Returns data to edit an existing phone", - "description" : "Returns configuration data for editing a phone, plus the current `PhoneEdit` object that can be altered and sent back", - "tags" : [ "Phones" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/id" - } ], - "responses" : { - "200" : { - "description" : "The data for editing a phone", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PhoneDataForEdit" + "/addresses/{id}/password-for-remove": { + "get": { + "operationId": "getPasswordInputForRemoveAddress", + "summary": "Returns a confirmation `PasswordInput` for removing an address, if any", + "description": "If a confirmation password is required to remove an address, clients should invoke this operation prior to effectively removing the address, which will return the data regarding the confirmation password.", + "tags": [ + "Addresses" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/id" + } + ], + "responses": { + "200": { + "description": "The confirmation password input, or null", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PasswordInput" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -8387,350 +8964,465 @@ } } }, - "/phones/{id}" : { - "get" : { - "operationId" : "viewPhone", - "summary" : "Returns details of a specific phone", - "description" : "Returns information about a phone, located by id", - "tags" : [ "Phones" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/id" - } ], - "responses" : { - "200" : { - "description" : "The phone data", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PhoneView" + "/addresses/countries": { + "get": { + "operationId": "listCountries", + "summary": "Lists all known countries with the ISO code and display name", + "description": "The country code is the 2-letter, `ISO 3166-1 alpha-2` code, and the display name is returned in the authenticated user's language.", + "tags": [ + "Addresses" + ], + "responses": { + "200": { + "description": "The list of countries", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Country" + } } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - }, - "delete" : { - "operationId" : "deletePhone", - "summary" : "Removes a phone", - "description" : "Removes a phone", - "tags" : [ "Phones" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/id" - }, { - "$ref" : "#/components/parameters/confirmationPassword" - } ], - "responses" : { - "204" : { - "description" : "The phone was deleted" + } + }, + "/{user}/phones/list-data": { + "get": { + "operationId": "getUserPhonesListData", + "summary": "Returns data for listing a user's phones", + "description": "Returns data containing the (visible) user phones, plus additional data related to phones.", + "tags": [ + "Phones" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/user" + } + ], + "responses": { + "200": { + "description": "An object containing the phones plus additional information", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserPhonesListData" + } + } + } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } + } + }, + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } + } + }, + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } + } }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/{user}/phones": { + "get": { + "operationId": "listPhonesByUser", + "summary": "Lists all (visible) user phones", + "description": "Returns a list with all phones of the given user that the currently authenticated user can see.", + "tags": [ + "Phones" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/user" + } + ], + "responses": { + "200": { + "description": "The list of visible user phones", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PhoneResult" + } } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } }, - "put" : { - "operationId" : "updatePhone", - "summary" : "Updates an existing phone", - "description" : "Updates an existing phone", - "tags" : [ "Phones" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/id" - }, { - "$ref" : "#/components/parameters/confirmationPassword" - } ], - "responses" : { - "204" : { - "description" : "The phone was updated" + "post": { + "operationId": "createPhone", + "summary": "Creates a new phone for the given user", + "description": "Creates a new phone for the given user", + "tags": [ + "Phones" + ], + "parameters": [ + { + "$ref": "#/components/parameters/user" }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" + { + "$ref": "#/components/parameters/confirmationPassword" + } + ], + "responses": { + "201": { + "description": "Returns the identifier of the new phone", + "headers": { + "Location": { + "description": "URL for viewing the mobile phone details", + "schema": { + "type": "string" + } + } + }, + "content": { + "text/plain": { + "schema": { + "type": "string" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } }, - "requestBody" : { - "description" : "The phone to be edited", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PhoneEdit" + "requestBody": { + "description": "The phone to be created", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PhoneNew" } } } } } }, - "/phones/{id}/password-for-remove" : { - "get" : { - "operationId" : "getPasswordInputForRemovePhone", - "summary" : "Returns a confirmation `PasswordInput` for removing a phone, if any", - "description" : "If a confirmation password is required to remove a phone, clients should invoke this operation prior to effectively removing the phone, which will return the data regarding the confirmation password.", - "tags" : [ "Phones" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/id" - } ], - "responses" : { - "200" : { - "description" : "The confirmation password input, or null", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PasswordInput" + "/{user}/phones/data-for-new": { + "get": { + "operationId": "getPhoneDataForNew", + "summary": "Returns data to create a new phone", + "description": "Returns configuration data for creating a phone for the given user", + "tags": [ + "Phones" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/user" + }, + { + "name": "type", + "in": "query", + "required": true, + "schema": { + "$ref": "#/components/schemas/PhoneKind" + } + } + ], + "responses": { + "200": { + "description": "The data for creating a phone", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PhoneDataForNew" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -8738,82 +9430,96 @@ } } }, - "/phones/{id}/send-verification-code" : { - "post" : { - "operationId" : "sendPhoneVerificationCode", - "summary" : "Sends the verification code for a user to verify the mobile phone", - "description" : "Sends an SMS text with a verification code the user can use to verify his mobile phone. Only verified phones can be used for receiving SMS notifications or to operate in the SMS operations channel. Only the phone owner can verify phones with this method. Administrators / brokers can directly mark a phone number as verified.", - "tags" : [ "Phones" ], - "parameters" : [ { - "$ref" : "#/components/parameters/id" - } ], - "responses" : { - "200" : { - "description" : "The phone number which received the SMS", - "content" : { - "text/plain" : { - "schema" : { - "type" : "string" - } - } - } + "/phones/{idOrNumber}/data-for-edit": { + "get": { + "operationId": "getPhoneDataForEdit", + "summary": "Returns data to edit an existing phone", + "description": "Returns configuration data for editing a phone, plus the current `PhoneEdit` object that can be altered and sent back", + "tags": [ + "Phones" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "idOrNumber", + "in": "path", + "required": true, + "description": "Either the id or phone number. Note that optional signs (`-` or `+`) immediately followed by digits-only are interpreted as ids. To use a phone number, either escape it starting or enclosing with single quotes (`'`) or prefixing the value with `number:`. Phone number can only be used for mobile phones if the configuration sets mobile numbers to be unique. Land-line phone numbers are never unique, hence, can't be used.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The data for editing a phone", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PhoneDataForEdit" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -8821,310 +9527,394 @@ } } }, - "/phones/{id}/verify" : { - "post" : { - "operationId" : "verifyPhone", - "summary" : "Marks a phone as verified if the code matches", - "description" : "Verifies a mobile phone by submitting the code received by SMS. Only verified phones can be enabled for receiving SMS notifications or to operate in the SMS operations channel. Only the phone owner can verify phones with this method. Administrators / brokers can directly mark a phone number as verified when saving the phone.", - "tags" : [ "Phones" ], - "parameters" : [ { - "$ref" : "#/components/parameters/id" - }, { - "name" : "code", - "in" : "query", - "required" : true, - "description" : "The verification code received by SMS", - "schema" : { - "type" : "string" + "/phones/{idOrNumber}": { + "parameters": [ + { + "name": "idOrNumber", + "in": "path", + "required": true, + "description": "Either the id or phone number. Note that optional signs (`-` or `+`) immediately followed by digits-only are interpreted as ids. To use a phone number, either escape it starting or enclosing with single quotes (`'`) or prefixing the value with `number:`. Phone number can only be used for mobile phones if the configuration sets mobile numbers to be unique. Land-line phone numbers are never unique, hence, can't be used.", + "schema": { + "type": "string" + } + } + ], + "get": { + "operationId": "viewPhone", + "summary": "Returns details of a specific phone", + "description": "Returns information about a phone, located by id", + "tags": [ + "Phones" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] } - } ], - "responses" : { - "200" : { - "description" : "The verification status", - "content" : { - "text/plain" : { - "schema" : { - "$ref" : "#/components/schemas/CodeVerificationStatusEnum" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The phone data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PhoneView" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - } - }, - "/phones/{id}/enable-for-sms" : { - "post" : { - "operationId" : "enablePhoneForSms", - "summary" : "Marks a phone as enabled to receive SMS notifications and operate in the SMS channel", - "description" : "Marks a phone as enabled to receive SMS notifications and operate in. Only allowed if is a verified mobile phone not already enabled for SMS. Only the phone owner can verify phones with this method. Administrators / brokers can directly mark a phone number as verified when saving it.", - "tags" : [ "Phones" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/id" - } ], - "responses" : { - "204" : { - "description" : "The phone is enabled for SMS and nothing is returned" + }, + "delete": { + "operationId": "deletePhone", + "summary": "Removes a phone", + "description": "Removes a phone", + "tags": [ + "Phones" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/confirmationPassword" + } + ], + "responses": { + "204": { + "description": "The phone was deleted" }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - } - }, - "/phones/{id}/disable-for-sms" : { - "post" : { - "operationId" : "disablePhoneForSms", - "summary" : "Marks a phone as disabled to receive SMS notifications and operate in the SMS channel", - "description" : "Marks a phone as disabled to receive SMS notifications and operate in. If the confirmation password is enabled, it must be passed in. Only allowed if is a verified mobile phone not already enabled for SMS. Only the phone owner can verify phones with this method. Administrators / brokers can directly mark a phone number as verified when saving it.", - "tags" : [ "Phones" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/id" - }, { - "$ref" : "#/components/parameters/confirmationPassword" - } ], - "responses" : { - "204" : { - "description" : "The phone is disabled for SMS and nothing is returned" + }, + "put": { + "operationId": "updatePhone", + "summary": "Updates an existing phone", + "description": "Updates an existing phone", + "tags": [ + "Phones" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/confirmationPassword" + } + ], + "responses": { + "204": { + "description": "The phone was updated" + }, + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" + } + } + } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } + } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } + }, + "requestBody": { + "description": "The phone to be edited", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PhoneEdit" + } + } + } } } }, - "/phones/{id}/password-for-disable-sms" : { - "get" : { - "operationId" : "getPasswordInputForDisablePhoneForSms", - "summary" : "Returns a confirmation `PasswordInput` for disabling SMS of a phone, if any", - "description" : "If a confirmation password is required to disable a phone from sending / receiving SMS, clients should invoke this operation prior to effectively disabling SMS, which will return the data regarding the confirmation password.", - "tags" : [ "Phones" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/id" - } ], - "responses" : { - "200" : { - "description" : "The confirmation password input, or null", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PasswordInput" + "/phones/{idOrNumber}/password-for-remove": { + "get": { + "operationId": "getPasswordInputForRemovePhone", + "summary": "Returns a confirmation `PasswordInput` for removing a phone, if any", + "description": "If a confirmation password is required to remove a phone, clients should invoke this operation prior to effectively removing the phone, which will return the data regarding the confirmation password.", + "tags": [ + "Phones" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "idOrNumber", + "in": "path", + "required": true, + "description": "Either the id or phone number. Note that optional signs (`-` or `+`) immediately followed by digits-only are interpreted as ids. To use a phone number, either escape it starting or enclosing with single quotes (`'`) or prefixing the value with `number:`. Phone number can only be used for mobile phones if the configuration sets mobile numbers to be unique. Land-line phone numbers are never unique, hence, can't be used.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The confirmation password input, or null", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PasswordInput" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -9132,81 +9922,92 @@ } } }, - "/{user}/contact-infos/list-data" : { - "get" : { - "operationId" : "getUserContactInfosListData", - "summary" : "Returns data for listing additional contact informations of the given user.", - "description" : "Returns data containing the (visible) user additional contact informations, plus additional data related to them.", - "tags" : [ "ContactInfos" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/user" - } ], - "responses" : { - "200" : { - "description" : "The data for listing additional contact informations", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UserContactInfosListData" + "/phones/{idOrNumber}/send-verification-code": { + "post": { + "operationId": "sendPhoneVerificationCode", + "summary": "Sends the verification code for a user to verify the mobile phone", + "description": "Sends an SMS text with a verification code the user can use to verify his mobile phone. Only verified phones can be used for receiving SMS notifications or to operate in the SMS operations channel. Only the phone owner can verify phones with this method. Administrators / brokers can directly mark a phone number as verified.", + "tags": [ + "Phones" + ], + "parameters": [ + { + "name": "idOrNumber", + "in": "path", + "required": true, + "description": "Either the id or phone number. Note that optional signs (`-` or `+`) immediately followed by digits-only are interpreted as ids. To use a phone number, either escape it starting or enclosing with single quotes (`'`) or prefixing the value with `number:`. Phone number can only be used if the configuration sets mobile numbers to be unique.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The phone number which received the SMS", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -9214,268 +10015,365 @@ } } }, - "/{user}/contact-infos" : { - "get" : { - "operationId" : "listContactInfosByUser", - "summary" : "Lists all (visible) additional contact informations for the user", - "description" : "Returns a list with all additional contact informations of the given user that the currently authenticated user can see.", - "tags" : [ "ContactInfos" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/user" - } ], - "responses" : { - "200" : { - "description" : "The list of visible additional contact information", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ContactInfoResult" - } + "/phones/{idOrNumber}/verify": { + "post": { + "operationId": "verifyPhone", + "summary": "Marks a mobile phone as verified if the code matches", + "description": "Verifies a mobile phone by submitting the code received by SMS. Only verified phones can be enabled for receiving SMS notifications or to operate in the SMS operations channel. Only the phone owner can verify phones with this method. Administrators / brokers can directly mark a phone number as verified when saving the phone.", + "tags": [ + "Phones" + ], + "parameters": [ + { + "name": "idOrNumber", + "in": "path", + "required": true, + "description": "Either the id or phone number. Note that optional signs (`-` or `+`) immediately followed by digits-only are interpreted as ids. To use a phone number, either escape it starting or enclosing with single quotes (`'`) or prefixing the value with `number:`. Phone number can only be used if the configuration sets mobile numbers to be unique.", + "schema": { + "type": "string" + } + }, + { + "name": "code", + "in": "query", + "required": true, + "description": "The verification code received by SMS", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The verification status", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/CodeVerificationStatusEnum" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - }, - "post" : { - "operationId" : "createContactInfo", - "summary" : "Creates a new additional contact information for the given user", - "description" : "Creates a new additional contact information for the given user.", - "tags" : [ "ContactInfos" ], - "parameters" : [ { - "$ref" : "#/components/parameters/user" - }, { - "$ref" : "#/components/parameters/confirmationPassword" - } ], - "responses" : { - "201" : { - "description" : "Returns the identifier of the new additional contact information", - "headers" : { - "Location" : { - "description" : "URL for viewing the additional contact information details", - "schema" : { - "type" : "string" + } + }, + "/phones/{idOrNumber}/enable-for-sms": { + "post": { + "operationId": "enablePhoneForSms", + "summary": "Marks a phone as enabled to receive SMS notifications and operate in the SMS channel", + "description": "Marks a phone as enabled to receive SMS notifications and operate in. Only allowed if is a verified mobile phone not already enabled for SMS. Only the phone owner can verify phones with this method. Administrators / brokers can directly mark a phone number as verified when saving it.", + "tags": [ + "Phones" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "name": "idOrNumber", + "in": "path", + "required": true, + "description": "Either the id or phone number. Note that optional signs (`-` or `+`) immediately followed by digits-only are interpreted as ids. To use a phone number, either escape it starting or enclosing with single quotes (`'`) or prefixing the value with `number:`. Phone number can only be used if the configuration sets mobile numbers to be unique.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "The phone is enabled for SMS and nothing is returned" + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } - }, - "content" : { - "text/plain" : { - "schema" : { - "type" : "string" + } + }, + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } + } + } + } + }, + "/phones/{idOrNumber}/disable-for-sms": { + "post": { + "operationId": "disablePhoneForSms", + "summary": "Marks a phone as disabled to receive SMS notifications and operate in the SMS channel", + "description": "Marks a phone as disabled to receive SMS notifications and operate in. If the confirmation password is enabled, it must be passed in. Only allowed if is a verified mobile phone not already enabled for SMS. Only the phone owner can verify phones with this method. Administrators / brokers can directly mark a phone number as verified when saving it.", + "tags": [ + "Phones" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "name": "idOrNumber", + "in": "path", + "required": true, + "description": "Either the id or phone number. Note that optional signs (`-` or `+`) immediately followed by digits-only are interpreted as ids. To use a phone number, either escape it starting or enclosing with single quotes (`'`) or prefixing the value with `number:`. Phone number can only be used if the configuration sets mobile numbers to be unique.", + "schema": { + "type": "string" + } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + { + "$ref": "#/components/parameters/confirmationPassword" + } + ], + "responses": { + "204": { + "description": "The phone is disabled for SMS and nothing is returned" + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } - } - }, - "requestBody" : { - "description" : "The additional contact information to be created", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ContactInfoNew" + }, + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } } } } } } }, - "/{user}/contact-infos/data-for-new" : { - "get" : { - "operationId" : "getContactInfoDataForNew", - "summary" : "Returns data to create a new additional contact information", - "description" : "Returns configuration data for creating an additional contact information for the given user", - "tags" : [ "ContactInfos" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/user" - } ], - "responses" : { - "200" : { - "description" : "The data for creating an additional contact information", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ContactInfoDataForNew" + "/phones/{idOrNumber}/password-for-disable-sms": { + "get": { + "operationId": "getPasswordInputForDisablePhoneForSms", + "summary": "Returns a confirmation `PasswordInput` for disabling SMS of a phone, if any", + "description": "If a confirmation password is required to disable a phone from sending / receiving SMS, clients should invoke this operation prior to effectively disabling SMS, which will return the data regarding the confirmation password.", + "tags": [ + "Phones" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "idOrNumber", + "in": "path", + "required": true, + "description": "Either the id or phone number. Note that optional signs (`-` or `+`) immediately followed by digits-only are interpreted as ids. To use a phone number, either escape it starting or enclosing with single quotes (`'`) or prefixing the value with `number:`. Phone number can only be used if the configuration sets mobile numbers to be unique.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The confirmation password input, or null", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PasswordInput" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -9483,81 +10381,90 @@ } } }, - "/contact-infos/{id}/data-for-edit" : { - "get" : { - "operationId" : "getContactInfoDataForEdit", - "summary" : "Returns data to edit an existing additional contact information", - "description" : "Returns configuration data for editing an additional contact information, plus the current ContactInfoEdit object that can be altered and posted back.", - "tags" : [ "ContactInfos" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/id" - } ], - "responses" : { - "200" : { - "description" : "The data for editing an contactInfo", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ContactInfoDataForEdit" + "/{user}/contact-infos/list-data": { + "get": { + "operationId": "getUserContactInfosListData", + "summary": "Returns data for listing additional contact informations of the given user.", + "description": "Returns data containing the (visible) user additional contact informations, plus additional data related to them.", + "tags": [ + "ContactInfos" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/user" + } + ], + "responses": { + "200": { + "description": "The data for listing additional contact informations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserContactInfosListData" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -9565,268 +10472,291 @@ } } }, - "/contact-infos/{id}" : { - "get" : { - "operationId" : "viewContactInfo", - "summary" : "Returns details of a specific additional contact information", - "description" : "Returns information about an additional contact information by id", - "tags" : [ "ContactInfos" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/id" - } ], - "responses" : { - "200" : { - "description" : "The additional contact information data", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ContactInfoView" + "/{user}/contact-infos": { + "get": { + "operationId": "listContactInfosByUser", + "summary": "Lists all (visible) additional contact informations for the user", + "description": "Returns a list with all additional contact informations of the given user that the currently authenticated user can see.", + "tags": [ + "ContactInfos" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/user" + } + ], + "responses": { + "200": { + "description": "The list of visible additional contact information", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ContactInfoResult" + } } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } }, - "put" : { - "operationId" : "updateContactInfo", - "summary" : "Updates an existing additional contact information", - "description" : "Updates an existing additional contact information", - "tags" : [ "ContactInfos" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/id" - }, { - "$ref" : "#/components/parameters/confirmationPassword" - } ], - "responses" : { - "204" : { - "description" : "The additional contact information was updated" + "post": { + "operationId": "createContactInfo", + "summary": "Creates a new additional contact information for the given user", + "description": "Creates a new additional contact information for the given user.", + "tags": [ + "ContactInfos" + ], + "parameters": [ + { + "$ref": "#/components/parameters/user" }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" + { + "$ref": "#/components/parameters/confirmationPassword" + } + ], + "responses": { + "201": { + "description": "Returns the identifier of the new additional contact information", + "headers": { + "Location": { + "description": "URL for viewing the additional contact information details", + "schema": { + "type": "string" + } + } + }, + "content": { + "text/plain": { + "schema": { + "type": "string" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } }, - "requestBody" : { - "description" : "The additional contact information to be edited", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ContactInfoEdit" + "requestBody": { + "description": "The additional contact information to be created", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ContactInfoNew" } } } } - }, - "delete" : { - "operationId" : "deleteContactInfo", - "summary" : "Removes an existing additional contact information", - "description" : "Removes an existing additional contact information", - "tags" : [ "ContactInfos" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/id" - }, { - "$ref" : "#/components/parameters/confirmationPassword" - } ], - "responses" : { - "204" : { - "description" : "The additional contact information was deleted" + } + }, + "/{user}/contact-infos/data-for-new": { + "get": { + "operationId": "getContactInfoDataForNew", + "summary": "Returns data to create a new additional contact information", + "description": "Returns configuration data for creating an additional contact information for the given user", + "tags": [ + "ContactInfos" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" + { + "$ref": "#/components/parameters/user" + } + ], + "responses": { + "200": { + "description": "The data for creating an additional contact information", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ContactInfoDataForNew" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -9834,81 +10764,90 @@ } } }, - "/contact-infos/{id}/password-for-remove" : { - "get" : { - "operationId" : "getPasswordInputForRemoveContactInfo", - "summary" : "Returns a confirmation `PasswordInput` for removing an additional contact information, if any.", - "description" : "If a confirmation password is required to remove an additional contact infomation, clients should invoke this operation prior to effectively removing it, which will return the data regarding the confirmation password.", - "tags" : [ "ContactInfos" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/id" - } ], - "responses" : { - "200" : { - "description" : "The confirmation password input, or null", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PasswordInput" + "/contact-infos/{id}/data-for-edit": { + "get": { + "operationId": "getContactInfoDataForEdit", + "summary": "Returns data to edit an existing additional contact information", + "description": "Returns configuration data for editing an additional contact information, plus the current ContactInfoEdit object that can be altered and posted back.", + "tags": [ + "ContactInfos" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/id" + } + ], + "responses": { + "200": { + "description": "The data for editing an contactInfo", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ContactInfoDataForEdit" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -9916,295 +10855,295 @@ } } }, - "/{user}/status" : { - "parameters" : [ { - "$ref" : "#/components/parameters/userNoSelf" - } ], - "get" : { - "operationId" : "getUserStatus", - "summary" : "Returns the current user status and the status history", - "description" : "Returns data containing information regarding the user status", - "tags" : [ "UserStatus" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The user status data", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UserStatusData" + "/contact-infos/{id}": { + "get": { + "operationId": "viewContactInfo", + "summary": "Returns details of a specific additional contact information", + "description": "Returns information about an additional contact information by id", + "tags": [ + "ContactInfos" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/id" + } + ], + "responses": { + "200": { + "description": "The additional contact information data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ContactInfoView" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } }, - "post" : { - "operationId" : "changeUserStatus", - "summary" : "Sets the new user status", - "description" : "Sets the new user status. Managers have permissions to which statuses are allowed. Some statuses are transient ( `active`, `blocked` and `disabled`) while others are terminal (`removed` and `purged`). The `pending` status can never be managed by this operation, but by validating the user registration.", - "tags" : [ "UserStatus" ], - "requestBody" : { - "description" : "The parameters for changing the status", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ChangeUserStatusParams" - } - } - } - }, - "responses" : { - "204" : { - "description" : "If the update is finished, nothing is returned" + "put": { + "operationId": "updateContactInfo", + "summary": "Updates an existing additional contact information", + "description": "Updates an existing additional contact information", + "tags": [ + "ContactInfos" + ], + "security": [ + { + "basic": [] }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } - } - } + { + "session": [] }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" - } - } - } + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/id" }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" - } - } - } + { + "$ref": "#/components/parameters/confirmationPassword" + } + ], + "responses": { + "204": { + "description": "The additional contact information was updated" }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } - } - } - } - }, - "/{user}/group" : { - "parameters" : [ { - "$ref" : "#/components/parameters/userNoSelf" - } ], - "get" : { - "operationId" : "getGroupMembershipData", - "summary" : "Returns the current user / operator group and the change history", - "description" : "Returns data containing information regarding the user / operator group membership", - "tags" : [ "GroupMembership" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The user / operator group membership data", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/GroupMembershipData" + }, + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } - }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" - } + } + }, + "requestBody": { + "description": "The additional contact information to be edited", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ContactInfoEdit" } } } } }, - "post" : { - "operationId" : "changeGroupMembership", - "summary" : "Changes the user / operator group", - "description" : "Sets the new user / operator group. Depending on the new group, new permissions are granted / revoked to / from the user / operator.", - "tags" : [ "GroupMembership" ], - "requestBody" : { - "description" : "The parameters for changing the group", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ChangeGroupMembershipParams" + "delete": { + "operationId": "deleteContactInfo", + "summary": "Removes an existing additional contact information", + "description": "Removes an existing additional contact information", + "tags": [ + "ContactInfos" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/id" + }, + { + "$ref": "#/components/parameters/confirmationPassword" + } + ], + "responses": { + "204": { + "description": "The additional contact information was deleted" + }, + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" + } } } - } - }, - "responses" : { - "204" : { - "description" : "If the update is finished, nothing is returned" }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -10212,82 +11151,90 @@ } } }, - "/{user}/products" : { - "parameters" : [ { - "$ref" : "#/components/parameters/userNoSelf" - } ], - "get" : { - "operationId" : "getUserProductsData", - "summary" : "Returns the user individual products and the change history", - "description" : "Returns data containing information regarding the products assigned to the given user", - "tags" : [ "ProductAssignment" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The user individual products data", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UserProductAssignmentData" + "/contact-infos/{id}/password-for-remove": { + "get": { + "operationId": "getPasswordInputForRemoveContactInfo", + "summary": "Returns a confirmation `PasswordInput` for removing an additional contact information, if any.", + "description": "If a confirmation password is required to remove an additional contact infomation, clients should invoke this operation prior to effectively removing it, which will return the data regarding the confirmation password.", + "tags": [ + "ContactInfos" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/id" + } + ], + "responses": { + "200": { + "description": "The confirmation password input, or null", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PasswordInput" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -10295,148 +11242,155 @@ } } }, - "/{user}/products/{product}" : { - "parameters" : [ { - "$ref" : "#/components/parameters/userNoSelf" - }, { - "name" : "product", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - }, - "description" : "Product internal name or identifier" - } ], - "post" : { - "operationId" : "assignIndividualProduct", - "summary" : "Assigns a product to an individual user.", - "description" : "Assigns a product to an individual user.", - "tags" : [ "ProductAssignment" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "204" : { - "description" : "The product is assigned and nothing is returned" + "/{user}/status": { + "parameters": [ + { + "$ref": "#/components/parameters/userNoSelf" + } + ], + "get": { + "operationId": "getUserStatus", + "summary": "Returns the current user status and the status history", + "description": "Returns data containing information regarding the user status", + "tags": [ + "UserStatus" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The user status data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserStatusData" + } + } + } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } }, - "delete" : { - "operationId" : "unassignIndividualProduct", - "summary" : "Unassigns a product to an individual user.", - "description" : "Unassigns a product to an individual user.", - "tags" : [ "ProductAssignment" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "204" : { - "description" : "The product is unassigned and nothing is returned" + "post": { + "operationId": "changeUserStatus", + "summary": "Sets the new user status", + "description": "Sets the new user status. Managers have permissions to which statuses are allowed. Some statuses are transient ( `active`, `blocked` and `disabled`) while others are terminal (`removed` and `purged`). The `pending` status can never be managed by this operation, but by validating the user registration.", + "tags": [ + "UserStatus" + ], + "requestBody": { + "description": "The parameters for changing the status", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeUserStatusParams" + } + } + } + }, + "responses": { + "204": { + "description": "If the update is finished, nothing is returned" }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -10444,151 +11398,155 @@ } } }, - "/{user}/brokers" : { - "parameters" : [ { - "$ref" : "#/components/parameters/userNoSelf" - } ], - "get" : { - "operationId" : "getUserBrokersData", - "summary" : "Returns the current broker(s), together with additional information", - "description" : "Returns data containing information regarding the user broker(s)", - "tags" : [ "Brokering" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The user brokers list data", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UserBrokersData" + "/{user}/group": { + "parameters": [ + { + "$ref": "#/components/parameters/userNoSelf" + } + ], + "get": { + "operationId": "getGroupMembershipData", + "summary": "Returns the current user / operator group and the change history", + "description": "Returns data containing information regarding the user / operator group membership", + "tags": [ + "GroupMembership" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The user / operator group membership data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GroupMembershipData" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - } - }, - "/{user}/brokers/data-for-add" : { - "parameters" : [ { - "$ref" : "#/components/parameters/userNoSelf" - } ], - "get" : { - "operationId" : "getBrokerDataForAdd", - "summary" : "Returns configuration data to add another broker to a user.", - "description" : "Returns configuration data to add another broker to a user.", - "tags" : [ "Brokering" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The user brokers list data", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/BrokerDataForAdd" - } + }, + "post": { + "operationId": "changeGroupMembership", + "summary": "Changes the user / operator group", + "description": "Sets the new user / operator group. Depending on the new group, new permissions are granted / revoked to / from the user / operator.", + "tags": [ + "GroupMembership" + ], + "requestBody": { + "description": "The parameters for changing the group", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeGroupMembershipParams" } } + } + }, + "responses": { + "204": { + "description": "If the update is finished, nothing is returned" }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -10596,224 +11554,256 @@ } } }, - "/{user}/brokers/{broker}" : { - "parameters" : [ { - "$ref" : "#/components/parameters/userNoSelf" - }, { - "name" : "broker", - "in" : "path", - "required" : true, - "description" : "The id or identifier of the broker", - "schema" : { - "type" : "string" + "/{user}/products": { + "parameters": [ + { + "$ref": "#/components/parameters/userNoSelf" } - } ], - "get" : { - "operationId" : "viewBrokering", - "summary" : "Returns details of the brokering relation for the given user and broker.", - "description" : "Returns details of the brokering relation for the given user and broker.", - "tags" : [ "Brokering" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The brokering details.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/BrokeringView" + ], + "get": { + "operationId": "getUserProductsData", + "summary": "Returns the user individual products and the change history", + "description": "Returns data containing information regarding the products assigned to the given user", + "tags": [ + "ProductAssignment" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The user individual products data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserProductAssignmentData" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - }, - "post" : { - "operationId" : "addBroker", - "summary" : "Adds a brokering relation between the given user and broker.", - "description" : "Adds a brokering relation between the given user and broker.", - "tags" : [ "Brokering" ], - "parameters" : [ { - "name" : "main", - "in" : "query", - "required" : false, - "description" : "Indicates whether this is the main broker. If this is the first broker of the user, it will be the main broker, regardless of this parameter.", - "schema" : { - "type" : "boolean" + } + }, + "/{user}/products/{product}": { + "parameters": [ + { + "$ref": "#/components/parameters/userNoSelf" + }, + { + "name": "product", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Product internal name or identifier" + } + ], + "post": { + "operationId": "assignIndividualProduct", + "summary": "Assigns a product to an individual user.", + "description": "Assigns a product to an individual user.", + "tags": [ + "ProductAssignment" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] } - } ], - "responses" : { - "204" : { - "description" : "The brokering relationship is added and nothing is returned." + ], + "responses": { + "204": { + "description": "The product is assigned and nothing is returned" }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } }, - "delete" : { - "operationId" : "removeBroker", - "summary" : "Removes a brokering relation between the given user and broker.", - "description" : "Removes a brokering relation between the given user and broker.", - "tags" : [ "Brokering" ], - "responses" : { - "204" : { - "description" : "The brokering relationship is removed and nothing is returned." + "delete": { + "operationId": "unassignIndividualProduct", + "summary": "Unassigns a product to an individual user.", + "description": "Unassigns a product to an individual user.", + "tags": [ + "ProductAssignment" + ], + "security": [ + { + "basic": [] }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" - } - } - } + { + "session": [] + }, + { + "accessClient": [] + } + ], + "responses": { + "204": { + "description": "The product is unassigned and nothing is returned" }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -10821,73 +11811,81 @@ } } }, - "/{user}/brokers/{broker}/set-main" : { - "parameters" : [ { - "$ref" : "#/components/parameters/userNoSelf" - }, { - "name" : "broker", - "in" : "path", - "required" : true, - "description" : "The id or identifier of the broker", - "schema" : { - "type" : "string" + "/{user}/brokers": { + "parameters": [ + { + "$ref": "#/components/parameters/userNoSelf" } - } ], - "post" : { - "operationId" : "setMainBroker", - "summary" : "Sets a broker as the main broker of the user.", - "description" : "Sets a broker as the main broker of the user.", - "tags" : [ "Brokering" ], - "responses" : { - "204" : { - "description" : "The broker is set as main and nothing is returned." + ], + "get": { + "operationId": "getUserBrokersData", + "summary": "Returns the current broker(s), together with additional information", + "description": "Returns data containing information regarding the user broker(s)", + "tags": [ + "Brokering" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The user brokers list data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserBrokersData" + } + } + } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -10895,364 +11893,319 @@ } } }, - "/images/{idOrKey}" : { - "get" : { - "operationId" : "viewImage", - "summary" : "Returns an image details by id or key", - "description" : "Returns metadata about an image given its identifier or key", - "tags" : [ "Images" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "idOrKey", - "in" : "path", - "required" : true, - "description" : "The image id or file name", - "x-dotInPath" : true, - "schema" : { - "type" : "string" + "/{user}/brokers/data-for-add": { + "parameters": [ + { + "$ref": "#/components/parameters/userNoSelf" + } + ], + "get": { + "operationId": "getBrokerDataForAdd", + "summary": "Returns configuration data to add another broker to a user.", + "description": "Returns configuration data to add another broker to a user.", + "tags": [ + "Brokering" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" } - } ], - "responses" : { - "200" : { - "description" : "The image details", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ImageView" + ], + "responses": { + "200": { + "description": "The user brokers list data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BrokerDataForAdd" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - }, - "delete" : { - "operationId" : "deleteImage", - "summary" : "Removes an image by id or key", - "description" : "Removes the image with the given internal id or key. Any image kind can be removed using this operation, but the authenticated user needs the appropriate permission to do so.", - "tags" : [ "Images" ], - "parameters" : [ { - "name" : "idOrKey", - "in" : "path", - "required" : true, - "description" : "The image id or file name", - "x-dotInPath" : true, - "schema" : { - "type" : "string" + } + }, + "/{user}/brokers/{broker}": { + "parameters": [ + { + "$ref": "#/components/parameters/userNoSelf" + }, + { + "name": "broker", + "in": "path", + "required": true, + "description": "The id or identifier of the broker", + "schema": { + "type": "string" } - } ], - "responses" : { - "204" : { - "description" : "The image was deleted" - }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" + } + ], + "get": { + "operationId": "viewBrokering", + "summary": "Returns details of the brokering relation for the given user and broker.", + "description": "Returns details of the brokering relation for the given user and broker.", + "tags": [ + "Brokering" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The brokering details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BrokeringView" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - } - }, - "/images/content/{idOrKey}" : { - "get" : { - "operationId" : "getImageContent", - "summary" : "Returns an image content by id or key", - "description" : "Returns the content of an image, given the image identifier or key. When neither `width` nor `height` are specified, returns the original content. The original ratio is always maintained. When only of one of the dimensions is specified, it is used as maximum, and the other is calculated. When both are informed, the maximum size with the original ratio that fits both dimensions is used.", - "tags" : [ "Images" ], - "parameters" : [ { - "name" : "idOrKey", - "in" : "path", - "required" : true, - "description" : "The image id or file name", - "x-dotInPath" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "width", - "in" : "query", - "required" : false, - "description" : "The requested image width", - "schema" : { - "type" : "integer" - } - }, { - "name" : "height", - "in" : "query", - "required" : false, - "description" : "The requested file height", - "schema" : { - "type" : "integer" - } - } ], - "responses" : { - "200" : { - "description" : "The image content", - "content" : { - "image/*" : { - "schema" : { - "type" : "string", - "format" : "binary" - } - } + }, + "post": { + "operationId": "addBroker", + "summary": "Adds a brokering relation between the given user and broker.", + "description": "Adds a brokering relation between the given user and broker.", + "tags": [ + "Brokering" + ], + "parameters": [ + { + "name": "main", + "in": "query", + "required": false, + "description": "Indicates whether this is the main broker. If this is the first broker of the user, it will be the main broker, regardless of this parameter.", + "schema": { + "type": "boolean" } + } + ], + "responses": { + "204": { + "description": "The brokering relationship is added and nothing is returned." }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - } - }, - "/logos/{configuration}/{kind}" : { - "parameters" : [ { - "name" : "configuration", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - }, - "description" : "Either the id or internal name of the configuration" - }, { - "name" : "kind", - "in" : "path", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/LogoKind" - }, - "description" : "The logo to be downloaded" - } ], - "get" : { - "operationId" : "getConfigurationLogoContent", - "summary" : "Returns a logo content for a given configuration and type", - "description" : "Returns the content of a logo, given the configuration and logo kind. When neither `width` nor `height` are specified, returns the original content. The original ratio is always maintained. When only of one of the dimensions is specified, it is used as maximum, and the other is calculated. When both are informed, the maximum size with the original ratio that fits both dimensions is used.", - "tags" : [ "Images" ], - "parameters" : [ { - "name" : "width", - "in" : "query", - "required" : false, - "description" : "The requested image width", - "schema" : { - "type" : "integer" - } - }, { - "name" : "height", - "in" : "query", - "required" : false, - "description" : "The requested file height", - "schema" : { - "type" : "integer" - } - } ], - "responses" : { - "200" : { - "description" : "The image content", - "content" : { - "image/*" : { - "schema" : { - "type" : "string", - "format" : "binary" + }, + "delete": { + "operationId": "removeBroker", + "summary": "Removes a brokering relation between the given user and broker.", + "description": "Removes a brokering relation between the given user and broker.", + "tags": [ + "Brokering" + ], + "responses": { + "204": { + "description": "The brokering relationship is removed and nothing is returned." + }, + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -11260,96 +12213,78 @@ } } }, - "/logos/{kind}" : { - "parameters" : [ { - "name" : "kind", - "in" : "path", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/LogoKind" + "/{user}/brokers/{broker}/set-main": { + "parameters": [ + { + "$ref": "#/components/parameters/userNoSelf" }, - "description" : "The logo to be downloaded" - } ], - "get" : { - "operationId" : "getCurrentLogoContent", - "summary" : "Returns a logo content for the current configuration and the given kind", - "description" : "Returns the content of a logo for the current configuration, given a kind. When neither `width` nor `height` are specified, returns the original content. The original ratio is always maintained. When only of one of the dimensions is specified, it is used as maximum, and the other is calculated. When both are informed, the maximum size with the original ratio that fits both dimensions is used.", - "tags" : [ "Images" ], - "parameters" : [ { - "name" : "width", - "in" : "query", - "required" : false, - "description" : "The requested image width", - "schema" : { - "type" : "integer" - } - }, { - "name" : "height", - "in" : "query", - "required" : false, - "description" : "The requested file height", - "schema" : { - "type" : "integer" + { + "name": "broker", + "in": "path", + "required": true, + "description": "The id or identifier of the broker", + "schema": { + "type": "string" } - } ], - "responses" : { - "200" : { - "description" : "The image content", - "content" : { - "image/*" : { - "schema" : { - "type" : "string", - "format" : "binary" - } - } - } + } + ], + "post": { + "operationId": "setMainBroker", + "summary": "Sets a broker as the main broker of the user.", + "description": "Sets a broker as the main broker of the user.", + "tags": [ + "Brokering" + ], + "responses": { + "204": { + "description": "The broker is set as main and nothing is returned." }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -11357,219 +12292,171 @@ } } }, - "/themes/{theme}/images/{kind}/{name}" : { - "parameters" : [ { - "name" : "theme", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - }, - "description" : "The theme id" - }, { - "name" : "kind", - "in" : "path", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/ThemeImageKind" - }, - "description" : "The kind of theme image to be downloaded" - }, { - "name" : "name", - "in" : "path", - "required" : true, - "x-dotInPath" : true, - "schema" : { - "type" : "string" - }, - "description" : "The name of the theme image to be downloaded" - } ], - "get" : { - "operationId" : "getThemeImageContent", - "summary" : "Returns a theme image content for a given theme.", - "description" : "Returns the content of a theme image, given the theme, image kind and name.", - "tags" : [ "Images" ], - "parameters" : [ { - "name" : "width", - "in" : "query", - "required" : false, - "description" : "The requested image width", - "schema" : { - "type" : "integer" - } - }, { - "name" : "height", - "in" : "query", - "required" : false, - "description" : "The requested file height", - "schema" : { - "type" : "integer" + "/images/{idOrKey}": { + "get": { + "operationId": "viewImage", + "summary": "Returns an image details by id or key", + "description": "Returns metadata about an image given its identifier or key", + "tags": [ + "Images" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "idOrKey", + "in": "path", + "required": true, + "description": "The image id or file name", + "x-dotInPath": true, + "schema": { + "type": "string" + } } - } ], - "responses" : { - "200" : { - "description" : "The image content", - "content" : { - "image/*" : { - "schema" : { - "type" : "string", - "format" : "binary" + ], + "responses": { + "200": { + "description": "The image details", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ImageView" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - } - }, - "/themes/images/{kind}/{name}" : { - "parameters" : [ { - "name" : "kind", - "in" : "path", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/ThemeImageKind" - }, - "description" : "The kind of theme image to be downloaded" - }, { - "name" : "name", - "in" : "path", - "required" : true, - "x-dotInPath" : true, - "schema" : { - "type" : "string" - }, - "description" : "The name of the theme image to be downloaded" - } ], - "get" : { - "operationId" : "getCurrentThemeImageContent", - "summary" : "Returns a theme image content for the current theme.", - "description" : "Returns the content of a theme image for the current theme. The image kind and name are given in the path.", - "tags" : [ "Images" ], - "parameters" : [ { - "name" : "width", - "in" : "query", - "required" : false, - "description" : "The requested image width", - "schema" : { - "type" : "integer" - } - }, { - "name" : "height", - "in" : "query", - "required" : false, - "description" : "The requested file height", - "schema" : { - "type" : "integer" + }, + "delete": { + "operationId": "deleteImage", + "summary": "Removes an image by id or key", + "description": "Removes the image with the given internal id or key. Any image kind can be removed using this operation, but the authenticated user needs the appropriate permission to do so.", + "tags": [ + "Images" + ], + "parameters": [ + { + "name": "idOrKey", + "in": "path", + "required": true, + "description": "The image id or file name", + "x-dotInPath": true, + "schema": { + "type": "string" + } } - } ], - "responses" : { - "200" : { - "description" : "The image content", - "content" : { - "image/*" : { - "schema" : { - "type" : "string", - "format" : "binary" + ], + "responses": { + "204": { + "description": "The image was deleted" + }, + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -11577,89 +12464,102 @@ } } }, - "/{user}/images/list-data" : { - "get" : { - "operationId" : "getUserImagesListData", - "summary" : "Returns either `profile` or `custom` images for a given user, plus additional permissions and data", - "description" : "Returns either `profile` or `custom` images for the given user. For `profile`, the user must be visible by the authenticated user. For `custom`, the authenticated user must either be the owner or a manager (administrator or broker). Custom images are used in rich text content, not images for custom fields. Additional data, such as the maximum images and whether the images can be managed by the authenticated user are also returned.", - "tags" : [ "Images" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/user" - }, { - "name" : "kind", - "in" : "query", - "required" : false, - "description" : "The kind of images to be returned. The default value is `profile`", - "schema" : { - "$ref" : "#/components/schemas/UserImageKind" + "/images/content/{idOrKey}": { + "get": { + "operationId": "getImageContent", + "summary": "Returns an image content by id or key", + "description": "Returns the content of an image, given the image identifier or key. When neither `width` nor `height` are specified, returns the original content. The original ratio is always maintained. When only of one of the dimensions is specified, it is used as maximum, and the other is calculated. When both are informed, the maximum size with the original ratio that fits both dimensions is used.", + "tags": [ + "Images" + ], + "parameters": [ + { + "name": "idOrKey", + "in": "path", + "required": true, + "description": "The image id or file name", + "x-dotInPath": true, + "schema": { + "type": "string" + } + }, + { + "name": "width", + "in": "query", + "required": false, + "description": "The requested image width", + "schema": { + "type": "integer" + } + }, + { + "name": "height", + "in": "query", + "required": false, + "description": "The requested file height", + "schema": { + "type": "integer" + } } - } ], - "responses" : { - "200" : { - "description" : "The images and additional information", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ImagesListData" + ], + "responses": { + "200": { + "description": "The image content", + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -11667,203 +12567,216 @@ } } }, - "/{user}/images" : { - "get" : { - "operationId" : "listUserImages", - "summary" : "Lists either `profile` or `custom` images for a given user.", - "description" : "Returns either `profile` or `custom` images for the given user. For `profile`, the user must be visible by the authenticated user. Custom images are used in rich text content, not images for custom fields. For `custom`, the authenticated user must either be the owner or a manager (administrator or broker).", - "tags" : [ "Images" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/user" - }, { - "name" : "kind", - "in" : "query", - "required" : false, - "description" : "The kind of images to be returned. The default value is `profile`", - "schema" : { - "$ref" : "#/components/schemas/UserImageKind" + "/logos/{configuration}/{kind}": { + "parameters": [ + { + "name": "configuration", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Either the id or internal name of the configuration" + }, + { + "name": "kind", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/LogoKind" + }, + "description": "The logo to be downloaded" + } + ], + "get": { + "operationId": "getConfigurationLogoContent", + "summary": "Returns a logo content for a given configuration and type", + "description": "Returns the content of a logo, given the configuration and logo kind. When neither `width` nor `height` are specified, returns the original content. The original ratio is always maintained. When only of one of the dimensions is specified, it is used as maximum, and the other is calculated. When both are informed, the maximum size with the original ratio that fits both dimensions is used.", + "tags": [ + "Images" + ], + "parameters": [ + { + "name": "width", + "in": "query", + "required": false, + "description": "The requested image width", + "schema": { + "type": "integer" + } + }, + { + "name": "height", + "in": "query", + "required": false, + "description": "The requested file height", + "schema": { + "type": "integer" + } } - } ], - "responses" : { - "200" : { - "description" : "The list of images", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Image" - } + ], + "responses": { + "200": { + "description": "The image content", + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - }, - "post" : { - "operationId" : "uploadUserImage", - "summary" : "Adds a new image for the given user. The image kind is either `profile` or `custom`.", - "description" : "Uploads a new image, either `profile` (by default) or `custom`, for the given user. Custom images are used in rich text content, not images for custom fields. For uploading images for custom field values, see the documentation for the operation at `POST /images/temp`.", - "tags" : [ "Images" ], - "parameters" : [ { - "$ref" : "#/components/parameters/user" - }, { - "name" : "kind", - "in" : "query", - "required" : false, - "description" : "The kind of images to be returned. The default value is `profile`", - "schema" : { - "$ref" : "#/components/schemas/UserImageKind" - } - }, { - "name" : "name", - "description" : "The name for the new image. If not informed will fall back to the original file name in the form data", - "in" : "query", - "required" : false, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "201" : { - "description" : "The image is saved, its id is returned in the body and the URL to get the content is returned in the `Location` header", - "headers" : { - "Location" : { - "description" : "URL for obtaining the image content", - "schema" : { - "type" : "string" - } - } - }, - "content" : { - "text/plain" : { - "schema" : { - "type" : "string" - } - } + } + }, + "/logos/{kind}": { + "parameters": [ + { + "name": "kind", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/LogoKind" + }, + "description": "The logo to be downloaded" + } + ], + "get": { + "operationId": "getCurrentLogoContent", + "summary": "Returns a logo content for the current configuration and the given kind", + "description": "Returns the content of a logo for the current configuration, given a kind. When neither `width` nor `height` are specified, returns the original content. The original ratio is always maintained. When only of one of the dimensions is specified, it is used as maximum, and the other is calculated. When both are informed, the maximum size with the original ratio that fits both dimensions is used.", + "tags": [ + "Images" + ], + "parameters": [ + { + "name": "width", + "in": "query", + "required": false, + "description": "The requested image width", + "schema": { + "type": "integer" } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + { + "name": "height", + "in": "query", + "required": false, + "description": "The requested file height", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "The image content", + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } - } - }, - "requestBody" : { - "content" : { - "multipart/form-data" : { - "schema" : { - "type" : "object", - "properties" : { - "image" : { - "type" : "string", - "format" : "binary", - "description" : "The image being uploaded" - } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -11871,83 +12784,122 @@ } } }, - "/{user}/images/order" : { - "put" : { - "operationId" : "reorderProfileImages", - "summary" : "Changes the order of a user's profile images", - "description" : "The new order is defined by the list of ids, so that images appear in the same order as the ids.", - "tags" : [ "Images" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/user" - }, { - "name" : "ids", - "description" : "The array of ids (comma-separated) reflecting the desired order", - "in" : "query", - "required" : true, - "schema" : { - "type" : "array", - "items" : { - "type" : "string" + "/themes/{theme}/images/{kind}/{name}": { + "parameters": [ + { + "name": "theme", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The theme id" + }, + { + "name": "kind", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/ThemeImageKind" + }, + "description": "The kind of theme image to be downloaded" + }, + { + "name": "name", + "in": "path", + "required": true, + "x-dotInPath": true, + "schema": { + "type": "string" + }, + "description": "The name of the theme image to be downloaded" + } + ], + "get": { + "operationId": "getThemeImageContent", + "summary": "Returns a theme image content for a given theme.", + "description": "Returns the content of a theme image, given the theme, image kind and name.", + "tags": [ + "Images" + ], + "parameters": [ + { + "name": "width", + "in": "query", + "required": false, + "description": "The requested image width", + "schema": { + "type": "integer" + } + }, + { + "name": "height", + "in": "query", + "required": false, + "description": "The requested file height", + "schema": { + "type": "integer" } } - } ], - "responses" : { - "204" : { - "description" : "The image order is changed and nothing is returned" + ], + "responses": { + "200": { + "description": "The image content", + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -11955,254 +12907,213 @@ } } }, - "/images/temp" : { - "get" : { - "operationId" : "listTempImages", - "summary" : "Lists temporary images related to the currently authenticated user or guest", - "description" : "Returns all uploaded temporary images by the current user, or guest key. If the current request is as guest and no guest key is given, the IP address is used to match images. Using a key is recommended, because clients that move between WiFi and mobile connection or if the client is in a network with multiple outbound IP addresses, images won't be correctly matched without a key.", - "tags" : [ "Images" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "target", - "in" : "query", - "description" : "Filter by target usage", - "schema" : { - "$ref" : "#/components/schemas/TempImageTargetEnum" - } - }, { - "name" : "guestKey", - "in" : "query", - "required" : false, - "description" : "This parameter is only taken into account if the current request is running as guest. It is the key passed by the client when uploading images. If no key is given, images are matched by remote address.", - "schema" : { - "type" : "string" - } - }, { - "name" : "user", - "in" : "query", - "required" : false, - "description" : "If the target is `userProfile` or `advertisement`, must be either the id or an identification method of the target user (or advertisement owner).", - "schema" : { - "type" : "string" - } - }, { - "name" : "customField", - "in" : "query", - "required" : false, - "description" : "If the temp image will be used as the value of a custom field of type image then the corresponding custom field must be given (id or internal name). Otherwise this paremeter will be ignored.", - "schema" : { - "type" : "string" - } - }, { - "name" : "customFieldKind", - "in" : "query", - "required" : false, - "description" : "If a custom field is given then its kind must be given too to allow find it.", - "schema" : { - "$ref" : "#/components/schemas/CustomFieldKind" + "/themes/images/{kind}/{name}": { + "parameters": [ + { + "name": "kind", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/ThemeImageKind" + }, + "description": "The kind of theme image to be downloaded" + }, + { + "name": "name", + "in": "path", + "required": true, + "x-dotInPath": true, + "schema": { + "type": "string" + }, + "description": "The name of the theme image to be downloaded" + } + ], + "get": { + "operationId": "getCurrentThemeImageContent", + "summary": "Returns a theme image content for the current theme.", + "description": "Returns the content of a theme image for the current theme. The image kind and name are given in the path.", + "tags": [ + "Images" + ], + "parameters": [ + { + "name": "width", + "in": "query", + "required": false, + "description": "The requested image width", + "schema": { + "type": "integer" + } + }, + { + "name": "height", + "in": "query", + "required": false, + "description": "The requested file height", + "schema": { + "type": "integer" + } } - } ], - "responses" : { - "200" : { - "description" : "The list of images", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Image" - } + ], + "responses": { + "200": { + "description": "The image content", + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - }, - "post" : { - "operationId" : "uploadTempImage", - "summary" : "Adds a new temporary image for the currently authenticated user or guest.", - "description" : "Uploads a new temporary image. A temporary image should be given a target, which can be:\n\n\n- `userRegistration`: The image will be used as\n a profile image for a newly registered user;\n\n- `userProfile`: The image will be used as a\n profile image for an existing user;\n\n- `advertisement`: The image will be used for an advertisement of a specific user;\n- `customValue`: The image will be used for a value of a specific custom field.\n\nTemporary images won't be immediately associated to the next registered model, but its `id`, which is returned by this operation, must be explicitly passed in, either as the `images` field (for profile or advertisement images) or in the `customValues` field of the model that has custom values (multiple ids can be passed-in as pipe-separated).", - "tags" : [ "Images" ], - "parameters" : [ { - "name" : "name", - "description" : "The name for the new image. If not informed will fall back to the original file name in the form data", - "in" : "query", - "required" : false, - "schema" : { - "type" : "string" - } - }, { - "name" : "target", - "in" : "query", - "description" : "The target usage for this temporary image", - "schema" : { - "$ref" : "#/components/schemas/TempImageTargetEnum" - } - }, { - "name" : "guestKey", - "in" : "query", - "required" : false, - "description" : "This parameter is only taken into account if the current request is running as guest. It should be a reasonably unique key (for example, an UUID, device identifier or a reasonably large random string) which uniquely identifies the uploaded image as belonging to this \"session\". If no key is given, images uploaded as guest are matched by IP address. Using a key is recommended, because clients that move between WiFi and mobile connection or if the client is in a network with multiple outbound IP addresses, images won't be correctly matched without a key.", - "schema" : { - "type" : "string" - } - }, { - "name" : "user", - "in" : "query", - "required" : false, - "description" : "If the target is `userProfile` or `advertisement`, must be either the id or an identification method of the target user (or advertisement owner).", - "schema" : { - "type" : "string" - } - }, { - "name" : "customField", - "in" : "query", - "required" : false, - "description" : "If the temp image will be used as the value of a custom field of type image then the corresponding custom field must be given (id or internal name). Otherwise this paremeter will be ignored.", - "schema" : { - "type" : "string" + } + }, + "/{user}/images/list-data": { + "get": { + "operationId": "getUserImagesListData", + "summary": "Returns either `profile` or `custom` images for a given user, plus additional permissions and data", + "description": "Returns either `profile` or `custom` images for the given user. For `profile`, the user must be visible by the authenticated user. For `custom`, the authenticated user must either be the owner or a manager (administrator or broker). Custom images are used in rich text content, not images for custom fields. Additional data, such as the maximum images and whether the images can be managed by the authenticated user are also returned.", + "tags": [ + "Images" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] } - }, { - "name" : "customFieldKind", - "in" : "query", - "required" : false, - "description" : "If a custom field is given then its kind must be given too to allow find it.", - "schema" : { - "$ref" : "#/components/schemas/CustomFieldKind" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/user" + }, + { + "name": "kind", + "in": "query", + "required": false, + "description": "The kind of images to be returned. The default value is `profile`", + "schema": { + "$ref": "#/components/schemas/UserImageKind" + } } - } ], - "responses" : { - "201" : { - "description" : "The image is saved, its id is returned in the body and the URL to get the content is returned in the `Location` header", - "headers" : { - "Location" : { - "description" : "URL for obtaining the image content", - "schema" : { - "type" : "string" - } - } - }, - "content" : { - "text/plain" : { - "schema" : { - "type" : "string" + ], + "responses": { + "200": { + "description": "The images and additional information", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ImagesListData" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" - } - } - } - } - }, - "requestBody" : { - "content" : { - "multipart/form-data" : { - "schema" : { - "type" : "object", - "properties" : { - "image" : { - "type" : "string", - "format" : "binary", - "description" : "The image being uploaded" - } + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -12210,183 +13121,218 @@ } } }, - "/system-images/list-data" : { - "get" : { - "operationId" : "getSystemCustomImagesListData", - "summary" : "Returns data containing the system custom images, as well as categories.", - "description" : "Contains each image category, as well as permissions over system custom images.", - "tags" : [ "Images" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The data with images", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SystemImagesListData" + "/{user}/images": { + "get": { + "operationId": "listUserImages", + "summary": "Lists either `profile` or `custom` images for a given user.", + "description": "Returns either `profile` or `custom` images for the given user. For `profile`, the user must be visible by the authenticated user. Custom images are used in rich text content, not images for custom fields. For `custom`, the authenticated user must either be the owner or a manager (administrator or broker).", + "tags": [ + "Images" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/user" + }, + { + "name": "kind", + "in": "query", + "required": false, + "description": "The kind of images to be returned. The default value is `profile`", + "schema": { + "$ref": "#/components/schemas/UserImageKind" + } + } + ], + "responses": { + "200": { + "description": "The list of images", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Image" + } } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - } - }, - "/system-images/{category}" : { - "parameters" : [ { - "name" : "category", - "in" : "path", - "required" : true, - "description" : "The system image category id or internal name", - "schema" : { - "type" : "string" - } - } ], - "post" : { - "operationId" : "uploadSystemCustomImage", - "summary" : "Adds a new system custom image under a given category", - "description" : "In order to upload, administrators need management permission over this specific category. These images can be used, for example, in rich text content edited by administrators.", - "tags" : [ "Images" ], - "parameters" : [ { - "name" : "name", - "description" : "The name for the new image. If not informed will fall back to the original file name in the form data", - "in" : "query", - "required" : false, - "schema" : { - "type" : "string" + }, + "post": { + "operationId": "uploadUserImage", + "summary": "Adds a new image for the given user. The image kind is either `profile` or `custom`.", + "description": "Uploads a new image, either `profile` (by default) or `custom`, for the given user. Custom images are used in rich text content, not images for custom fields. For uploading images for custom field values, see the documentation for the operation at `POST /images/temp`.", + "tags": [ + "Images" + ], + "parameters": [ + { + "$ref": "#/components/parameters/user" + }, + { + "name": "kind", + "in": "query", + "required": false, + "description": "The kind of images to be returned. The default value is `profile`", + "schema": { + "$ref": "#/components/schemas/UserImageKind" + } + }, + { + "name": "name", + "description": "The name for the new image. If not informed will fall back to the original file name in the form data", + "in": "query", + "required": false, + "schema": { + "type": "string" + } } - } ], - "responses" : { - "201" : { - "description" : "The image is saved, its id is returned in the body and the URL to get the content is returned in the `Location` header", - "headers" : { - "Location" : { - "description" : "URL for obtaining the image content", - "schema" : { - "type" : "string" + ], + "responses": { + "201": { + "description": "The image is saved, its id is returned in the body and the URL to get the content is returned in the `Location` header", + "headers": { + "Location": { + "description": "URL for obtaining the image content", + "schema": { + "type": "string" } } }, - "content" : { - "text/plain" : { - "schema" : { - "type" : "string" + "content": { + "text/plain": { + "schema": { + "type": "string" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } }, - "requestBody" : { - "content" : { - "multipart/form-data" : { - "schema" : { - "type" : "object", - "properties" : { - "image" : { - "type" : "string", - "format" : "binary", - "description" : "The image being uploaded" + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "image": { + "type": "string", + "format": "binary", + "description": "The image being uploaded" } } } @@ -12395,81 +13341,92 @@ } } }, - "/marketplace/{ad}/images/list-data" : { - "get" : { - "operationId" : "getAdImagesListData", - "summary" : "Returns the images of an advertisement, plus additional permissions and data.", - "description" : "Returns the images of an advertisement. Additional data, such as the maximum images and whether the images can be managed by the authenticated user are also returned.", - "tags" : [ "Images" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/ad" - } ], - "responses" : { - "200" : { - "description" : "The images and additional information", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ImagesListData" - } + "/{user}/images/order": { + "put": { + "operationId": "reorderProfileImages", + "summary": "Changes the order of a user's profile images removing the ones not given", + "description": "The new order is defined by the list of ids, so that images appear in the same order as the ids. All images not given in the ids will be removed.", + "tags": [ + "Images" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/user" + }, + { + "name": "ids", + "description": "The array of ids (comma-separated) reflecting the desired order, if no\n id is given then all images will be removed", + "in": "query", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" } } + } + ], + "responses": { + "204": { + "description": "The image order is changed and nothing is returned" }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -12477,186 +13434,271 @@ } } }, - "/marketplace/{ad}/images" : { - "get" : { - "operationId" : "listAdImages", - "summary" : "Lists the images of an advertisement", - "description" : "Returns the images of an advertisement.", - "tags" : [ "Images" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/ad" - } ], - "responses" : { - "200" : { - "description" : "The list of images", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Image" + "/images/temp": { + "get": { + "operationId": "listTempImages", + "summary": "Lists temporary images related to the currently authenticated user or guest", + "description": "Returns all uploaded temporary images by the current user, or guest key. If the current request is as guest and no guest key is given, the IP address is used to match images. Using a key is recommended, because clients that move between WiFi and mobile connection or if the client is in a network with multiple outbound IP addresses, images won't be correctly matched without a key.", + "tags": [ + "Images" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "target", + "in": "query", + "description": "Filter by target usage", + "schema": { + "$ref": "#/components/schemas/TempImageTargetEnum" + } + }, + { + "name": "guestKey", + "in": "query", + "required": false, + "description": "This parameter is only taken into account if the current request is running as guest. It is the key passed by the client when uploading images. If no key is given, images are matched by remote address.", + "schema": { + "type": "string" + } + }, + { + "name": "user", + "in": "query", + "required": false, + "description": "If the target is `userProfile` or `advertisement`, must be either the id or an identification method of the target user (or advertisement owner).", + "schema": { + "type": "string" + } + }, + { + "name": "customField", + "in": "query", + "required": false, + "description": "If the temp image will be used as the value of a custom field of type image then the corresponding custom field must be given (id or internal name). Otherwise this paremeter will be ignored.", + "schema": { + "type": "string" + } + }, + { + "name": "customFieldKind", + "in": "query", + "required": false, + "description": "If a custom field is given then its kind must be given too to allow find it.", + "schema": { + "$ref": "#/components/schemas/CustomFieldKind" + } + } + ], + "responses": { + "200": { + "description": "The list of images", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Image" } } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } }, - "post" : { - "operationId" : "uploadAdImage", - "summary" : "Adds a new image for the given advertisement.", - "description" : "Uploads a new image for the given advertisement.", - "tags" : [ "Images" ], - "parameters" : [ { - "$ref" : "#/components/parameters/ad" - }, { - "name" : "name", - "description" : "The name for the new image. If not informed will fall back to the original file name in the form data", - "in" : "query", - "required" : false, - "schema" : { - "type" : "string" + "post": { + "operationId": "uploadTempImage", + "summary": "Adds a new temporary image for the currently authenticated user or guest.", + "description": "Uploads a new temporary image. A temporary image should be given a target, which can be:\n\n\n- `userRegistration`: The image will be used as\n a profile image for a newly registered user;\n\n- `userProfile`: The image will be used as a\n profile image for an existing user;\n\n- `advertisement`: The image will be used for an advertisement of a specific user;\n- `customValue`: The image will be used for a value of a specific custom field.\n\nTemporary images won't be immediately associated to the next registered model, but its `id`, which is returned by this operation, must be explicitly passed in, either as the `images` field (for profile or advertisement images) or in the `customValues` field of the model that has custom values (multiple ids can be passed-in as pipe-separated).", + "tags": [ + "Images" + ], + "parameters": [ + { + "name": "name", + "description": "The name for the new image. If not informed will fall back to the original file name in the form data", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "target", + "in": "query", + "description": "The target usage for this temporary image", + "schema": { + "$ref": "#/components/schemas/TempImageTargetEnum" + } + }, + { + "name": "guestKey", + "in": "query", + "required": false, + "description": "This parameter is only taken into account if the current request is running as guest. It should be a reasonably unique key (for example, an UUID, device identifier or a reasonably large random string) which uniquely identifies the uploaded image as belonging to this \"session\". If no key is given, images uploaded as guest are matched by IP address. Using a key is recommended, because clients that move between WiFi and mobile connection or if the client is in a network with multiple outbound IP addresses, images won't be correctly matched without a key.", + "schema": { + "type": "string" + } + }, + { + "name": "user", + "in": "query", + "required": false, + "description": "If the target is `userProfile` or `advertisement`, must be either the id or an identification method of the target user (or advertisement owner).", + "schema": { + "type": "string" + } + }, + { + "name": "customField", + "in": "query", + "required": false, + "description": "If the temp image will be used as the value of a custom field of type image then the corresponding custom field must be given (id or internal name). Otherwise this paremeter will be ignored.", + "schema": { + "type": "string" + } + }, + { + "name": "customFieldKind", + "in": "query", + "required": false, + "description": "If a custom field is given then its kind must be given too to allow find it.", + "schema": { + "$ref": "#/components/schemas/CustomFieldKind" + } } - } ], - "responses" : { - "201" : { - "description" : "The image is saved, its id is returned in the body and the URL to get the content is returned in the `Location` header", - "headers" : { - "Location" : { - "description" : "URL for obtaining the image content", - "schema" : { - "type" : "string" + ], + "responses": { + "201": { + "description": "The image is saved, its id is returned in the body and the URL to get the content is returned in the `Location` header", + "headers": { + "Location": { + "description": "URL for obtaining the image content", + "schema": { + "type": "string" } } }, - "content" : { - "text/plain" : { - "schema" : { - "type" : "string" + "content": { + "text/plain": { + "schema": { + "type": "string" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } }, - "requestBody" : { - "content" : { - "multipart/form-data" : { - "schema" : { - "type" : "object", - "properties" : { - "image" : { - "type" : "string", - "format" : "binary", - "description" : "The image being uploaded" + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "image": { + "type": "string", + "format": "binary", + "description": "The image being uploaded" } } } @@ -12665,83 +13707,76 @@ } } }, - "/marketplace/{ad}/images/order" : { - "put" : { - "operationId" : "reorderAdImages", - "summary" : "Changes the order of the images of an advertisement.", - "description" : "The new order is defined by the list of ids, so that images appear in the same order as the ids.", - "tags" : [ "Images" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/ad" - }, { - "name" : "ids", - "description" : "The array of ids (comma-separated) reflecting the desired order", - "in" : "query", - "required" : true, - "schema" : { - "type" : "array", - "items" : { - "type" : "string" - } + "/system-images/list-data": { + "get": { + "operationId": "getSystemCustomImagesListData", + "summary": "Returns data containing the system custom images, as well as categories.", + "description": "Contains each image category, as well as permissions over system custom images.", + "tags": [ + "Images" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" } - } ], - "responses" : { - "204" : { - "description" : "The image order is changed and nothing is returned" + ], + "responses": { + "200": { + "description": "The data with images", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SystemImagesListData" + } + } + } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -12749,103 +13784,116 @@ } } }, - "/contact-infos/{id}/image" : { - "post" : { - "operationId" : "uploadContactInfoImage", - "summary" : "Uploads a new image for the given additional contact information.", - "description" : "Saves the given image for the additional contact information. If the given additional contact information already has an image, the old one is removed, and the current image is saved in its place.", - "tags" : [ "Images" ], - "parameters" : [ { - "$ref" : "#/components/parameters/id" - }, { - "name" : "name", - "description" : "The name for the new image. If not informed will fall back to the original file name in the form data", - "in" : "query", - "required" : false, - "schema" : { - "type" : "string" + "/system-images/{category}": { + "parameters": [ + { + "name": "category", + "in": "path", + "required": true, + "description": "The system image category id or internal name", + "schema": { + "type": "string" + } + } + ], + "post": { + "operationId": "uploadSystemCustomImage", + "summary": "Adds a new system custom image under a given category", + "description": "In order to upload, administrators need management permission over this specific category. These images can be used, for example, in rich text content edited by administrators.", + "tags": [ + "Images" + ], + "parameters": [ + { + "name": "name", + "description": "The name for the new image. If not informed will fall back to the original file name in the form data", + "in": "query", + "required": false, + "schema": { + "type": "string" + } } - } ], - "responses" : { - "201" : { - "description" : "The image is saved, its id is returned in the body and the URL to get the content is returned in the `Location` header", - "headers" : { - "Location" : { - "description" : "URL for obtaining the image content", - "schema" : { - "type" : "string" + ], + "responses": { + "201": { + "description": "The image is saved, its id is returned in the body and the URL to get the content is returned in the `Location` header", + "headers": { + "Location": { + "description": "URL for obtaining the image content", + "schema": { + "type": "string" } } }, - "content" : { - "text/plain" : { - "schema" : { - "type" : "string" + "content": { + "text/plain": { + "schema": { + "type": "string" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } }, - "requestBody" : { - "content" : { - "multipart/form-data" : { - "schema" : { - "type" : "object", - "properties" : { - "image" : { - "type" : "string", - "format" : "binary", - "description" : "The image being uploaded" + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "image": { + "type": "string", + "format": "binary", + "description": "The image being uploaded" } } } @@ -12854,79 +13902,90 @@ } } }, - "/files/{id}/content" : { - "get" : { - "operationId" : "getRawFileContent", - "summary" : "Returns the content of a raw file (temp or custom field value)", - "description" : "Returns the content of either a temporary or a custom field value file", - "tags" : [ "Files" ], - "parameters" : [ { - "name" : "id", - "in" : "path", - "required" : true, - "description" : "The file identifier", - "schema" : { - "type" : "string" + "/marketplace/{ad}/images/list-data": { + "get": { + "operationId": "getAdImagesListData", + "summary": "Returns the images of an advertisement, plus additional permissions and data.", + "description": "Returns the images of an advertisement. Additional data, such as the maximum images and whether the images can be managed by the authenticated user are also returned.", + "tags": [ + "Images" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] } - } ], - "responses" : { - "200" : { - "description" : "The file content", - "content" : { - "*/*" : { - "schema" : { - "type" : "string", - "format" : "binary" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/ad" + } + ], + "responses": { + "200": { + "description": "The images and additional information", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ImagesListData" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -12934,148 +13993,201 @@ } } }, - "/files/{id}" : { - "get" : { - "operationId" : "viewRawFile", - "summary" : "Returns a file details by id", - "description" : "Returns metadata about a file given its id", - "tags" : [ "Files" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/id" - } ], - "responses" : { - "200" : { - "description" : "The file details", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/StoredFile" + "/marketplace/{ad}/images": { + "get": { + "operationId": "listAdImages", + "summary": "Lists the images of an advertisement", + "description": "Returns the images of an advertisement.", + "tags": [ + "Images" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/ad" + } + ], + "responses": { + "200": { + "description": "The list of images", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Image" + } } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } }, - "delete" : { - "operationId" : "deleteRawFile", - "summary" : "Removes a file by id", - "description" : "Removes the file with id", - "tags" : [ "Files" ], - "parameters" : [ { - "$ref" : "#/components/parameters/id" - } ], - "responses" : { - "204" : { - "description" : "The file was deleted" + "post": { + "operationId": "uploadAdImage", + "summary": "Adds a new image for the given advertisement.", + "description": "Uploads a new image for the given advertisement.", + "tags": [ + "Images" + ], + "parameters": [ + { + "$ref": "#/components/parameters/ad" }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" + { + "name": "name", + "description": "The name for the new image. If not informed will fall back to the original file name in the form data", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "201": { + "description": "The image is saved, its id is returned in the body and the URL to get the content is returned in the `Location` header", + "headers": { + "Location": { + "description": "URL for obtaining the image content", + "schema": { + "type": "string" + } + } + }, + "content": { + "text/plain": { + "schema": { + "type": "string" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "image": { + "type": "string", + "format": "binary", + "description": "The image being uploaded" + } } } } @@ -13083,223 +14195,201 @@ } } }, - "/files/temp" : { - "get" : { - "operationId" : "listTempFiles", - "summary" : "Lists temporary files related to the currently authenticated user or guest", - "description" : "Returns all uploaded temporary files by the current user, or guest key. If the current request is as guest and no guest key is given, the IP address is used to match files. Using a key is recommended, because clients that move between WiFi and mobile connection or if the client is in a network with multiple outbound IP addresses, files won't be correctly matched without a key.", - "tags" : [ "Files" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "guestKey", - "in" : "query", - "required" : false, - "description" : "This parameter is only taken into account if the current request is running as guest. It is the key passed by the client when uploading files. If no key is given, files are matched by remote address.", - "schema" : { - "type" : "string" - } - }, { - "name" : "customField", - "in" : "query", - "required" : false, - "description" : "If the temp file will be used as the value of a custom field of type file then the corresponding custom field must be given (id or internal name). Otherwise this paremeter will be ignored.", - "schema" : { - "type" : "string" - } - }, { - "name" : "customFieldKind", - "in" : "query", - "required" : false, - "description" : "If a custom field is given then its kind must be given too to allow find it.", - "schema" : { - "$ref" : "#/components/schemas/CustomFieldKind" + "/marketplace/{ad}/images/order": { + "put": { + "operationId": "reorderAdImages", + "summary": "Changes the order of an advertisement's images removing the ones not given", + "description": "The new order is defined by the list of ids, so that images appear in the same order as the ids. All images not given in the ids will be removed.", + "tags": [ + "Images" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] } - } ], - "responses" : { - "200" : { - "description" : "The list of files", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/StoredFile" - } - } + ], + "parameters": [ + { + "$ref": "#/components/parameters/ad" + }, + { + "name": "ids", + "description": "The array of ids (comma-separated) reflecting the desired order, if no\n id is given then all images will be removed", + "in": "query", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" } } + } + ], + "responses": { + "204": { + "description": "The image order is changed and nothing is returned" }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - }, - "post" : { - "operationId" : "uploadTempFile", - "summary" : "Adds a new temporary file for the currently authenticated user or guest.", - "description" : "Uploads a new temporary file. The returned id can later be used as value of a custom field of type file.", - "tags" : [ "Files" ], - "parameters" : [ { - "name" : "name", - "description" : "The name for the new file. If not informed will fall back to the original file name in the form data", - "in" : "query", - "required" : false, - "schema" : { - "type" : "string" - } - }, { - "name" : "guestKey", - "in" : "query", - "required" : false, - "description" : "This parameter is only taken into account if the current request is running as guest. It should be a reasonably unique key (for example, an UUID, device identifier or a reasonably large random string) which uniquely identifies the uploaded file as belonging to this \"session\". If no key is given, files uploaded as guest are matched by IP address. Using a key is recommended, because clients that move between WiFi and mobile connection or if the client is in a network with multiple outbound IP addresses, files won't be correctly matched without a key.", - "schema" : { - "type" : "string" - } - }, { - "name" : "customField", - "in" : "query", - "required" : false, - "description" : "If the temp file will be used as the value of a custom field of type file then the corresponding custom field must be given (id or internal name). Otherwise this paremeter will be ignored.", - "schema" : { - "type" : "string" - } - }, { - "name" : "customFieldKind", - "in" : "query", - "required" : false, - "description" : "If a custom field is given then its kind must be given too to allow find it.", - "schema" : { - "$ref" : "#/components/schemas/CustomFieldKind" + } + }, + "/contact-infos/{id}/image": { + "post": { + "operationId": "uploadContactInfoImage", + "summary": "Uploads a new image for the given additional contact information.", + "description": "Saves the given image for the additional contact information. If the given additional contact information already has an image, the old one is removed, and the current image is saved in its place.", + "tags": [ + "Images" + ], + "parameters": [ + { + "$ref": "#/components/parameters/id" + }, + { + "name": "name", + "description": "The name for the new image. If not informed will fall back to the original file name in the form data", + "in": "query", + "required": false, + "schema": { + "type": "string" + } } - } ], - "responses" : { - "201" : { - "description" : "The file is saved, its id is returned in the body and the URL to get the content is returned in the `Location` header", - "headers" : { - "Location" : { - "description" : "URL for obtaining the file content", - "schema" : { - "type" : "string" + ], + "responses": { + "201": { + "description": "The image is saved, its id is returned in the body and the URL to get the content is returned in the `Location` header", + "headers": { + "Location": { + "description": "URL for obtaining the image content", + "schema": { + "type": "string" } } }, - "content" : { - "text/plain" : { - "schema" : { - "type" : "string" + "content": { + "text/plain": { + "schema": { + "type": "string" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } }, - "requestBody" : { - "content" : { - "multipart/form-data" : { - "schema" : { - "type" : "object", - "properties" : { - "file" : { - "type" : "string", - "format" : "binary", - "description" : "The file being uploaded" + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "image": { + "type": "string", + "format": "binary", + "description": "The image being uploaded" } } } @@ -13308,587 +14398,418 @@ } } }, - "/documents/data-for-search" : { - "get" : { - "operationId" : "getDocumentsDataForSearch", - "summary" : "Returns configuration data for searching documents.", - "description" : "Returns configuration data for searching documents.", - "tags" : [ "Documents" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/userInQuery" - } ], - "responses" : { - "200" : { - "description" : "The configuration data for documents search.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DocumentDataForSearch" + "/svg-icons/{name}.svg": { + "get": { + "operationId": "viewSvgIcon", + "summary": "Returns an SVG icon by name", + "description": "Returns metadata about an SVG icon given it's name", + "tags": [ + "Images" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "name", + "in": "path", + "required": true, + "description": "The SVG icon name", + "x-dotInPath": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The SVG icon content", + "content": { + "text/plain": { + "schema": { + "type": "string" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } - } - } - } - } - }, - "/documents" : { - "get" : { - "operationId" : "searchDocuments", - "summary" : "General documents search", - "description" : "Searches for documents, which might be both shared and individual documents", - "tags" : [ "Documents" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "brokers", - "in" : "query", - "required" : false, - "description" : "Either the ids or identification methods of individual document owners' brokers", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "categories", - "in" : "query", - "required" : false, - "description" : "The shared document categories", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "enabled", - "in" : "query", - "required" : false, - "description" : "Only used if the logged user can manage documents. When set, filters documents by their `enabled` status, either `true` or `false`.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "groups", - "in" : "query", - "required" : false, - "description" : "Either the ids or internal names of individual document owners' group", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "keywords", - "in" : "query", - "required" : false, - "description" : "Used to filter documents containing that keywords in the the name or description (case insensitive)", - "schema" : { - "type" : "string" - } - }, { - "name" : "page", - "in" : "query", - "required" : false, - "description" : "The page number (zero-based) of the search. The default value is zero.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "pageSize", - "in" : "query", - "required" : false, - "description" : "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "range", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/DocumentRangeEnum" - } - }, { - "name" : "skipTotalCount", - "in" : "query", - "required" : false, - "description" : "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "user", - "in" : "query", - "required" : false, - "description" : "Either the id or identifier of the document owner", - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "The list of devices the user has.", - "headers" : { - "X-Total-Count" : { - "schema" : { - "type" : "integer" - }, - "description" : "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." - }, - "X-Page-Size" : { - "schema" : { - "type" : "integer" - }, - "description" : "The maximum number of results per page" - }, - "X-Current-Page" : { - "schema" : { - "type" : "integer" - }, - "description" : "The current page the results are in" - }, - "X-Has-Next-Page" : { - "schema" : { - "type" : "boolean" - }, - "description" : "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." - } - }, - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/DocumentResult" + } + } + } + } + }, + "/svg-icons": { + "get": { + "operationId": "getSvgIcons", + "summary": "Returns a JSON object keyed by icon name and whose values are the SVG contents", + "description": "Returns a JSON object keyed by icon name and whose values are the SVG contents", + "tags": [ + "Images" + ], + "parameters": [ + { + "name": "names", + "in": "query", + "required": false, + "explode": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": "The icon names to return" + } + ], + "responses": { + "200": { + "description": "The JSON content.", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" } } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - }, - "post" : { - "operationId" : "createSharedDocument", - "summary" : "Creates a new static shared document.", - "description" : "Creates a new static shared document.", - "tags" : [ "Documents" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "201" : { - "description" : "Returns the identifier of the new document", - "headers" : { - "Location" : { - "description" : "URL for viewing the document details", - "schema" : { - "type" : "string" - } - } - }, - "content" : { - "text/plain" : { - "schema" : { - "type" : "string" - } - } + } + }, + "/files/{id}/content": { + "get": { + "operationId": "getRawFileContent", + "summary": "Returns the content of a raw file (temp or custom field value)", + "description": "Returns the content of either a temporary or a custom field value file", + "tags": [ + "Files" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "The file identifier", + "schema": { + "type": "string" } - }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + } + ], + "responses": { + "200": { + "description": "The file content", + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - }, - "requestBody" : { - "description" : "The document to be created", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DocumentNew" - } - } - } - } - } - }, - "/documents/upload" : { - "post" : { - "operationId" : "createSharedDocumentWithUpload", - "summary" : "Creates a new static shared document with a file", - "description" : "Creates a new static shared document and saves the content of the file.", - "tags" : [ "Documents" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "201" : { - "description" : "Returns the identifier of the new document", - "headers" : { - "Location" : { - "description" : "URL for viewing the document details", - "schema" : { - "type" : "string" - } - } - }, - "content" : { - "text/plain" : { - "schema" : { - "type" : "string" - } - } - } + } + } + }, + "/files/{id}": { + "get": { + "operationId": "viewRawFile", + "summary": "Returns a file details by id", + "description": "Returns metadata about a file given its id", + "tags": [ + "Files" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + { + "$ref": "#/components/parameters/id" + } + ], + "responses": { + "200": { + "description": "The file details", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StoredFile" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - }, - "requestBody" : { - "content" : { - "multipart/form-data" : { - "schema" : { - "type" : "object", - "properties" : { - "document" : { - "description" : "The document to be created", - "allOf" : [ { - "$ref" : "#/components/schemas/DocumentNew" - } ] - }, - "file" : { - "type" : "string", - "format" : "binary", - "description" : "The file being uploaded" - }, - "fileName" : { - "type" : "string", - "description" : "The file's name" - } - }, - "required" : [ "file" ] - } - } - } } - } - }, - "/documents/data-for-new" : { - "get" : { - "operationId" : "getSharedDocumentDataForNew", - "summary" : "Returns data to create a new shared static document", - "description" : "Returns configuration data for creating a new document of kind `static`.", - "tags" : [ "Documents" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The data for creating a document", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DocumentDataForNew" + }, + "delete": { + "operationId": "deleteRawFile", + "summary": "Removes a file by id", + "description": "Removes the file with id", + "tags": [ + "Files" + ], + "parameters": [ + { + "$ref": "#/components/parameters/id" + } + ], + "responses": { + "204": { + "description": "The file was deleted" + }, + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -13896,259 +14817,329 @@ } } }, - "/documents/{id}" : { - "parameters" : [ { - "$ref" : "#/components/parameters/id" - } ], - "get" : { - "operationId" : "viewDocument", - "summary" : "Returns details of a specific document.", - "description" : "Returns details of a specific document.", - "tags" : [ "Documents" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The document details", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DocumentView" + "/files/temp": { + "get": { + "operationId": "listTempFiles", + "summary": "Lists temporary files related to the currently authenticated user or guest", + "description": "Returns all uploaded temporary files by the current user, or guest key. If the current request is as guest and no guest key is given, the IP address is used to match files. Using a key is recommended, because clients that move between WiFi and mobile connection or if the client is in a network with multiple outbound IP addresses, files won't be correctly matched without a key.", + "tags": [ + "Files" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "guestKey", + "in": "query", + "required": false, + "description": "This parameter is only taken into account if the current request is running as guest. It is the key passed by the client when uploading files. If no key is given, files are matched by remote address.", + "schema": { + "type": "string" + } + }, + { + "name": "customField", + "in": "query", + "required": false, + "description": "If the temp file will be used as the value of a custom field of type file then the corresponding custom field must be given (id or internal name). Otherwise this paremeter will be ignored.", + "schema": { + "type": "string" + } + }, + { + "name": "customFieldKind", + "in": "query", + "required": false, + "description": "If a custom field is given then its kind must be given too to allow find it.", + "schema": { + "$ref": "#/components/schemas/CustomFieldKind" + } + } + ], + "responses": { + "200": { + "description": "The list of files", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StoredFile" + } } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } }, - "put" : { - "operationId" : "updateDocument", - "summary" : "Updates the details of a document.", - "description" : "Updates the details of a document.", - "tags" : [ "Documents" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "204" : { - "description" : "The document was updated" + "post": { + "operationId": "uploadTempFile", + "summary": "Adds a new temporary file for the currently authenticated user or guest.", + "description": "Uploads a new temporary file. The returned id can later be used as value of a custom field of type file.", + "tags": [ + "Files" + ], + "parameters": [ + { + "name": "name", + "description": "The name for the new file. If not informed will fall back to the original file name in the form data", + "in": "query", + "required": false, + "schema": { + "type": "string" + } }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" - } - } + { + "name": "guestKey", + "in": "query", + "required": false, + "description": "This parameter is only taken into account if the current request is running as guest. It should be a reasonably unique key (for example, an UUID, device identifier or a reasonably large random string) which uniquely identifies the uploaded file as belonging to this \"session\". If no key is given, files uploaded as guest are matched by IP address. Using a key is recommended, because clients that move between WiFi and mobile connection or if the client is in a network with multiple outbound IP addresses, files won't be correctly matched without a key.", + "schema": { + "type": "string" + } + }, + { + "name": "customField", + "in": "query", + "required": false, + "description": "If the temp file will be used as the value of a custom field of type file then the corresponding custom field must be given (id or internal name). Otherwise this paremeter will be ignored.", + "schema": { + "type": "string" } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + { + "name": "customFieldKind", + "in": "query", + "required": false, + "description": "If a custom field is given then its kind must be given too to allow find it.", + "schema": { + "$ref": "#/components/schemas/CustomFieldKind" + } + } + ], + "responses": { + "201": { + "description": "The file is saved, its id is returned in the body and the URL to get the content is returned in the `Location` header", + "headers": { + "Location": { + "description": "URL for obtaining the file content", + "schema": { + "type": "string" + } + } + }, + "content": { + "text/plain": { + "schema": { + "type": "string" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } }, - "requestBody" : { - "description" : "The document to be edited", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DocumentEdit" + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "file": { + "type": "string", + "format": "binary", + "description": "The file being uploaded" + } + } } } } } - }, - "delete" : { - "operationId" : "deleteDocument", - "summary" : "Removes a document.", - "description" : "Removes a document.", - "tags" : [ "Documents" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "204" : { - "description" : "The document was deleted" + } + }, + "/documents/data-for-search": { + "get": { + "operationId": "getDocumentsDataForSearch", + "summary": "Returns configuration data for searching documents.", + "description": "Returns configuration data for searching documents.", + "tags": [ + "Documents" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" + { + "$ref": "#/components/parameters/userInQuery" + } + ], + "responses": { + "200": { + "description": "The configuration data for documents search.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DocumentDataForSearch" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -14156,1125 +15147,1054 @@ } } }, - "/documents/{id}/upload" : { - "parameters" : [ { - "$ref" : "#/components/parameters/id" - } ], - "post" : { - "operationId" : "updateDocumentWithUpload", - "summary" : "Updates the details of a document and the file content.", - "description" : "Updates the details of a document and the file content if given. Due to implementation issues was used post for edit a document and upload the file at the same time.", - "tags" : [ "Documents" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "204" : { - "description" : "The document was updated" - }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" - } - } - } - }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "/documents": { + "get": { + "operationId": "searchDocuments", + "summary": "General documents search", + "description": "Searches for documents, which might be both shared and individual documents", + "tags": [ + "Documents" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "brokers", + "in": "query", + "required": false, + "description": "Either the ids or identification methods of individual document owners' brokers", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "categories", + "in": "query", + "required": false, + "description": "The shared document categories", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "enabled", + "in": "query", + "required": false, + "description": "Only used if the logged user can manage documents. When set, filters documents by their `enabled` status, either `true` or `false`.", + "schema": { + "type": "boolean" + } + }, + { + "name": "groups", + "in": "query", + "required": false, + "description": "Either the ids or internal names of individual document owners' group", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "keywords", + "in": "query", + "required": false, + "description": "Used to filter documents containing that keywords in the the name or description (case insensitive)", + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number (zero-based) of the search. The default value is zero.", + "schema": { + "type": "integer" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", + "schema": { + "type": "integer" + } + }, + { + "name": "range", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/DocumentRangeEnum" + } + }, + { + "name": "skipTotalCount", + "in": "query", + "required": false, + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", + "schema": { + "type": "boolean" + } + }, + { + "name": "user", + "in": "query", + "required": false, + "description": "Either the id or identifier of the document owner", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The list of devices the user has.", + "headers": { + "X-Total-Count": { + "schema": { + "type": "integer" + }, + "description": "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." + }, + "X-Page-Size": { + "schema": { + "type": "integer" + }, + "description": "The maximum number of results per page" + }, + "X-Current-Page": { + "schema": { + "type": "integer" + }, + "description": "The current page the results are in" + }, + "X-Has-Next-Page": { + "schema": { + "type": "boolean" + }, + "description": "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." + } + }, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DocumentResult" + } } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - }, - "requestBody" : { - "content" : { - "multipart/form-data" : { - "schema" : { - "type" : "object", - "properties" : { - "document" : { - "description" : "The document to be edited", - "allOf" : [ { - "$ref" : "#/components/schemas/DocumentEdit" - } ] - }, - "file" : { - "type" : "string", - "format" : "binary", - "description" : "The file being uploaded" - }, - "fileName" : { - "type" : "string", - "description" : "The file's name" - } - }, - "required" : [ "file" ] - } - } - } } - } - }, - "/documents/{id}/data-for-edit" : { - "parameters" : [ { - "$ref" : "#/components/parameters/id" - } ], - "get" : { - "operationId" : "getDocumentDataForEdit", - "summary" : "Returns data to edit an existing document", - "description" : "Returns configuration data for editing a document, plus the current `DocumentEdit` object that can be altered and sent back", - "tags" : [ "Documents" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The data for editing a document", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DocumentDataForEdit" - } - } - } + }, + "post": { + "operationId": "createSharedDocument", + "summary": "Creates a new static shared document.", + "description": "Creates a new static shared document.", + "tags": [ + "Documents" + ], + "security": [ + { + "basic": [] }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + { + "session": [] + }, + { + "accessClient": [] + } + ], + "responses": { + "201": { + "description": "Returns the identifier of the new document", + "headers": { + "Location": { + "description": "URL for viewing the document details", + "schema": { + "type": "string" } } - } - }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + }, + "content": { + "text/plain": { + "schema": { + "type": "string" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } - } - } - } - }, - "/documents/{id}/file" : { - "parameters" : [ { - "$ref" : "#/components/parameters/id" - } ], - "get" : { - "operationId" : "downloadDocumentFile", - "summary" : "Returns the content of the document file.", - "description" : "The document `kind` must be either `static` or `user`. Otherwise a 404 status is returned.", - "tags" : [ "Documents" ], - "responses" : { - "200" : { - "description" : "The document file", - "content" : { - "*/*" : { - "schema" : { - "type" : "string", - "format" : "binary" + }, + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } - }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" - } + } + }, + "requestBody": { + "description": "The document to be created", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DocumentNew" } } + } + } + } + }, + "/documents/upload": { + "post": { + "operationId": "createSharedDocumentWithUpload", + "summary": "Creates a new static shared document with a file", + "description": "Creates a new static shared document and saves the content of the file.", + "tags": [ + "Documents" + ], + "security": [ + { + "basic": [] }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + { + "session": [] + }, + { + "accessClient": [] + } + ], + "responses": { + "201": { + "description": "Returns the identifier of the new document", + "headers": { + "Location": { + "description": "URL for viewing the document details", + "schema": { + "type": "string" } } - } - }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + }, + "content": { + "text/plain": { + "schema": { + "type": "string" } } } - } - } - }, - "post" : { - "operationId" : "uploadDocumentFile", - "summary" : "Saves the content of the document file.", - "description" : "The document `kind` must be either `static` or `user`. Otherwise a 404 status is returned.", - "tags" : [ "Documents" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "name" : "name", - "description" : "The name for the new file. If not informed will fall back to the original file name in the form data", - "in" : "query", - "required" : false, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "204" : { - "description" : "The file is saved, and nothing is returned. The URL to get the content is returned in the `Location` header.", - "headers" : { - "Location" : { - "description" : "URL for obtaining the file content", - "schema" : { - "type" : "string" + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } }, - "requestBody" : { - "content" : { - "multipart/form-data" : { - "schema" : { - "type" : "object", - "properties" : { - "file" : { - "type" : "string", - "format" : "binary", - "description" : "The file being uploaded" + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "document": { + "description": "The document to be created", + "allOf": [ + { + "$ref": "#/components/schemas/DocumentNew" + } + ] + }, + "file": { + "type": "string", + "format": "binary", + "description": "The file being uploaded" + }, + "fileName": { + "type": "string", + "description": "The file's name" } }, - "required" : [ "file" ] + "required": [ + "file" + ] } } } } } }, - "/documents/{id}/dynamic/{user}" : { - "parameters" : [ { - "$ref" : "#/components/parameters/id" - }, { - "$ref" : "#/components/parameters/user" - } ], - "get" : { - "operationId" : "getDataForDynamicDocument", - "summary" : "Returns data to process a dynamic document", - "description" : "Returns the fields that can be used to process a dynamic document for the given user.", - "tags" : [ "Documents" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The data for processing a dynamic a document", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DataForDynamicDocument" + "/documents/data-for-new": { + "get": { + "operationId": "getSharedDocumentDataForNew", + "summary": "Returns data to create a new shared static document", + "description": "Returns configuration data for creating a new document of kind `static`.", + "tags": [ + "Documents" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The data for creating a document", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DocumentDataForNew" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - }, - "post" : { - "operationId" : "processDynamicDocument", - "summary" : "Processes a dynamic document", - "description" : "Generates the HTML content which is the result of processing a dynamic document", - "tags" : [ "Documents" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "200" : { - "description" : "The dynamic document content", - "content" : { - "text/html" : { - "schema" : { - "type" : "string" + } + }, + "/documents/{id}": { + "parameters": [ + { + "$ref": "#/components/parameters/id" + } + ], + "get": { + "operationId": "viewDocument", + "summary": "Returns details of a specific document.", + "description": "Returns details of a specific document.", + "tags": [ + "Documents" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The document details", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DocumentView" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - }, - "requestBody" : { - "description" : "The form fields", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProcessDynamicDocument" - } - } - } - } - } - }, - "/{user}/documents" : { - "parameters" : [ { - "$ref" : "#/components/parameters/user" - } ], - "get" : { - "operationId" : "listUserDocuments", - "summary" : "Lists the enabled documents for the given user", - "description" : "Lists the enabled documents for the given user", - "tags" : [ "Documents" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The list of documents for the user.", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Document" - } + } + }, + "put": { + "operationId": "updateDocument", + "summary": "Updates the details of a document.", + "description": "Updates the details of a document.", + "tags": [ + "Documents" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "responses": { + "204": { + "description": "The document was updated" + }, + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } - } - } - }, - "post" : { - "operationId" : "createUserDocument", - "summary" : "Creates a new individual document for the given user.", - "description" : "Creates a new individual document for the given user.", - "tags" : [ "Documents" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "201" : { - "description" : "Returns the identifier of the new document", - "headers" : { - "Location" : { - "description" : "URL for viewing the document details", - "schema" : { - "type" : "string" + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } - }, - "content" : { - "text/plain" : { - "schema" : { - "type" : "string" - } + } + } + }, + "requestBody": { + "description": "The document to be edited", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DocumentEdit" } } + } + } + }, + "delete": { + "operationId": "deleteDocument", + "summary": "Removes a document.", + "description": "Removes a document.", + "tags": [ + "Documents" + ], + "security": [ + { + "basic": [] }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + { + "session": [] + }, + { + "accessClient": [] + } + ], + "responses": { + "204": { + "description": "The document was deleted" + }, + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - }, - "requestBody" : { - "description" : "The document to be created", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DocumentNew" - } - } - } - } - } - }, - "/{user}/documents/upload" : { - "parameters" : [ { - "$ref" : "#/components/parameters/user" - } ], - "post" : { - "operationId" : "createUserDocumentWithUpload", - "summary" : "Creates a new individual document for the given user with a file.", - "description" : "Creates a new individual document for the given user and saves the content of the file.", - "tags" : [ "Documents" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "201" : { - "description" : "Returns the identifier of the new document", - "headers" : { - "Location" : { - "description" : "URL for viewing the document details", - "schema" : { - "type" : "string" - } - } - }, - "content" : { - "text/plain" : { - "schema" : { - "type" : "string" + } + } + }, + "/documents/{id}/upload": { + "parameters": [ + { + "$ref": "#/components/parameters/id" + } + ], + "post": { + "operationId": "updateDocumentWithUpload", + "summary": "Updates the details of a document and the file content.", + "description": "Updates the details of a document and the file content if given. Due to implementation issues was used post for edit a document and upload the file at the same time.", + "tags": [ + "Documents" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "responses": { + "204": { + "description": "The document was updated" + }, + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } }, - "requestBody" : { - "content" : { - "multipart/form-data" : { - "schema" : { - "type" : "object", - "properties" : { - "document" : { - "description" : "The document to be created", - "allOf" : [ { - "$ref" : "#/components/schemas/DocumentNew" - } ] + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "document": { + "description": "The document to be edited", + "allOf": [ + { + "$ref": "#/components/schemas/DocumentEdit" + } + ] }, - "file" : { - "type" : "string", - "format" : "binary", - "description" : "The file being uploaded" + "file": { + "type": "string", + "format": "binary", + "description": "The file being uploaded" }, - "fileName" : { - "type" : "string", - "description" : "The file's name" + "fileName": { + "type": "string", + "description": "The file's name" } }, - "required" : [ "file" ] + "required": [ + "file" + ] } } } } } }, - "/{user}/documents/data-for-new" : { - "parameters" : [ { - "$ref" : "#/components/parameters/user" - } ], - "get" : { - "operationId" : "getUserDocumentDataForNew", - "summary" : "Returns data to create a new shared individual document", - "description" : "Returns configuration data for creating a new document of kind `user` for the given user.", - "tags" : [ "Documents" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The data for creating a document", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DocumentDataForNew" - } - } - } - }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } - } - } - }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" - } - } - } + "/documents/{id}/data-for-edit": { + "parameters": [ + { + "$ref": "#/components/parameters/id" + } + ], + "get": { + "operationId": "getDocumentDataForEdit", + "summary": "Returns data to edit an existing document", + "description": "Returns configuration data for editing a document, plus the current `DocumentEdit` object that can be altered and sent back", + "tags": [ + "Documents" + ], + "security": [ + { + "basic": [] }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" - } - } - } + { + "session": [] }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" - } - } - } - }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" - } - } - } - } - } - } - }, - "/{user}/contacts" : { - "get" : { - "operationId" : "searchContacts", - "summary" : "Search users which are contacts of a specific user", - "description" : "Returns a page of users that are contacts of the given user. This path works as such for backwards compatibility reason. In general, seaching the contact list of a user should use the `GET /{user}/contact-list` operation instead. That way contact custom fields will be properly handled. However the `GET /{user}/contacts` operation is kept for simple cases where only the contact users, not the contact relation are desired. The fields returned depend on the products, in the profile fields of other users setting. Only fields (both basic or custom) marked to be returned on user list are returned. If no fields are set to be returned, the resulting objects will have the `display` filled in. However, that field is not returned when another profile field is returned, preventing duplicated data to be returned.", - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/user" - }, { - "name" : "ignoreProfileFieldsInList", - "in" : "query", - "required" : false, - "description" : "When set to `true`, instead of returning users with corresponding profile fields set on list, will return them with `display`.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "includeGroup", - "in" : "query", - "required" : false, - "description" : "When set to `true` and the logged user has permission to view user groups, will return the `group` property on users.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "includeGroupSet", - "in" : "query", - "required" : false, - "description" : "When set to `true` and the logged user has permission to view user group sets, will return the `groupSet` property on users.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "keywords", - "in" : "query", - "required" : false, - "description" : "Textual search keywords. Sometimes, like in user search, the fields matched depends on what is configured on the products.", - "schema" : { - "type" : "string" - } - }, { - "name" : "page", - "in" : "query", - "required" : false, - "description" : "The page number (zero-based) of the search. The default value is zero.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "pageSize", - "in" : "query", - "required" : false, - "description" : "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "profileFields", - "in" : "query", - "required" : false, - "description" : "User profile fields, both basic (full name, login name, phone, e-mail, etc) and custom fields, that are used for search. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by `:` (colon). For example, `profileFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, `profileFields=field1:valueA|valueB`. The accepted fields depend on the products the authenticated user has. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `profileFields=rank:bronze|silver,birthDate:2000-01-01|2001-12-31` would match results whose custom field with internal name 'rank' is either bronze or silver, and whose 'birthDate' is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `profileFields=birthDate:|2001-12-31`.\nThe basic profile fields have one of the following identifiers:\n- `name` or `fullName`: Full name; - `username`, `loginName` or `login`: Login name; - `email`: E-mail; - `phone`: Phone; - `accountNumber`, `account`: Account number; - `image`: Image (accepts a boolean value, indicating that either it is required that users either have images or not).\n\nIf address is an allowed profile field for search, specific address fields may be searched. The allowed ones are normally returned as the `addressFieldsInSearch` field in the corresponding result from a data-for-search request. The specific address fields are:\n- `address`: Searches on any address field (not a specific field); - `address.address`: Searches on the fields that represent the street address, which are `addressLine1`, `addressLine2`, `street`, `buildingNumber` and `complement`. Note that normally only a subset of them should be enabled in the configuration (either line 1 / 2 or street + number + complement);\n- `address.zip`: Searches for matching zip (postal) code; - `address.poBox`: Searches for matching postal box; - `address.neighborhood`: Searches by neighborhood; - `address.city`: Searches by city; - `address.region`: Searches by region (or state); - `address.country`: Searches by ISO 3166-1 alpha-2 country code. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `profileFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `profileFields=dynamic:'business`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "skipTotalCount", - "in" : "query", - "required" : false, - "description" : "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", - "schema" : { - "type" : "boolean" - } - } ], - "tags" : [ "Contacts" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "200" : { - "description" : "The users in the contact list which match the criteria", - "headers" : { - "X-Total-Count" : { - "schema" : { - "type" : "integer" - }, - "description" : "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." - }, - "X-Page-Size" : { - "schema" : { - "type" : "integer" - }, - "description" : "The maximum number of results per page" - }, - "X-Current-Page" : { - "schema" : { - "type" : "integer" - }, - "description" : "The current page the results are in" - }, - "X-Has-Next-Page" : { - "schema" : { - "type" : "boolean" - }, - "description" : "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." - } - }, - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/UserResult" - } + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The data for editing a document", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DocumentDataForEdit" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -15282,792 +16202,812 @@ } } }, - "/{user}/contact-list" : { - "get" : { - "operationId" : "searchContactList", - "summary" : "Searches the contact list of a given user", - "description" : "Returns a page of contacts, which have the contacted user and custom field values for custom fields set to be returned on the list. This operation is preferred over `GET /{user}/contacts` because it returns contact custom fields, while `GET /{user}/contacts` returns users which are contacts, with the profile fields configured to be returned in a regular users search.", - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/user" - }, { - "name" : "customFields", - "in" : "query", - "required" : false, - "description" : "Concat custom field values used as filters. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by : (colon). For example, `customFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, customFields=field1:valueA|valueB. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `customFields=tradeType:offer|search,extraDate:2000-01-01|2001-12-31` would match results whose custom field with internal name `tradeType` is either `offer` or `search`, and whose `extraDate` is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `customValues=extraDate:|2001-12-31`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "keywords", - "in" : "query", - "required" : false, - "description" : "Textual search keywords. Sometimes, like in user search, the fields matched depends on what is configured on the products.", - "schema" : { - "type" : "string" - } - }, { - "name" : "orderBy", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/ContactOrderByEnum" - } - }, { - "name" : "page", - "in" : "query", - "required" : false, - "description" : "The page number (zero-based) of the search. The default value is zero.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "pageSize", - "in" : "query", - "required" : false, - "description" : "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "skipTotalCount", - "in" : "query", - "required" : false, - "description" : "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "usersToExclude", - "in" : "query", - "required" : false, - "description" : "Indicated the users to be excluded from the result", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - } ], - "tags" : [ "Contacts" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "200" : { - "description" : "The contacts of the given owner that match the criteria", - "headers" : { - "X-Total-Count" : { - "schema" : { - "type" : "integer" - }, - "description" : "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." - }, - "X-Page-Size" : { - "schema" : { - "type" : "integer" - }, - "description" : "The maximum number of results per page" - }, - "X-Current-Page" : { - "schema" : { - "type" : "integer" - }, - "description" : "The current page the results are in" - }, - "X-Has-Next-Page" : { - "schema" : { - "type" : "boolean" - }, - "description" : "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." - } - }, - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ContactResult" - } + "/documents/{id}/file": { + "parameters": [ + { + "$ref": "#/components/parameters/id" + } + ], + "get": { + "operationId": "downloadDocumentFile", + "summary": "Returns the content of the document file.", + "description": "The document `kind` must be either `static` or `user`. Otherwise a 404 status is returned.", + "tags": [ + "Documents" + ], + "responses": { + "200": { + "description": "The document file", + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } }, - "post" : { - "operationId" : "createContact", - "summary" : "Creates a new contact", - "description" : "Creates a new contact for the given owner. The contact user needs to be set in the request body, as well as contact custom fields, if any.", - "parameters" : [ { - "$ref" : "#/components/parameters/user" - } ], - "tags" : [ "Contacts" ], - "responses" : { - "201" : { - "description" : "Returns the identifier of the new contact", - "headers" : { - "Location" : { - "description" : "URL for viewing the contact details", - "schema" : { - "type" : "string" - } - } - }, - "content" : { - "text/plain" : { - "schema" : { - "type" : "string" - } - } - } + "post": { + "operationId": "uploadDocumentFile", + "summary": "Saves the content of the document file.", + "description": "The document `kind` must be either `static` or `user`. Otherwise a 404 status is returned.", + "tags": [ + "Documents" + ], + "security": [ + { + "basic": [] }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "name": "name", + "description": "The name for the new file. If not informed will fall back to the original file name in the form data", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "The file is saved, and nothing is returned. The URL to get the content is returned in the `Location` header.", + "headers": { + "Location": { + "description": "URL for obtaining the file content", + "schema": { + "type": "string" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } }, - "requestBody" : { - "description" : "The contact to be added", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ContactNew" + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "file": { + "type": "string", + "format": "binary", + "description": "The file being uploaded" + } + }, + "required": [ + "file" + ] } } } } } }, - "/{user}/contact-list/data-for-search" : { - "get" : { - "operationId" : "getContactListDataForSearch", - "summary" : "Returns configuration data used when searching for contacts", - "description" : "Returns data for searching a user's contact list, such as the contact custom fields which are set for being used as search filters.", - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/user" - } ], - "tags" : [ "Contacts" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "200" : { - "description" : "The data for searching the contact list", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ContactListDataForSearch" + "/documents/{id}/dynamic/{user}": { + "parameters": [ + { + "$ref": "#/components/parameters/id" + }, + { + "$ref": "#/components/parameters/user" + } + ], + "get": { + "operationId": "getDataForDynamicDocument", + "summary": "Returns data to process a dynamic document", + "description": "Returns the fields that can be used to process a dynamic document for the given user.", + "tags": [ + "Documents" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The data for processing a dynamic a document", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DataForDynamicDocument" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - } - }, - "/{user}/contact-list/data-for-new" : { - "get" : { - "operationId" : "getContactListDataForNew", - "summary" : "Returns configuration data for creating a new contact", - "description" : "Returns data, such as a given contact user details and contact custom fields, for creating a new contact. The contact user is optional. If informed, the result will contain additional details about that user.", - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/user" - }, { - "name" : "contactUser", - "required" : false, - "in" : "query", - "description" : "The (optional) user to which will be the contact", - "schema" : { - "type" : "string" + }, + "post": { + "operationId": "processDynamicDocument", + "summary": "Processes a dynamic document", + "description": "Generates the HTML content which is the result of processing a dynamic document", + "tags": [ + "Documents" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] } - } ], - "tags" : [ "Contacts" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "200" : { - "description" : "The data for creating a new contact", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ContactDataForNew" + ], + "responses": { + "200": { + "description": "The dynamic document content", + "content": { + "text/html": { + "schema": { + "type": "string" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } + }, + "requestBody": { + "description": "The form fields", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessDynamicDocument" + } + } + } } } }, - "/contact-list/{id}/data-for-edit" : { - "get" : { - "operationId" : "getContactDataForEdit", - "summary" : "Returns data to edit an existing contact", - "description" : "Returns configuration data for editing a contact, plus the current `ContactEdit` object that can be altered and sent back", - "tags" : [ "Contacts" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/id" - } ], - "responses" : { - "200" : { - "description" : "The data for editing a contact", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ContactDataForEdit" + "/{user}/documents": { + "parameters": [ + { + "$ref": "#/components/parameters/user" + } + ], + "get": { + "operationId": "listUserDocuments", + "summary": "Lists the enabled documents for the given user", + "description": "Lists the enabled documents for the given user", + "tags": [ + "Documents" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The list of documents for the user.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Document" + } } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - } - }, - "/contact-list/{id}" : { - "get" : { - "operationId" : "viewContact", - "summary" : "Returns details of a specific contact", - "description" : "Returns information about a contact, located by id", - "tags" : [ "Contacts" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/id" - } ], - "responses" : { - "200" : { - "description" : "The contact data", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ContactView" + }, + "post": { + "operationId": "createUserDocument", + "summary": "Creates a new individual document for the given user.", + "description": "Creates a new individual document for the given user.", + "tags": [ + "Documents" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "responses": { + "201": { + "description": "Returns the identifier of the new document", + "headers": { + "Location": { + "description": "URL for viewing the document details", + "schema": { + "type": "string" + } + } + }, + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } + }, + "requestBody": { + "description": "The document to be created", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DocumentNew" + } + } + } } - }, - "put" : { - "operationId" : "updateContact", - "summary" : "Updates an existing contact", - "description" : "Updates an existing contact", - "tags" : [ "Contacts" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/id" - } ], - "responses" : { - "204" : { - "description" : "The contact was updated" + } + }, + "/{user}/documents/upload": { + "parameters": [ + { + "$ref": "#/components/parameters/user" + } + ], + "post": { + "operationId": "createUserDocumentWithUpload", + "summary": "Creates a new individual document for the given user with a file.", + "description": "Creates a new individual document for the given user and saves the content of the file.", + "tags": [ + "Documents" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" + { + "accessClient": [] + } + ], + "responses": { + "201": { + "description": "Returns the identifier of the new document", + "headers": { + "Location": { + "description": "URL for viewing the document details", + "schema": { + "type": "string" + } + } + }, + "content": { + "text/plain": { + "schema": { + "type": "string" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } }, - "requestBody" : { - "description" : "The contact to be edited", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ContactEdit" + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "document": { + "description": "The document to be created", + "allOf": [ + { + "$ref": "#/components/schemas/DocumentNew" + } + ] + }, + "file": { + "type": "string", + "format": "binary", + "description": "The file being uploaded" + }, + "fileName": { + "type": "string", + "description": "The file's name" + } + }, + "required": [ + "file" + ] } } } } - }, - "delete" : { - "operationId" : "deleteContact", - "summary" : "Removes a contact", - "description" : "Removes a contact", - "tags" : [ "Contacts" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/id" - } ], - "responses" : { - "204" : { - "description" : "The contact was deleted" + } + }, + "/{user}/documents/data-for-new": { + "parameters": [ + { + "$ref": "#/components/parameters/user" + } + ], + "get": { + "operationId": "getUserDocumentDataForNew", + "summary": "Returns data to create a new shared individual document", + "description": "Returns configuration data for creating a new document of kind `user` for the given user.", + "tags": [ + "Documents" + ], + "security": [ + { + "basic": [] }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The data for creating a document", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DocumentDataForNew" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -16075,82 +17015,195 @@ } } }, - "/agreements/pending" : { - "get" : { - "operationId" : "listPendingAgreements", - "summary" : "Returns the agreements the authenticated user needs to accept in order to use the system", - "description" : "Returns a list with all agreements the authenticated user is pending to accept. Until accepting the pending agreements, the usage of the system is limited.", - "tags" : [ "Agreements" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The list of agreements, or empty if there are no pending agreements", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Agreement" + "/{user}/contacts": { + "get": { + "operationId": "searchContacts", + "summary": "Search users which are contacts of a specific user", + "description": "Returns a page of users that are contacts of the given user. This path works as such for backwards compatibility reason. In general, seaching the contact list of a user should use the `GET /{user}/contact-list` operation instead. That way contact custom fields will be properly handled. However the `GET /{user}/contacts` operation is kept for simple cases where only the contact users, not the contact relation are desired. The fields returned depend on the products, in the profile fields of other users setting. Only fields (both basic or custom) marked to be returned on user list are returned. If no fields are set to be returned, the resulting objects will have the `display` filled in. However, that field is not returned when another profile field is returned, preventing duplicated data to be returned.", + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/user" + }, + { + "name": "ignoreProfileFieldsInList", + "in": "query", + "required": false, + "description": "When set to `true`, instead of returning users with corresponding profile fields set on list, will return them with `display`.", + "schema": { + "type": "boolean" + } + }, + { + "name": "includeGroup", + "in": "query", + "required": false, + "description": "When set to `true` and the logged user has permission to view user groups, will return the `group` property on users.", + "schema": { + "type": "boolean" + } + }, + { + "name": "includeGroupSet", + "in": "query", + "required": false, + "description": "When set to `true` and the logged user has permission to view user group sets, will return the `groupSet` property on users.", + "schema": { + "type": "boolean" + } + }, + { + "name": "keywords", + "in": "query", + "required": false, + "description": "Textual search keywords. Sometimes, like in user search, the fields matched depends on what is configured on the products.", + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number (zero-based) of the search. The default value is zero.", + "schema": { + "type": "integer" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", + "schema": { + "type": "integer" + } + }, + { + "name": "profileFields", + "in": "query", + "required": false, + "description": "User profile fields, both basic (full name, login name, phone, e-mail, etc) and custom fields, that are used for search. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by `:` (colon). For example, `profileFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, `profileFields=field1:valueA|valueB`. The accepted fields depend on the products the authenticated user has. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `profileFields=rank:bronze|silver,birthDate:2000-01-01|2001-12-31` would match results whose custom field with internal name 'rank' is either bronze or silver, and whose 'birthDate' is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `profileFields=birthDate:|2001-12-31`.\nThe basic profile fields have one of the following identifiers:\n- `name` or `fullName`: Full name; - `username`, `loginName` or `login`: Login name; - `email`: E-mail; - `phone`: Phone; - `accountNumber`, `account`: Account number; - `image`: Image (accepts a boolean value, indicating that either it is required that users either have images or not).\n\nIf address is an allowed profile field for search, specific address fields may be searched. The allowed ones are normally returned as the `addressFieldsInSearch` field in the corresponding result from a data-for-search request. The specific address fields are:\n- `address`: Searches on any address field (not a specific field); - `address.address`: Searches on the fields that represent the street address, which are `addressLine1`, `addressLine2`, `street`, `buildingNumber` and `complement`. Note that normally only a subset of them should be enabled in the configuration (either line 1 / 2 or street + number + complement);\n- `address.zip`: Searches for matching zip (postal) code; - `address.poBox`: Searches for matching postal box; - `address.neighborhood`: Searches by neighborhood; - `address.city`: Searches by city; - `address.region`: Searches by region (or state); - `address.country`: Searches by ISO 3166-1 alpha-2 country code. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `profileFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `profileFields=dynamic:'business`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "skipTotalCount", + "in": "query", + "required": false, + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + "Contacts" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "responses": { + "200": { + "description": "The users in the contact list which match the criteria", + "headers": { + "X-Total-Count": { + "schema": { + "type": "integer" + }, + "description": "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." + }, + "X-Page-Size": { + "schema": { + "type": "integer" + }, + "description": "The maximum number of results per page" + }, + "X-Current-Page": { + "schema": { + "type": "integer" + }, + "description": "The current page the results are in" + }, + "X-Has-Next-Page": { + "schema": { + "type": "boolean" + }, + "description": "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." + } + }, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserResult" } } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -16158,251 +17211,384 @@ } } }, - "/agreements/accept" : { - "post" : { - "operationId" : "acceptPendingAgreement", - "summary" : "Accept one or more agreements", - "description" : "Accept all the given agreements", - "tags" : [ "Agreements" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "name" : "agreements", - "in" : "query", - "description" : "The identifiers or internal names of the agreements to be accepted", - "schema" : { - "type" : "array", - "items" : { - "type" : "string" + "/{user}/contact-list": { + "get": { + "operationId": "searchContactList", + "summary": "Searches the contact list of a given user", + "description": "Returns a page of contacts, which have the contacted user and custom field values for custom fields set to be returned on the list. This operation is preferred over `GET /{user}/contacts` because it returns contact custom fields, while `GET /{user}/contacts` returns users which are contacts, with the profile fields configured to be returned in a regular users search.", + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/user" + }, + { + "name": "customFields", + "in": "query", + "required": false, + "description": "Concat custom field values used as filters. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by : (colon). For example, `customFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, customFields=field1:valueA|valueB. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `customFields=tradeType:offer|search,extraDate:2000-01-01|2001-12-31` would match results whose custom field with internal name `tradeType` is either `offer` or `search`, and whose `extraDate` is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `customValues=extraDate:|2001-12-31`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "keywords", + "in": "query", + "required": false, + "description": "Textual search keywords. Sometimes, like in user search, the fields matched depends on what is configured on the products.", + "schema": { + "type": "string" + } + }, + { + "name": "orderBy", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/ContactOrderByEnum" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number (zero-based) of the search. The default value is zero.", + "schema": { + "type": "integer" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", + "schema": { + "type": "integer" + } + }, + { + "name": "skipTotalCount", + "in": "query", + "required": false, + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", + "schema": { + "type": "boolean" + } + }, + { + "name": "usersToExclude", + "in": "query", + "required": false, + "description": "Indicated the users to be excluded from the result", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + } + ], + "tags": [ + "Contacts" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "responses": { + "200": { + "description": "The contacts of the given owner that match the criteria", + "headers": { + "X-Total-Count": { + "schema": { + "type": "integer" + }, + "description": "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." + }, + "X-Page-Size": { + "schema": { + "type": "integer" + }, + "description": "The maximum number of results per page" + }, + "X-Current-Page": { + "schema": { + "type": "integer" + }, + "description": "The current page the results are in" + }, + "X-Has-Next-Page": { + "schema": { + "type": "boolean" + }, + "description": "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." + } + }, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ContactResult" + } + } + } } - } - } ], - "responses" : { - "204" : { - "description" : "The agreements were accepted" }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - } - }, - "/agreements/optional" : { - "post" : { - "operationId" : "acceptOptionalAgreements", - "summary" : "Saves the optional agreements for the authenticated user.", - "description" : "The optional agreements that are passed in are marked as accepted, and those ommitted are marked as no longer accepted (if they were previously accepted).", - "tags" : [ "Agreements" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "name" : "agreements", - "in" : "query", - "description" : "The identifiers or internal names of the optional agreements which will be accepted.", - "schema" : { - "type" : "array", - "items" : { - "type" : "string" - } + }, + "post": { + "operationId": "createContact", + "summary": "Creates a new contact", + "description": "Creates a new contact for the given owner. The contact user needs to be set in the request body, as well as contact custom fields, if any.", + "parameters": [ + { + "$ref": "#/components/parameters/user" } - } ], - "responses" : { - "204" : { - "description" : "The agreements were accepted / no longer accepted." + ], + "tags": [ + "Contacts" + ], + "responses": { + "201": { + "description": "Returns the identifier of the new contact", + "headers": { + "Location": { + "description": "URL for viewing the contact details", + "schema": { + "type": "string" + } + } + }, + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } + } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } + }, + "requestBody": { + "description": "The contact to be added", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ContactNew" + } + } + } } } }, - "/agreements/{key}/content" : { - "parameters" : [ { - "name" : "key", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - }, - "description" : "Either the agreement identifier or internal name" - } ], - "get" : { - "operationId" : "getAgreementContent", - "summary" : "Returns the content of an agreement", - "description" : "A specific version may be requested. If not, will return the current content", - "tags" : [ "Agreements" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "version", - "in" : "query", - "required" : false, - "schema" : { - "type" : "integer" + "/{user}/contact-list/data-for-search": { + "get": { + "operationId": "getContactListDataForSearch", + "summary": "Returns configuration data used when searching for contacts", + "description": "Returns data for searching a user's contact list, such as the contact custom fields which are set for being used as search filters.", + "parameters": [ + { + "$ref": "#/components/parameters/fields" }, - "description" : "The specific content version to retrieve. When not specified, returns the current version." - } ], - "responses" : { - "200" : { - "description" : "The agreement content", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AgreementContent" + { + "$ref": "#/components/parameters/user" + } + ], + "tags": [ + "Contacts" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "responses": { + "200": { + "description": "The data for searching the contact list", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ContactListDataForSearch" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -16410,82 +17596,99 @@ } } }, - "/{user}/agreements" : { - "parameters" : [ { - "$ref" : "#/components/parameters/user" - } ], - "get" : { - "operationId" : "getUserAgreements", - "summary" : "Returns agreements information for the given user", - "description" : "Can be used by the own user or by managers.", - "tags" : [ "Agreements" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "200" : { - "description" : "The agreements data", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UserAgreementsData" + "/{user}/contact-list/data-for-new": { + "get": { + "operationId": "getContactListDataForNew", + "summary": "Returns configuration data for creating a new contact", + "description": "Returns data, such as a given contact user details and contact custom fields, for creating a new contact. The contact user is optional. If informed, the result will contain additional details about that user.", + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/user" + }, + { + "name": "contactUser", + "required": false, + "in": "query", + "description": "The (optional) user to which will be the contact", + "schema": { + "type": "string" + } + } + ], + "tags": [ + "Contacts" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "responses": { + "200": { + "description": "The data for creating a new contact", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ContactDataForNew" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -16493,89 +17696,90 @@ } } }, - "/{user}/passwords/{type}" : { - "get" : { - "operationId" : "getUserPasswordsData", - "summary" : "Returns complete data of the given password the given user have.", - "description" : "Returns the password status and the permissions on which operations are enabled for a given user.", - "tags" : [ "Passwords" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/user" - }, { - "name" : "type", - "in" : "path", - "required" : true, - "description" : "Either the id or internal name of the password type", - "schema" : { - "type" : "string" + "/contact-list/{id}/data-for-edit": { + "get": { + "operationId": "getContactDataForEdit", + "summary": "Returns data to edit an existing contact", + "description": "Returns configuration data for editing a contact, plus the current `ContactEdit` object that can be altered and sent back", + "tags": [ + "Contacts" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/id" } - } ], - "responses" : { - "200" : { - "description" : "The password details and permissions.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PasswordStatusAndActions" + ], + "responses": { + "200": { + "description": "The data for editing a contact", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ContactDataForEdit" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -16583,339 +17787,289 @@ } } }, - "/{user}/passwords/list-data" : { - "get" : { - "operationId" : "getUserPasswordsListData", - "summary" : "Returns complete data for each passwords the given user have.", - "description" : "Returns the passwords, with their statuses, for a given user. Also, permissions on which operations are enabled are also returned. It is also returned additional data - the confirmation password input, in case some action is needed; and the security question data, in case the security answer is pending. Passwords whose type's `mode` is `script` are never included.", - "tags" : [ "Passwords" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/user" - } ], - "responses" : { - "200" : { - "description" : "The list of password statuses and permissions", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DataForUserPasswords" + "/contact-list/{id}": { + "get": { + "operationId": "viewContact", + "summary": "Returns details of a specific contact", + "description": "Returns information about a contact, located by id", + "tags": [ + "Contacts" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/id" + } + ], + "responses": { + "200": { + "description": "The contact data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ContactView" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - } - }, - "/{user}/passwords" : { - "get" : { - "operationId" : "listUserPasswords", - "summary" : "Returns the status for each passwords the given user have.", - "description" : "Returns the passwords, with their statuses, for a given user. Passwords whose type's `mode` is `script` are never included.", - "tags" : [ "Passwords" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/user" - } ], - "responses" : { - "200" : { - "description" : "The list of password statuses and permissions", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PasswordStatusAndType" - } - } - } - } - }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } - } - } + }, + "put": { + "operationId": "updateContact", + "summary": "Updates an existing contact", + "description": "Updates an existing contact", + "tags": [ + "Contacts" + ], + "security": [ + { + "basic": [] }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" - } - } - } + { + "session": [] }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" - } - } - } + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/id" + } + ], + "responses": { + "204": { + "description": "The contact was updated" }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } - } - } - } - }, - "/{user}/passwords/{type}/change" : { - "post" : { - "operationId" : "changePassword", - "summary" : "Changes a manual password", - "description" : "Changes a manual password of the given user. When the user is changing his own password he needs to pass in the `oldPassword` as well. When an adminitrator / broker is changing the password of a managed user, he/she can optionally force the password change on next login.", - "tags" : [ "Passwords" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/user" - }, { - "name" : "type", - "in" : "path", - "required" : true, - "description" : "Either the id or internal name of the password type", - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "204" : { - "description" : "The password is changed, and nothing is returned" }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } }, - "requestBody" : { - "description" : "The parameters for password change", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ChangePassword" + "requestBody": { + "description": "The contact to be edited", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ContactEdit" } } } } - } - }, - "/passwords/{type}/change-generated" : { - "post" : { - "operationId" : "changeGenerated", - "summary" : "Generates a new value for an active generated password.", - "description" : "Generates a new password whose type's `mode` is `generated`.\n Only the password owner can perform this operation and the password\n status must be `active`.", - "tags" : [ "Passwords" ], - "parameters" : [ { - "$ref" : "#/components/parameters/confirmationPassword" - }, { - "name" : "type", - "in" : "path", - "required" : true, - "description" : "Either the id or internal name of the password type", - "schema" : { - "type" : "string" + }, + "delete": { + "operationId": "deleteContact", + "summary": "Removes a contact", + "description": "Removes a contact", + "tags": [ + "Contacts" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/id" } - } ], - "responses" : { - "200" : { - "description" : "The plain value of the generated password. This is the only time this plain value is ever returned.", - "content" : { - "text/plain" : { - "schema" : { - "type" : "string" + ], + "responses": { + "204": { + "description": "The contact was deleted" + }, + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -16923,78 +18077,90 @@ } } }, - "/passwords/{type}/generate" : { - "post" : { - "operationId" : "generatePassword", - "summary" : "Generates the value of a generated password for the first time or if expired.", - "description" : "Generates the value of a password whose type's `mode` is `generated`. Only the password owner can perform this operation, and only in one of these conditions:\n\n- If the password `status` is `neverCreated` it\n can only be generated if the password doesn't require the administrator\n authorization to generate. This can be configured in the password type.\n\n- The password can be generated if its `status` is one of the\n following: `pending`,\n `expired` or `reset`.", - "tags" : [ "Passwords" ], - "parameters" : [ { - "name" : "type", - "in" : "path", - "required" : true, - "description" : "Either the id or internal name of the password type", - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "The plain value of the generated password. This is the only time this plain value is ever returned.", - "content" : { - "text/plain" : { - "schema" : { - "type" : "string" + "/agreements/pending": { + "get": { + "operationId": "listPendingAgreements", + "summary": "Returns the agreements the authenticated user needs to accept in order to use the system", + "description": "Returns a list with all agreements the authenticated user is pending to accept. Until accepting the pending agreements, the usage of the system is limited.", + "tags": [ + "Agreements" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The list of agreements, or empty if there are no pending agreements", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Agreement" + } } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -17002,80 +18168,88 @@ } } }, - "/{user}/passwords/{type}/allow-generation" : { - "post" : { - "operationId" : "allowGeneration", - "summary" : "Allows the given user to generate the password for the first time for the given type.", - "description" : "Only valid if type's mode is `generated`, it's marked as requiring administrator authorization and the password status is `neverCreated`.", - "tags" : [ "Passwords" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/userNoSelf" - }, { - "name" : "type", - "in" : "path", - "required" : true, - "description" : "Either the id or internal name of the password type", - "schema" : { - "type" : "string" + "/agreements/accept": { + "post": { + "operationId": "acceptPendingAgreement", + "summary": "Accept one or more agreements", + "description": "Accept all the given agreements", + "tags": [ + "Agreements" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "name": "agreements", + "in": "query", + "description": "The identifiers or internal names of the agreements to be accepted", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } } - } ], - "responses" : { - "204" : { - "description" : "The password is pending and nothing is returned." + ], + "responses": { + "204": { + "description": "The agreements were accepted" }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -17083,80 +18257,88 @@ } } }, - "/{user}/passwords/{type}/reset-generated" : { - "post" : { - "operationId" : "resetGeneratedPassword", - "summary" : "Resets a generated password, allowing it to be generated again", - "description" : "Resets a generated password. This can only be done by administrators / brokers over managed users, and allow them to generate the password value again.", - "tags" : [ "Passwords" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/userNoSelf" - }, { - "name" : "type", - "in" : "path", - "required" : true, - "description" : "Either the id or internal name of the password type", - "schema" : { - "type" : "string" + "/agreements/optional": { + "post": { + "operationId": "acceptOptionalAgreements", + "summary": "Saves the optional agreements for the authenticated user.", + "description": "The optional agreements that are passed in are marked as accepted, and those ommitted are marked as no longer accepted (if they were previously accepted).", + "tags": [ + "Agreements" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] } - } ], - "responses" : { - "204" : { - "description" : "The password is reset, and nothing is returned" + ], + "parameters": [ + { + "name": "agreements", + "in": "query", + "description": "The identifiers or internal names of the optional agreements which will be accepted.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "204": { + "description": "The agreements were accepted / no longer accepted." }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -17164,91 +18346,96 @@ } } }, - "/{user}/passwords/{type}/reset-and-send" : { - "post" : { - "operationId" : "resetAndSendPassword", - "summary" : "Generates a new value for a manual password and send it to the user via e-mail", - "description" : "Resets a manual password to a generated value and send it to the user.\n Can also be used to reset and send the main channel's access password if\n it is generated. The new password is initially expired, so the user\nneeds\n to change it on first login.", - "tags" : [ "Passwords" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/userNoSelf" - }, { - "name" : "type", - "in" : "path", - "required" : true, - "description" : "Either the id or internal name of the password type", - "schema" : { - "type" : "string" + "/agreements/{key}/content": { + "parameters": [ + { + "name": "key", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Either the agreement identifier or internal name" + } + ], + "get": { + "operationId": "getAgreementContent", + "summary": "Returns the content of an agreement", + "description": "A specific version may be requested. If not, will return the current content", + "tags": [ + "Agreements" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "version", + "in": "query", + "required": false, + "schema": { + "type": "integer" + }, + "description": "The specific content version to retrieve. When not specified, returns the current version." } - }, { - "name" : "sendMediums", - "in" : "query", - "required" : false, - "description" : "The send mediums for which the password will be send. If nothing is specified will send though all available mediums.", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/SendMediumEnum" + ], + "responses": { + "200": { + "description": "The agreement content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgreementContent" + } + } } - } - } ], - "responses" : { - "204" : { - "description" : "The password is reset and sent, and nothing is returned" }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -17256,80 +18443,92 @@ } } }, - "/{user}/passwords/{type}/disable" : { - "post" : { - "operationId" : "disablePassword", - "summary" : "Disables a password, making it unusable until manually re-enabled", - "description" : "Disables a password. It cannot be used again until enabled again.", - "tags" : [ "Passwords" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/user" - }, { - "name" : "type", - "in" : "path", - "required" : true, - "description" : "Either the id or internal name of the password type", - "schema" : { - "type" : "string" + "/{user}/agreements": { + "parameters": [ + { + "$ref": "#/components/parameters/user" + } + ], + "get": { + "operationId": "getUserAgreements", + "summary": "Returns agreements information for the given user", + "description": "Can be used by the own user or by managers.", + "tags": [ + "Agreements" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] } - } ], - "responses" : { - "204" : { - "description" : "The password is disabled, and nothing is returned" + ], + "responses": { + "200": { + "description": "The agreements data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserAgreementsData" + } + } + } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -17337,80 +18536,99 @@ } } }, - "/{user}/passwords/{type}/enable" : { - "post" : { - "operationId" : "enablePassword", - "summary" : "Re-enables a disabled a password", - "description" : "Re-enables a password that was previously disabled.", - "tags" : [ "Passwords" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/user" - }, { - "name" : "type", - "in" : "path", - "required" : true, - "description" : "Either the id or internal name of the password type", - "schema" : { - "type" : "string" + "/{user}/passwords/{type}": { + "get": { + "operationId": "getUserPasswordsData", + "summary": "Returns complete data of the given password the given user have.", + "description": "Returns the password status and the permissions on which operations are enabled for a given user.", + "tags": [ + "Passwords" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/user" + }, + { + "name": "type", + "in": "path", + "required": true, + "description": "Either the id or internal name of the password type", + "schema": { + "type": "string" + } } - } ], - "responses" : { - "204" : { - "description" : "The password is re-enabled, and nothing is returned" + ], + "responses": { + "200": { + "description": "The password details and permissions.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PasswordStatusAndActions" + } + } + } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -17418,80 +18636,90 @@ } } }, - "/{user}/passwords/{type}/unblock" : { - "post" : { - "operationId" : "unblockPassword", - "summary" : "Unblocks a password that has been blocked by exceeding the wrong tries", - "description" : "The password is unblocked if its status is either `temporarilyBlocked` or `indefinitelyBlocked`.", - "tags" : [ "Passwords" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/user" - }, { - "name" : "type", - "in" : "path", - "required" : true, - "description" : "Either the id or internal name of the password type", - "schema" : { - "type" : "string" + "/{user}/passwords/list-data": { + "get": { + "operationId": "getUserPasswordsListData", + "summary": "Returns complete data for each passwords the given user have.", + "description": "Returns the passwords, with their statuses, for a given user. Also, permissions on which operations are enabled are also returned. It is also returned additional data - the confirmation password input, in case some action is needed; and the security question data, in case the security answer is pending. Passwords whose type's `mode` is `script` are never included.", + "tags": [ + "Passwords" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] } - } ], - "responses" : { - "204" : { - "description" : "The password is unblocked, and nothing is returned" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/user" + } + ], + "responses": { + "200": { + "description": "The list of password statuses and permissions", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DataForUserPasswords" + } + } + } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -17499,79 +18727,93 @@ } } }, - "/security-answer" : { - "post" : { - "operationId" : "setSecurityAnswer", - "summary" : "Sets the security answer if the current authenticated user", - "description" : "The security question can be enabled in the configuration, and is used on the forgot password process. This method only works if the security answer is pending and enabled. If the user wants to change the security answer, first an admin must remove the current answer via `DELETE /{user}/security-answer`.", - "tags" : [ "Passwords" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "requestBody" : { - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SetSecurityAnswer" + "/{user}/passwords": { + "get": { + "operationId": "listUserPasswords", + "summary": "Returns the status for each passwords the given user have.", + "description": "Returns the passwords, with their statuses, for a given user. Passwords whose type's `mode` is `script` are never included.", + "tags": [ + "Passwords" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/user" + } + ], + "responses": { + "200": { + "description": "The list of password statuses and permissions", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PasswordStatusAndType" + } + } } } - } - }, - "responses" : { - "204" : { - "description" : "The security answer is set and nothing is returned." }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -17579,167 +18821,186 @@ } } }, - "/{user}/security-answer" : { - "delete" : { - "operationId" : "resetUserSecurityAnswer", - "summary" : "Resets a user security answer, allowing they to change it", - "description" : "This operation must be performed as a manager of the user. It resets the current security answer, allowing the user to set a new one.", - "tags" : [ "Passwords" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/userNoSelf" - } ], - "responses" : { - "204" : { - "description" : "The security answer is reset and nothing is returned." + "/{user}/passwords/{type}/change": { + "post": { + "operationId": "changePassword", + "summary": "Changes a manual password", + "description": "Changes a manual password of the given user. When the user is changing his own password he needs to pass in the `oldPassword` as well. When an adminitrator / broker is changing the password of a managed user, he/she can optionally force the password change on next login.", + "tags": [ + "Passwords" + ], + "security": [ + { + "basic": [] }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" - } - } + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/user" + }, + { + "name": "type", + "in": "path", + "required": true, + "description": "Either the id or internal name of the password type", + "schema": { + "type": "string" } + } + ], + "responses": { + "204": { + "description": "The password is changed, and nothing is returned" }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } + }, + "requestBody": { + "description": "The parameters for password change", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangePassword" + } + } + } } } }, - "/{user}/devices" : { - "get" : { - "operationId" : "listDevices", - "summary" : "Returns the list of trusted devices for a user.", - "description" : "The returned list includes those pending by activation and the already active devices the given user has. Only allowed if the authenticated user is the same as the user parameter or is an administrator / broker with permissions.", - "tags" : [ "Devices" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/user" - } ], - "responses" : { - "200" : { - "description" : "The list of devices the user has.", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Device" - } + "/passwords/{type}/change-generated": { + "post": { + "operationId": "changeGenerated", + "summary": "Generates a new value for an active generated password.", + "description": "Generates a new password whose type's `mode` is `generated`.\n Only the password owner can perform this operation and the password\n status must be `active`.", + "tags": [ + "Passwords" + ], + "parameters": [ + { + "$ref": "#/components/parameters/confirmationPassword" + }, + { + "name": "type", + "in": "path", + "required": true, + "description": "Either the id or internal name of the password type", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The plain value of the generated password. This is the only time this plain value is ever returned.", + "content": { + "text/plain": { + "schema": { + "type": "string" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -17747,79 +19008,82 @@ } } }, - "/devices/data-for-send" : { - "get" : { - "operationId" : "getDeviceDataForSend", - "summary" : "Returns data for send / resend an activation code.", - "description" : "Returns data required to send or resend the activation code for the authenticated user.", - "tags" : [ "Devices" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "Return the data for send a confirmation code.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DeviceDataForSend" + "/passwords/{type}/generate": { + "post": { + "operationId": "generatePassword", + "summary": "Generates the value of a generated password for the first time or if expired.", + "description": "Generates the value of a password whose type's `mode` is `generated`. Only the password owner can perform this operation, and only in one of these conditions:\n\n- If the password `status` is `neverCreated` it\n can only be generated if the password doesn't require the administrator\n authorization to generate. This can be configured in the password type.\n\n- The password can be generated if its `status` is one of the\n following: `pending`,\n `expired` or `reset`.", + "tags": [ + "Passwords" + ], + "parameters": [ + { + "name": "type", + "in": "path", + "required": true, + "description": "Either the id or internal name of the password type", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The plain value of the generated password. This is the only time this plain value is ever returned.", + "content": { + "text/plain": { + "schema": { + "type": "string" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -17827,380 +19091,371 @@ } } }, - "/devices/send-activation-code" : { - "post" : { - "operationId" : "sendDeviceActivationCode", - "summary" : "Sends a new device activation code.", - "description" : "Creates a new pending-by-activation device for the authenticated user and sends the activation code through a given medium.", - "tags" : [ "Devices" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ ], - "responses" : { - "200" : { - "description" : "The code was sent to the user. The resultant device name and the e-mail or the normalized mobile phone number that received the code is returned.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SendActivationCodeResult" - } - } - } + "/{user}/passwords/{type}/allow-generation": { + "post": { + "operationId": "allowGeneration", + "summary": "Allows the given user to generate the password for the first time for the given type.", + "description": "Only valid if type's mode is `generated`, it's marked as requiring administrator authorization and the password status is `neverCreated`.", + "tags": [ + "Passwords" + ], + "security": [ + { + "basic": [] }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } - } + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/userNoSelf" + }, + { + "name": "type", + "in": "path", + "required": true, + "description": "Either the id or internal name of the password type", + "schema": { + "type": "string" } + } + ], + "responses": { + "204": { + "description": "The password is pending and nothing is returned." }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - }, - "requestBody" : { - "description" : "The parameters for requesting a device activation.", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SendActivationCodeRequest" - } - } - } } } }, - "/devices/{id}/resend-activation-code" : { - "post" : { - "operationId" : "resendDeviceActivationCode", - "summary" : "Resends the activation code for the given pending device.", - "description" : "Resends the same activation code for the pending device for the authenticated user through a given medium.", - "tags" : [ "Devices" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/id" - } ], - "responses" : { - "200" : { - "description" : "The code was resent to the user. The resultant device name and the e-mail or the normalized mobile phone number that received the code is returned.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SendActivationCodeResult" - } - } - } + "/{user}/passwords/{type}/reset-generated": { + "post": { + "operationId": "resetGeneratedPassword", + "summary": "Resets a generated password, allowing it to be generated again", + "description": "Resets a generated password. This can only be done by administrators / brokers over managed users, and allow them to generate the password value again.", + "tags": [ + "Passwords" + ], + "security": [ + { + "basic": [] }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } - } + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/userNoSelf" + }, + { + "name": "type", + "in": "path", + "required": true, + "description": "Either the id or internal name of the password type", + "schema": { + "type": "string" } + } + ], + "responses": { + "204": { + "description": "The password is reset, and nothing is returned" }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - }, - "requestBody" : { - "description" : "The parameters for resending a device activation code.", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ResendActivationCodeRequest" - } - } - } } } }, - "/devices/activate" : { - "post" : { - "operationId" : "deviceActivation", - "summary" : "Activates a device by code.", - "description" : "Activates a trusted device by code for the authenticated user.", - "tags" : [ "Devices" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ ], - "responses" : { - "200" : { - "description" : "Successful activation.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DeviceActivationResult" - } - } + "/{user}/passwords/{type}/reset-and-send": { + "post": { + "operationId": "resetAndSendPassword", + "summary": "Generates a new value for a manual password and send it to the user via e-mail", + "description": "Resets a manual password to a generated value and send it to the user.\n Can also be used to reset and send the main channel's access password if\n it is generated. The new password is initially expired, so the user\nneeds\n to change it on first login.", + "tags": [ + "Passwords" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/userNoSelf" + }, + { + "name": "type", + "in": "path", + "required": true, + "description": "Either the id or internal name of the password type", + "schema": { + "type": "string" } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } + { + "name": "sendMediums", + "in": "query", + "required": false, + "description": "The send mediums for which the password will be send. If nothing is specified will send though all available mediums.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SendMediumEnum" } } + } + ], + "responses": { + "204": { + "description": "The password is reset and sent, and nothing is returned" }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - }, - "requestBody" : { - "description" : "The parameters for activating a device.", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DeviceActivation" - } - } - } } } }, - "/devices/{id}/data-for-edit" : { - "get" : { - "operationId" : "getDeviceDataForEdit", - "summary" : "Returns data to edit an existing device.", - "description" : "Returns configuration data for editing a device, plus the current `DeviceEdit` object that can be altered and sent back.", - "tags" : [ "Devices" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/id" - } ], - "responses" : { - "200" : { - "description" : "The data for editing a device", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DeviceDataForEdit" - } - } + "/{user}/passwords/{type}/disable": { + "post": { + "operationId": "disablePassword", + "summary": "Disables a password, making it unusable until manually re-enabled", + "description": "Disables a password. It cannot be used again until enabled again.", + "tags": [ + "Passwords" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/user" + }, + { + "name": "type", + "in": "path", + "required": true, + "description": "Either the id or internal name of the password type", + "schema": { + "type": "string" } + } + ], + "responses": { + "204": { + "description": "The password is disabled, and nothing is returned" }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -18208,81 +19463,89 @@ } } }, - "/devices/{id}/password-for-remove" : { - "get" : { - "operationId" : "getPasswordInputForRemoveDevice", - "summary" : "Returns a confirmation `PasswordInput` for removing a device, if any", - "description" : "If a confirmation password is required to remove a device, clients should invoke this operation prior to effectively removing the device, which will return the data regarding the confirmation password.", - "tags" : [ "Devices" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/id" - } ], - "responses" : { - "200" : { - "description" : "The confirmation password input, or null", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PasswordInput" - } - } + "/{user}/passwords/{type}/enable": { + "post": { + "operationId": "enablePassword", + "summary": "Re-enables a disabled a password", + "description": "Re-enables a password that was previously disabled.", + "tags": [ + "Passwords" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/user" + }, + { + "name": "type", + "in": "path", + "required": true, + "description": "Either the id or internal name of the password type", + "schema": { + "type": "string" } + } + ], + "responses": { + "204": { + "description": "The password is re-enabled, and nothing is returned" }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -18290,186 +19553,175 @@ } } }, - "/devices/{id}" : { - "put" : { - "operationId" : "updateDevice", - "summary" : "Updates a device.", - "description" : "Updates a device. The device's owner and administrators / brokers with permissions can update a device. In case a PIN was already defined for the device then it's name will be updated too.", - "tags" : [ "Devices" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/id" - } ], - "responses" : { - "204" : { - "description" : "The device was updated." + "/{user}/passwords/{type}/unblock": { + "post": { + "operationId": "unblockPassword", + "summary": "Unblocks a password that has been blocked by exceeding the wrong tries", + "description": "The password is unblocked if its status is either `temporarilyBlocked` or `indefinitelyBlocked`.", + "tags": [ + "Passwords" + ], + "security": [ + { + "basic": [] }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" - } - } - } + { + "session": [] }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } - } + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/user" + }, + { + "name": "type", + "in": "path", + "required": true, + "description": "Either the id or internal name of the password type", + "schema": { + "type": "string" } + } + ], + "responses": { + "204": { + "description": "The password is unblocked, and nothing is returned" }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - }, - "requestBody" : { - "description" : "The parameters for saving a device.", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DeviceEdit" - } - } - } } - }, - "delete" : { - "operationId" : "deleteDevice", - "summary" : "Removes a device.", - "description" : "Removes a device. The device's owner and administrators / brokers with permissions can remove a device.", - "tags" : [ "Devices" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/id" - }, { - "$ref" : "#/components/parameters/confirmationPassword" - } ], - "responses" : { - "204" : { - "description" : "The device was removed." - }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" - } + } + }, + "/security-answer": { + "post": { + "operationId": "setSecurityAnswer", + "summary": "Sets the security answer if the current authenticated user", + "description": "The security question can be enabled in the configuration, and is used on the forgot password process. This method only works if the security answer is pending and enabled. If the user wants to change the security answer, first an admin must remove the current answer via `DELETE /{user}/security-answer`.", + "tags": [ + "Passwords" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetSecurityAnswer" } } + } + }, + "responses": { + "204": { + "description": "The security answer is set and nothing is returned." }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -18477,78 +19729,90 @@ } } }, - "/device-confirmations/data-for-approval" : { - "get" : { - "operationId" : "dataForDeviceConfirmationApproval", - "summary" : "Return data for approve / reject device confirmations.", - "description" : "Can be invoked by guests to know if authentication is required for approve / reject pending device confirmations.", - "tags" : [ "DeviceConfirmations" ], - "parameters" : [ { - "name" : "deviceId", - "in" : "query", - "required" : true, - "description" : "The id of the device used to confirm operations.", - "schema" : { - "type" : "string" + "/{user}/security-answer": { + "delete": { + "operationId": "resetUserSecurityAnswer", + "summary": "Resets a user security answer, allowing they to change it", + "description": "This operation must be performed as a manager of the user. It resets the current security answer, allowing the user to set a new one.", + "tags": [ + "Passwords" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] } - } ], - "responses" : { - "200" : { - "description" : "The data for approval.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DataForDeviceConfirmationApproval" + ], + "parameters": [ + { + "$ref": "#/components/parameters/userNoSelf" + } + ], + "responses": { + "204": { + "description": "The security answer is reset and nothing is returned." + }, + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -18556,600 +19820,700 @@ } } }, - "/device-confirmations" : { - "post" : { - "operationId" : "createDeviceConfirmation", - "summary" : "Creates a pending device confirmation for the authenticated user.", - "description" : "Creates a device confirmation for an operation that must be confirmed. The confirmation will have a QR code that can be read (e.g with the Mobile App) to be approved / rejected by the device owner.", - "tags" : [ "DeviceConfirmations" ], - "parameters" : [ ], - "responses" : { - "201" : { - "description" : "Returns the identifier of the new confirmation.", - "headers" : { - "Location" : { - "description" : "URL for viewing the confirmation details", - "schema" : { - "type" : "string" - } - } - }, - "content" : { - "text/plain" : { - "schema" : { - "type" : "string" - } - } - } - }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "/{user}/devices": { + "get": { + "operationId": "listDevices", + "summary": "Returns the list of trusted devices for a user.", + "description": "The returned list includes those pending by activation and the already active devices the given user has. Only allowed if the authenticated user is the same as the user parameter or is an administrator / broker with permissions.", + "tags": [ + "Devices" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/user" + } + ], + "responses": { + "200": { + "description": "The list of devices the user has.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Device" + } } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - }, - "requestBody" : { - "description" : "The parameters for creating the confirmation.", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/CreateDeviceConfirmation" - } - } - } } } }, - "/device-confirmations/{id}" : { - "get" : { - "operationId" : "viewDeviceConfirmation", - "summary" : "Shows the details of a device confirmation for the authenticated user.", - "description" : "Shows the details of a device confirmation for the authenticated user.", - "tags" : [ "DeviceConfirmations" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/id" - } ], - "responses" : { - "200" : { - "description" : "The device confirmation details.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DeviceConfirmationView" + "/devices/data-for-send": { + "get": { + "operationId": "getDeviceDataForSend", + "summary": "Returns data for send / resend an activation code.", + "description": "Returns data required to send or resend the activation code for the authenticated user.", + "tags": [ + "Devices" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "Return the data for send a confirmation code.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DataForSendingOtp" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - }, - "delete" : { - "operationId" : "deleteDeviceConfirmation", - "summary" : "Deletes a device confirmation for the authenticated user.", - "description" : "Deletes a device confirmation for the authenticated user.", - "tags" : [ "DeviceConfirmations" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/id" - } ], - "responses" : { - "204" : { - "description" : "The device confirmation was removed." + } + }, + "/devices/send-activation-code": { + "post": { + "operationId": "sendDeviceActivationCode", + "summary": "Sends a new device activation code.", + "description": "Creates a new pending-by-activation device for the authenticated user and sends the activation code through a given medium.", + "tags": [ + "Devices" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [], + "responses": { + "200": { + "description": "The code was sent to the user. The resultant device name and the e-mail or the normalized mobile phone number that received the code is returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SendActivationCodeResult" + } + } + } }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } + }, + "requestBody": { + "description": "The parameters for requesting a device activation.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SendActivationCodeRequest" + } + } + } } } }, - "/device-confirmations/{id}/approve" : { - "post" : { - "operationId" : "approveDeviceConfirmation", - "summary" : "Approves a pending device confirmation.", - "description" : "Approves a pending confirmation with a device only if not already approved / rejected. This operation can be executed as guest or as a logged user, if guest, the final user used to approve will be the device owner. For successful approval, the user who creates the confirmation (for a pending operation in other channel) must be the same as the user who owns the device. Moreover, to ensure the user is approving the same operation he previously requested, a HMAC-SHA256 must be calculated for the QR code using a secret key only valid for the device being used to confirm. Finally, when the operation requiring confirmation is executed, Cyclos will recalculate the QR code from the operation actual parameters and it must match the QR of the confirmation.", - "tags" : [ "DeviceConfirmations" ], - "parameters" : [ { - "$ref" : "#/components/parameters/id" - } ], - "responses" : { - "204" : { - "description" : "The confirmation was approved." + "/devices/{id}/resend-activation-code": { + "post": { + "operationId": "resendDeviceActivationCode", + "summary": "Resends the activation code for the given pending device.", + "description": "Resends the same activation code for the pending device for the authenticated user through a given medium.", + "tags": [ + "Devices" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/id" + } + ], + "responses": { + "200": { + "description": "The code was resent to the user. The resultant device name and the e-mail or the normalized mobile phone number that received the code is returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SendActivationCodeResult" + } + } + } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } }, - "requestBody" : { - "description" : "The parameters for approving the confirmation.", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DeviceConfirmationActionParams" + "requestBody": { + "description": "The parameters for resending a device activation code.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SendOtpWithId" } } } } } }, - "/device-confirmations/{id}/reject" : { - "post" : { - "operationId" : "rejectDeviceConfirmation", - "summary" : "Rejects a pending device confirmation.", - "description" : "Rejects a confirmation with a device only if not already approved / rejected. This operation can be executed as guest or as a logged user, if guest, the final user used to reject will be the device owner. For successful rejection, the user who creates the confirmation (for a pending operation in other channel) must be the same as the user who owns the device. Moreover, to ensure the user is rejecting the same operation he previously requested, a HMAC-SHA256 must be calculated for the QR code using a secret key only valid for the device being used to reject.", - "tags" : [ "DeviceConfirmations" ], - "parameters" : [ { - "$ref" : "#/components/parameters/id" - } ], - "responses" : { - "204" : { - "description" : "The confirmation was rejected." + "/devices/activate": { + "post": { + "operationId": "deviceActivation", + "summary": "Activates a device by code.", + "description": "Activates a trusted device by code for the authenticated user.", + "tags": [ + "Devices" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [], + "responses": { + "200": { + "description": "Successful activation.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceActivationResult" + } + } + } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } }, - "requestBody" : { - "description" : "The parameters for approving the confirmation.", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DeviceConfirmationActionParams" + "requestBody": { + "description": "The parameters for activating a device.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceActivation" } } } } } }, - "/device-confirmations/{id}/qr-code" : { - "get" : { - "operationId" : "getDeviceConfirmationQrCode", - "summary" : "Returns the QR-code image for the given confirmation only if not already approved / rejected.", - "description" : "Returns the QR-code image for the given confirmation only if not already approved / rejected. The QR content is a URL of the form: cyclos://confirmation?id=confirmation_id&description=i18n_confirmation_type&fields=Label1:Value1|Label2:Value2... This request will return the image contents as expected but our api documentation page (or any other usage of an <img> tag), created using swagger-ui, generates a second request to include the image in the page. This new (GET) request won't send the authentication parameters and as this path requires authentication the image will be shown as broken. Optionally, to solve the problem described above and to allow authenticate the user when using sessions, a `sessionToken` or `accessClientToken` query parameter could be specified.", - "tags" : [ "DeviceConfirmations" ], - "parameters" : [ { - "$ref" : "#/components/parameters/id" - }, { - "name" : "size", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/ImageSizeEnum" + "/devices/activate-if-possible": { + "post": { + "operationId": "deviceActivationIfPossible", + "summary": "Activates a device without requiring a code if the email was already verified.", + "description": "If the user has been registered from the same device that is being activated and the email was verified (i.e the email validation was is required for public registrations), then the device will be activated as trusted without the need for an activation code. In such a case, this method will return an object containing only a `DeviceActivationResult`. Otherwise, this operation works exactly in the same way as `/devices/data-for-send` returning an object with only a `DataForSendingOtp`.", + "tags": [ + "Devices" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] } - } ], - "responses" : { - "200" : { - "description" : "The image content.", - "content" : { - "image/png" : { - "schema" : { - "type" : "string", - "format" : "binary" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "Successful activation or return the data for send a confirmation code.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceActivationInfo" + } + } + } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } + }, + "requestBody": { + "description": "The parameters for requesting the device activation.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ActivationRequest" + } + } + } } } }, - "/{user}/device-pins" : { - "get" : { - "operationId" : "listDevicePins", - "summary" : "Returns the list of device PIN for a user.", - "description" : "Returns the list of device PIN for a user. Only allowed if the authenticated user is the same as the user parameter or is an administrator / broker with permissions.", - "tags" : [ "DevicePins" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/user" - } ], - "responses" : { - "200" : { - "description" : "The list of device PIN the user has.", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/DevicePin" - } + "/devices/{id}/data-for-edit": { + "get": { + "operationId": "getDeviceDataForEdit", + "summary": "Returns data to edit an existing device.", + "description": "Returns configuration data for editing a device, plus the current `DeviceEdit` object that can be altered and sent back.", + "tags": [ + "Devices" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/id" + } + ], + "responses": { + "200": { + "description": "The data for editing a device", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceDataForEdit" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -19157,98 +20521,90 @@ } } }, - "/device-pins/validate" : { - "get" : { - "operationId" : "validateDevicePinValue", - "summary" : "Validates a value to be used as a pin.", - "description" : "Validates if a value can be used as a pin for the authenticated user. It checks for obvious values, value's length, etc. using the configuration for the current channel. If the value is a valid one then a `204 No Content` status code is returned. Otherwise, if the value is invalid, a `200 OK` will be returned with an `InputError` with code `validation` as the payload. This error will contains only `generalErrors` (if any), `properties` (containing only the `pin` property) and `propertyErrors` (containing all errors for the `pin` property). Please note that a `422 Unprocessable Entity` status will be returned if the given value is empty or the pin is not enabled for the current channel. To know if the pin is enabled or not you could check for the `DataForLogin.passwordInput.pinAvailability` enum.", - "tags" : [ "DevicePins" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "name" : "value", - "required" : true, - "in" : "query", - "description" : "The value to be validated", - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "The validation error if the value is invalid. The returned data contains the validation error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" - } - } - } + "/devices/{id}/password-for-remove": { + "get": { + "operationId": "getPasswordInputForRemoveDevice", + "summary": "Returns a confirmation `PasswordInput` for removing a device, if any", + "description": "If a confirmation password is required to remove a device, clients should invoke this operation prior to effectively removing the device, which will return the data regarding the confirmation password.", + "tags": [ + "Devices" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] }, - "204" : { - "description" : "The value is valid to be used as a pin. No content is returned." + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + { + "$ref": "#/components/parameters/id" + } + ], + "responses": { + "200": { + "description": "The confirmation password input, or null", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PasswordInput" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -19256,186 +20612,203 @@ } } }, - "/device-pins" : { - "post" : { - "operationId" : "setDevicePin", - "summary" : "Creates a new PIN or modify the current existing one.", - "description" : "Creates a new PIN for the authenticated user. If authenticating with a PIN then changes its value and returns nothing.", - "tags" : [ "DevicePins" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ ], - "responses" : { - "200" : { - "description" : "The pin was successfully created.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/CreateDevicePinResult" + "/devices/{id}": { + "put": { + "operationId": "updateDevice", + "summary": "Updates a device.", + "description": "Updates a device. The device's owner and administrators / brokers with permissions can update a device. In case a PIN was already defined for the device then it's name will be updated too.", + "tags": [ + "Devices" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/id" + } + ], + "responses": { + "204": { + "description": "The device was updated." + }, + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } }, - "requestBody" : { - "description" : "The parameters for creating the PIN.", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/CreateDevicePin" + "requestBody": { + "description": "The parameters for saving a device.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceEdit" } } } } - } - }, - "/device-pins/{key}/data-for-edit" : { - "get" : { - "operationId" : "getDevicePinDataForEdit", - "summary" : "Returns data for editing the PIN name.", - "description" : "Returns configuration data for editing the PIN name, plus the current `DevicePinEdit` object that can be altered and sent back to change the name.", - "tags" : [ "DevicePins" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "key", - "description" : "The principal or id of the device PIN.", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" + }, + "delete": { + "operationId": "deleteDevice", + "summary": "Removes a device.", + "description": "Removes a device. The device's owner and administrators / brokers with permissions can remove a device.", + "tags": [ + "Devices" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] } - } ], - "responses" : { - "200" : { - "description" : "The data for editing a device PIN", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DevicePinDataForEdit" + ], + "parameters": [ + { + "$ref": "#/components/parameters/id" + }, + { + "$ref": "#/components/parameters/confirmationPassword" + } + ], + "responses": { + "204": { + "description": "The device was removed." + }, + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -19443,79 +20816,82 @@ } } }, - "/device-pins/password-for-create" : { - "get" : { - "operationId" : "getPasswordInputForCreatePin", - "summary" : "Returns a `PasswordInput` for create a device pin.", - "description" : "Returns a `PasswordInput` for create a device pin for the authenticated user. In case of updating its value please use `GET /device-pins/{key}` that already include a `PasswordInput`. If the pin is created in the next 6 minutes after a successful login then the action can be confirmed with the `pinCreationToken` included in the login's result (`LoginAuth`, `POST /auth/session`) or the login password. This operation can be invoked only if the pin is enabled (check for `DataForLogin.passwordInput.pinAvailability`)", - "tags" : [ "DevicePins" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The `PasswordInput` used to create the pin.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PasswordInput" + "/device-confirmations/data-for-approval": { + "get": { + "operationId": "dataForDeviceConfirmationApproval", + "summary": "Return data for approve / reject device confirmations.", + "description": "Can be invoked by guests to know if authentication is required for approve / reject pending device confirmations.", + "tags": [ + "DeviceConfirmations" + ], + "parameters": [ + { + "name": "deviceId", + "in": "query", + "required": true, + "description": "The id of the device used to confirm operations.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The data for approval.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DataForDeviceConfirmationApproval" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -19523,1663 +20899,747 @@ } } }, - "/device-pins/{key}" : { - "get" : { - "operationId" : "viewDevicePin", - "summary" : "Returns details of a specific device PIN", - "description" : "Returns information about a device PIN by key. The result also includes a `PasswordInput` that can be used to remove or update the pin's value (only for the authenticated user).", - "tags" : [ "DevicePins" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "key", - "description" : "The principal or id of the device PIN.", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "The device PIN data", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DevicePinView" + "/device-confirmations": { + "post": { + "operationId": "createDeviceConfirmation", + "summary": "Creates a pending device confirmation for the authenticated user.", + "description": "Creates a device confirmation for an operation that must be confirmed. The confirmation will have a QR code that can be read (e.g with the Mobile App) to be approved / rejected by the device owner.", + "tags": [ + "DeviceConfirmations" + ], + "parameters": [], + "responses": { + "201": { + "description": "Returns the identifier of the new confirmation.", + "headers": { + "Location": { + "description": "URL for viewing the confirmation details", + "schema": { + "type": "string" } } - } - }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + }, + "content": { + "text/plain": { + "schema": { + "type": "string" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } - } - } - }, - "put" : { - "operationId" : "updateDevicePin", - "summary" : "Updates the device PIN name.", - "description" : "Updates the device PIN name. The device's owner and administrators / brokers with permissions can update a device PIN. In case the device was already activated as trusted then it's name will be updated too.", - "tags" : [ "DevicePins" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "name" : "key", - "description" : "The principal or id of the device PIN.", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "204" : { - "description" : "The device PIN was updated." }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } + } + }, + "requestBody": { + "description": "The parameters for creating the confirmation.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateDeviceConfirmation" + } + } + } + } + } + }, + "/device-confirmations/{id}": { + "get": { + "operationId": "viewDeviceConfirmation", + "summary": "Shows the details of a device confirmation for the authenticated user.", + "description": "Shows the details of a device confirmation for the authenticated user.", + "tags": [ + "DeviceConfirmations" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/id" + } + ], + "responses": { + "200": { + "description": "The device confirmation details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceConfirmationView" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } - } - }, - "requestBody" : { - "description" : "The parameters for saving a device PIN.", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DevicePinEdit" + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } } } } } }, - "delete" : { - "operationId" : "deleteDevicePin", - "summary" : "Removes a device PIN.", - "description" : "Removes a device PIN. The device's owner and administrators / brokers with permissions can remove a device PIN.", - "tags" : [ "DevicePins" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "name" : "key", - "description" : "The principal or id of the device PIN.", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" + "delete": { + "operationId": "deleteDeviceConfirmation", + "summary": "Deletes a device confirmation for the authenticated user.", + "description": "Deletes a device confirmation for the authenticated user.", + "tags": [ + "DeviceConfirmations" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] } - } ], - "responses" : { - "204" : { - "description" : "The device PIN was removed." + ], + "parameters": [ + { + "$ref": "#/components/parameters/id" + } + ], + "responses": { + "204": { + "description": "The device confirmation was removed." }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - }, - "requestBody" : { - "description" : "The parameters for removing a device PIN.", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DevicePinRemoveParams" - } - } - } - } - } - }, - "/{owner}/accounts" : { - "get" : { - "operationId" : "listAccountsByOwner", - "summary" : "Lists accounts of the given owner with their statuses", - "description" : "Lists all visible accounts of the given user, or system accounts if the owner 'system' is used. Each account has status information, like the current balance, avaliable balance and so on. However, the returned data depend on the configuration, in the `Account status indicators` option, which is used to limit the amount of data returned.", - "tags" : [ "Accounts" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/owner" - } ], - "responses" : { - "200" : { - "description" : "The accounts with their statuses.", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/AccountWithStatus" - } + } + } + }, + "/device-confirmations/{id}/approve": { + "post": { + "operationId": "approveDeviceConfirmation", + "summary": "Approves a pending device confirmation.", + "description": "Approves a pending confirmation with a device only if not already approved / rejected. This operation can be executed as guest or as a logged user, if guest, the final user used to approve will be the device owner. For successful approval, the user who creates the confirmation (for a pending operation in other channel) must be the same as the user who owns the device. Moreover, to ensure the user is approving the same operation he previously requested, a HMAC-SHA256 must be calculated for the QR code using a secret key only valid for the device being used to confirm. Finally, when the operation requiring confirmation is executed, Cyclos will recalculate the QR code from the operation actual parameters and it must match the QR of the confirmation.", + "tags": [ + "DeviceConfirmations" + ], + "parameters": [ + { + "$ref": "#/components/parameters/id" + } + ], + "responses": { + "204": { + "description": "The confirmation was approved." + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } + }, + "requestBody": { + "description": "The parameters for approving the confirmation.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceConfirmationActionParams" + } + } + } } } }, - "/{owner}/accounts/list-data" : { - "get" : { - "operationId" : "getOwnerAccountsListData", - "summary" : "Returns data for listing accounts of the given owner with their statuses.", - "description" : "Returns data containing all visible accounts of the given user, or system accounts if the owner 'system' is used, plus additional data related to them. Each account has status information, like the current balance, avaliable balance and so on. However, the returned data depend on the configuration, in the `Account status indicators` option, which is used to limit the amount of data returned.", - "tags" : [ "Accounts" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/owner" - } ], - "responses" : { - "200" : { - "description" : "The data for listing accounts with their statuses.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/OwnerAccountsListData" - } - } - } - }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } - } - } - }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" - } - } - } + "/device-confirmations/{id}/reject": { + "post": { + "operationId": "rejectDeviceConfirmation", + "summary": "Rejects a pending device confirmation.", + "description": "Rejects a confirmation with a device only if not already approved / rejected. This operation can be executed as guest or as a logged user, if guest, the final user used to reject will be the device owner. For successful rejection, the user who creates the confirmation (for a pending operation in other channel) must be the same as the user who owns the device. Moreover, to ensure the user is rejecting the same operation he previously requested, a HMAC-SHA256 must be calculated for the QR code using a secret key only valid for the device being used to reject.", + "tags": [ + "DeviceConfirmations" + ], + "parameters": [ + { + "$ref": "#/components/parameters/id" + } + ], + "responses": { + "204": { + "description": "The confirmation was rejected." }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" - } - } - } - } - } - } - }, - "/{owner}/accounts/{accountType}" : { - "parameters" : [ { - "$ref" : "#/components/parameters/owner" - }, { - "$ref" : "#/components/parameters/accountType" - } ], - "get" : { - "operationId" : "getAccountStatusByOwnerAndType", - "summary" : "Returns the status of an account by owner and type", - "description" : "Returns the account status for a specific account. The account type may be either the identifier or internal name. The status will contain both instant status information, that is, the same fields as `AccountStatus`, plus status that depend on the input parameters, such as those defined in `AccountWithHistoryStatus`. The actual data inside the result depend on the configuration, in the `Account status indicators` option, which is used to limit the amount of data returned.", - "tags" : [ "Accounts" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "accessClients", - "in" : "query", - "required" : false, - "description" : "References to access clients (id or token) used to perform / receive the transfer.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "amountRange", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum amount. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "number" - } - } - }, { - "name" : "brokers", - "in" : "query", - "required" : false, - "description" : "Reference to the broker of users involved in transfers. Is only taken into account if authenticated as administrator.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "by", - "in" : "query", - "required" : false, - "description" : "Reference to the user that was authenticated when the transfer was performed. Is only taken into account if authenticated as administrator.", - "schema" : { - "type" : "string" - } - }, { - "name" : "channels", - "in" : "query", - "required" : false, - "description" : "Reference to the channel used to perform / receive the transfer. Only taken into account if authenticated as administrator.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "chargedBack", - "in" : "query", - "required" : false, - "description" : "When set to either `true` will only return transfers that were charged-back. When set to `false`, will only return transfers that were not charged-back. When left blank will not filter by this creterion.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "customFields", - "in" : "query", - "required" : false, - "description" : "Transaction custom field values used as filters. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by : (colon). For example, `customFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, customFields=field1:valueA|valueB. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `customFields=rank:bronze|silver,documentDate:2000-01-01|2001-12-31` would match results whose custom field with internal name `rank` is either `bronze` or `silver`, and whose `documentDate` is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `customFields=documentDate:|2001-12-31`. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `customFields=dynamic:a|b|c`. However, it is also possible to perform a partial-match search using the dynamic value label. In this case a single value, prefixed or enclosed by single quotes should be used. For example: `customFields=dynamic:'business` or `customFields=dynamic:'business'`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "datePeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum transfer date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "description", - "in" : "query", - "required" : false, - "description" : "The description to search for.", - "schema" : { - "type" : "string" - } - }, { - "name" : "direction", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/TransferDirectionEnum" - } - }, { - "name" : "excludedIds", - "in" : "query", - "required" : false, - "description" : "List of transfers ids to be excluded from the result.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "fromCurrentAccessClient", - "in" : "query", - "required" : false, - "description" : "Flag indicating whether to include only transfers by the current access client.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "groups", - "in" : "query", - "required" : false, - "description" : "Reference to the user group used to perform / receive the transfer. Only taken into account if authenticated as administrator.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "includeGeneratedByAccessClient", - "in" : "query", - "required" : false, - "description" : "Flag indicating whether to include or not the generated transfer. Only valid if there is at least one access client specified. For example if a `ticket` or `paymentRequest` was processed then a new transfer will be generated.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "kinds", - "in" : "query", - "required" : false, - "description" : "The kind of transfers to return", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransferKind" - } - } - }, { - "name" : "page", - "in" : "query", - "required" : false, - "description" : "The page number (zero-based) of the search. The default value is zero.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "pageSize", - "in" : "query", - "required" : false, - "description" : "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "skipTotalCount", - "in" : "query", - "required" : false, - "description" : "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "statuses", - "in" : "query", - "required" : false, - "description" : "Transfer statuses used as search criteria. Each array element should be either the identifier or the status qualified internal name, composed by flow internal name, a dot, and the status internal name. For example, `loan.open` would be a valid internal name.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "transactionNumber", - "in" : "query", - "required" : false, - "description" : "The transaction number of the matching transfer", - "schema" : { - "type" : "string" - } - }, { - "name" : "transferFilters", - "in" : "query", - "required" : false, - "description" : "Reference to the transfer filters, which filters transfers by type. May be either the internal id or qualified transfer filter internal name, in the format `accountType.transferFilter`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "transferTypes", - "in" : "query", - "required" : false, - "description" : "Reference to the transfer types for filter. May be either the internal id or qualified transfer type internal name, in the format `accountType.transferType`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "user", - "in" : "query", - "required" : false, - "description" : "Reference a user that should have either received / performed the transfer.", - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "The account", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AccountWithHistoryStatus" - } - } - } - }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } - }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" - } + } + }, + "requestBody": { + "description": "The parameters for approving the confirmation.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceConfirmationActionParams" } } } } } }, - "/{owner}/accounts/{accountType}/data-for-history" : { - "parameters" : [ { - "$ref" : "#/components/parameters/owner" - }, { - "$ref" : "#/components/parameters/accountType" - } ], - "get" : { - "operationId" : "getAccountHistoryDataByOwnerAndType", - "summary" : "Returns data for searching an account history by owner and type", - "description" : "Returns configuration data for searching entries in a specific account history, as well as status information for that account information.", - "tags" : [ "Accounts" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The data for searching account history", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DataForAccountHistory" + "/device-confirmations/{id}/qr-code": { + "get": { + "operationId": "getDeviceConfirmationQrCode", + "summary": "Returns the QR-code image for the given confirmation only if not already approved / rejected.", + "description": "Returns the QR-code image for the given confirmation only if not already approved / rejected. The QR content is a URL of the form: cyclos://confirmation?id=confirmation_id&description=i18n_confirmation_type&fields=Label1:Value1|Label2:Value2... This request will return the image contents as expected but our api documentation page (or any other usage of an <img> tag), created using swagger-ui, generates a second request to include the image in the page. This new (GET) request won't send the authentication parameters and as this path requires authentication the image will be shown as broken. Optionally, to solve the problem described above and to allow authenticate the user when using sessions, a `sessionToken` or `accessClientToken` query parameter could be specified.", + "tags": [ + "DeviceConfirmations" + ], + "parameters": [ + { + "$ref": "#/components/parameters/id" + }, + { + "name": "size", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/ImageSizeEnum" + } + } + ], + "responses": { + "200": { + "description": "The image content.", + "content": { + "image/png": { + "schema": { + "type": "string", + "format": "binary" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" - } - } - } + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } } } } - }, - "/{owner}/accounts/{accountType}/history" : { - "parameters" : [ { - "$ref" : "#/components/parameters/owner" - }, { - "$ref" : "#/components/parameters/accountType" - } ], - "get" : { - "operationId" : "searchAccountHistory", - "summary" : "Search an account history", - "description" : "Returns a page of account history entries for a specific account, according to the given criteria", - "tags" : [ "Accounts" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "accessClients", - "in" : "query", - "required" : false, - "description" : "References to access clients (id or token) used to perform / receive the transfer.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "amountRange", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum amount. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "number" - } - } - }, { - "name" : "brokers", - "in" : "query", - "required" : false, - "description" : "Reference to the broker of users involved in transfers. Is only taken into account if authenticated as administrator.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "by", - "in" : "query", - "required" : false, - "description" : "Reference to the user that was authenticated when the transfer was performed. Is only taken into account if authenticated as administrator.", - "schema" : { - "type" : "string" - } - }, { - "name" : "channels", - "in" : "query", - "required" : false, - "description" : "Reference to the channel used to perform / receive the transfer. Only taken into account if authenticated as administrator.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "chargedBack", - "in" : "query", - "required" : false, - "description" : "When set to either `true` will only return transfers that were charged-back. When set to `false`, will only return transfers that were not charged-back. When left blank will not filter by this creterion.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "customFields", - "in" : "query", - "required" : false, - "description" : "Transaction custom field values used as filters. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by : (colon). For example, `customFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, customFields=field1:valueA|valueB. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `customFields=rank:bronze|silver,documentDate:2000-01-01|2001-12-31` would match results whose custom field with internal name `rank` is either `bronze` or `silver`, and whose `documentDate` is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `customFields=documentDate:|2001-12-31`. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `customFields=dynamic:a|b|c`. However, it is also possible to perform a partial-match search using the dynamic value label. In this case a single value, prefixed or enclosed by single quotes should be used. For example: `customFields=dynamic:'business` or `customFields=dynamic:'business'`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "datePeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum transfer date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "description", - "in" : "query", - "required" : false, - "description" : "The description to search for.", - "schema" : { - "type" : "string" - } - }, { - "name" : "direction", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/TransferDirectionEnum" - } - }, { - "name" : "excludedIds", - "in" : "query", - "required" : false, - "description" : "List of transfers ids to be excluded from the result.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "fromCurrentAccessClient", - "in" : "query", - "required" : false, - "description" : "Flag indicating whether to include only transfers by the current access client.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "groups", - "in" : "query", - "required" : false, - "description" : "Reference to the user group used to perform / receive the transfer. Only taken into account if authenticated as administrator.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "includeGeneratedByAccessClient", - "in" : "query", - "required" : false, - "description" : "Flag indicating whether to include or not the generated transfer. Only valid if there is at least one access client specified. For example if a `ticket` or `paymentRequest` was processed then a new transfer will be generated.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "kinds", - "in" : "query", - "required" : false, - "description" : "The kind of transfers to return", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransferKind" - } - } - }, { - "name" : "orderBy", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/TransOrderByEnum" - } - }, { - "name" : "page", - "in" : "query", - "required" : false, - "description" : "The page number (zero-based) of the search. The default value is zero.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "pageSize", - "in" : "query", - "required" : false, - "description" : "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "skipTotalCount", - "in" : "query", - "required" : false, - "description" : "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "statuses", - "in" : "query", - "required" : false, - "description" : "Transfer statuses used as search criteria. Each array element should be either the identifier or the status qualified internal name, composed by flow internal name, a dot, and the status internal name. For example, `loan.open` would be a valid internal name.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "transactionNumber", - "in" : "query", - "required" : false, - "description" : "The transaction number of the matching transfer", - "schema" : { - "type" : "string" - } - }, { - "name" : "transferFilters", - "in" : "query", - "required" : false, - "description" : "Reference to the transfer filters, which filters transfers by type. May be either the internal id or qualified transfer filter internal name, in the format `accountType.transferFilter`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "transferTypes", - "in" : "query", - "required" : false, - "description" : "Reference to the transfer types for filter. May be either the internal id or qualified transfer type internal name, in the format `accountType.transferType`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "user", - "in" : "query", - "required" : false, - "description" : "Reference a user that should have either received / performed the transfer.", - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "The account history entries matching the criteria", - "headers" : { - "X-Total-Count" : { - "schema" : { - "type" : "integer" - }, - "description" : "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." - }, - "X-Page-Size" : { - "schema" : { - "type" : "integer" - }, - "description" : "The maximum number of results per page" - }, - "X-Current-Page" : { - "schema" : { - "type" : "integer" - }, - "description" : "The current page the results are in" - }, - "X-Has-Next-Page" : { - "schema" : { - "type" : "boolean" - }, - "description" : "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." - } - }, - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/AccountHistoryResult" + }, + "/{user}/device-pins": { + "get": { + "operationId": "listDevicePins", + "summary": "Returns the list of device PIN for a user.", + "description": "Returns the list of device PIN for a user. Only allowed if the authenticated user is the same as the user parameter or is an administrator / broker with permissions.", + "tags": [ + "DevicePins" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/user" + } + ], + "responses": { + "200": { + "description": "The list of device PIN the user has.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DevicePin" } } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } - } + } } } } } }, - "/{owner}/accounts/{accountType}/export/{format}" : { - "parameters" : [ { - "$ref" : "#/components/parameters/owner" - }, { - "$ref" : "#/components/parameters/accountType" - }, { - "$ref" : "#/components/parameters/format" - } ], - "get" : { - "operationId" : "exportAccountHistory", - "summary" : "Exports the accounts history entries as file", - "description" : "Generates a file containing the search results. The available export formats are returned in `GET /{owner}/accounts/{accountType}/data-for-history`.", - "tags" : [ "Accounts" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "name" : "accessClients", - "in" : "query", - "required" : false, - "description" : "References to access clients (id or token) used to perform / receive the transfer.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "amountRange", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum amount. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "number" - } - } - }, { - "name" : "brokers", - "in" : "query", - "required" : false, - "description" : "Reference to the broker of users involved in transfers. Is only taken into account if authenticated as administrator.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "by", - "in" : "query", - "required" : false, - "description" : "Reference to the user that was authenticated when the transfer was performed. Is only taken into account if authenticated as administrator.", - "schema" : { - "type" : "string" - } - }, { - "name" : "channels", - "in" : "query", - "required" : false, - "description" : "Reference to the channel used to perform / receive the transfer. Only taken into account if authenticated as administrator.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "chargedBack", - "in" : "query", - "required" : false, - "description" : "When set to either `true` will only return transfers that were charged-back. When set to `false`, will only return transfers that were not charged-back. When left blank will not filter by this creterion.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "customFields", - "in" : "query", - "required" : false, - "description" : "Transaction custom field values used as filters. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by : (colon). For example, `customFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, customFields=field1:valueA|valueB. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `customFields=rank:bronze|silver,documentDate:2000-01-01|2001-12-31` would match results whose custom field with internal name `rank` is either `bronze` or `silver`, and whose `documentDate` is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `customFields=documentDate:|2001-12-31`. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `customFields=dynamic:a|b|c`. However, it is also possible to perform a partial-match search using the dynamic value label. In this case a single value, prefixed or enclosed by single quotes should be used. For example: `customFields=dynamic:'business` or `customFields=dynamic:'business'`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "datePeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum transfer date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "description", - "in" : "query", - "required" : false, - "description" : "The description to search for.", - "schema" : { - "type" : "string" - } - }, { - "name" : "direction", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/TransferDirectionEnum" - } - }, { - "name" : "excludedIds", - "in" : "query", - "required" : false, - "description" : "List of transfers ids to be excluded from the result.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "fromCurrentAccessClient", - "in" : "query", - "required" : false, - "description" : "Flag indicating whether to include only transfers by the current access client.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "groups", - "in" : "query", - "required" : false, - "description" : "Reference to the user group used to perform / receive the transfer. Only taken into account if authenticated as administrator.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "includeGeneratedByAccessClient", - "in" : "query", - "required" : false, - "description" : "Flag indicating whether to include or not the generated transfer. Only valid if there is at least one access client specified. For example if a `ticket` or `paymentRequest` was processed then a new transfer will be generated.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "kinds", - "in" : "query", - "required" : false, - "description" : "The kind of transfers to return", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransferKind" - } - } - }, { - "name" : "orderBy", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/TransOrderByEnum" - } - }, { - "name" : "page", - "in" : "query", - "required" : false, - "description" : "The page number (zero-based) of the search. The default value is zero.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "pageSize", - "in" : "query", - "required" : false, - "description" : "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "skipTotalCount", - "in" : "query", - "required" : false, - "description" : "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "statuses", - "in" : "query", - "required" : false, - "description" : "Transfer statuses used as search criteria. Each array element should be either the identifier or the status qualified internal name, composed by flow internal name, a dot, and the status internal name. For example, `loan.open` would be a valid internal name.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "transactionNumber", - "in" : "query", - "required" : false, - "description" : "The transaction number of the matching transfer", - "schema" : { - "type" : "string" - } - }, { - "name" : "transferFilters", - "in" : "query", - "required" : false, - "description" : "Reference to the transfer filters, which filters transfers by type. May be either the internal id or qualified transfer filter internal name, in the format `accountType.transferFilter`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "transferTypes", - "in" : "query", - "required" : false, - "description" : "Reference to the transfer types for filter. May be either the internal id or qualified transfer type internal name, in the format `accountType.transferType`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "user", - "in" : "query", - "required" : false, - "description" : "Reference a user that should have either received / performed the transfer.", - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "The file content", - "content" : { - "*/*" : { - "schema" : { - "type" : "string", - "format" : "binary" - } - } - } - }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } - } - } - }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" - } - } - } - }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" - } - } - } - }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" - } - } - } + "/device-pins/validate": { + "get": { + "operationId": "validateDevicePinValue", + "summary": "Validates a value to be used as a pin.", + "description": "Validates if a value can be used as a pin for the authenticated user. It checks for obvious values, value's length, etc. using the configuration for the current channel. If the value is a valid one then a `204 No Content` status code is returned. Otherwise, if the value is invalid, a `200 OK` will be returned with an `InputError` with code `validation` as the payload. This error will contains only `generalErrors` (if any), `properties` (containing only the `pin` property) and `propertyErrors` (containing all errors for the `pin` property). Please note that a `422 Unprocessable Entity` status will be returned if the given value is empty or the pin is not enabled for the current channel. To know if the pin is enabled or not you could check for the `DataForLogin.passwordInput.pinAvailability` enum.", + "tags": [ + "DevicePins" + ], + "security": [ + { + "basic": [] }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" - } - } - } + { + "session": [] }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" - } - } - } + { + "accessClient": [] } - } - } - }, - "/{owner}/accounts/{accountType}/balances-history" : { - "parameters" : [ { - "$ref" : "#/components/parameters/owner" - }, { - "$ref" : "#/components/parameters/accountType" - } ], - "get" : { - "operationId" : "getAccountBalanceHistory", - "summary" : "Returns the account balances over time", - "description" : "Receives a period and an interval, returning the balance over each corresponding date. The maximum number of data points is 60, so it is possible to get the balances per day over 2 months. For larger periods, use weeks or months. When no period is given, assumes the beginning of current year or the account creation date, whichever is newer. When no interval is given, one is assumed. Also returns status of the given account", - "tags" : [ "Accounts" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "datePeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum transfer date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "type" : "string", - "format" : "date-time" + ], + "parameters": [ + { + "name": "value", + "required": true, + "in": "query", + "description": "The value to be validated", + "schema": { + "type": "string" } } - }, { - "name" : "intervalUnit", - "in" : "query", - "required" : false, - "description" : "The time unit for the data point interval", - "schema" : { - "$ref" : "#/components/schemas/TimeFieldEnum" - } - }, { - "name" : "intervalCount", - "in" : "query", - "required" : false, - "description" : "A data point every X units. For example, it is possible to request the balance every 3 days. Defaults to 1.", - "schema" : { - "type" : "integer" - } - } ], - "responses" : { - "200" : { - "description" : "The account balances over each datapoint", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AccountBalanceHistoryResult" + ], + "responses": { + "200": { + "description": "The validation error if the value is invalid. The returned data contains the validation error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" + } + } + } + }, + "204": { + "description": "The value is valid to be used as a pin. No content is returned." + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -21187,919 +21647,201 @@ } } }, - "/accounts/data-for-user-balances" : { - "get" : { - "operationId" : "getUserBalancesData", - "summary" : "Returns data for searching users together with their balances", - "description" : "Returns configuration data for searching users together with their balances. The account types are returned, and the account type needs to be passed in the other `user-balances` operations.", - "tags" : [ "Accounts" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The data for searching users with balances", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DataForUserBalancesSearch" + "/device-pins": { + "post": { + "operationId": "setDevicePin", + "summary": "Creates a new PIN or modify the current existing one.", + "description": "Creates a new PIN for the authenticated user. If authenticating with a PIN then changes its value and returns nothing.", + "tags": [ + "DevicePins" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [], + "responses": { + "200": { + "description": "The pin was successfully created.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateDevicePinResult" + } + } + } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } + }, + "requestBody": { + "description": "The parameters for creating the PIN.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateDevicePin" + } + } + } } } }, - "/accounts/{accountType}/user-balances/summary" : { - "get" : { - "operationId" : "getUserBalancesSummary", - "summary" : "Returns summarized information for the user balances search", - "description" : "Returns summaries for each balance level (if ranges are defined in either account type or filter), as well as the total summary.", - "tags" : [ "Accounts" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "acceptedAgreements", - "in" : "query", - "required" : false, - "description" : "Either id or internal names of agreements the user must have accepted. Ignored if the logged user isn't an admin or broker with permission to view the user agreement log.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "accountType", - "in" : "path", - "required" : true, - "description" : "The account type", - "schema" : { - "type" : "string" - } - }, { - "name" : "activationPeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum user activation date. Only taken into account if searching as administrator or managing broker. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "addressResult", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/UserAddressResultEnum" - } - }, { - "name" : "balanceRange", - "in" : "query", - "required" : false, - "description" : "The minimum and / or maximum balance for users to be returned. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "number" - } - } - }, { - "name" : "brokers", - "in" : "query", - "required" : false, - "description" : "Either id or a principal (login name, e-mail, etc) for brokers", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "creationPeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum user creation date. Only taken into account if searching as administrator or managing broker. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "groups", - "in" : "query", - "required" : false, - "description" : "Either id or internal names of groups / group sets", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "hasBroker", - "in" : "query", - "required" : false, - "description" : "When set to `true`, will match only users that have at least one broker. When set to `false`, will will match only users without brokers. Ignored if the logged user isn't an admin.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "ignoreProfileFieldsInList", - "in" : "query", - "required" : false, - "description" : "When set to `true`, instead of returning users with corresponding profile fields set on list, will return them with `display`.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "includeGlobal", - "in" : "query", - "required" : false, - "description" : "Indicates whether global administrators should be returned when searching users in a network. Only usable by global administrators.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "includeGroup", - "in" : "query", - "required" : false, - "description" : "When set to `true` and the logged user has permission to view user groups, will return the `group` property on users.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "includeGroupSet", - "in" : "query", - "required" : false, - "description" : "When set to `true` and the logged user has permission to view user group sets, will return the `groupSet` property on users.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "invitedBy", - "in" : "query", - "required" : false, - "description" : "The user that has invited the returned users. Only used when searching as a manager (admin / broker).", - "schema" : { - "type" : "string" - } - }, { - "name" : "keywords", - "in" : "query", - "required" : false, - "description" : "Textual search keywords. Sometimes, like in user search, the fields matched depends on what is configured on the products.", - "schema" : { - "type" : "string" - } - }, { - "name" : "lastLoginPeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum user last login date. Only taken into account if searching as administrator or managing broker. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "latitude", - "in" : "query", - "required" : false, - "description" : "The reference latitude for distance searches", - "schema" : { - "type" : "number", - "format" : "double" - } - }, { - "name" : "longitude", - "in" : "query", - "required" : false, - "description" : "The reference longitude for distance searches", - "schema" : { - "type" : "number", - "format" : "double" - } - }, { - "name" : "mainBrokerOnly", - "in" : "query", - "required" : false, - "description" : "When set to `true`, will match only users that have the brokers as set in the `brokers` parameter as main broker.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "maxDistance", - "in" : "query", - "required" : false, - "description" : "Maximum straight-line distance between the informed location and the resulting address. Is measured either in kilometers or miles, depending on the configuration. Only accepted if both `longitude` and `latitude` parameters are passed with the actual reference position.", - "schema" : { - "type" : "number", - "format" : "double" - } - }, { - "name" : "mediumBalanceRange", - "in" : "query", - "required" : false, - "description" : "An array with 2 elements, describing the lower and upper medium balance bounds. Both of them need to be set as 2 element in the array, or it won't be considered.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "integer" - } - } - }, { - "name" : "negativeSincePeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum negative-since date for users to be returned. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "notAcceptedAgreements", - "in" : "query", - "required" : false, - "description" : "Either id or internal names of agreements the user must not have accepted. Ignored if the logged user isn't an admin or broker with permission to view the user agreement log.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "page", - "in" : "query", - "required" : false, - "description" : "The page number (zero-based) of the search. The default value is zero.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "pageSize", - "in" : "query", - "required" : false, - "description" : "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "products", - "in" : "query", - "required" : false, - "description" : "Either id or internal names of products the users should have assigned. Ignored if the authenticated user isn't an administrator.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "productsIndividuallyAssigned", - "in" : "query", - "required" : false, - "description" : "When set to `true`, the list specifid in `products` will only match users with those products assigned individually, not via group or group set. When set to `false` (default), the products will match any level (individual, group or group set).", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "profileFields", - "in" : "query", - "required" : false, - "description" : "User profile fields, both basic (full name, login name, phone, e-mail, etc) and custom fields, that are used for search. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by `:` (colon). For example, `profileFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, `profileFields=field1:valueA|valueB`. The accepted fields depend on the products the authenticated user has. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `profileFields=rank:bronze|silver,birthDate:2000-01-01|2001-12-31` would match results whose custom field with internal name 'rank' is either bronze or silver, and whose 'birthDate' is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `profileFields=birthDate:|2001-12-31`.\nThe basic profile fields have one of the following identifiers:\n- `name` or `fullName`: Full name; - `username`, `loginName` or `login`: Login name; - `email`: E-mail; - `phone`: Phone; - `accountNumber`, `account`: Account number; - `image`: Image (accepts a boolean value, indicating that either it is required that users either have images or not).\n\nIf address is an allowed profile field for search, specific address fields may be searched. The allowed ones are normally returned as the `addressFieldsInSearch` field in the corresponding result from a data-for-search request. The specific address fields are:\n- `address`: Searches on any address field (not a specific field); - `address.address`: Searches on the fields that represent the street address, which are `addressLine1`, `addressLine2`, `street`, `buildingNumber` and `complement`. Note that normally only a subset of them should be enabled in the configuration (either line 1 / 2 or street + number + complement);\n- `address.zip`: Searches for matching zip (postal) code; - `address.poBox`: Searches for matching postal box; - `address.neighborhood`: Searches by neighborhood; - `address.city`: Searches by city; - `address.region`: Searches by region (or state); - `address.country`: Searches by ISO 3166-1 alpha-2 country code. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `profileFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `profileFields=dynamic:'business`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "skipTotalCount", - "in" : "query", - "required" : false, - "description" : "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "statuses", - "in" : "query", - "required" : false, - "description" : "The possible status of the user. If no status is given, `active` and `blocked` users are returned.", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/UserStatusEnum" - } - } - }, { - "name" : "usersToExclude", - "in" : "query", - "required" : false, - "description" : "Indicated the users to be excluded from the result", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "usersToInclude", - "in" : "query", - "required" : false, - "description" : "Indicated the users to be included in the result. Any other user not present in this list will be excluded from the result.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - } ], - "responses" : { - "200" : { - "description" : "The summary of user balances matching the parameters", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UsersWithBalanceSummary" - } - } - } - }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } - } - } - }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" - } - } - } - }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" - } - } - } - }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" - } - } - } - }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" - } - } - } - } - } - } - }, - "/accounts/{accountType}/user-balances" : { - "get" : { - "operationId" : "searchUsersWithBalances", - "summary" : "Searches for users together with balance information", - "description" : "Returns the users, together with their balances", - "tags" : [ "Accounts" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "acceptedAgreements", - "in" : "query", - "required" : false, - "description" : "Either id or internal names of agreements the user must have accepted. Ignored if the logged user isn't an admin or broker with permission to view the user agreement log.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "accountType", - "in" : "path", - "required" : true, - "description" : "The account type", - "schema" : { - "type" : "string" - } - }, { - "name" : "activationPeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum user activation date. Only taken into account if searching as administrator or managing broker. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "addressResult", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/UserAddressResultEnum" - } - }, { - "name" : "balanceRange", - "in" : "query", - "required" : false, - "description" : "The minimum and / or maximum balance for users to be returned. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "number" - } - } - }, { - "name" : "brokers", - "in" : "query", - "required" : false, - "description" : "Either id or a principal (login name, e-mail, etc) for brokers", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "creationPeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum user creation date. Only taken into account if searching as administrator or managing broker. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "groups", - "in" : "query", - "required" : false, - "description" : "Either id or internal names of groups / group sets", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "hasBroker", - "in" : "query", - "required" : false, - "description" : "When set to `true`, will match only users that have at least one broker. When set to `false`, will will match only users without brokers. Ignored if the logged user isn't an admin.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "ignoreProfileFieldsInList", - "in" : "query", - "required" : false, - "description" : "When set to `true`, instead of returning users with corresponding profile fields set on list, will return them with `display`.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "includeGlobal", - "in" : "query", - "required" : false, - "description" : "Indicates whether global administrators should be returned when searching users in a network. Only usable by global administrators.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "includeGroup", - "in" : "query", - "required" : false, - "description" : "When set to `true` and the logged user has permission to view user groups, will return the `group` property on users.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "includeGroupSet", - "in" : "query", - "required" : false, - "description" : "When set to `true` and the logged user has permission to view user group sets, will return the `groupSet` property on users.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "invitedBy", - "in" : "query", - "required" : false, - "description" : "The user that has invited the returned users. Only used when searching as a manager (admin / broker).", - "schema" : { - "type" : "string" - } - }, { - "name" : "keywords", - "in" : "query", - "required" : false, - "description" : "Textual search keywords. Sometimes, like in user search, the fields matched depends on what is configured on the products.", - "schema" : { - "type" : "string" - } - }, { - "name" : "lastLoginPeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum user last login date. Only taken into account if searching as administrator or managing broker. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "latitude", - "in" : "query", - "required" : false, - "description" : "The reference latitude for distance searches", - "schema" : { - "type" : "number", - "format" : "double" - } - }, { - "name" : "longitude", - "in" : "query", - "required" : false, - "description" : "The reference longitude for distance searches", - "schema" : { - "type" : "number", - "format" : "double" - } - }, { - "name" : "mainBrokerOnly", - "in" : "query", - "required" : false, - "description" : "When set to `true`, will match only users that have the brokers as set in the `brokers` parameter as main broker.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "maxDistance", - "in" : "query", - "required" : false, - "description" : "Maximum straight-line distance between the informed location and the resulting address. Is measured either in kilometers or miles, depending on the configuration. Only accepted if both `longitude` and `latitude` parameters are passed with the actual reference position.", - "schema" : { - "type" : "number", - "format" : "double" - } - }, { - "name" : "mediumBalanceRange", - "in" : "query", - "required" : false, - "description" : "An array with 2 elements, describing the lower and upper medium balance bounds. Both of them need to be set as 2 element in the array, or it won't be considered.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "integer" - } - } - }, { - "name" : "negativeSincePeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum negative-since date for users to be returned. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "notAcceptedAgreements", - "in" : "query", - "required" : false, - "description" : "Either id or internal names of agreements the user must not have accepted. Ignored if the logged user isn't an admin or broker with permission to view the user agreement log.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "orderBy", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/UsersWithBalanceOrderByEnum" - } - }, { - "name" : "page", - "in" : "query", - "required" : false, - "description" : "The page number (zero-based) of the search. The default value is zero.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "pageSize", - "in" : "query", - "required" : false, - "description" : "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "products", - "in" : "query", - "required" : false, - "description" : "Either id or internal names of products the users should have assigned. Ignored if the authenticated user isn't an administrator.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "productsIndividuallyAssigned", - "in" : "query", - "required" : false, - "description" : "When set to `true`, the list specifid in `products` will only match users with those products assigned individually, not via group or group set. When set to `false` (default), the products will match any level (individual, group or group set).", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "profileFields", - "in" : "query", - "required" : false, - "description" : "User profile fields, both basic (full name, login name, phone, e-mail, etc) and custom fields, that are used for search. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by `:` (colon). For example, `profileFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, `profileFields=field1:valueA|valueB`. The accepted fields depend on the products the authenticated user has. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `profileFields=rank:bronze|silver,birthDate:2000-01-01|2001-12-31` would match results whose custom field with internal name 'rank' is either bronze or silver, and whose 'birthDate' is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `profileFields=birthDate:|2001-12-31`.\nThe basic profile fields have one of the following identifiers:\n- `name` or `fullName`: Full name; - `username`, `loginName` or `login`: Login name; - `email`: E-mail; - `phone`: Phone; - `accountNumber`, `account`: Account number; - `image`: Image (accepts a boolean value, indicating that either it is required that users either have images or not).\n\nIf address is an allowed profile field for search, specific address fields may be searched. The allowed ones are normally returned as the `addressFieldsInSearch` field in the corresponding result from a data-for-search request. The specific address fields are:\n- `address`: Searches on any address field (not a specific field); - `address.address`: Searches on the fields that represent the street address, which are `addressLine1`, `addressLine2`, `street`, `buildingNumber` and `complement`. Note that normally only a subset of them should be enabled in the configuration (either line 1 / 2 or street + number + complement);\n- `address.zip`: Searches for matching zip (postal) code; - `address.poBox`: Searches for matching postal box; - `address.neighborhood`: Searches by neighborhood; - `address.city`: Searches by city; - `address.region`: Searches by region (or state); - `address.country`: Searches by ISO 3166-1 alpha-2 country code. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `profileFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `profileFields=dynamic:'business`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "skipTotalCount", - "in" : "query", - "required" : false, - "description" : "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "statuses", - "in" : "query", - "required" : false, - "description" : "The possible status of the user. If no status is given, `active` and `blocked` users are returned.", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/UserStatusEnum" - } - } - }, { - "name" : "usersToExclude", - "in" : "query", - "required" : false, - "description" : "Indicated the users to be excluded from the result", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "usersToInclude", - "in" : "query", - "required" : false, - "description" : "Indicated the users to be included in the result. Any other user not present in this list will be excluded from the result.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - } ], - "responses" : { - "200" : { - "description" : "The users together with their balances", - "headers" : { - "X-Total-Count" : { - "schema" : { - "type" : "integer" - }, - "description" : "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." - }, - "X-Page-Size" : { - "schema" : { - "type" : "integer" - }, - "description" : "The maximum number of results per page" - }, - "X-Current-Page" : { - "schema" : { - "type" : "integer" - }, - "description" : "The current page the results are in" - }, - "X-Has-Next-Page" : { - "schema" : { - "type" : "boolean" - }, - "description" : "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." - } - }, - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/UserWithBalanceResult" - } + "/device-pins/{key}/data-for-edit": { + "get": { + "operationId": "getDevicePinDataForEdit", + "summary": "Returns data for editing the PIN name.", + "description": "Returns configuration data for editing the PIN name, plus the current `DevicePinEdit` object that can be altered and sent back to change the name.", + "tags": [ + "DevicePins" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "key", + "description": "The principal or id of the device PIN.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The data for editing a device PIN", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DevicePinDataForEdit" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -22107,420 +21849,87 @@ } } }, - "/accounts/{accountType}/user-balances/export/{format}" : { - "parameters" : [ { - "$ref" : "#/components/parameters/format" - } ], - "get" : { - "operationId" : "exportUsersWithBalances", - "summary" : "Exports the user listing together with their balances as file", - "description" : "Generates a file containing the search results. The available export formats are returned in `GET /accounts/data-for-user-balances`.", - "tags" : [ "Accounts" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "name" : "acceptedAgreements", - "in" : "query", - "required" : false, - "description" : "Either id or internal names of agreements the user must have accepted. Ignored if the logged user isn't an admin or broker with permission to view the user agreement log.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "accountType", - "in" : "path", - "required" : true, - "description" : "The account type", - "schema" : { - "type" : "string" - } - }, { - "name" : "activationPeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum user activation date. Only taken into account if searching as administrator or managing broker. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "addressResult", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/UserAddressResultEnum" - } - }, { - "name" : "balanceRange", - "in" : "query", - "required" : false, - "description" : "The minimum and / or maximum balance for users to be returned. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "number" - } - } - }, { - "name" : "brokers", - "in" : "query", - "required" : false, - "description" : "Either id or a principal (login name, e-mail, etc) for brokers", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "creationPeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum user creation date. Only taken into account if searching as administrator or managing broker. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "groups", - "in" : "query", - "required" : false, - "description" : "Either id or internal names of groups / group sets", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "hasBroker", - "in" : "query", - "required" : false, - "description" : "When set to `true`, will match only users that have at least one broker. When set to `false`, will will match only users without brokers. Ignored if the logged user isn't an admin.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "ignoreProfileFieldsInList", - "in" : "query", - "required" : false, - "description" : "When set to `true`, instead of returning users with corresponding profile fields set on list, will return them with `display`.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "includeGlobal", - "in" : "query", - "required" : false, - "description" : "Indicates whether global administrators should be returned when searching users in a network. Only usable by global administrators.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "includeGroup", - "in" : "query", - "required" : false, - "description" : "When set to `true` and the logged user has permission to view user groups, will return the `group` property on users.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "includeGroupSet", - "in" : "query", - "required" : false, - "description" : "When set to `true` and the logged user has permission to view user group sets, will return the `groupSet` property on users.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "invitedBy", - "in" : "query", - "required" : false, - "description" : "The user that has invited the returned users. Only used when searching as a manager (admin / broker).", - "schema" : { - "type" : "string" - } - }, { - "name" : "keywords", - "in" : "query", - "required" : false, - "description" : "Textual search keywords. Sometimes, like in user search, the fields matched depends on what is configured on the products.", - "schema" : { - "type" : "string" - } - }, { - "name" : "lastLoginPeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum user last login date. Only taken into account if searching as administrator or managing broker. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "latitude", - "in" : "query", - "required" : false, - "description" : "The reference latitude for distance searches", - "schema" : { - "type" : "number", - "format" : "double" - } - }, { - "name" : "longitude", - "in" : "query", - "required" : false, - "description" : "The reference longitude for distance searches", - "schema" : { - "type" : "number", - "format" : "double" - } - }, { - "name" : "mainBrokerOnly", - "in" : "query", - "required" : false, - "description" : "When set to `true`, will match only users that have the brokers as set in the `brokers` parameter as main broker.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "maxDistance", - "in" : "query", - "required" : false, - "description" : "Maximum straight-line distance between the informed location and the resulting address. Is measured either in kilometers or miles, depending on the configuration. Only accepted if both `longitude` and `latitude` parameters are passed with the actual reference position.", - "schema" : { - "type" : "number", - "format" : "double" - } - }, { - "name" : "mediumBalanceRange", - "in" : "query", - "required" : false, - "description" : "An array with 2 elements, describing the lower and upper medium balance bounds. Both of them need to be set as 2 element in the array, or it won't be considered.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "integer" - } - } - }, { - "name" : "negativeSincePeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum negative-since date for users to be returned. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "notAcceptedAgreements", - "in" : "query", - "required" : false, - "description" : "Either id or internal names of agreements the user must not have accepted. Ignored if the logged user isn't an admin or broker with permission to view the user agreement log.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "orderBy", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/UsersWithBalanceOrderByEnum" - } - }, { - "name" : "page", - "in" : "query", - "required" : false, - "description" : "The page number (zero-based) of the search. The default value is zero.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "pageSize", - "in" : "query", - "required" : false, - "description" : "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "products", - "in" : "query", - "required" : false, - "description" : "Either id or internal names of products the users should have assigned. Ignored if the authenticated user isn't an administrator.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "productsIndividuallyAssigned", - "in" : "query", - "required" : false, - "description" : "When set to `true`, the list specifid in `products` will only match users with those products assigned individually, not via group or group set. When set to `false` (default), the products will match any level (individual, group or group set).", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "profileFields", - "in" : "query", - "required" : false, - "description" : "User profile fields, both basic (full name, login name, phone, e-mail, etc) and custom fields, that are used for search. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by `:` (colon). For example, `profileFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, `profileFields=field1:valueA|valueB`. The accepted fields depend on the products the authenticated user has. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `profileFields=rank:bronze|silver,birthDate:2000-01-01|2001-12-31` would match results whose custom field with internal name 'rank' is either bronze or silver, and whose 'birthDate' is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `profileFields=birthDate:|2001-12-31`.\nThe basic profile fields have one of the following identifiers:\n- `name` or `fullName`: Full name; - `username`, `loginName` or `login`: Login name; - `email`: E-mail; - `phone`: Phone; - `accountNumber`, `account`: Account number; - `image`: Image (accepts a boolean value, indicating that either it is required that users either have images or not).\n\nIf address is an allowed profile field for search, specific address fields may be searched. The allowed ones are normally returned as the `addressFieldsInSearch` field in the corresponding result from a data-for-search request. The specific address fields are:\n- `address`: Searches on any address field (not a specific field); - `address.address`: Searches on the fields that represent the street address, which are `addressLine1`, `addressLine2`, `street`, `buildingNumber` and `complement`. Note that normally only a subset of them should be enabled in the configuration (either line 1 / 2 or street + number + complement);\n- `address.zip`: Searches for matching zip (postal) code; - `address.poBox`: Searches for matching postal box; - `address.neighborhood`: Searches by neighborhood; - `address.city`: Searches by city; - `address.region`: Searches by region (or state); - `address.country`: Searches by ISO 3166-1 alpha-2 country code. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `profileFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `profileFields=dynamic:'business`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "skipTotalCount", - "in" : "query", - "required" : false, - "description" : "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "statuses", - "in" : "query", - "required" : false, - "description" : "The possible status of the user. If no status is given, `active` and `blocked` users are returned.", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/UserStatusEnum" - } + "/device-pins/password-for-create": { + "get": { + "operationId": "getPasswordInputForCreatePin", + "summary": "Returns a `PasswordInput` for create a device pin.", + "description": "Returns a `PasswordInput` for create a device pin for the authenticated user. In case of updating its value please use `GET /device-pins/{key}` that already include a `PasswordInput`. If the pin is created in the next 6 minutes after a successful login then the action can be confirmed with the `pinCreationToken` included in the login's result (`LoginAuth`, `POST /auth/session`) or the login password. This operation can be invoked only if the pin is enabled (check for `DataForLogin.passwordInput.pinAvailability`)", + "tags": [ + "DevicePins" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] } - }, { - "name" : "usersToExclude", - "in" : "query", - "required" : false, - "description" : "Indicated the users to be excluded from the result", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" } - }, { - "name" : "usersToInclude", - "in" : "query", - "required" : false, - "description" : "Indicated the users to be included in the result. Any other user not present in this list will be excluded from the result.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - } ], - "responses" : { - "200" : { - "description" : "The file content", - "content" : { - "*/*" : { - "schema" : { - "type" : "string", - "format" : "binary" - } - } - } - }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + ], + "responses": { + "200": { + "description": "The `PasswordInput` used to create the pin.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PasswordInput" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -22528,1190 +21937,906 @@ } } }, - "/{user}/account-visibility" : { - "parameters" : [ { - "$ref" : "#/components/parameters/user" - } ], - "get" : { - "operationId" : "getUserAccountVisibilityData", - "summary" : "Returns data for setting the account visibility.", - "description" : "Returns data containing, for all assigned user accounts, if each account can be set hidden or visible and if it is currently visible.", - "tags" : [ "AccountVisibility" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "Data containing the accounts.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DataForUserAccountVisibility" + "/device-pins/{key}": { + "get": { + "operationId": "viewDevicePin", + "summary": "Returns details of a specific device PIN", + "description": "Returns information about a device PIN by key. The result also includes a `PasswordInput` that can be used to remove or update the pin's value (only for the authenticated user).", + "tags": [ + "DevicePins" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "key", + "description": "The principal or id of the device PIN.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The device PIN data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DevicePinView" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } }, - "put" : { - "operationId" : "saveUserAccountVisibility", - "summary" : "Saves at once the visibility for all accounts.", - "description" : "Saves, for the given user, the account visibility for all accounts. All account types not sent are considered hidden, whereas all which are sent are considered visible.", - "tags" : [ "AccountVisibility" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "requestBody" : { - "description" : "The parameters for setting the accounts visibility.", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SaveUserAccountVisibilityAsVisibleParams" - } + "put": { + "operationId": "updateDevicePin", + "summary": "Updates the device PIN name.", + "description": "Updates the device PIN name. The device's owner and administrators / brokers with permissions can update a device PIN. In case the device was already activated as trusted then it's name will be updated too.", + "tags": [ + "DevicePins" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "name": "key", + "description": "The principal or id of the device PIN.", + "in": "path", + "required": true, + "schema": { + "type": "string" } } - }, - "responses" : { - "204" : { - "description" : "The visible accounts are saved and nothing is returned." + ], + "responses": { + "204": { + "description": "The device PIN was updated." }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } - } - } - } - }, - "/{user}/account-visibility/{accountType}/show" : { - "parameters" : [ { - "$ref" : "#/components/parameters/user" - }, { - "name" : "accountType", - "in" : "path", - "required" : true, - "description" : "The account type id or internal name", - "schema" : { - "type" : "string" - } - } ], - "post" : { - "operationId" : "setUserAccountVisibilityAsVisible", - "summary" : "Sets the visibility for a single user account.", - "description" : "Modifies the visibility of an account to be visible. Ignored when the user cannot change the visibility of this account.", - "tags" : [ "AccountVisibility" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "204" : { - "description" : "The visibility for this account is changed to be visible and nothing is returned" }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } - }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" - } + } + }, + "requestBody": { + "description": "The parameters for saving a device PIN.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DevicePinEdit" } } + } + } + }, + "delete": { + "operationId": "deleteDevicePin", + "summary": "Removes a device PIN.", + "description": "Removes a device PIN. The device's owner and administrators / brokers with permissions can remove a device PIN.", + "tags": [ + "DevicePins" + ], + "security": [ + { + "basic": [] }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" - } - } + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "name": "key", + "description": "The principal or id of the device PIN.", + "in": "path", + "required": true, + "schema": { + "type": "string" } + } + ], + "responses": { + "204": { + "description": "The device PIN was removed." }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" } } } - } - } - } - }, - "/{user}/account-visibility/{accountType}/hide" : { - "parameters" : [ { - "$ref" : "#/components/parameters/user" - }, { - "name" : "accountType", - "in" : "path", - "required" : true, - "description" : "The account type id or internal name", - "schema" : { - "type" : "string" - } - } ], - "post" : { - "operationId" : "setUserAccountVisibilityAsHidden", - "summary" : "Sets the visibility for a single user account.", - "description" : "Modifies the visibility of an account to be hidden. Ignored when the user cannot change the visibility of this account.", - "tags" : [ "AccountVisibility" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "204" : { - "description" : "The visibility for this account is changed to be hidden and nothing is returned" }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } + }, + "requestBody": { + "description": "The parameters for removing a device PIN.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DevicePinRemoveParams" + } + } + } } } }, - "/{user}/accounts/data-for-balance-limits" : { - "parameters" : [ { - "$ref" : "#/components/parameters/user" - } ], - "get" : { - "operationId" : "getDataForUserBalanceLimits", - "summary" : "Returns data regarding the limits of all accounts of a given user.", - "description" : "Returns data regarding the limits of all accounts of a given user.", - "tags" : [ "BalanceLimits" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The user account limits data", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UserAccountBalanceLimitsListData" + "/{user}/totp-secret": { + "parameters": [ + { + "$ref": "#/components/parameters/user" + } + ], + "get": { + "operationId": "viewUserTotpSecret", + "summary": "Returns information about the TOTP secret for the given user.", + "description": "Of course, the secret itself (the byte sequence) is never returned, only the status and possible actions.", + "tags": [ + "TOTP" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The TOTP secret details", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TotpSecretData" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - } - }, - "/{user}/accounts/{accountType}/balance-limits" : { - "parameters" : [ { - "$ref" : "#/components/parameters/user" - }, { - "$ref" : "#/components/parameters/accountType" - } ], - "get" : { - "operationId" : "getAccountBalanceLimits", - "summary" : "Returns data for the limits of a given account", - "description" : "Returns the data needed to edit the limits of the given account, plus the history of limit changes.", - "tags" : [ "BalanceLimits" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The account limit data.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AccountBalanceLimitsData" + }, + "delete": { + "operationId": "deleteUserTotpSecret", + "summary": "Removes the TOTP secret of a user.", + "description": "Removes the TOTP secret of a user.", + "tags": [ + "TOTP" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/confirmationPassword" + } + ], + "responses": { + "204": { + "description": "The TOTP secret was deleted." + }, + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - }, - "put" : { - "operationId" : "setAccountBalanceLimits", - "summary" : "Sets the limits for a given user account.", - "description" : "Saves the account limits. The lower limit may be customized or default, while the upper limit may also be set to unlimited.", - "tags" : [ "BalanceLimits" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/confirmationPassword" - } ], - "responses" : { - "204" : { - "description" : "The limits were changed and nothing is returned." + } + }, + "/totp-secret/send-activaction-code": { + "post": { + "operationId": "sendTotpSecretActivationCode", + "summary": "Sends a activation code, so the user identity is validated before activating a TOTP.", + "description": "Sends a activation code, so the user identity is validated before activating a TOTP.", + "tags": [ + "TOTP" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The code was sent to the user.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OtpResult" + } + } + } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } }, - "requestBody" : { - "description" : "The new account balance limits", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SetAccountBalanceLimits" + "requestBody": { + "description": "The parameters for sending the activation code for activating a TOTP.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SendOtp" } } } } } }, - "/accounts/data-for-balance-limits" : { - "get" : { - "operationId" : "getAccountBalanceLimitsData", - "summary" : "Returns data for a general search of account balance limits.", - "description" : "Returns data for a general search of account balance limits.", - "tags" : [ "BalanceLimits" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The data for searching account balances limits", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DataForBalanceLimitsSearch" - } - } - } + "/totp-secret/verify-activation-code": { + "post": { + "operationId": "verifyTotpSecretActivationCode", + "summary": "Verifies the sent activation code, returning the secret URL for the app.", + "description": "Must be executed for the currently logged user. Once the activation code is verified, the TOTP status is changed to `pending`, and an URI is returned. This URL should be scanned by an authenticator app, which will then add the account in the app. To finalize the activation, a `POST /totp/activate` is needed.", + "tags": [ + "TOTP" + ], + "security": [ + { + "basic": [] }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [], + "responses": { + "200": { + "description": "The code was verified and the URI with the secret is returned.", + "content": { + "text/plain": { + "schema": { + "type": "string" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" - } - } - } - }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" - } - } - } - }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" - } - } - } - } - } - } - }, - "/accounts/balance-limits" : { - "get" : { - "operationId" : "searchAccountBalanceLimits", - "summary" : "Searches for account balance limits.", - "description" : "Searches for account balance limits, according to the given filters.", - "tags" : [ "BalanceLimits" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "accountType", - "in" : "query", - "required" : false, - "description" : "Either id or internal name of the account type", - "schema" : { - "type" : "string" - } - }, { - "name" : "brokers", - "in" : "query", - "required" : false, - "description" : "Either the ids or identification methods of users' broker", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "by", - "in" : "query", - "required" : false, - "description" : "Either the id or identifier of the user that performed the change", - "schema" : { - "type" : "string" - } - }, { - "name" : "currency", - "in" : "query", - "required" : false, - "description" : "Either id or internal name of the currency", - "schema" : { - "type" : "string" - } - }, { - "name" : "customLimit", - "in" : "query", - "required" : false, - "description" : "When set, returns only accounts that have a custom (if true) or have default (false) lower limit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "customLimitRange", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum customized limit. Is only used when `customLimit` is set to true. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "number" - } - } - }, { - "name" : "customUpperLimit", - "in" : "query", - "required" : false, - "description" : "When set, returns only accounts that have a custom (if true) or have default (false) upper limit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "customUpperLimitRange", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum customized upper limit. Is only used when `customUpperLimit` is set to true. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "number" - } - } - }, { - "name" : "groups", - "in" : "query", - "required" : false, - "description" : "Either the ids or internal names of user group", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "page", - "in" : "query", - "required" : false, - "description" : "The page number (zero-based) of the search. The default value is zero.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "pageSize", - "in" : "query", - "required" : false, - "description" : "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "skipTotalCount", - "in" : "query", - "required" : false, - "description" : "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "user", - "in" : "query", - "required" : false, - "description" : "Either the id or identifier of the account owner", - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "The data for searching account balances limits", - "headers" : { - "X-Total-Count" : { - "schema" : { - "type" : "integer" - }, - "description" : "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." - }, - "X-Page-Size" : { - "schema" : { - "type" : "integer" - }, - "description" : "The maximum number of results per page" - }, - "X-Current-Page" : { - "schema" : { - "type" : "integer" - }, - "description" : "The current page the results are in" - }, - "X-Has-Next-Page" : { - "schema" : { - "type" : "boolean" - }, - "description" : "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." - } - }, - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/GeneralAccountBalanceLimitsResult" - } + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } - }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" - } + } + }, + "requestBody": { + "description": "The verification code.", + "required": true, + "content": { + "text/plain": { + "schema": { + "type": "string" } } } } - } - }, - "/accounts/balance-limits/export/{format}" : { - "parameters" : [ { - "$ref" : "#/components/parameters/format" - } ], - "get" : { - "operationId" : "exportAccountBalanceLimits", - "summary" : "Exports the account balance limits results as file.", - "description" : "Generates a file containing the search results. The available export formats are returned in `GET /accounts/data-for-balance-limits`.", - "tags" : [ "BalanceLimits" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "name" : "accountType", - "in" : "query", - "required" : false, - "description" : "Either id or internal name of the account type", - "schema" : { - "type" : "string" - } - }, { - "name" : "brokers", - "in" : "query", - "required" : false, - "description" : "Either the ids or identification methods of users' broker", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "by", - "in" : "query", - "required" : false, - "description" : "Either the id or identifier of the user that performed the change", - "schema" : { - "type" : "string" - } - }, { - "name" : "currency", - "in" : "query", - "required" : false, - "description" : "Either id or internal name of the currency", - "schema" : { - "type" : "string" - } - }, { - "name" : "customLimit", - "in" : "query", - "required" : false, - "description" : "When set, returns only accounts that have a custom (if true) or have default (false) lower limit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "customLimitRange", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum customized limit. Is only used when `customLimit` is set to true. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "number" - } - } - }, { - "name" : "customUpperLimit", - "in" : "query", - "required" : false, - "description" : "When set, returns only accounts that have a custom (if true) or have default (false) upper limit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "customUpperLimitRange", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum customized upper limit. Is only used when `customUpperLimit` is set to true. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "number" - } - } - }, { - "name" : "groups", - "in" : "query", - "required" : false, - "description" : "Either the ids or internal names of user group", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "page", - "in" : "query", - "required" : false, - "description" : "The page number (zero-based) of the search. The default value is zero.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "pageSize", - "in" : "query", - "required" : false, - "description" : "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "skipTotalCount", - "in" : "query", - "required" : false, - "description" : "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "user", - "in" : "query", - "required" : false, - "description" : "Either the id or identifier of the account owner", - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "The file content", - "content" : { - "*/*" : { - "schema" : { - "type" : "string", - "format" : "binary" - } - } - } - }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + } + }, + "/totp-secret/activate": { + "post": { + "operationId": "activateTotpSecret", + "summary": "Finishes the activation process of the TOTP for the logged user.", + "description": "The activation code must have already been verified (status must be `pending`). A numeric sequence generated by the authenticator app must be sent in the request body.", + "tags": [ + "TOTP" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [], + "responses": { + "204": { + "description": "The TOTP secret is activated and nothing is returned." + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } + }, + "requestBody": { + "description": "The TOTP code generated by the authenticator app.", + "required": true, + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } } } }, - "/{user}/accounts/data-for-payment-limits" : { - "parameters" : [ { - "$ref" : "#/components/parameters/user" - } ], - "get" : { - "operationId" : "getDataForUserPaymentLimits", - "summary" : "Returns data regarding the limits of all accounts of a given user.", - "description" : "Returns data regarding the limits of all accounts of a given user.", - "tags" : [ "PaymentLimits" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The user account payment limits data", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UserAccountPaymentLimitsListData" + "/{owner}/accounts": { + "get": { + "operationId": "listAccountsByOwner", + "summary": "Lists accounts of the given owner with their statuses", + "description": "Lists all visible accounts of the given user, or system accounts if the owner 'system' is used. Each account has status information, like the current balance, avaliable balance and so on. However, the returned data depend on the configuration, in the `Account status indicators` option, which is used to limit the amount of data returned.", + "tags": [ + "Accounts" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/owner" + } + ], + "responses": { + "200": { + "description": "The accounts with their statuses.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AccountWithStatus" + } } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -23719,906 +22844,537 @@ } } }, - "/{user}/accounts/{accountType}/payment-limits" : { - "parameters" : [ { - "$ref" : "#/components/parameters/user" - }, { - "$ref" : "#/components/parameters/accountType" - } ], - "get" : { - "operationId" : "getAccountPaymentLimits", - "summary" : "Returns data for the limits of a given account", - "description" : "Returns the data needed to edit the limits of the given account, plus the history of limit changes.", - "tags" : [ "PaymentLimits" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The account limit data.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AccountPaymentLimitsData" + "/{owner}/accounts/list-data": { + "get": { + "operationId": "getOwnerAccountsListData", + "summary": "Returns data for listing accounts of the given owner with their statuses.", + "description": "Returns data containing all visible accounts of the given user, or system accounts if the owner 'system' is used, plus additional data related to them. Each account has status information, like the current balance, avaliable balance and so on. However, the returned data depend on the configuration, in the `Account status indicators` option, which is used to limit the amount of data returned.", + "tags": [ + "Accounts" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/owner" + } + ], + "responses": { + "200": { + "description": "The data for listing accounts with their statuses.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OwnerAccountsListData" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - }, - "put" : { - "operationId" : "setAccountPaymentLimits", - "summary" : "Sets the limits for a given user account.", - "description" : "Saves the account limits. The lower limit may be customized or default, while the upper limit may also be set to unlimited.", - "tags" : [ "PaymentLimits" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/confirmationPassword" - } ], - "responses" : { - "204" : { - "description" : "The limits were changed and nothing is returned." + } + }, + "/{owner}/accounts/{accountType}": { + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/accountType" + } + ], + "get": { + "operationId": "getAccountStatusByOwnerAndType", + "summary": "Returns the status of an account by owner and type", + "description": "Returns the account status for a specific account. The account type may be either the identifier or internal name. The status will contain both instant status information, that is, the same fields as `AccountStatus`, plus status that depend on the input parameters, such as those defined in `AccountWithHistoryStatus`. The actual data inside the result depend on the configuration, in the `Account status indicators` option, which is used to limit the amount of data returned.", + "tags": [ + "Accounts" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "accessClients", + "in": "query", + "required": false, + "description": "References to access clients (id or token) used to perform / receive the transfer.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "amountRange", + "in": "query", + "required": false, + "description": "The minimum / maximum amount. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "number" + } + } + }, + { + "name": "brokers", + "in": "query", + "required": false, + "description": "Reference to the broker of users involved in transfers. Is only taken into account if authenticated as administrator.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "by", + "in": "query", + "required": false, + "description": "Reference to the user that was authenticated when the transfer was performed. Is only taken into account if authenticated as administrator.", + "schema": { + "type": "string" + } + }, + { + "name": "channels", + "in": "query", + "required": false, + "description": "Reference to the channel used to perform / receive the transfer. Only taken into account if authenticated as administrator.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "chargedBack", + "in": "query", + "required": false, + "description": "When set to either `true` will only return transfers that were charged-back. When set to `false`, will only return transfers that were not charged-back. When left blank will not filter by this creterion.", + "schema": { + "type": "boolean" + } + }, + { + "name": "customFields", + "in": "query", + "required": false, + "description": "Transaction custom field values used as filters. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by : (colon). For example, `customFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, customFields=field1:valueA|valueB. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `customFields=rank:bronze|silver,documentDate:2000-01-01|2001-12-31` would match results whose custom field with internal name `rank` is either `bronze` or `silver`, and whose `documentDate` is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `customFields=documentDate:|2001-12-31`. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `customFields=dynamic:a|b|c`. However, it is also possible to perform a partial-match search using the dynamic value label. In this case a single value, prefixed or enclosed by single quotes should be used. For example: `customFields=dynamic:'business` or `customFields=dynamic:'business'`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "datePeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum transfer date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "description", + "in": "query", + "required": false, + "description": "The description to search for.", + "schema": { + "type": "string" + } + }, + { + "name": "direction", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/TransferDirectionEnum" + } + }, + { + "name": "excludedIds", + "in": "query", + "required": false, + "description": "List of transfers ids to be excluded from the result.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "fromCurrentAccessClient", + "in": "query", + "required": false, + "description": "Flag indicating whether to include only transfers by the current access client.", + "schema": { + "type": "boolean" + } + }, + { + "name": "groups", + "in": "query", + "required": false, + "description": "Reference to the user group used to perform / receive the transfer. Only taken into account if authenticated as administrator.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "includeGeneratedByAccessClient", + "in": "query", + "required": false, + "description": "Flag indicating whether to include or not the generated transfer. Only valid if there is at least one access client specified. For example if a `ticket` or `paymentRequest` was processed then a new transfer will be generated.", + "schema": { + "type": "boolean" + } + }, + { + "name": "kinds", + "in": "query", + "required": false, + "description": "The kind of transfers to return", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TransferKind" + } + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number (zero-based) of the search. The default value is zero.", + "schema": { + "type": "integer" + } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } - } + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", + "schema": { + "type": "integer" } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" - } - } + { + "name": "skipTotalCount", + "in": "query", + "required": false, + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", + "schema": { + "type": "boolean" } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" - } + { + "name": "statuses", + "in": "query", + "required": false, + "description": "Transfer statuses used as search criteria. Each array element should be either the identifier or the status qualified internal name, composed by flow internal name, a dot, and the status internal name. For example, `loan.open` would be a valid internal name.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" - } - } + { + "name": "transactionNumber", + "in": "query", + "required": false, + "description": "The transaction number of the matching transfer", + "schema": { + "type": "string" } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" - } + { + "name": "transferFilters", + "in": "query", + "required": false, + "description": "Reference to the transfer filters, which filters transfers by type. May be either the internal id or qualified transfer filter internal name, in the format `accountType.transferFilter`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" - } + { + "name": "transferTypes", + "in": "query", + "required": false, + "description": "Reference to the transfer types for filter. May be either the internal id or qualified transfer type internal name, in the format `accountType.transferType`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" } } + }, + { + "name": "user", + "in": "query", + "required": false, + "description": "Reference a user that should have either received / performed the transfer.", + "schema": { + "type": "string" + } } - }, - "requestBody" : { - "description" : "The new account payment limits", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SetAccountPaymentLimits" + ], + "responses": { + "200": { + "description": "The account", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountWithHistoryStatus" + } } } - } - } - } - }, - "/accounts/data-for-payment-limits" : { - "get" : { - "operationId" : "getAccountPaymentLimitsData", - "summary" : "Returns data for a general search of account payment limits.", - "description" : "Returns data for a general search of account payment limits.", - "tags" : [ "PaymentLimits" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The data for searching account payment limits", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DataForPaymentLimitsSearch" + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" - } - } - } - }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" - } - } - } - }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" - } - } - } - } - } - } - }, - "/accounts/payment-limits" : { - "get" : { - "operationId" : "searchAccountPaymentLimits", - "summary" : "Searches for account payment limits.", - "description" : "Searches for account payment limits, according to the given filters.", - "tags" : [ "PaymentLimits" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "accountType", - "in" : "query", - "required" : false, - "description" : "Either id or internal name of the account type", - "schema" : { - "type" : "string" - } - }, { - "name" : "brokers", - "in" : "query", - "required" : false, - "description" : "Either the ids or identification methods of users' broker", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "by", - "in" : "query", - "required" : false, - "description" : "Either the id or identifier of the user that performed the change", - "schema" : { - "type" : "string" - } - }, { - "name" : "currency", - "in" : "query", - "required" : false, - "description" : "Either id or internal name of the currency", - "schema" : { - "type" : "string" - } - }, { - "name" : "customAmountLimit", - "in" : "query", - "required" : false, - "description" : "When set, returns only accounts that have a custom (if true) or have default (false) payment amount limit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "customAmountLimitRange", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum customized payment amount limit. Is only used when `customAmountLimit` is set to true. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "number" - } - } - }, { - "name" : "customAmountPerDayLimit", - "in" : "query", - "required" : false, - "description" : "When set, returns only accounts that have a custom (if true) or have default (false) payment amount per day limit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "customAmountPerDayLimitRange", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum customized payment amount per day limit. Is only used when `customAmountPerDayLimit` is set to true. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "number" - } - } - }, { - "name" : "customAmountPerMonthLimit", - "in" : "query", - "required" : false, - "description" : "When set, returns only accounts that have a custom (if true) or have default (false) payment amount per month limit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "customAmountPerMonthLimitRange", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum customized payment amount per month limit. Is only used when `customAmountPerMonthLimit` is set to true. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "number" - } - } - }, { - "name" : "customAmountPerWeekLimit", - "in" : "query", - "required" : false, - "description" : "When set, returns only accounts that have a custom (if true) or have default (false) payment amount per week limit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "customAmountPerWeekLimitRange", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum customized payment amount per week limit. Is only used when `customAmountPerWeekLimit` is set to true. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "number" - } - } - }, { - "name" : "customAmountPerYearLimit", - "in" : "query", - "required" : false, - "description" : "When set, returns only accounts that have a custom (if true) or have default (false) payment amount per year limit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "customAmountPerYearLimitRange", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum customized payment amount per year limit. Is only used when `customAmountPerYearLimit` is set to true. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "number" - } - } - }, { - "name" : "groups", - "in" : "query", - "required" : false, - "description" : "Either the ids or internal names of user group", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "page", - "in" : "query", - "required" : false, - "description" : "The page number (zero-based) of the search. The default value is zero.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "pageSize", - "in" : "query", - "required" : false, - "description" : "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "skipTotalCount", - "in" : "query", - "required" : false, - "description" : "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "user", - "in" : "query", - "required" : false, - "description" : "Either the id or identifier of the account owner", - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "The data for searching account payment limits", - "headers" : { - "X-Total-Count" : { - "schema" : { - "type" : "integer" - }, - "description" : "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." - }, - "X-Page-Size" : { - "schema" : { - "type" : "integer" - }, - "description" : "The maximum number of results per page" - }, - "X-Current-Page" : { - "schema" : { - "type" : "integer" - }, - "description" : "The current page the results are in" - }, - "X-Has-Next-Page" : { - "schema" : { - "type" : "boolean" - }, - "description" : "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." - } - }, - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/GeneralAccountPaymentLimitsResult" - } - } - } - } - }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } - } - } - }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" - } - } - } - }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" - } - } - } - }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - } - }, - "/accounts/payment-limits/export/{format}" : { - "parameters" : [ { - "$ref" : "#/components/parameters/format" - } ], - "get" : { - "operationId" : "exportAccountPaymentLimits", - "summary" : "Exports the account payment limits results as file.", - "description" : "Generates a file containing the search results. The available export formats are returned in `GET /accounts/data-for-payment-limits`.", - "tags" : [ "PaymentLimits" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "name" : "accountType", - "in" : "query", - "required" : false, - "description" : "Either id or internal name of the account type", - "schema" : { - "type" : "string" - } - }, { - "name" : "brokers", - "in" : "query", - "required" : false, - "description" : "Either the ids or identification methods of users' broker", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "by", - "in" : "query", - "required" : false, - "description" : "Either the id or identifier of the user that performed the change", - "schema" : { - "type" : "string" - } - }, { - "name" : "currency", - "in" : "query", - "required" : false, - "description" : "Either id or internal name of the currency", - "schema" : { - "type" : "string" - } - }, { - "name" : "customAmountLimit", - "in" : "query", - "required" : false, - "description" : "When set, returns only accounts that have a custom (if true) or have default (false) payment amount limit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "customAmountLimitRange", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum customized payment amount limit. Is only used when `customAmountLimit` is set to true. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "number" - } - } - }, { - "name" : "customAmountPerDayLimit", - "in" : "query", - "required" : false, - "description" : "When set, returns only accounts that have a custom (if true) or have default (false) payment amount per day limit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "customAmountPerDayLimitRange", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum customized payment amount per day limit. Is only used when `customAmountPerDayLimit` is set to true. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "number" - } - } - }, { - "name" : "customAmountPerMonthLimit", - "in" : "query", - "required" : false, - "description" : "When set, returns only accounts that have a custom (if true) or have default (false) payment amount per month limit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "customAmountPerMonthLimitRange", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum customized payment amount per month limit. Is only used when `customAmountPerMonthLimit` is set to true. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "number" - } - } - }, { - "name" : "customAmountPerWeekLimit", - "in" : "query", - "required" : false, - "description" : "When set, returns only accounts that have a custom (if true) or have default (false) payment amount per week limit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "customAmountPerWeekLimitRange", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum customized payment amount per week limit. Is only used when `customAmountPerWeekLimit` is set to true. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "number" - } - } - }, { - "name" : "customAmountPerYearLimit", - "in" : "query", - "required" : false, - "description" : "When set, returns only accounts that have a custom (if true) or have default (false) payment amount per year limit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "customAmountPerYearLimitRange", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum customized payment amount per year limit. Is only used when `customAmountPerYearLimit` is set to true. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "number" - } - } - }, { - "name" : "groups", - "in" : "query", - "required" : false, - "description" : "Either the ids or internal names of user group", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "page", - "in" : "query", - "required" : false, - "description" : "The page number (zero-based) of the search. The default value is zero.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "pageSize", - "in" : "query", - "required" : false, - "description" : "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "skipTotalCount", - "in" : "query", - "required" : false, - "description" : "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "user", - "in" : "query", - "required" : false, - "description" : "Either the id or identifier of the account owner", - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "The file content", - "content" : { - "*/*" : { - "schema" : { - "type" : "string", - "format" : "binary" - } - } - } - }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } - } - } - }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" - } - } - } - }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" - } - } - } - }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" - } - } - } + } + }, + "/{owner}/accounts/{accountType}/data-for-history": { + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/accountType" + } + ], + "get": { + "operationId": "getAccountHistoryDataByOwnerAndType", + "summary": "Returns data for searching an account history by owner and type", + "description": "Returns configuration data for searching entries in a specific account history, as well as status information for that account information.", + "tags": [ + "Accounts" + ], + "security": [ + { + "basic": [] }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" - } - } - } + { + "session": [] }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" - } - } - } + { + "accessClient": [] } - } - } - }, - "/transfers/data-for-search" : { - "get" : { - "operationId" : "getTransferDataForSearch", - "summary" : "Returns configuration data for searching transfers over multiple accounts.", - "description" : "Returns configuration data for searching transfers over multiple accounts.", - "tags" : [ "Transfers" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "Transaction details", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/TransferDataForSearch" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The data for searching account history", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DataForAccountHistory" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -24626,356 +23382,387 @@ } } }, - "/transfers" : { - "get" : { - "operationId" : "searchTransfers", - "summary" : "Searches for transfers over multiple accounts.", - "description" : "Searches for transfers over multiple accounts. Only transfers which can really be seen are returned. So, admins can search over any visible member / system accounts. Brokers can search over their managed members or themselves, and regular members can only search own transfers.", - "tags" : [ "Transfers" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "accessClients", - "in" : "query", - "required" : false, - "description" : "References to access clients (id or token) used to perform / receive the transfer.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "amountRange", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum amount. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "number" - } - } - }, { - "name" : "brokers", - "in" : "query", - "required" : false, - "description" : "Reference to the broker of users involved in transfers. Is only taken into account if authenticated as administrator.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "by", - "in" : "query", - "required" : false, - "description" : "Reference to the user that was authenticated when the transfer was performed. Is only taken into account if authenticated as administrator.", - "schema" : { - "type" : "string" - } - }, { - "name" : "channels", - "in" : "query", - "required" : false, - "description" : "Reference to the channel used to perform / receive the transfer. Only taken into account if authenticated as administrator.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "chargedBack", - "in" : "query", - "required" : false, - "description" : "When set to either `true` will only return transfers that were charged-back. When set to `false`, will only return transfers that were not charged-back. When left blank will not filter by this creterion.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "currencies", - "in" : "query", - "required" : false, - "description" : "Either ids or internal names of the currency", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "datePeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum transfer date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "excludedIds", - "in" : "query", - "required" : false, - "description" : "List of transfers ids to be excluded from the result.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "fromAccountTypes", - "in" : "query", - "required" : false, - "description" : "Either ids or internal names of the origin account type", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "fromCurrentAccessClient", - "in" : "query", - "required" : false, - "description" : "Flag indicating whether to include only transfers by the current access client.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "groups", - "in" : "query", - "required" : false, - "description" : "Reference to the user group used to perform / receive the transfer. Only taken into account if authenticated as administrator.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "includeGeneratedByAccessClient", - "in" : "query", - "required" : false, - "description" : "Flag indicating whether to include or not the generated transfer. Only valid if there is at least one access client specified. For example if a `ticket` or `paymentRequest` was processed then a new transfer will be generated.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "kinds", - "in" : "query", - "required" : false, - "description" : "The kind of transfers to return", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransferKind" - } - } - }, { - "name" : "orderBy", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/TransOrderByEnum" - } - }, { - "name" : "page", - "in" : "query", - "required" : false, - "description" : "The page number (zero-based) of the search. The default value is zero.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "pageSize", - "in" : "query", - "required" : false, - "description" : "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "skipTotalCount", - "in" : "query", - "required" : false, - "description" : "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "statuses", - "in" : "query", - "required" : false, - "description" : "Transfer statuses used as search criteria. Each array element should be either the identifier or the status qualified internal name, composed by flow internal name, a dot, and the status internal name. For example, `loan.open` would be a valid internal name.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "toAccountTypes", - "in" : "query", - "required" : false, - "description" : "Either ids or internal names of the destination account type", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "transactionNumber", - "in" : "query", - "required" : false, - "description" : "The transaction number of the matching transfer", - "schema" : { - "type" : "string" - } - }, { - "name" : "transferFilters", - "in" : "query", - "required" : false, - "description" : "Reference to the transfer filters, which filters transfers by type. May be either the internal id or qualified transfer filter internal name, in the format `accountType.transferFilter`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "transferTypes", - "in" : "query", - "required" : false, - "description" : "Reference to the transfer types for filter. May be either the internal id or qualified transfer type internal name, in the format `accountType.transferType`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "user", - "in" : "query", - "required" : false, - "description" : "Reference a user that should have either received / performed the transfer.", - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "The visible transfers matching the search filters", - "headers" : { - "X-Total-Count" : { - "schema" : { - "type" : "integer" + "/{owner}/accounts/{accountType}/history": { + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/accountType" + } + ], + "get": { + "operationId": "searchAccountHistory", + "summary": "Search an account history", + "description": "Returns a page of account history entries for a specific account, according to the given criteria", + "tags": [ + "Accounts" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "accessClients", + "in": "query", + "required": false, + "description": "References to access clients (id or token) used to perform / receive the transfer.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "amountRange", + "in": "query", + "required": false, + "description": "The minimum / maximum amount. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "number" + } + } + }, + { + "name": "brokers", + "in": "query", + "required": false, + "description": "Reference to the broker of users involved in transfers. Is only taken into account if authenticated as administrator.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "by", + "in": "query", + "required": false, + "description": "Reference to the user that was authenticated when the transfer was performed. Is only taken into account if authenticated as administrator.", + "schema": { + "type": "string" + } + }, + { + "name": "channels", + "in": "query", + "required": false, + "description": "Reference to the channel used to perform / receive the transfer. Only taken into account if authenticated as administrator.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "chargedBack", + "in": "query", + "required": false, + "description": "When set to either `true` will only return transfers that were charged-back. When set to `false`, will only return transfers that were not charged-back. When left blank will not filter by this creterion.", + "schema": { + "type": "boolean" + } + }, + { + "name": "customFields", + "in": "query", + "required": false, + "description": "Transaction custom field values used as filters. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by : (colon). For example, `customFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, customFields=field1:valueA|valueB. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `customFields=rank:bronze|silver,documentDate:2000-01-01|2001-12-31` would match results whose custom field with internal name `rank` is either `bronze` or `silver`, and whose `documentDate` is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `customFields=documentDate:|2001-12-31`. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `customFields=dynamic:a|b|c`. However, it is also possible to perform a partial-match search using the dynamic value label. In this case a single value, prefixed or enclosed by single quotes should be used. For example: `customFields=dynamic:'business` or `customFields=dynamic:'business'`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "datePeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum transfer date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "description", + "in": "query", + "required": false, + "description": "The description to search for.", + "schema": { + "type": "string" + } + }, + { + "name": "direction", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/TransferDirectionEnum" + } + }, + { + "name": "excludedIds", + "in": "query", + "required": false, + "description": "List of transfers ids to be excluded from the result.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "fromCurrentAccessClient", + "in": "query", + "required": false, + "description": "Flag indicating whether to include only transfers by the current access client.", + "schema": { + "type": "boolean" + } + }, + { + "name": "groups", + "in": "query", + "required": false, + "description": "Reference to the user group used to perform / receive the transfer. Only taken into account if authenticated as administrator.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "includeGeneratedByAccessClient", + "in": "query", + "required": false, + "description": "Flag indicating whether to include or not the generated transfer. Only valid if there is at least one access client specified. For example if a `ticket` or `paymentRequest` was processed then a new transfer will be generated.", + "schema": { + "type": "boolean" + } + }, + { + "name": "kinds", + "in": "query", + "required": false, + "description": "The kind of transfers to return", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TransferKind" + } + } + }, + { + "name": "orderBy", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/TransOrderByEnum" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number (zero-based) of the search. The default value is zero.", + "schema": { + "type": "integer" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", + "schema": { + "type": "integer" + } + }, + { + "name": "skipTotalCount", + "in": "query", + "required": false, + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", + "schema": { + "type": "boolean" + } + }, + { + "name": "statuses", + "in": "query", + "required": false, + "description": "Transfer statuses used as search criteria. Each array element should be either the identifier or the status qualified internal name, composed by flow internal name, a dot, and the status internal name. For example, `loan.open` would be a valid internal name.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "transactionNumber", + "in": "query", + "required": false, + "description": "The transaction number of the matching transfer", + "schema": { + "type": "string" + } + }, + { + "name": "transferFilters", + "in": "query", + "required": false, + "description": "Reference to the transfer filters, which filters transfers by type. May be either the internal id or qualified transfer filter internal name, in the format `accountType.transferFilter`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "transferTypes", + "in": "query", + "required": false, + "description": "Reference to the transfer types for filter. May be either the internal id or qualified transfer type internal name, in the format `accountType.transferType`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "user", + "in": "query", + "required": false, + "description": "Reference a user that should have either received / performed the transfer.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The account history entries matching the criteria", + "headers": { + "X-Total-Count": { + "schema": { + "type": "integer" }, - "description" : "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." + "description": "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." }, - "X-Page-Size" : { - "schema" : { - "type" : "integer" + "X-Page-Size": { + "schema": { + "type": "integer" }, - "description" : "The maximum number of results per page" + "description": "The maximum number of results per page" }, - "X-Current-Page" : { - "schema" : { - "type" : "integer" + "X-Current-Page": { + "schema": { + "type": "integer" }, - "description" : "The current page the results are in" + "description": "The current page the results are in" }, - "X-Has-Next-Page" : { - "schema" : { - "type" : "boolean" + "X-Has-Next-Page": { + "schema": { + "type": "boolean" }, - "description" : "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." + "description": "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." } }, - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransferResult" + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AccountHistoryResult" } } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -24983,660 +23770,369 @@ } } }, - "/transfers/summary" : { - "get" : { - "operationId" : "searchTransfersSummary", - "summary" : "Returns totals per currency for the transfers search.", - "description" : "For each returned currency, according to the visibility and filters, a summary is returned for the total visible transactions.", - "tags" : [ "Transfers" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "accessClients", - "in" : "query", - "required" : false, - "description" : "References to access clients (id or token) used to perform / receive the transfer.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "amountRange", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum amount. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "number" - } - } - }, { - "name" : "brokers", - "in" : "query", - "required" : false, - "description" : "Reference to the broker of users involved in transfers. Is only taken into account if authenticated as administrator.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "by", - "in" : "query", - "required" : false, - "description" : "Reference to the user that was authenticated when the transfer was performed. Is only taken into account if authenticated as administrator.", - "schema" : { - "type" : "string" - } - }, { - "name" : "channels", - "in" : "query", - "required" : false, - "description" : "Reference to the channel used to perform / receive the transfer. Only taken into account if authenticated as administrator.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "chargedBack", - "in" : "query", - "required" : false, - "description" : "When set to either `true` will only return transfers that were charged-back. When set to `false`, will only return transfers that were not charged-back. When left blank will not filter by this creterion.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "currencies", - "in" : "query", - "required" : false, - "description" : "Either ids or internal names of the currency", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "datePeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum transfer date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "excludedIds", - "in" : "query", - "required" : false, - "description" : "List of transfers ids to be excluded from the result.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "fromAccountTypes", - "in" : "query", - "required" : false, - "description" : "Either ids or internal names of the origin account type", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "fromCurrentAccessClient", - "in" : "query", - "required" : false, - "description" : "Flag indicating whether to include only transfers by the current access client.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "groups", - "in" : "query", - "required" : false, - "description" : "Reference to the user group used to perform / receive the transfer. Only taken into account if authenticated as administrator.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "includeGeneratedByAccessClient", - "in" : "query", - "required" : false, - "description" : "Flag indicating whether to include or not the generated transfer. Only valid if there is at least one access client specified. For example if a `ticket` or `paymentRequest` was processed then a new transfer will be generated.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "kinds", - "in" : "query", - "required" : false, - "description" : "The kind of transfers to return", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransferKind" - } - } - }, { - "name" : "orderBy", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/TransOrderByEnum" - } - }, { - "name" : "page", - "in" : "query", - "required" : false, - "description" : "The page number (zero-based) of the search. The default value is zero.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "pageSize", - "in" : "query", - "required" : false, - "description" : "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "skipTotalCount", - "in" : "query", - "required" : false, - "description" : "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "statuses", - "in" : "query", - "required" : false, - "description" : "Transfer statuses used as search criteria. Each array element should be either the identifier or the status qualified internal name, composed by flow internal name, a dot, and the status internal name. For example, `loan.open` would be a valid internal name.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "toAccountTypes", - "in" : "query", - "required" : false, - "description" : "Either ids or internal names of the destination account type", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "transactionNumber", - "in" : "query", - "required" : false, - "description" : "The transaction number of the matching transfer", - "schema" : { - "type" : "string" - } - }, { - "name" : "transferFilters", - "in" : "query", - "required" : false, - "description" : "Reference to the transfer filters, which filters transfers by type. May be either the internal id or qualified transfer filter internal name, in the format `accountType.transferFilter`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "transferTypes", - "in" : "query", - "required" : false, - "description" : "Reference to the transfer types for filter. May be either the internal id or qualified transfer type internal name, in the format `accountType.transferType`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "user", - "in" : "query", - "required" : false, - "description" : "Reference a user that should have either received / performed the transfer.", - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "The summaries for each account", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/CurrencyAmountSummary" - } - } - } + "/{owner}/accounts/{accountType}/export/{format}": { + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/accountType" + }, + { + "$ref": "#/components/parameters/format" + } + ], + "get": { + "operationId": "exportAccountHistory", + "summary": "Exports the accounts history entries as file", + "description": "Generates a file containing the search results. The available export formats are returned in `GET /{owner}/accounts/{accountType}/data-for-history`.", + "tags": [ + "Accounts" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "name": "accessClients", + "in": "query", + "required": false, + "description": "References to access clients (id or token) used to perform / receive the transfer.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "amountRange", + "in": "query", + "required": false, + "description": "The minimum / maximum amount. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "number" + } + } + }, + { + "name": "brokers", + "in": "query", + "required": false, + "description": "Reference to the broker of users involved in transfers. Is only taken into account if authenticated as administrator.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "by", + "in": "query", + "required": false, + "description": "Reference to the user that was authenticated when the transfer was performed. Is only taken into account if authenticated as administrator.", + "schema": { + "type": "string" + } + }, + { + "name": "channels", + "in": "query", + "required": false, + "description": "Reference to the channel used to perform / receive the transfer. Only taken into account if authenticated as administrator.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "chargedBack", + "in": "query", + "required": false, + "description": "When set to either `true` will only return transfers that were charged-back. When set to `false`, will only return transfers that were not charged-back. When left blank will not filter by this creterion.", + "schema": { + "type": "boolean" + } + }, + { + "name": "customFields", + "in": "query", + "required": false, + "description": "Transaction custom field values used as filters. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by : (colon). For example, `customFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, customFields=field1:valueA|valueB. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `customFields=rank:bronze|silver,documentDate:2000-01-01|2001-12-31` would match results whose custom field with internal name `rank` is either `bronze` or `silver`, and whose `documentDate` is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `customFields=documentDate:|2001-12-31`. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `customFields=dynamic:a|b|c`. However, it is also possible to perform a partial-match search using the dynamic value label. In this case a single value, prefixed or enclosed by single quotes should be used. For example: `customFields=dynamic:'business` or `customFields=dynamic:'business'`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "datePeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum transfer date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "description", + "in": "query", + "required": false, + "description": "The description to search for.", + "schema": { + "type": "string" + } + }, + { + "name": "direction", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/TransferDirectionEnum" + } + }, + { + "name": "excludedIds", + "in": "query", + "required": false, + "description": "List of transfers ids to be excluded from the result.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "fromCurrentAccessClient", + "in": "query", + "required": false, + "description": "Flag indicating whether to include only transfers by the current access client.", + "schema": { + "type": "boolean" + } + }, + { + "name": "groups", + "in": "query", + "required": false, + "description": "Reference to the user group used to perform / receive the transfer. Only taken into account if authenticated as administrator.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "includeGeneratedByAccessClient", + "in": "query", + "required": false, + "description": "Flag indicating whether to include or not the generated transfer. Only valid if there is at least one access client specified. For example if a `ticket` or `paymentRequest` was processed then a new transfer will be generated.", + "schema": { + "type": "boolean" + } + }, + { + "name": "kinds", + "in": "query", + "required": false, + "description": "The kind of transfers to return", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TransferKind" + } + } + }, + { + "name": "orderBy", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/TransOrderByEnum" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number (zero-based) of the search. The default value is zero.", + "schema": { + "type": "integer" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", + "schema": { + "type": "integer" } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } - } + { + "name": "skipTotalCount", + "in": "query", + "required": false, + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", + "schema": { + "type": "boolean" } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" - } + { + "name": "statuses", + "in": "query", + "required": false, + "description": "Transfer statuses used as search criteria. Each array element should be either the identifier or the status qualified internal name, composed by flow internal name, a dot, and the status internal name. For example, `loan.open` would be a valid internal name.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" - } + { + "name": "transactionNumber", + "in": "query", + "required": false, + "description": "The transaction number of the matching transfer", + "schema": { + "type": "string" + } + }, + { + "name": "transferFilters", + "in": "query", + "required": false, + "description": "Reference to the transfer filters, which filters transfers by type. May be either the internal id or qualified transfer filter internal name, in the format `accountType.transferFilter`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" - } + { + "name": "transferTypes", + "in": "query", + "required": false, + "description": "Reference to the transfer types for filter. May be either the internal id or qualified transfer type internal name, in the format `accountType.transferType`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + { + "name": "user", + "in": "query", + "required": false, + "description": "Reference a user that should have either received / performed the transfer.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The file content", + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" } } } - } - } - } - }, - "/transfers/export/{format}" : { - "parameters" : [ { - "$ref" : "#/components/parameters/format" - } ], - "get" : { - "operationId" : "exportTransfers", - "summary" : "Exports the transfers search results as file", - "description" : "Generates a file containing the search results. The available export formats are returned in `GET /transfers/data-for-search`.", - "tags" : [ "Transfers" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "name" : "accessClients", - "in" : "query", - "required" : false, - "description" : "References to access clients (id or token) used to perform / receive the transfer.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "amountRange", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum amount. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "number" - } - } - }, { - "name" : "brokers", - "in" : "query", - "required" : false, - "description" : "Reference to the broker of users involved in transfers. Is only taken into account if authenticated as administrator.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "by", - "in" : "query", - "required" : false, - "description" : "Reference to the user that was authenticated when the transfer was performed. Is only taken into account if authenticated as administrator.", - "schema" : { - "type" : "string" - } - }, { - "name" : "channels", - "in" : "query", - "required" : false, - "description" : "Reference to the channel used to perform / receive the transfer. Only taken into account if authenticated as administrator.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "chargedBack", - "in" : "query", - "required" : false, - "description" : "When set to either `true` will only return transfers that were charged-back. When set to `false`, will only return transfers that were not charged-back. When left blank will not filter by this creterion.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "currencies", - "in" : "query", - "required" : false, - "description" : "Either ids or internal names of the currency", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "datePeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum transfer date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "excludedIds", - "in" : "query", - "required" : false, - "description" : "List of transfers ids to be excluded from the result.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "fromAccountTypes", - "in" : "query", - "required" : false, - "description" : "Either ids or internal names of the origin account type", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "fromCurrentAccessClient", - "in" : "query", - "required" : false, - "description" : "Flag indicating whether to include only transfers by the current access client.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "groups", - "in" : "query", - "required" : false, - "description" : "Reference to the user group used to perform / receive the transfer. Only taken into account if authenticated as administrator.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "includeGeneratedByAccessClient", - "in" : "query", - "required" : false, - "description" : "Flag indicating whether to include or not the generated transfer. Only valid if there is at least one access client specified. For example if a `ticket` or `paymentRequest` was processed then a new transfer will be generated.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "kinds", - "in" : "query", - "required" : false, - "description" : "The kind of transfers to return", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransferKind" - } - } - }, { - "name" : "orderBy", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/TransOrderByEnum" - } - }, { - "name" : "page", - "in" : "query", - "required" : false, - "description" : "The page number (zero-based) of the search. The default value is zero.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "pageSize", - "in" : "query", - "required" : false, - "description" : "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "skipTotalCount", - "in" : "query", - "required" : false, - "description" : "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "statuses", - "in" : "query", - "required" : false, - "description" : "Transfer statuses used as search criteria. Each array element should be either the identifier or the status qualified internal name, composed by flow internal name, a dot, and the status internal name. For example, `loan.open` would be a valid internal name.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "toAccountTypes", - "in" : "query", - "required" : false, - "description" : "Either ids or internal names of the destination account type", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "transactionNumber", - "in" : "query", - "required" : false, - "description" : "The transaction number of the matching transfer", - "schema" : { - "type" : "string" - } - }, { - "name" : "transferFilters", - "in" : "query", - "required" : false, - "description" : "Reference to the transfer filters, which filters transfers by type. May be either the internal id or qualified transfer filter internal name, in the format `accountType.transferFilter`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "transferTypes", - "in" : "query", - "required" : false, - "description" : "Reference to the transfer types for filter. May be either the internal id or qualified transfer type internal name, in the format `accountType.transferType`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "user", - "in" : "query", - "required" : false, - "description" : "Reference a user that should have either received / performed the transfer.", - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "The file content", - "content" : { - "*/*" : { - "schema" : { - "type" : "string", - "format" : "binary" - } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } } } - }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + }, + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -25644,87 +24140,126 @@ } } }, - "/transfers/{key}" : { - "get" : { - "operationId" : "viewTransfer", - "summary" : "Returns details about a transfer", - "description" : "Returns details about a transfer.", - "tags" : [ "Transfers" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "key", - "in" : "path", - "required" : true, - "description" : "Either the id or transaction number", - "schema" : { - "type" : "string" + "/{owner}/accounts/{accountType}/balances-history": { + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/accountType" + } + ], + "get": { + "operationId": "getAccountBalanceHistory", + "summary": "Returns the account balances over time", + "description": "Receives a period and an interval, returning the balance over each corresponding date. The maximum number of data points is 60, so it is possible to get the balances per day over 2 months. For larger periods, use weeks or months. When no period is given, assumes the beginning of current year or the account creation date, whichever is newer. When no interval is given, one is assumed. Also returns status of the given account", + "tags": [ + "Accounts" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "datePeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum transfer date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "intervalUnit", + "in": "query", + "required": false, + "description": "The time unit for the data point interval", + "schema": { + "$ref": "#/components/schemas/TimeFieldEnum" + } + }, + { + "name": "intervalCount", + "in": "query", + "required": false, + "description": "A data point every X units. For example, it is possible to request the balance every 3 days. Defaults to 1.", + "schema": { + "type": "integer" + } } - } ], - "responses" : { - "200" : { - "description" : "Transaction details", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/TransferView" + ], + "responses": { + "200": { + "description": "The account balances over each datapoint", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountBalanceHistoryResult" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -25732,88 +24267,87 @@ } } }, - "/transfers/{key}/export/{format}" : { - "parameters" : [ { - "name" : "key", - "in" : "path", - "required" : true, - "description" : "Either the id or transaction number", - "schema" : { - "type" : "string" - } - }, { - "$ref" : "#/components/parameters/format" - } ], - "get" : { - "operationId" : "exportTransfer", - "summary" : "Exports the transfer details to a file.", - "description" : "Exports the transfer details to a file. The available formats are available in `TransferView`", - "tags" : [ "Transfers" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "200" : { - "description" : "The file content", - "content" : { - "*/*" : { - "schema" : { - "type" : "string", - "format" : "binary" + "/accounts/data-for-user-balances": { + "get": { + "operationId": "getUserBalancesData", + "summary": "Returns data for searching users together with their balances", + "description": "Returns configuration data for searching users together with their balances. The account types are returned, and the account type needs to be passed in the other `user-balances` operations.", + "tags": [ + "Accounts" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The data for searching users with balances", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DataForUserBalancesSearch" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -25821,170 +24355,441 @@ } } }, - "/transfers/{key}/chargeback" : { - "post" : { - "operationId" : "chargebackTransfer", - "summary" : "Perform the chargeback of a transfer", - "description" : "The chargeback generates a new transaction with `kind` = `chargeback`. A new transfer is generated with the same from / to, and negative amount. This will effectively return the amount to the original account. Only top-level transfers can be charged back. For example, a transfer used to charge a fee cannot be charged back. Also, the hability to chargeback a transfer depends on permissions and configuration like the maximum allowed time for the chargeback.", - "tags" : [ "Transfers" ], - "parameters" : [ { - "name" : "key", - "in" : "path", - "required" : true, - "description" : "Either the id or transaction number", - "schema" : { - "type" : "string" - } - }, { - "$ref" : "#/components/parameters/confirmationPassword" - } ], - "responses" : { - "201" : { - "description" : "The chargeback id", - "headers" : { - "Location" : { - "description" : "URL for viewing the created chargeback", - "schema" : { - "type" : "string" - } - } - }, - "content" : { - "text/plain" : { - "schema" : { - "type" : "string" - } - } + "/accounts/{accountType}/user-balances/summary": { + "get": { + "operationId": "getUserBalancesSummary", + "summary": "Returns summarized information for the user balances search", + "description": "Returns summaries for each balance level (if ranges are defined in either account type or filter), as well as the total summary.", + "tags": [ + "Accounts" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "acceptedAgreements", + "in": "query", + "required": false, + "description": "Either id or internal names of agreements the user must have accepted. Ignored if the logged user isn't an admin or broker with permission to view the user agreement log.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "accountType", + "in": "path", + "required": true, + "description": "The account type", + "schema": { + "type": "string" + } + }, + { + "name": "activationPeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum user activation date. Only taken into account if searching as administrator or managing broker. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "addressResult", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/UserAddressResultEnum" + } + }, + { + "name": "balanceRange", + "in": "query", + "required": false, + "description": "The minimum and / or maximum balance for users to be returned. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "number" + } + } + }, + { + "name": "brokers", + "in": "query", + "required": false, + "description": "Either id or a principal (login name, e-mail, etc) for brokers", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "creationPeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum user creation date. Only taken into account if searching as administrator or managing broker. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "groups", + "in": "query", + "required": false, + "description": "Either id or internal names of groups / group sets", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "hasBroker", + "in": "query", + "required": false, + "description": "When set to `true`, will match only users that have at least one broker. When set to `false`, will will match only users without brokers. Ignored if the logged user isn't an admin.", + "schema": { + "type": "boolean" + } + }, + { + "name": "ignoreProfileFieldsInList", + "in": "query", + "required": false, + "description": "When set to `true`, instead of returning users with corresponding profile fields set on list, will return them with `display`.", + "schema": { + "type": "boolean" + } + }, + { + "name": "includeGlobal", + "in": "query", + "required": false, + "description": "Indicates whether global administrators should be returned when searching users in a network. Only usable by global administrators.", + "schema": { + "type": "boolean" + } + }, + { + "name": "includeGroup", + "in": "query", + "required": false, + "description": "When set to `true` and the logged user has permission to view user groups, will return the `group` property on users.", + "schema": { + "type": "boolean" + } + }, + { + "name": "includeGroupSet", + "in": "query", + "required": false, + "description": "When set to `true` and the logged user has permission to view user group sets, will return the `groupSet` property on users.", + "schema": { + "type": "boolean" + } + }, + { + "name": "invitedBy", + "in": "query", + "required": false, + "description": "The user that has invited the returned users. Only used when searching as a manager (admin / broker).", + "schema": { + "type": "string" + } + }, + { + "name": "keywords", + "in": "query", + "required": false, + "description": "Textual search keywords. Sometimes, like in user search, the fields matched depends on what is configured on the products.", + "schema": { + "type": "string" + } + }, + { + "name": "lastLoginPeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum user last login date. Only taken into account if searching as administrator or managing broker. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "latitude", + "in": "query", + "required": false, + "description": "The reference latitude for distance searches", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "longitude", + "in": "query", + "required": false, + "description": "The reference longitude for distance searches", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "mainBrokerOnly", + "in": "query", + "required": false, + "description": "When set to `true`, will match only users that have the brokers as set in the `brokers` parameter as main broker.", + "schema": { + "type": "boolean" + } + }, + { + "name": "maxDistance", + "in": "query", + "required": false, + "description": "Maximum straight-line distance between the informed location and the resulting address. Is measured either in kilometers or miles, depending on the configuration. Only accepted if both `longitude` and `latitude` parameters are passed with the actual reference position.", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "mediumBalanceRange", + "in": "query", + "required": false, + "description": "An array with 2 elements, describing the lower and upper medium balance bounds. Both of them need to be set as 2 element in the array, or it won't be considered.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "integer" + } + } + }, + { + "name": "negativeSincePeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum negative-since date for users to be returned. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "notAcceptedAgreements", + "in": "query", + "required": false, + "description": "Either id or internal names of agreements the user must not have accepted. Ignored if the logged user isn't an admin or broker with permission to view the user agreement log.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number (zero-based) of the search. The default value is zero.", + "schema": { + "type": "integer" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", + "schema": { + "type": "integer" + } + }, + { + "name": "products", + "in": "query", + "required": false, + "description": "Either id or internal names of products the users should have assigned. Ignored if the authenticated user isn't an administrator.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } - } + { + "name": "productsIndividuallyAssigned", + "in": "query", + "required": false, + "description": "When set to `true`, the list specifid in `products` will only match users with those products assigned individually, not via group or group set. When set to `false` (default), the products will match any level (individual, group or group set).", + "schema": { + "type": "boolean" } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" - } + { + "name": "profileFields", + "in": "query", + "required": false, + "description": "User profile fields, both basic (full name, login name, phone, e-mail, etc) and custom fields, that are used for search. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by `:` (colon). For example, `profileFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, `profileFields=field1:valueA|valueB`. The accepted fields depend on the products the authenticated user has. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `profileFields=rank:bronze|silver,birthDate:2000-01-01|2001-12-31` would match results whose custom field with internal name 'rank' is either bronze or silver, and whose 'birthDate' is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `profileFields=birthDate:|2001-12-31`.\nThe basic profile fields have one of the following identifiers:\n- `name` or `fullName`: Full name; - `username`, `loginName` or `login`: Login name; - `email`: E-mail; - `phone`: Phone; - `accountNumber`, `account`: Account number; - `image`: Image (accepts a boolean value, indicating that either it is required that users either have images or not).\n\nIf address is an allowed profile field for search, specific address fields may be searched. The allowed ones are normally returned as the `addressFieldsInSearch` field in the corresponding result from a data-for-search request. The specific address fields are:\n- `address`: Searches on any address field (not a specific field); - `address.address`: Searches on the fields that represent the street address, which are `addressLine1`, `addressLine2`, `street`, `buildingNumber` and `complement`. Note that normally only a subset of them should be enabled in the configuration (either line 1 / 2 or street + number + complement);\n- `address.zip`: Searches for matching zip (postal) code; - `address.poBox`: Searches for matching postal box; - `address.neighborhood`: Searches by neighborhood; - `address.city`: Searches by city; - `address.region`: Searches by region (or state); - `address.country`: Searches by ISO 3166-1 alpha-2 country code. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `profileFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `profileFields=dynamic:'business`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" - } + { + "name": "skipTotalCount", + "in": "query", + "required": false, + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", + "schema": { + "type": "boolean" + } + }, + { + "name": "statuses", + "in": "query", + "required": false, + "description": "The possible status of the user. If no status is given, `active` and `blocked` users are returned.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserStatusEnum" } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" - } + { + "name": "usersToExclude", + "in": "query", + "required": false, + "description": "Indicated the users to be excluded from the result", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" } } }, - "500" : { - "description" : "There was an error while creating the chargeback payment", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PaymentError" - } + { + "name": "usersToInclude", + "in": "query", + "required": false, + "description": "Indicated the users to be included in the result. Any other user not present in this list will be excluded from the result.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" } } } - } - } - }, - "/{owner}/transactions/data-for-search" : { - "get" : { - "operationId" : "getTransactionsDataForSearch", - "summary" : "Returns data for searching transactions of an account owner", - "description" : "Returns data which can be used to filter a transaction search", - "tags" : [ "Transactions" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/owner" - } ], - "responses" : { - "200" : { - "description" : "Data for searching transactions of an account owner", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/TransactionDataForSearch" + ], + "responses": { + "200": { + "description": "The summary of user balances matching the parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UsersWithBalanceSummary" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -25992,466 +24797,478 @@ } } }, - "/{owner}/transactions" : { - "parameters" : [ { - "$ref" : "#/components/parameters/owner" - } ], - "get" : { - "operationId" : "searchTransactions", - "summary" : "Searches transactions of an account owner", - "description" : "Returns the transactions of a given account owner that match the specified criteria. Each result will will be relative to this owner. The amount may be positive or negative, depending on whether this owner has performed or received the transaction.", - "tags" : [ "Transactions" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "accessClients", - "in" : "query", - "required" : false, - "description" : "References to access clients (id or token) used to perform / receive the transfer.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "accountTypes", - "in" : "query", - "required" : false, - "description" : "The account types", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "amountRange", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum amount. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "number" - } - } - }, { - "name" : "authorizationPerformedBy", - "in" : "query", - "required" : false, - "description" : "Id or other identifier (login name, email, etc) of the user that performed an authorization action (authorize, deny or cancel).", - "schema" : { - "type" : "string" - } - }, { - "name" : "authorizationRoles", - "in" : "query", - "required" : false, - "description" : "Either internal names or ids of authorization roles. To match, transactions must be pending authorization in a level which can be authorized by any of the given roles.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "authorizationStatuses", - "in" : "query", - "required" : false, - "description" : "Authorization statuses used as search criteria. When set, only kinds that can go through authorization are returned (`payment`, `order`, `recurringPayment` or `scheduledPayment`).", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransactionAuthorizationStatusEnum" - } - } - }, { - "name" : "authorized", - "in" : "query", - "required" : false, - "description" : "When set, will only return transactions that went through the authorization process (if true) or that never went through it (when false). In either case, only kinds that can go through authorization are returned (`payment`, `order`, `recurringPayment` or `scheduledPayment`).", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "brokers", - "in" : "query", - "required" : false, - "description" : "Reference to the broker of users involved in transfers. Is only taken into account if authenticated as administrator.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "by", - "in" : "query", - "required" : false, - "description" : "Reference to the user that was authenticated when the transfer was performed. Is only taken into account if authenticated as administrator.", - "schema" : { - "type" : "string" - } - }, { - "name" : "channels", - "in" : "query", - "required" : false, - "description" : "Reference to the channel used to perform / receive the transfer. Only taken into account if authenticated as administrator.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "creationTypes", - "in" : "query", - "required" : false, - "description" : "Include only payments created as one of these. This filter only applies to the following kinds: `payment`, `scheduledPayment` and `recurringPayment`. It doesn't affect other kinds of returned transactions. If you only want payments to be returned, set these in the `kinds` filter.", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PaymentCreationTypeEnum" - } - } - }, { - "name" : "datePeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum transfer date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "direction", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/TransferDirectionEnum" - } - }, { - "name" : "excludedIds", - "in" : "query", - "required" : false, - "description" : "List of transfers ids to be excluded from the result.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "externalPaymentExpiration", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum date for external payment expiration. Only affects external payments. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "externalPaymentStatuses", - "in" : "query", - "required" : false, - "description" : "Statuses used as search criteria applied only to transactions of kind `externalPayment`.", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ExternalPaymentStatusEnum" - } - } - }, { - "name" : "fromCurrentAccessClient", - "in" : "query", - "required" : false, - "description" : "Flag indicating whether to include only transfers by the current access client.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "groups", - "in" : "query", - "required" : false, - "description" : "Reference to the user group used to perform / receive the transfer. Only taken into account if authenticated as administrator.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "includeGeneratedByAccessClient", - "in" : "query", - "required" : false, - "description" : "Flag indicating whether to include or not the generated transfer. Only valid if there is at least one access client specified. For example if a `ticket` or `paymentRequest` was processed then a new transfer will be generated.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "kinds", - "in" : "query", - "required" : false, - "description" : "The kinds of transactions to include", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransactionKind" - } - } - }, { - "name" : "orderBy", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/TransOrderByEnum" - } - }, { - "name" : "page", - "in" : "query", - "required" : false, - "description" : "The page number (zero-based) of the search. The default value is zero.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "pageSize", - "in" : "query", - "required" : false, - "description" : "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "paymentRequestExpiration", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum date for payment request expiration. Only affects payment requests. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "paymentRequestStatuses", - "in" : "query", - "required" : false, - "description" : "Statuses used as search criteria applied only to transactions of kind `paymentRequest`.", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PaymentRequestStatusEnum" - } - } - }, { - "name" : "recurringPaymentStatuses", - "in" : "query", - "required" : false, - "description" : "Statuses used as search criteria applied only to transactions of kind `recurringPayment`. If this filter is not empty then pending recurring payments will be excluded from the result. Pending recurring payments does not have a status.", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/RecurringPaymentStatusEnum" - } - } - }, { - "name" : "scheduledPaymentStatuses", - "in" : "query", - "required" : false, - "description" : "Statuses used as search criteria applied only to transactions of kind `scheduledPayment`. If this filter is not empty then pending scheduled payments will be excluded from the result. Pending scheduled payments does not have a status.", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ScheduledPaymentStatusEnum" - } - } - }, { - "name" : "skipTotalCount", - "in" : "query", - "required" : false, - "description" : "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "ticketExpiration", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum date for ticket expiration. Only affects tickets. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "ticketStatuses", - "in" : "query", - "required" : false, - "description" : "Statuses used as search criteria applied only to transactions of kind `ticket`.", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TicketStatusEnum" - } - } - }, { - "name" : "transactionNumber", - "in" : "query", - "required" : false, - "description" : "The transaction number of the matching transfer", - "schema" : { - "type" : "string" - } - }, { - "name" : "transferFilters", - "in" : "query", - "required" : false, - "description" : "Reference to the transfer filters, which filters transfers by type. May be either the internal id or qualified transfer filter internal name, in the format `accountType.transferFilter`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "transferTypes", - "in" : "query", - "required" : false, - "description" : "Reference to the transfer types for filter. May be either the internal id or qualified transfer type internal name, in the format `accountType.transferType`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "user", - "in" : "query", - "required" : false, - "description" : "Reference a user that should have either received / performed the transfer.", - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "The transaction entries matching the criteria", - "headers" : { - "X-Total-Count" : { - "schema" : { - "type" : "integer" + "/accounts/{accountType}/user-balances": { + "get": { + "operationId": "searchUsersWithBalances", + "summary": "Searches for users together with balance information", + "description": "Returns the users, together with their balances", + "tags": [ + "Accounts" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "acceptedAgreements", + "in": "query", + "required": false, + "description": "Either id or internal names of agreements the user must have accepted. Ignored if the logged user isn't an admin or broker with permission to view the user agreement log.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "accountType", + "in": "path", + "required": true, + "description": "The account type", + "schema": { + "type": "string" + } + }, + { + "name": "activationPeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum user activation date. Only taken into account if searching as administrator or managing broker. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "addressResult", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/UserAddressResultEnum" + } + }, + { + "name": "balanceRange", + "in": "query", + "required": false, + "description": "The minimum and / or maximum balance for users to be returned. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "number" + } + } + }, + { + "name": "brokers", + "in": "query", + "required": false, + "description": "Either id or a principal (login name, e-mail, etc) for brokers", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "creationPeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum user creation date. Only taken into account if searching as administrator or managing broker. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "groups", + "in": "query", + "required": false, + "description": "Either id or internal names of groups / group sets", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "hasBroker", + "in": "query", + "required": false, + "description": "When set to `true`, will match only users that have at least one broker. When set to `false`, will will match only users without brokers. Ignored if the logged user isn't an admin.", + "schema": { + "type": "boolean" + } + }, + { + "name": "ignoreProfileFieldsInList", + "in": "query", + "required": false, + "description": "When set to `true`, instead of returning users with corresponding profile fields set on list, will return them with `display`.", + "schema": { + "type": "boolean" + } + }, + { + "name": "includeGlobal", + "in": "query", + "required": false, + "description": "Indicates whether global administrators should be returned when searching users in a network. Only usable by global administrators.", + "schema": { + "type": "boolean" + } + }, + { + "name": "includeGroup", + "in": "query", + "required": false, + "description": "When set to `true` and the logged user has permission to view user groups, will return the `group` property on users.", + "schema": { + "type": "boolean" + } + }, + { + "name": "includeGroupSet", + "in": "query", + "required": false, + "description": "When set to `true` and the logged user has permission to view user group sets, will return the `groupSet` property on users.", + "schema": { + "type": "boolean" + } + }, + { + "name": "invitedBy", + "in": "query", + "required": false, + "description": "The user that has invited the returned users. Only used when searching as a manager (admin / broker).", + "schema": { + "type": "string" + } + }, + { + "name": "keywords", + "in": "query", + "required": false, + "description": "Textual search keywords. Sometimes, like in user search, the fields matched depends on what is configured on the products.", + "schema": { + "type": "string" + } + }, + { + "name": "lastLoginPeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum user last login date. Only taken into account if searching as administrator or managing broker. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "latitude", + "in": "query", + "required": false, + "description": "The reference latitude for distance searches", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "longitude", + "in": "query", + "required": false, + "description": "The reference longitude for distance searches", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "mainBrokerOnly", + "in": "query", + "required": false, + "description": "When set to `true`, will match only users that have the brokers as set in the `brokers` parameter as main broker.", + "schema": { + "type": "boolean" + } + }, + { + "name": "maxDistance", + "in": "query", + "required": false, + "description": "Maximum straight-line distance between the informed location and the resulting address. Is measured either in kilometers or miles, depending on the configuration. Only accepted if both `longitude` and `latitude` parameters are passed with the actual reference position.", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "mediumBalanceRange", + "in": "query", + "required": false, + "description": "An array with 2 elements, describing the lower and upper medium balance bounds. Both of them need to be set as 2 element in the array, or it won't be considered.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "integer" + } + } + }, + { + "name": "negativeSincePeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum negative-since date for users to be returned. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "notAcceptedAgreements", + "in": "query", + "required": false, + "description": "Either id or internal names of agreements the user must not have accepted. Ignored if the logged user isn't an admin or broker with permission to view the user agreement log.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "orderBy", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/UsersWithBalanceOrderByEnum" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number (zero-based) of the search. The default value is zero.", + "schema": { + "type": "integer" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", + "schema": { + "type": "integer" + } + }, + { + "name": "products", + "in": "query", + "required": false, + "description": "Either id or internal names of products the users should have assigned. Ignored if the authenticated user isn't an administrator.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "productsIndividuallyAssigned", + "in": "query", + "required": false, + "description": "When set to `true`, the list specifid in `products` will only match users with those products assigned individually, not via group or group set. When set to `false` (default), the products will match any level (individual, group or group set).", + "schema": { + "type": "boolean" + } + }, + { + "name": "profileFields", + "in": "query", + "required": false, + "description": "User profile fields, both basic (full name, login name, phone, e-mail, etc) and custom fields, that are used for search. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by `:` (colon). For example, `profileFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, `profileFields=field1:valueA|valueB`. The accepted fields depend on the products the authenticated user has. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `profileFields=rank:bronze|silver,birthDate:2000-01-01|2001-12-31` would match results whose custom field with internal name 'rank' is either bronze or silver, and whose 'birthDate' is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `profileFields=birthDate:|2001-12-31`.\nThe basic profile fields have one of the following identifiers:\n- `name` or `fullName`: Full name; - `username`, `loginName` or `login`: Login name; - `email`: E-mail; - `phone`: Phone; - `accountNumber`, `account`: Account number; - `image`: Image (accepts a boolean value, indicating that either it is required that users either have images or not).\n\nIf address is an allowed profile field for search, specific address fields may be searched. The allowed ones are normally returned as the `addressFieldsInSearch` field in the corresponding result from a data-for-search request. The specific address fields are:\n- `address`: Searches on any address field (not a specific field); - `address.address`: Searches on the fields that represent the street address, which are `addressLine1`, `addressLine2`, `street`, `buildingNumber` and `complement`. Note that normally only a subset of them should be enabled in the configuration (either line 1 / 2 or street + number + complement);\n- `address.zip`: Searches for matching zip (postal) code; - `address.poBox`: Searches for matching postal box; - `address.neighborhood`: Searches by neighborhood; - `address.city`: Searches by city; - `address.region`: Searches by region (or state); - `address.country`: Searches by ISO 3166-1 alpha-2 country code. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `profileFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `profileFields=dynamic:'business`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "skipTotalCount", + "in": "query", + "required": false, + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", + "schema": { + "type": "boolean" + } + }, + { + "name": "statuses", + "in": "query", + "required": false, + "description": "The possible status of the user. If no status is given, `active` and `blocked` users are returned.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserStatusEnum" + } + } + }, + { + "name": "usersToExclude", + "in": "query", + "required": false, + "description": "Indicated the users to be excluded from the result", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "usersToInclude", + "in": "query", + "required": false, + "description": "Indicated the users to be included in the result. Any other user not present in this list will be excluded from the result.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "The users together with their balances", + "headers": { + "X-Total-Count": { + "schema": { + "type": "integer" }, - "description" : "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." + "description": "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." }, - "X-Page-Size" : { - "schema" : { - "type" : "integer" + "X-Page-Size": { + "schema": { + "type": "integer" }, - "description" : "The maximum number of results per page" + "description": "The maximum number of results per page" }, - "X-Current-Page" : { - "schema" : { - "type" : "integer" + "X-Current-Page": { + "schema": { + "type": "integer" }, - "description" : "The current page the results are in" + "description": "The current page the results are in" }, - "X-Has-Next-Page" : { - "schema" : { - "type" : "boolean" + "X-Has-Next-Page": { + "schema": { + "type": "boolean" }, - "description" : "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." + "description": "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." } }, - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransactionResult" + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserWithBalanceResult" } } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -26459,1497 +25276,640 @@ } } }, - "/{owner}/transactions/export/{format}" : { - "parameters" : [ { - "$ref" : "#/components/parameters/owner" - }, { - "$ref" : "#/components/parameters/format" - } ], - "get" : { - "operationId" : "exportTransactions", - "summary" : "Exports the owner transactions search results as file", - "description" : "Generates a file containing the search results. The available export formats are returned in `GET /{owner}/transactions/data-for-search`.", - "tags" : [ "Transactions" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "name" : "accessClients", - "in" : "query", - "required" : false, - "description" : "References to access clients (id or token) used to perform / receive the transfer.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "accountTypes", - "in" : "query", - "required" : false, - "description" : "The account types", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "amountRange", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum amount. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "number" - } - } - }, { - "name" : "authorizationPerformedBy", - "in" : "query", - "required" : false, - "description" : "Id or other identifier (login name, email, etc) of the user that performed an authorization action (authorize, deny or cancel).", - "schema" : { - "type" : "string" - } - }, { - "name" : "authorizationRoles", - "in" : "query", - "required" : false, - "description" : "Either internal names or ids of authorization roles. To match, transactions must be pending authorization in a level which can be authorized by any of the given roles.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "authorizationStatuses", - "in" : "query", - "required" : false, - "description" : "Authorization statuses used as search criteria. When set, only kinds that can go through authorization are returned (`payment`, `order`, `recurringPayment` or `scheduledPayment`).", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransactionAuthorizationStatusEnum" - } - } - }, { - "name" : "authorized", - "in" : "query", - "required" : false, - "description" : "When set, will only return transactions that went through the authorization process (if true) or that never went through it (when false). In either case, only kinds that can go through authorization are returned (`payment`, `order`, `recurringPayment` or `scheduledPayment`).", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "brokers", - "in" : "query", - "required" : false, - "description" : "Reference to the broker of users involved in transfers. Is only taken into account if authenticated as administrator.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "by", - "in" : "query", - "required" : false, - "description" : "Reference to the user that was authenticated when the transfer was performed. Is only taken into account if authenticated as administrator.", - "schema" : { - "type" : "string" - } - }, { - "name" : "channels", - "in" : "query", - "required" : false, - "description" : "Reference to the channel used to perform / receive the transfer. Only taken into account if authenticated as administrator.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "creationTypes", - "in" : "query", - "required" : false, - "description" : "Include only payments created as one of these. This filter only applies to the following kinds: `payment`, `scheduledPayment` and `recurringPayment`. It doesn't affect other kinds of returned transactions. If you only want payments to be returned, set these in the `kinds` filter.", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PaymentCreationTypeEnum" - } - } - }, { - "name" : "datePeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum transfer date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "direction", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/TransferDirectionEnum" - } - }, { - "name" : "excludedIds", - "in" : "query", - "required" : false, - "description" : "List of transfers ids to be excluded from the result.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "externalPaymentExpiration", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum date for external payment expiration. Only affects external payments. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "externalPaymentStatuses", - "in" : "query", - "required" : false, - "description" : "Statuses used as search criteria applied only to transactions of kind `externalPayment`.", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ExternalPaymentStatusEnum" - } - } - }, { - "name" : "fromCurrentAccessClient", - "in" : "query", - "required" : false, - "description" : "Flag indicating whether to include only transfers by the current access client.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "groups", - "in" : "query", - "required" : false, - "description" : "Reference to the user group used to perform / receive the transfer. Only taken into account if authenticated as administrator.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "includeGeneratedByAccessClient", - "in" : "query", - "required" : false, - "description" : "Flag indicating whether to include or not the generated transfer. Only valid if there is at least one access client specified. For example if a `ticket` or `paymentRequest` was processed then a new transfer will be generated.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "kinds", - "in" : "query", - "required" : false, - "description" : "The kinds of transactions to include", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransactionKind" - } - } - }, { - "name" : "orderBy", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/TransOrderByEnum" - } - }, { - "name" : "page", - "in" : "query", - "required" : false, - "description" : "The page number (zero-based) of the search. The default value is zero.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "pageSize", - "in" : "query", - "required" : false, - "description" : "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "paymentRequestExpiration", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum date for payment request expiration. Only affects payment requests. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "paymentRequestStatuses", - "in" : "query", - "required" : false, - "description" : "Statuses used as search criteria applied only to transactions of kind `paymentRequest`.", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PaymentRequestStatusEnum" - } - } - }, { - "name" : "recurringPaymentStatuses", - "in" : "query", - "required" : false, - "description" : "Statuses used as search criteria applied only to transactions of kind `recurringPayment`. If this filter is not empty then pending recurring payments will be excluded from the result. Pending recurring payments does not have a status.", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/RecurringPaymentStatusEnum" - } - } - }, { - "name" : "scheduledPaymentStatuses", - "in" : "query", - "required" : false, - "description" : "Statuses used as search criteria applied only to transactions of kind `scheduledPayment`. If this filter is not empty then pending scheduled payments will be excluded from the result. Pending scheduled payments does not have a status.", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ScheduledPaymentStatusEnum" - } - } - }, { - "name" : "skipTotalCount", - "in" : "query", - "required" : false, - "description" : "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "ticketExpiration", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum date for ticket expiration. Only affects tickets. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "ticketStatuses", - "in" : "query", - "required" : false, - "description" : "Statuses used as search criteria applied only to transactions of kind `ticket`.", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TicketStatusEnum" - } - } - }, { - "name" : "transactionNumber", - "in" : "query", - "required" : false, - "description" : "The transaction number of the matching transfer", - "schema" : { - "type" : "string" - } - }, { - "name" : "transferFilters", - "in" : "query", - "required" : false, - "description" : "Reference to the transfer filters, which filters transfers by type. May be either the internal id or qualified transfer filter internal name, in the format `accountType.transferFilter`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "transferTypes", - "in" : "query", - "required" : false, - "description" : "Reference to the transfer types for filter. May be either the internal id or qualified transfer type internal name, in the format `accountType.transferType`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "user", - "in" : "query", - "required" : false, - "description" : "Reference a user that should have either received / performed the transfer.", - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "The file content", - "content" : { - "*/*" : { - "schema" : { - "type" : "string", - "format" : "binary" - } - } + "/accounts/{accountType}/user-balances/export/{format}": { + "parameters": [ + { + "$ref": "#/components/parameters/format" + } + ], + "get": { + "operationId": "exportUsersWithBalances", + "summary": "Exports the user listing together with their balances as file", + "description": "Generates a file containing the search results. The available export formats are returned in `GET /accounts/data-for-user-balances`.", + "tags": [ + "Accounts" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "name": "acceptedAgreements", + "in": "query", + "required": false, + "description": "Either id or internal names of agreements the user must have accepted. Ignored if the logged user isn't an admin or broker with permission to view the user agreement log.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "accountType", + "in": "path", + "required": true, + "description": "The account type", + "schema": { + "type": "string" + } + }, + { + "name": "activationPeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum user activation date. Only taken into account if searching as administrator or managing broker. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "addressResult", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/UserAddressResultEnum" + } + }, + { + "name": "balanceRange", + "in": "query", + "required": false, + "description": "The minimum and / or maximum balance for users to be returned. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "number" + } + } + }, + { + "name": "brokers", + "in": "query", + "required": false, + "description": "Either id or a principal (login name, e-mail, etc) for brokers", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "creationPeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum user creation date. Only taken into account if searching as administrator or managing broker. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "groups", + "in": "query", + "required": false, + "description": "Either id or internal names of groups / group sets", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "hasBroker", + "in": "query", + "required": false, + "description": "When set to `true`, will match only users that have at least one broker. When set to `false`, will will match only users without brokers. Ignored if the logged user isn't an admin.", + "schema": { + "type": "boolean" + } + }, + { + "name": "ignoreProfileFieldsInList", + "in": "query", + "required": false, + "description": "When set to `true`, instead of returning users with corresponding profile fields set on list, will return them with `display`.", + "schema": { + "type": "boolean" + } + }, + { + "name": "includeGlobal", + "in": "query", + "required": false, + "description": "Indicates whether global administrators should be returned when searching users in a network. Only usable by global administrators.", + "schema": { + "type": "boolean" + } + }, + { + "name": "includeGroup", + "in": "query", + "required": false, + "description": "When set to `true` and the logged user has permission to view user groups, will return the `group` property on users.", + "schema": { + "type": "boolean" + } + }, + { + "name": "includeGroupSet", + "in": "query", + "required": false, + "description": "When set to `true` and the logged user has permission to view user group sets, will return the `groupSet` property on users.", + "schema": { + "type": "boolean" + } + }, + { + "name": "invitedBy", + "in": "query", + "required": false, + "description": "The user that has invited the returned users. Only used when searching as a manager (admin / broker).", + "schema": { + "type": "string" + } + }, + { + "name": "keywords", + "in": "query", + "required": false, + "description": "Textual search keywords. Sometimes, like in user search, the fields matched depends on what is configured on the products.", + "schema": { + "type": "string" + } + }, + { + "name": "lastLoginPeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum user last login date. Only taken into account if searching as administrator or managing broker. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "latitude", + "in": "query", + "required": false, + "description": "The reference latitude for distance searches", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "longitude", + "in": "query", + "required": false, + "description": "The reference longitude for distance searches", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "mainBrokerOnly", + "in": "query", + "required": false, + "description": "When set to `true`, will match only users that have the brokers as set in the `brokers` parameter as main broker.", + "schema": { + "type": "boolean" + } + }, + { + "name": "maxDistance", + "in": "query", + "required": false, + "description": "Maximum straight-line distance between the informed location and the resulting address. Is measured either in kilometers or miles, depending on the configuration. Only accepted if both `longitude` and `latitude` parameters are passed with the actual reference position.", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "mediumBalanceRange", + "in": "query", + "required": false, + "description": "An array with 2 elements, describing the lower and upper medium balance bounds. Both of them need to be set as 2 element in the array, or it won't be considered.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "integer" + } + } + }, + { + "name": "negativeSincePeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum negative-since date for users to be returned. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "notAcceptedAgreements", + "in": "query", + "required": false, + "description": "Either id or internal names of agreements the user must not have accepted. Ignored if the logged user isn't an admin or broker with permission to view the user agreement log.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "orderBy", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/UsersWithBalanceOrderByEnum" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number (zero-based) of the search. The default value is zero.", + "schema": { + "type": "integer" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", + "schema": { + "type": "integer" + } + }, + { + "name": "products", + "in": "query", + "required": false, + "description": "Either id or internal names of products the users should have assigned. Ignored if the authenticated user isn't an administrator.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "productsIndividuallyAssigned", + "in": "query", + "required": false, + "description": "When set to `true`, the list specifid in `products` will only match users with those products assigned individually, not via group or group set. When set to `false` (default), the products will match any level (individual, group or group set).", + "schema": { + "type": "boolean" } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } + { + "name": "profileFields", + "in": "query", + "required": false, + "description": "User profile fields, both basic (full name, login name, phone, e-mail, etc) and custom fields, that are used for search. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by `:` (colon). For example, `profileFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, `profileFields=field1:valueA|valueB`. The accepted fields depend on the products the authenticated user has. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `profileFields=rank:bronze|silver,birthDate:2000-01-01|2001-12-31` would match results whose custom field with internal name 'rank' is either bronze or silver, and whose 'birthDate' is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `profileFields=birthDate:|2001-12-31`.\nThe basic profile fields have one of the following identifiers:\n- `name` or `fullName`: Full name; - `username`, `loginName` or `login`: Login name; - `email`: E-mail; - `phone`: Phone; - `accountNumber`, `account`: Account number; - `image`: Image (accepts a boolean value, indicating that either it is required that users either have images or not).\n\nIf address is an allowed profile field for search, specific address fields may be searched. The allowed ones are normally returned as the `addressFieldsInSearch` field in the corresponding result from a data-for-search request. The specific address fields are:\n- `address`: Searches on any address field (not a specific field); - `address.address`: Searches on the fields that represent the street address, which are `addressLine1`, `addressLine2`, `street`, `buildingNumber` and `complement`. Note that normally only a subset of them should be enabled in the configuration (either line 1 / 2 or street + number + complement);\n- `address.zip`: Searches for matching zip (postal) code; - `address.poBox`: Searches for matching postal box; - `address.neighborhood`: Searches by neighborhood; - `address.city`: Searches by city; - `address.region`: Searches by region (or state); - `address.country`: Searches by ISO 3166-1 alpha-2 country code. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `profileFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `profileFields=dynamic:'business`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" - } - } + { + "name": "skipTotalCount", + "in": "query", + "required": false, + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", + "schema": { + "type": "boolean" } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" - } + { + "name": "statuses", + "in": "query", + "required": false, + "description": "The possible status of the user. If no status is given, `active` and `blocked` users are returned.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserStatusEnum" } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" - } + { + "name": "usersToExclude", + "in": "query", + "required": false, + "description": "Indicated the users to be excluded from the result", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" - } + { + "name": "usersToInclude", + "in": "query", + "required": false, + "description": "Indicated the users to be included in the result. Any other user not present in this list will be excluded from the result.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" } } - }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + } + ], + "responses": { + "200": { + "description": "The file content", + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" } } } - } - } - } - }, - "/transactions/data-for-search" : { - "get" : { - "operationId" : "getTransactionsOverviewDataForSearch", - "summary" : "Returns data for searching transactions regardless of a owner", - "description" : "Returns data which can be used to filter a transaction search", - "tags" : [ "Transactions" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "pendingMyAuthorization", - "in" : "query", - "required" : false, - "schema" : { - "type" : "boolean" }, - "description" : "When set to true will search for transactions which are currently pending authorization, and the authenticated user can authorize." - } ], - "responses" : { - "200" : { - "description" : "Data for searching transactions of an account owner", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/TransactionOverviewDataForSearch" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - } - } - }, - "/transactions" : { - "get" : { - "operationId" : "searchTransactionsOverview", - "summary" : "Searches transactions regardless of a owner", - "description" : "Searches transactions regardless of a owner that match the specified criteria.", - "tags" : [ "Transactions" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "accessClients", - "in" : "query", - "required" : false, - "description" : "References to access clients (id or token) used to perform / receive the transfer.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "amountRange", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum amount. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "number" - } - } - }, { - "name" : "authorizationPerformedBy", - "in" : "query", - "required" : false, - "description" : "Id or other identifier (login name, email, etc) of the user that performed an authorization action (authorize, deny or cancel).", - "schema" : { - "type" : "string" - } - }, { - "name" : "authorizationRoles", - "in" : "query", - "required" : false, - "description" : "Either internal names or ids of authorization roles. To match, transactions must be pending authorization in a level which can be authorized by any of the given roles.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "authorizationStatuses", - "in" : "query", - "required" : false, - "description" : "Authorization statuses used as search criteria. When set, only kinds that can go through authorization are returned (`payment`, `order`, `recurringPayment` or `scheduledPayment`).", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransactionAuthorizationStatusEnum" - } - } - }, { - "name" : "authorized", - "in" : "query", - "required" : false, - "description" : "When set, will only return transactions that went through the authorization process (if true) or that never went through it (when false). In either case, only kinds that can go through authorization are returned (`payment`, `order`, `recurringPayment` or `scheduledPayment`).", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "brokers", - "in" : "query", - "required" : false, - "description" : "Reference to the broker of users involved in transfers. Is only taken into account if authenticated as administrator.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "by", - "in" : "query", - "required" : false, - "description" : "Reference to the user that was authenticated when the transfer was performed. Is only taken into account if authenticated as administrator.", - "schema" : { - "type" : "string" - } - }, { - "name" : "channels", - "in" : "query", - "required" : false, - "description" : "Reference to the channel used to perform / receive the transfer. Only taken into account if authenticated as administrator.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "creationTypes", - "in" : "query", - "required" : false, - "description" : "Include only payments created as one of these. This filter only applies to the following kinds: `payment`, `scheduledPayment` and `recurringPayment`. It doesn't affect other kinds of returned transactions. If you only want payments to be returned, set these in the `kinds` filter.", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PaymentCreationTypeEnum" - } - } - }, { - "name" : "currencies", - "in" : "query", - "required" : false, - "description" : "The currencies internal names or ids.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "datePeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum transfer date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "excludedIds", - "in" : "query", - "required" : false, - "description" : "List of transfers ids to be excluded from the result.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "externalPaymentExpiration", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum date for external payment expiration. Only affects external payments. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "externalPaymentStatuses", - "in" : "query", - "required" : false, - "description" : "Statuses used as search criteria applied only to transactions of kind `externalPayment`.", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ExternalPaymentStatusEnum" - } - } - }, { - "name" : "fromAccountTypes", - "in" : "query", - "required" : false, - "description" : "The source account types internal names or ids.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "fromCurrentAccessClient", - "in" : "query", - "required" : false, - "description" : "Flag indicating whether to include only transfers by the current access client.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "groups", - "in" : "query", - "required" : false, - "description" : "Reference to the user group used to perform / receive the transfer. Only taken into account if authenticated as administrator.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "includeGeneratedByAccessClient", - "in" : "query", - "required" : false, - "description" : "Flag indicating whether to include or not the generated transfer. Only valid if there is at least one access client specified. For example if a `ticket` or `paymentRequest` was processed then a new transfer will be generated.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "kinds", - "in" : "query", - "required" : false, - "description" : "The kinds of transactions to include", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransactionKind" - } - } - }, { - "name" : "orderBy", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/TransOrderByEnum" - } - }, { - "name" : "page", - "in" : "query", - "required" : false, - "description" : "The page number (zero-based) of the search. The default value is zero.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "pageSize", - "in" : "query", - "required" : false, - "description" : "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "paymentRequestExpiration", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum date for payment request expiration. Only affects payment requests. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "paymentRequestStatuses", - "in" : "query", - "required" : false, - "description" : "Statuses used as search criteria applied only to transactions of kind `paymentRequest`.", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PaymentRequestStatusEnum" - } - } - }, { - "name" : "pendingMyAuthorization", - "in" : "query", - "required" : false, - "description" : "When set to true will only return transactions (`payment`, `recurringPayment` or `scheduledPayment`) in pending authorization state that the logged user can authorize", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "recurringPaymentStatuses", - "in" : "query", - "required" : false, - "description" : "Statuses used as search criteria applied only to transactions of kind `recurringPayment`. If this filter is not empty then pending recurring payments will be excluded from the result. Pending recurring payments does not have a status.", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/RecurringPaymentStatusEnum" - } - } - }, { - "name" : "scheduledPaymentStatuses", - "in" : "query", - "required" : false, - "description" : "Statuses used as search criteria applied only to transactions of kind `scheduledPayment`. If this filter is not empty then pending scheduled payments will be excluded from the result. Pending scheduled payments does not have a status.", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ScheduledPaymentStatusEnum" - } - } - }, { - "name" : "skipTotalCount", - "in" : "query", - "required" : false, - "description" : "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "ticketExpiration", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum date for ticket expiration. Only affects tickets. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "ticketStatuses", - "in" : "query", - "required" : false, - "description" : "Statuses used as search criteria applied only to transactions of kind `ticket`.", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TicketStatusEnum" - } - } - }, { - "name" : "toAccountTypes", - "in" : "query", - "required" : false, - "description" : "The source account types internal names or ids.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "transactionNumber", - "in" : "query", - "required" : false, - "description" : "The transaction number of the matching transfer", - "schema" : { - "type" : "string" - } - }, { - "name" : "transferFilters", - "in" : "query", - "required" : false, - "description" : "Reference to the transfer filters, which filters transfers by type. May be either the internal id or qualified transfer filter internal name, in the format `accountType.transferFilter`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "transferTypes", - "in" : "query", - "required" : false, - "description" : "Reference to the transfer types for filter. May be either the internal id or qualified transfer type internal name, in the format `accountType.transferType`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "user", - "in" : "query", - "required" : false, - "description" : "Reference a user that should have either received / performed the transfer.", - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "The transaction entries matching the criteria", - "headers" : { - "X-Total-Count" : { - "schema" : { - "type" : "integer" - }, - "description" : "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." - }, - "X-Page-Size" : { - "schema" : { - "type" : "integer" - }, - "description" : "The maximum number of results per page" - }, - "X-Current-Page" : { - "schema" : { - "type" : "integer" - }, - "description" : "The current page the results are in" - }, - "X-Has-Next-Page" : { - "schema" : { - "type" : "boolean" - }, - "description" : "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." - } - }, - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransactionOverviewResult" - } + } + } + }, + "/{user}/account-visibility": { + "parameters": [ + { + "$ref": "#/components/parameters/user" + } + ], + "get": { + "operationId": "getUserAccountVisibilityData", + "summary": "Returns data for setting the account visibility.", + "description": "Returns data containing, for all assigned user accounts, if each account can be set hidden or visible and if it is currently visible.", + "tags": [ + "AccountVisibility" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "Data containing the accounts.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DataForUserAccountVisibility" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - } - }, - "/transactions/export/{format}" : { - "parameters" : [ { - "$ref" : "#/components/parameters/format" - } ], - "get" : { - "operationId" : "exportTransactionsOverview", - "summary" : "Exports the transactions overview search results as file", - "description" : "Generates a file containing the search results. The available export formats are returned in `GET /transactions/data-for-search`.", - "tags" : [ "Transactions" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "name" : "accessClients", - "in" : "query", - "required" : false, - "description" : "References to access clients (id or token) used to perform / receive the transfer.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "amountRange", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum amount. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "number" - } - } - }, { - "name" : "authorizationPerformedBy", - "in" : "query", - "required" : false, - "description" : "Id or other identifier (login name, email, etc) of the user that performed an authorization action (authorize, deny or cancel).", - "schema" : { - "type" : "string" - } - }, { - "name" : "authorizationRoles", - "in" : "query", - "required" : false, - "description" : "Either internal names or ids of authorization roles. To match, transactions must be pending authorization in a level which can be authorized by any of the given roles.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "authorizationStatuses", - "in" : "query", - "required" : false, - "description" : "Authorization statuses used as search criteria. When set, only kinds that can go through authorization are returned (`payment`, `order`, `recurringPayment` or `scheduledPayment`).", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransactionAuthorizationStatusEnum" - } - } - }, { - "name" : "authorized", - "in" : "query", - "required" : false, - "description" : "When set, will only return transactions that went through the authorization process (if true) or that never went through it (when false). In either case, only kinds that can go through authorization are returned (`payment`, `order`, `recurringPayment` or `scheduledPayment`).", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "brokers", - "in" : "query", - "required" : false, - "description" : "Reference to the broker of users involved in transfers. Is only taken into account if authenticated as administrator.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "by", - "in" : "query", - "required" : false, - "description" : "Reference to the user that was authenticated when the transfer was performed. Is only taken into account if authenticated as administrator.", - "schema" : { - "type" : "string" - } - }, { - "name" : "channels", - "in" : "query", - "required" : false, - "description" : "Reference to the channel used to perform / receive the transfer. Only taken into account if authenticated as administrator.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "creationTypes", - "in" : "query", - "required" : false, - "description" : "Include only payments created as one of these. This filter only applies to the following kinds: `payment`, `scheduledPayment` and `recurringPayment`. It doesn't affect other kinds of returned transactions. If you only want payments to be returned, set these in the `kinds` filter.", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PaymentCreationTypeEnum" - } - } - }, { - "name" : "currencies", - "in" : "query", - "required" : false, - "description" : "The currencies internal names or ids.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "datePeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum transfer date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "excludedIds", - "in" : "query", - "required" : false, - "description" : "List of transfers ids to be excluded from the result.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "externalPaymentExpiration", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum date for external payment expiration. Only affects external payments. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "externalPaymentStatuses", - "in" : "query", - "required" : false, - "description" : "Statuses used as search criteria applied only to transactions of kind `externalPayment`.", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ExternalPaymentStatusEnum" - } - } - }, { - "name" : "fromAccountTypes", - "in" : "query", - "required" : false, - "description" : "The source account types internal names or ids.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "fromCurrentAccessClient", - "in" : "query", - "required" : false, - "description" : "Flag indicating whether to include only transfers by the current access client.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "groups", - "in" : "query", - "required" : false, - "description" : "Reference to the user group used to perform / receive the transfer. Only taken into account if authenticated as administrator.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "includeGeneratedByAccessClient", - "in" : "query", - "required" : false, - "description" : "Flag indicating whether to include or not the generated transfer. Only valid if there is at least one access client specified. For example if a `ticket` or `paymentRequest` was processed then a new transfer will be generated.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "kinds", - "in" : "query", - "required" : false, - "description" : "The kinds of transactions to include", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransactionKind" - } - } - }, { - "name" : "orderBy", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/TransOrderByEnum" - } - }, { - "name" : "page", - "in" : "query", - "required" : false, - "description" : "The page number (zero-based) of the search. The default value is zero.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "pageSize", - "in" : "query", - "required" : false, - "description" : "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "paymentRequestExpiration", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum date for payment request expiration. Only affects payment requests. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "paymentRequestStatuses", - "in" : "query", - "required" : false, - "description" : "Statuses used as search criteria applied only to transactions of kind `paymentRequest`.", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PaymentRequestStatusEnum" - } - } - }, { - "name" : "pendingMyAuthorization", - "in" : "query", - "required" : false, - "description" : "When set to true will only return transactions (`payment`, `recurringPayment` or `scheduledPayment`) in pending authorization state that the logged user can authorize", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "recurringPaymentStatuses", - "in" : "query", - "required" : false, - "description" : "Statuses used as search criteria applied only to transactions of kind `recurringPayment`. If this filter is not empty then pending recurring payments will be excluded from the result. Pending recurring payments does not have a status.", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/RecurringPaymentStatusEnum" - } - } - }, { - "name" : "scheduledPaymentStatuses", - "in" : "query", - "required" : false, - "description" : "Statuses used as search criteria applied only to transactions of kind `scheduledPayment`. If this filter is not empty then pending scheduled payments will be excluded from the result. Pending scheduled payments does not have a status.", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ScheduledPaymentStatusEnum" - } - } - }, { - "name" : "skipTotalCount", - "in" : "query", - "required" : false, - "description" : "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "ticketExpiration", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum date for ticket expiration. Only affects tickets. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "ticketStatuses", - "in" : "query", - "required" : false, - "description" : "Statuses used as search criteria applied only to transactions of kind `ticket`.", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TicketStatusEnum" - } - } - }, { - "name" : "toAccountTypes", - "in" : "query", - "required" : false, - "description" : "The source account types internal names or ids.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "transactionNumber", - "in" : "query", - "required" : false, - "description" : "The transaction number of the matching transfer", - "schema" : { - "type" : "string" - } - }, { - "name" : "transferFilters", - "in" : "query", - "required" : false, - "description" : "Reference to the transfer filters, which filters transfers by type. May be either the internal id or qualified transfer filter internal name, in the format `accountType.transferFilter`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "transferTypes", - "in" : "query", - "required" : false, - "description" : "Reference to the transfer types for filter. May be either the internal id or qualified transfer type internal name, in the format `accountType.transferType`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "user", - "in" : "query", - "required" : false, - "description" : "Reference a user that should have either received / performed the transfer.", - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "The file content", - "content" : { - "*/*" : { - "schema" : { - "type" : "string", - "format" : "binary" - } - } - } + }, + "put": { + "operationId": "saveUserAccountVisibility", + "summary": "Saves at once the visibility for all accounts.", + "description": "Saves, for the given user, the account visibility for all accounts. All account types not sent are considered hidden, whereas all which are sent are considered visible.", + "tags": [ + "AccountVisibility" + ], + "security": [ + { + "basic": [] }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } + { + "session": [] + }, + { + "accessClient": [] + } + ], + "requestBody": { + "description": "The parameters for setting the accounts visibility.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SaveUserAccountVisibilityAsVisibleParams" } } + } + }, + "responses": { + "204": { + "description": "The visible accounts are saved and nothing is returned." }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -27957,87 +25917,89 @@ } } }, - "/transactions/{key}" : { - "get" : { - "operationId" : "viewTransaction", - "summary" : "Returns details about a transaction", - "description" : "Returns details about a transaction.", - "tags" : [ "Transactions" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "key", - "in" : "path", - "required" : true, - "description" : "Either the id or transaction number", - "schema" : { - "type" : "string" + "/{user}/account-visibility/{accountType}/show": { + "parameters": [ + { + "$ref": "#/components/parameters/user" + }, + { + "name": "accountType", + "in": "path", + "required": true, + "description": "The account type id or internal name", + "schema": { + "type": "string" } - } ], - "responses" : { - "200" : { - "description" : "Transaction details", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/TransactionView" - } - } - } + } + ], + "post": { + "operationId": "setUserAccountVisibilityAsVisible", + "summary": "Sets the visibility for a single user account.", + "description": "Modifies the visibility of an account to be visible. Ignored when the user cannot change the visibility of this account.", + "tags": [ + "AccountVisibility" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + { + "accessClient": [] + } + ], + "responses": { + "204": { + "description": "The visibility for this account is changed to be visible and nothing is returned" + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -28045,88 +26007,89 @@ } } }, - "/transactions/{key}/export/{format}" : { - "parameters" : [ { - "name" : "key", - "in" : "path", - "required" : true, - "description" : "Either the id or transaction number", - "schema" : { - "type" : "string" + "/{user}/account-visibility/{accountType}/hide": { + "parameters": [ + { + "$ref": "#/components/parameters/user" + }, + { + "name": "accountType", + "in": "path", + "required": true, + "description": "The account type id or internal name", + "schema": { + "type": "string" + } } - }, { - "$ref" : "#/components/parameters/format" - } ], - "get" : { - "operationId" : "exportTransaction", - "summary" : "Exports the transaction details to a file.", - "description" : "Exports the transaction details to a file. The available formats are available in `TransactionView`", - "tags" : [ "Transactions" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "200" : { - "description" : "The file content", - "content" : { - "*/*" : { - "schema" : { - "type" : "string", - "format" : "binary" - } - } - } + ], + "post": { + "operationId": "setUserAccountVisibilityAsHidden", + "summary": "Sets the visibility for a single user account.", + "description": "Modifies the visibility of an account to be hidden. Ignored when the user cannot change the visibility of this account.", + "tags": [ + "AccountVisibility" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + { + "accessClient": [] + } + ], + "responses": { + "204": { + "description": "The visibility for this account is changed to be hidden and nothing is returned" + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -28134,82 +26097,92 @@ } } }, - "/{owner}/installments/data-for-search" : { - "parameters" : [ { - "$ref" : "#/components/parameters/owner" - } ], - "get" : { - "operationId" : "getInstallmentsDataForSearch", - "summary" : "Returns data for searching installments of an account owner", - "description" : "Returns data which can be used to filter a installment search", - "tags" : [ "Installments" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "Data for searching installments of an account owner", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InstallmentDataForSearch" + "/{user}/accounts/data-for-balance-limits": { + "parameters": [ + { + "$ref": "#/components/parameters/user" + } + ], + "get": { + "operationId": "getDataForUserBalanceLimits", + "summary": "Returns data regarding the limits of all accounts of a given user.", + "description": "Returns data regarding the limits of all accounts of a given user.", + "tags": [ + "BalanceLimits" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The user account limits data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserAccountBalanceLimitsListData" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -28217,805 +26190,282 @@ } } }, - "/{owner}/installments" : { - "parameters" : [ { - "$ref" : "#/components/parameters/owner" - } ], - "get" : { - "operationId" : "searchInstallments", - "summary" : "Searches installments of an account owner", - "description" : "Returns the installments of a given account owner that match the specified criteria. Each result will will be relative to this owner. The amount may be positive or negative, depending on whether this owner has performed or received the transaction.", - "tags" : [ "Installments" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "accessClients", - "in" : "query", - "required" : false, - "description" : "References to access clients (id or token) used to perform / receive the transfer.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "accountTypes", - "in" : "query", - "required" : false, - "description" : "The account types", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "amountRange", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum amount. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "number" - } - } - }, { - "name" : "authorizationPerformedBy", - "in" : "query", - "required" : false, - "description" : "Id or other identifier (login name, email, etc) of the user that performed an authorization action (authorize, deny or cancel).", - "schema" : { - "type" : "string" - } - }, { - "name" : "authorizationStatuses", - "in" : "query", - "required" : false, - "description" : "Authorization statuses used as search criteria. When set, only kinds that can go through authorization are returned (`payment`, `order`, `recurringPayment` or `scheduledPayment`).", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransactionAuthorizationStatusEnum" - } - } - }, { - "name" : "authorized", - "in" : "query", - "required" : false, - "description" : "When set, will only return transactions that went through the authorization process (if true) or that never went through it (when false). In either case, only kinds that can go through authorization are returned (`payment`, `order`, `recurringPayment` or `scheduledPayment`).", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "brokers", - "in" : "query", - "required" : false, - "description" : "Reference to the broker of users involved in transfers. Is only taken into account if authenticated as administrator.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "by", - "in" : "query", - "required" : false, - "description" : "Reference to the user that was authenticated when the transfer was performed. Is only taken into account if authenticated as administrator.", - "schema" : { - "type" : "string" - } - }, { - "name" : "channels", - "in" : "query", - "required" : false, - "description" : "Reference to the channel used to perform / receive the transfer. Only taken into account if authenticated as administrator.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "creationTypes", - "in" : "query", - "required" : false, - "description" : "Include only payments created as one of these. This filter only applies to the following kinds: `payment`, `scheduledPayment` and `recurringPayment`. It doesn't affect other kinds of returned transactions. If you only want payments to be returned, set these in the `kinds` filter.", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PaymentCreationTypeEnum" - } - } - }, { - "name" : "datePeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum transfer date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "direction", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/TransferDirectionEnum" - } - }, { - "name" : "excludedIds", - "in" : "query", - "required" : false, - "description" : "List of transfers ids to be excluded from the result.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "fromCurrentAccessClient", - "in" : "query", - "required" : false, - "description" : "Flag indicating whether to include only transfers by the current access client.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "groups", - "in" : "query", - "required" : false, - "description" : "Reference to the user group used to perform / receive the transfer. Only taken into account if authenticated as administrator.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "includeGeneratedByAccessClient", - "in" : "query", - "required" : false, - "description" : "Flag indicating whether to include or not the generated transfer. Only valid if there is at least one access client specified. For example if a `ticket` or `paymentRequest` was processed then a new transfer will be generated.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "kinds", - "in" : "query", - "required" : false, - "description" : "The kinds of transactions to include", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransactionKind" - } - } - }, { - "name" : "orderBy", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/TransOrderByEnum" - } - }, { - "name" : "page", - "in" : "query", - "required" : false, - "description" : "The page number (zero-based) of the search. The default value is zero.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "pageSize", - "in" : "query", - "required" : false, - "description" : "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "skipTotalCount", - "in" : "query", - "required" : false, - "description" : "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "statuses", - "in" : "query", - "required" : false, - "description" : "Possible statuses for installments.", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/InstallmentStatusEnum" - } - } - }, { - "name" : "transactionNumber", - "in" : "query", - "required" : false, - "description" : "The transaction number of the matching transfer", - "schema" : { - "type" : "string" - } - }, { - "name" : "transferFilters", - "in" : "query", - "required" : false, - "description" : "Reference to the transfer filters, which filters transfers by type. May be either the internal id or qualified transfer filter internal name, in the format `accountType.transferFilter`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "transferTypes", - "in" : "query", - "required" : false, - "description" : "Reference to the transfer types for filter. May be either the internal id or qualified transfer type internal name, in the format `accountType.transferType`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "user", - "in" : "query", - "required" : false, - "description" : "Reference a user that should have either received / performed the transfer.", - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "The installment entries matching the criteria", - "headers" : { - "X-Total-Count" : { - "schema" : { - "type" : "integer" - }, - "description" : "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." - }, - "X-Page-Size" : { - "schema" : { - "type" : "integer" - }, - "description" : "The maximum number of results per page" - }, - "X-Current-Page" : { - "schema" : { - "type" : "integer" - }, - "description" : "The current page the results are in" - }, - "X-Has-Next-Page" : { - "schema" : { - "type" : "boolean" - }, - "description" : "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." - } - }, - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/InstallmentResult" - } + "/{user}/accounts/{accountType}/balance-limits": { + "parameters": [ + { + "$ref": "#/components/parameters/user" + }, + { + "$ref": "#/components/parameters/accountType" + } + ], + "get": { + "operationId": "getAccountBalanceLimits", + "summary": "Returns data for the limits of a given account", + "description": "Returns the data needed to edit the limits of the given account, plus the history of limit changes.", + "tags": [ + "BalanceLimits" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The account limit data.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountBalanceLimitsData" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - } - }, - "/{owner}/installments/export/{format}" : { - "parameters" : [ { - "$ref" : "#/components/parameters/owner" - }, { - "$ref" : "#/components/parameters/format" - } ], - "get" : { - "operationId" : "exportInstallments", - "summary" : "Exports the owner installments search results as file", - "description" : "Generates a file containing the search results. The available export formats are returned in `GET /{owner}/installments/data-for-search`.", - "tags" : [ "Installments" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "name" : "accessClients", - "in" : "query", - "required" : false, - "description" : "References to access clients (id or token) used to perform / receive the transfer.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "accountTypes", - "in" : "query", - "required" : false, - "description" : "The account types", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "amountRange", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum amount. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "number" - } - } - }, { - "name" : "authorizationPerformedBy", - "in" : "query", - "required" : false, - "description" : "Id or other identifier (login name, email, etc) of the user that performed an authorization action (authorize, deny or cancel).", - "schema" : { - "type" : "string" - } - }, { - "name" : "authorizationStatuses", - "in" : "query", - "required" : false, - "description" : "Authorization statuses used as search criteria. When set, only kinds that can go through authorization are returned (`payment`, `order`, `recurringPayment` or `scheduledPayment`).", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransactionAuthorizationStatusEnum" - } - } - }, { - "name" : "authorized", - "in" : "query", - "required" : false, - "description" : "When set, will only return transactions that went through the authorization process (if true) or that never went through it (when false). In either case, only kinds that can go through authorization are returned (`payment`, `order`, `recurringPayment` or `scheduledPayment`).", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "brokers", - "in" : "query", - "required" : false, - "description" : "Reference to the broker of users involved in transfers. Is only taken into account if authenticated as administrator.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "by", - "in" : "query", - "required" : false, - "description" : "Reference to the user that was authenticated when the transfer was performed. Is only taken into account if authenticated as administrator.", - "schema" : { - "type" : "string" - } - }, { - "name" : "channels", - "in" : "query", - "required" : false, - "description" : "Reference to the channel used to perform / receive the transfer. Only taken into account if authenticated as administrator.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "creationTypes", - "in" : "query", - "required" : false, - "description" : "Include only payments created as one of these. This filter only applies to the following kinds: `payment`, `scheduledPayment` and `recurringPayment`. It doesn't affect other kinds of returned transactions. If you only want payments to be returned, set these in the `kinds` filter.", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PaymentCreationTypeEnum" - } - } - }, { - "name" : "datePeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum transfer date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "direction", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/TransferDirectionEnum" - } - }, { - "name" : "excludedIds", - "in" : "query", - "required" : false, - "description" : "List of transfers ids to be excluded from the result.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "fromCurrentAccessClient", - "in" : "query", - "required" : false, - "description" : "Flag indicating whether to include only transfers by the current access client.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "groups", - "in" : "query", - "required" : false, - "description" : "Reference to the user group used to perform / receive the transfer. Only taken into account if authenticated as administrator.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "includeGeneratedByAccessClient", - "in" : "query", - "required" : false, - "description" : "Flag indicating whether to include or not the generated transfer. Only valid if there is at least one access client specified. For example if a `ticket` or `paymentRequest` was processed then a new transfer will be generated.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "kinds", - "in" : "query", - "required" : false, - "description" : "The kinds of transactions to include", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransactionKind" - } - } - }, { - "name" : "orderBy", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/TransOrderByEnum" - } - }, { - "name" : "page", - "in" : "query", - "required" : false, - "description" : "The page number (zero-based) of the search. The default value is zero.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "pageSize", - "in" : "query", - "required" : false, - "description" : "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "skipTotalCount", - "in" : "query", - "required" : false, - "description" : "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "statuses", - "in" : "query", - "required" : false, - "description" : "Possible statuses for installments.", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/InstallmentStatusEnum" - } - } - }, { - "name" : "transactionNumber", - "in" : "query", - "required" : false, - "description" : "The transaction number of the matching transfer", - "schema" : { - "type" : "string" - } - }, { - "name" : "transferFilters", - "in" : "query", - "required" : false, - "description" : "Reference to the transfer filters, which filters transfers by type. May be either the internal id or qualified transfer filter internal name, in the format `accountType.transferFilter`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "transferTypes", - "in" : "query", - "required" : false, - "description" : "Reference to the transfer types for filter. May be either the internal id or qualified transfer type internal name, in the format `accountType.transferType`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "user", - "in" : "query", - "required" : false, - "description" : "Reference a user that should have either received / performed the transfer.", - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "The file content", - "content" : { - "*/*" : { - "schema" : { - "type" : "string", - "format" : "binary" + }, + "put": { + "operationId": "setAccountBalanceLimits", + "summary": "Sets the limits for a given user account.", + "description": "Saves the account limits. The lower limit may be customized or default, while the upper limit may also be set to unlimited.", + "tags": [ + "BalanceLimits" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/confirmationPassword" + } + ], + "responses": { + "204": { + "description": "The limits were changed and nothing is returned." + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } - }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" - } + } + }, + "requestBody": { + "description": "The new account balance limits", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetAccountBalanceLimits" } } } } } }, - "/installments/data-for-search" : { - "get" : { - "operationId" : "getInstallmentsOverviewDataForSearch", - "summary" : "Returns data for searching installments regardless of a owner", - "description" : "Returns data which can be used to filter a installment search", - "tags" : [ "Installments" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "Data for searching installments of an account owner", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InstallmentOverviewDataForSearch" + "/accounts/data-for-balance-limits": { + "get": { + "operationId": "getAccountBalanceLimitsData", + "summary": "Returns data for a general search of account balance limits.", + "description": "Returns data for a general search of account balance limits.", + "tags": [ + "BalanceLimits" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The data for searching account balances limits", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DataForBalanceLimitsSearch" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -29023,385 +26473,251 @@ } } }, - "/installments" : { - "get" : { - "operationId" : "searchInstallmentsOverview", - "summary" : "Searches installments regardless of a owner", - "description" : "Searches installments regardless of a owner that match the specified criteria.", - "tags" : [ "Installments" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "accessClients", - "in" : "query", - "required" : false, - "description" : "References to access clients (id or token) used to perform / receive the transfer.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "amountRange", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum amount. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "number" - } - } - }, { - "name" : "authorizationPerformedBy", - "in" : "query", - "required" : false, - "description" : "Id or other identifier (login name, email, etc) of the user that performed an authorization action (authorize, deny or cancel).", - "schema" : { - "type" : "string" - } - }, { - "name" : "authorizationStatuses", - "in" : "query", - "required" : false, - "description" : "Authorization statuses used as search criteria. When set, only kinds that can go through authorization are returned (`payment`, `order`, `recurringPayment` or `scheduledPayment`).", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransactionAuthorizationStatusEnum" - } - } - }, { - "name" : "authorized", - "in" : "query", - "required" : false, - "description" : "When set, will only return transactions that went through the authorization process (if true) or that never went through it (when false). In either case, only kinds that can go through authorization are returned (`payment`, `order`, `recurringPayment` or `scheduledPayment`).", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "brokers", - "in" : "query", - "required" : false, - "description" : "Reference to the broker of users involved in transfers. Is only taken into account if authenticated as administrator.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "by", - "in" : "query", - "required" : false, - "description" : "Reference to the user that was authenticated when the transfer was performed. Is only taken into account if authenticated as administrator.", - "schema" : { - "type" : "string" - } - }, { - "name" : "channels", - "in" : "query", - "required" : false, - "description" : "Reference to the channel used to perform / receive the transfer. Only taken into account if authenticated as administrator.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "creationTypes", - "in" : "query", - "required" : false, - "description" : "Include only payments created as one of these. This filter only applies to the following kinds: `payment`, `scheduledPayment` and `recurringPayment`. It doesn't affect other kinds of returned transactions. If you only want payments to be returned, set these in the `kinds` filter.", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PaymentCreationTypeEnum" - } - } - }, { - "name" : "currencies", - "in" : "query", - "required" : false, - "description" : "The currencies internal names or ids.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "datePeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum transfer date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "excludedIds", - "in" : "query", - "required" : false, - "description" : "List of transfers ids to be excluded from the result.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "fromAccountTypes", - "in" : "query", - "required" : false, - "description" : "The source account types internal names or ids.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "fromCurrentAccessClient", - "in" : "query", - "required" : false, - "description" : "Flag indicating whether to include only transfers by the current access client.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "groups", - "in" : "query", - "required" : false, - "description" : "Reference to the user group used to perform / receive the transfer. Only taken into account if authenticated as administrator.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "includeGeneratedByAccessClient", - "in" : "query", - "required" : false, - "description" : "Flag indicating whether to include or not the generated transfer. Only valid if there is at least one access client specified. For example if a `ticket` or `paymentRequest` was processed then a new transfer will be generated.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "kinds", - "in" : "query", - "required" : false, - "description" : "The kinds of transactions to include", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransactionKind" - } - } - }, { - "name" : "orderBy", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/TransOrderByEnum" - } - }, { - "name" : "page", - "in" : "query", - "required" : false, - "description" : "The page number (zero-based) of the search. The default value is zero.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "pageSize", - "in" : "query", - "required" : false, - "description" : "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "skipTotalCount", - "in" : "query", - "required" : false, - "description" : "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "statuses", - "in" : "query", - "required" : false, - "description" : "Possible statuses for installments.", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/InstallmentStatusEnum" - } - } - }, { - "name" : "toAccountTypes", - "in" : "query", - "required" : false, - "description" : "The source account types internal names or ids.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "transactionNumber", - "in" : "query", - "required" : false, - "description" : "The transaction number of the matching transfer", - "schema" : { - "type" : "string" - } - }, { - "name" : "transferFilters", - "in" : "query", - "required" : false, - "description" : "Reference to the transfer filters, which filters transfers by type. May be either the internal id or qualified transfer filter internal name, in the format `accountType.transferFilter`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "transferTypes", - "in" : "query", - "required" : false, - "description" : "Reference to the transfer types for filter. May be either the internal id or qualified transfer type internal name, in the format `accountType.transferType`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "user", - "in" : "query", - "required" : false, - "description" : "Reference a user that should have either received / performed the transfer.", - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "The installment entries matching the criteria", - "headers" : { - "X-Total-Count" : { - "schema" : { - "type" : "integer" + "/accounts/balance-limits": { + "get": { + "operationId": "searchAccountBalanceLimits", + "summary": "Searches for account balance limits.", + "description": "Searches for account balance limits, according to the given filters.", + "tags": [ + "BalanceLimits" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "accountType", + "in": "query", + "required": false, + "description": "Either id or internal name of the account type", + "schema": { + "type": "string" + } + }, + { + "name": "brokers", + "in": "query", + "required": false, + "description": "Either the ids or identification methods of users' broker", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "by", + "in": "query", + "required": false, + "description": "Either the id or identifier of the user that performed the change", + "schema": { + "type": "string" + } + }, + { + "name": "currency", + "in": "query", + "required": false, + "description": "Either id or internal name of the currency", + "schema": { + "type": "string" + } + }, + { + "name": "customLimit", + "in": "query", + "required": false, + "description": "When set, returns only accounts that have a custom (if true) or have default (false) lower limit.", + "schema": { + "type": "boolean" + } + }, + { + "name": "customLimitRange", + "in": "query", + "required": false, + "description": "The minimum / maximum customized limit. Is only used when `customLimit` is set to true. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "number" + } + } + }, + { + "name": "customUpperLimit", + "in": "query", + "required": false, + "description": "When set, returns only accounts that have a custom (if true) or have default (false) upper limit.", + "schema": { + "type": "boolean" + } + }, + { + "name": "customUpperLimitRange", + "in": "query", + "required": false, + "description": "The minimum / maximum customized upper limit. Is only used when `customUpperLimit` is set to true. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "number" + } + } + }, + { + "name": "groups", + "in": "query", + "required": false, + "description": "Either the ids or internal names of user group", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number (zero-based) of the search. The default value is zero.", + "schema": { + "type": "integer" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", + "schema": { + "type": "integer" + } + }, + { + "name": "skipTotalCount", + "in": "query", + "required": false, + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", + "schema": { + "type": "boolean" + } + }, + { + "name": "user", + "in": "query", + "required": false, + "description": "Either the id or identifier of the account owner", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The data for searching account balances limits", + "headers": { + "X-Total-Count": { + "schema": { + "type": "integer" }, - "description" : "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." + "description": "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." }, - "X-Page-Size" : { - "schema" : { - "type" : "integer" + "X-Page-Size": { + "schema": { + "type": "integer" }, - "description" : "The maximum number of results per page" + "description": "The maximum number of results per page" }, - "X-Current-Page" : { - "schema" : { - "type" : "integer" + "X-Current-Page": { + "schema": { + "type": "integer" }, - "description" : "The current page the results are in" + "description": "The current page the results are in" }, - "X-Has-Next-Page" : { - "schema" : { - "type" : "boolean" + "X-Has-Next-Page": { + "schema": { + "type": "boolean" }, - "description" : "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." + "description": "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." } }, - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/InstallmentOverviewResult" + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GeneralAccountBalanceLimitsResult" } } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -29409,467 +26725,235 @@ } } }, - "/installments/export/{format}" : { - "parameters" : [ { - "$ref" : "#/components/parameters/format" - } ], - "get" : { - "operationId" : "exportInstallmentsOverview", - "summary" : "Exports the installments overview search results as file", - "description" : "Generates a file containing the search results. The available export formats are returned in `GET /installments/data-for-search`.", - "tags" : [ "Installments" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "name" : "accessClients", - "in" : "query", - "required" : false, - "description" : "References to access clients (id or token) used to perform / receive the transfer.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "amountRange", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum amount. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "number" - } - } - }, { - "name" : "authorizationPerformedBy", - "in" : "query", - "required" : false, - "description" : "Id or other identifier (login name, email, etc) of the user that performed an authorization action (authorize, deny or cancel).", - "schema" : { - "type" : "string" - } - }, { - "name" : "authorizationStatuses", - "in" : "query", - "required" : false, - "description" : "Authorization statuses used as search criteria. When set, only kinds that can go through authorization are returned (`payment`, `order`, `recurringPayment` or `scheduledPayment`).", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransactionAuthorizationStatusEnum" - } - } - }, { - "name" : "authorized", - "in" : "query", - "required" : false, - "description" : "When set, will only return transactions that went through the authorization process (if true) or that never went through it (when false). In either case, only kinds that can go through authorization are returned (`payment`, `order`, `recurringPayment` or `scheduledPayment`).", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "brokers", - "in" : "query", - "required" : false, - "description" : "Reference to the broker of users involved in transfers. Is only taken into account if authenticated as administrator.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "by", - "in" : "query", - "required" : false, - "description" : "Reference to the user that was authenticated when the transfer was performed. Is only taken into account if authenticated as administrator.", - "schema" : { - "type" : "string" - } - }, { - "name" : "channels", - "in" : "query", - "required" : false, - "description" : "Reference to the channel used to perform / receive the transfer. Only taken into account if authenticated as administrator.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "creationTypes", - "in" : "query", - "required" : false, - "description" : "Include only payments created as one of these. This filter only applies to the following kinds: `payment`, `scheduledPayment` and `recurringPayment`. It doesn't affect other kinds of returned transactions. If you only want payments to be returned, set these in the `kinds` filter.", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PaymentCreationTypeEnum" - } - } - }, { - "name" : "currencies", - "in" : "query", - "required" : false, - "description" : "The currencies internal names or ids.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "datePeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum transfer date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "excludedIds", - "in" : "query", - "required" : false, - "description" : "List of transfers ids to be excluded from the result.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "fromAccountTypes", - "in" : "query", - "required" : false, - "description" : "The source account types internal names or ids.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "fromCurrentAccessClient", - "in" : "query", - "required" : false, - "description" : "Flag indicating whether to include only transfers by the current access client.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "groups", - "in" : "query", - "required" : false, - "description" : "Reference to the user group used to perform / receive the transfer. Only taken into account if authenticated as administrator.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "includeGeneratedByAccessClient", - "in" : "query", - "required" : false, - "description" : "Flag indicating whether to include or not the generated transfer. Only valid if there is at least one access client specified. For example if a `ticket` or `paymentRequest` was processed then a new transfer will be generated.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "kinds", - "in" : "query", - "required" : false, - "description" : "The kinds of transactions to include", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransactionKind" - } - } - }, { - "name" : "orderBy", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/TransOrderByEnum" - } - }, { - "name" : "page", - "in" : "query", - "required" : false, - "description" : "The page number (zero-based) of the search. The default value is zero.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "pageSize", - "in" : "query", - "required" : false, - "description" : "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "skipTotalCount", - "in" : "query", - "required" : false, - "description" : "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "statuses", - "in" : "query", - "required" : false, - "description" : "Possible statuses for installments.", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/InstallmentStatusEnum" - } - } - }, { - "name" : "toAccountTypes", - "in" : "query", - "required" : false, - "description" : "The source account types internal names or ids.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "transactionNumber", - "in" : "query", - "required" : false, - "description" : "The transaction number of the matching transfer", - "schema" : { - "type" : "string" - } - }, { - "name" : "transferFilters", - "in" : "query", - "required" : false, - "description" : "Reference to the transfer filters, which filters transfers by type. May be either the internal id or qualified transfer filter internal name, in the format `accountType.transferFilter`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" + "/accounts/balance-limits/export/{format}": { + "parameters": [ + { + "$ref": "#/components/parameters/format" + } + ], + "get": { + "operationId": "exportAccountBalanceLimits", + "summary": "Exports the account balance limits results as file.", + "description": "Generates a file containing the search results. The available export formats are returned in `GET /accounts/data-for-balance-limits`.", + "tags": [ + "BalanceLimits" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "name": "accountType", + "in": "query", + "required": false, + "description": "Either id or internal name of the account type", + "schema": { + "type": "string" + } + }, + { + "name": "brokers", + "in": "query", + "required": false, + "description": "Either the ids or identification methods of users' broker", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "by", + "in": "query", + "required": false, + "description": "Either the id or identifier of the user that performed the change", + "schema": { + "type": "string" + } + }, + { + "name": "currency", + "in": "query", + "required": false, + "description": "Either id or internal name of the currency", + "schema": { + "type": "string" + } + }, + { + "name": "customLimit", + "in": "query", + "required": false, + "description": "When set, returns only accounts that have a custom (if true) or have default (false) lower limit.", + "schema": { + "type": "boolean" + } + }, + { + "name": "customLimitRange", + "in": "query", + "required": false, + "description": "The minimum / maximum customized limit. Is only used when `customLimit` is set to true. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "number" + } + } + }, + { + "name": "customUpperLimit", + "in": "query", + "required": false, + "description": "When set, returns only accounts that have a custom (if true) or have default (false) upper limit.", + "schema": { + "type": "boolean" + } + }, + { + "name": "customUpperLimitRange", + "in": "query", + "required": false, + "description": "The minimum / maximum customized upper limit. Is only used when `customUpperLimit` is set to true. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "number" + } } - } - }, { - "name" : "transferTypes", - "in" : "query", - "required" : false, - "description" : "Reference to the transfer types for filter. May be either the internal id or qualified transfer type internal name, in the format `accountType.transferType`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "user", - "in" : "query", - "required" : false, - "description" : "Reference a user that should have either received / performed the transfer.", - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "The file content", - "content" : { - "*/*" : { - "schema" : { - "type" : "string", - "format" : "binary" - } - } - } - }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } - } - } - }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" - } + }, + { + "name": "groups", + "in": "query", + "required": false, + "description": "Either the ids or internal names of user group", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" - } - } + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number (zero-based) of the search. The default value is zero.", + "schema": { + "type": "integer" } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" - } - } + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", + "schema": { + "type": "integer" } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" - } - } + { + "name": "skipTotalCount", + "in": "query", + "required": false, + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", + "schema": { + "type": "boolean" } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" - } - } + { + "name": "user", + "in": "query", + "required": false, + "description": "Either the id or identifier of the account owner", + "schema": { + "type": "string" } } - } - } - }, - "/installments/{key}/process" : { - "parameters" : [ { - "name" : "key", - "in" : "path", - "required" : true, - "description" : "Either the id or a string in the form `number@transaction`, beging transaction either the id or transaction number.", - "schema" : { - "type" : "string" - } - } ], - "post" : { - "operationId" : "processInstallment", - "summary" : "Processes a installment, generating its corresponding transfer.", - "description" : "Processes an installment. The installment status must be either `scheduled`, `failed` or `blocked`. This action must be performed by the payer or manager.", - "tags" : [ "Installments" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/confirmationPassword" - } ], - "responses" : { - "201" : { - "description" : "The installment is processed and the transfer is returned", - "headers" : { - "Location" : { - "description" : "URL for viewing the transfer details", - "schema" : { - "type" : "string" + ], + "responses": { + "200": { + "description": "The file content", + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" } } - }, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Transfer" + } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -29877,81 +26961,92 @@ } } }, - "/installments/{key}/settle" : { - "parameters" : [ { - "name" : "key", - "in" : "path", - "required" : true, - "description" : "Either the id or a string in the form `number@transaction`, beging transaction either the id or transaction number.", - "schema" : { - "type" : "string" + "/{user}/accounts/data-for-payment-limits": { + "parameters": [ + { + "$ref": "#/components/parameters/user" } - } ], - "post" : { - "operationId" : "settleInstallment", - "summary" : "Settles a scheduled payment installment.", - "description" : "Settles a single installment. It must be a scheduled payment installment (not recurring payment), and the status must be either `scheduled`, `failed` or `blocked`. This action must be performed by the payment receiver or manager.", - "tags" : [ "Installments" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/confirmationPassword" - } ], - "responses" : { - "204" : { - "description" : "The installment is unblocked and nothing is returned." + ], + "get": { + "operationId": "getDataForUserPaymentLimits", + "summary": "Returns data regarding the limits of all accounts of a given user.", + "description": "Returns data regarding the limits of all accounts of a given user.", + "tags": [ + "PaymentLimits" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The user account payment limits data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserAccountPaymentLimitsListData" + } + } + } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -29959,416 +27054,603 @@ } } }, - "/{owner}/payments/data-for-perform" : { - "get" : { - "operationId" : "dataForPerformPayment", - "summary" : "Returns configuration data for performing a payment", - "description" : "Returns configuration data for performing a payment", - "tags" : [ "Payments" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - }, { - "oidc" : [ "payment" ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/owner" - }, { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "to", - "in" : "query", - "required" : false, - "description" : "The payment destination. Either the string `system` for a payment to system or a user identification.", - "schema" : { - "type" : "string" + "/{user}/accounts/{accountType}/payment-limits": { + "parameters": [ + { + "$ref": "#/components/parameters/user" + }, + { + "$ref": "#/components/parameters/accountType" + } + ], + "get": { + "operationId": "getAccountPaymentLimits", + "summary": "Returns data for the limits of a given account", + "description": "Returns the data needed to edit the limits of the given account, plus the history of limit changes.", + "tags": [ + "PaymentLimits" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] } - }, { - "name" : "type", - "in" : "query", - "required" : false, - "description" : "The payment type id or qualified internal name (in the form `fromAccountType.paymentType`). If no payment type is provided, the possible types will be returned, so the payer can choose.", - "schema" : { - "type" : "string" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" } - } ], - "responses" : { - "200" : { - "description" : "The data for performing a payment", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DataForTransaction" + ], + "responses": { + "200": { + "description": "The account limit data.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountPaymentLimitsData" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - } - }, - "/{owner}/payments" : { - "post" : { - "operationId" : "performPayment", - "summary" : "Performs a payment from the given owner", - "description" : "Performs either a direct, scheduled or recurring payment from the owner indicated on the path to the owner specified on the body. The destination user should be informed in the `subject` parameter. If the `subject` is `system`, it will be a payment to a system account. The payment id is returned on the response, and a link to the transaction details is returned on the `Location` header.", - "tags" : [ "Payments" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - }, { - "oidc" : [ "payment" ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/owner" - }, { - "$ref" : "#/components/parameters/confirmationPassword" - } ], - "responses" : { - "201" : { - "description" : "The created payment", - "headers" : { - "Location" : { - "description" : "URL for viewing the transaction details", - "schema" : { - "type" : "string" + }, + "put": { + "operationId": "setAccountPaymentLimits", + "summary": "Sets the limits for a given user account.", + "description": "Saves the account limits. The lower limit may be customized or default, while the upper limit may also be set to unlimited.", + "tags": [ + "PaymentLimits" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/confirmationPassword" + } + ], + "responses": { + "204": { + "description": "The limits were changed and nothing is returned." + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } - }, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Transaction" + } + }, + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } + } + }, + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } + } + }, + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "If a payment error has occurred", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PaymentError" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } }, - "requestBody" : { - "description" : "The perform payment parameters", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PerformPayment" + "requestBody": { + "description": "The new account payment limits", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetAccountPaymentLimits" } } } } } }, - "/{owner}/payments/preview" : { - "post" : { - "operationId" : "previewPayment", - "summary" : "Previews a payment before performing it", - "description" : "Previews a payment, scheduled or recurring payment. The actual balance checking is not performed in the preview.", - "tags" : [ "Payments" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - }, { - "oidc" : [ "payment" ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/owner" - }, { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The payment preview", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PaymentPreview" - } - } - } + "/accounts/data-for-payment-limits": { + "get": { + "operationId": "getAccountPaymentLimitsData", + "summary": "Returns data for a general search of account payment limits.", + "description": "Returns data for a general search of account payment limits.", + "tags": [ + "PaymentLimits" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The data for searching account payment limits", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DataForPaymentLimitsSearch" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - }, - "requestBody" : { - "description" : "The perform payment parameters", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PerformPayment" - } - } - } - } - } - }, - "/{owner}/payments/installments" : { - "get" : { - "operationId" : "calculatePerformPaymentInstallments", - "summary" : "Calculates the default installments for a scheduled payment", - "description" : "Used to calculate installments for a scheduled payment. Will return an installment every month. When later performing the payment, these can be (optionally) customized (such as changing some due dates or amounts) and used on the payment installments.", - "tags" : [ "Payments" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - }, { - "oidc" : [ "payment" ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/owner" - }, { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "to", - "in" : "query", - "required" : true, - "description" : "The payment destination", - "schema" : { - "type" : "string" - } - }, { - "name" : "count", - "in" : "query", - "required" : true, - "description" : "The number of installments", - "schema" : { - "type" : "integer" - } - }, { - "name" : "amount", - "in" : "query", - "required" : true, - "description" : "The total scheduled payment amount", - "schema" : { - "type" : "string", - "format" : "number" - } - }, { - "name" : "currency", - "in" : "query", - "required" : false, - "description" : "The payment currency. Used when no `type` is not provided, to narrow the possible payment types by currency.", - "schema" : { - "type" : "string" - } - }, { - "name" : "type", - "in" : "query", - "required" : false, - "description" : "The payment type id or qualified internal name (in the form `fromAccountType.paymentType`). If not provided, will use the first possible type (possibly narrowed by the `currency` parameter). However, if more than one type is available, a validation error will be raised.", - "schema" : { - "type" : "string" - } - }, { - "name" : "firstDate", - "in" : "query", - "required" : false, - "description" : "The due date of the first installment. If none is provided, it is assumed that the first installment is paid immediately, and others will be with regular 1 month interval", - "schema" : { - "type" : "string", - "format" : "date-time" - } - } ], - "responses" : { - "200" : { - "description" : "The calculated installments", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PerformInstallment" - } - } + } + } + }, + "/accounts/payment-limits": { + "get": { + "operationId": "searchAccountPaymentLimits", + "summary": "Searches for account payment limits.", + "description": "Searches for account payment limits, according to the given filters.", + "tags": [ + "PaymentLimits" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "accountType", + "in": "query", + "required": false, + "description": "Either id or internal name of the account type", + "schema": { + "type": "string" + } + }, + { + "name": "brokers", + "in": "query", + "required": false, + "description": "Either the ids or identification methods of users' broker", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "by", + "in": "query", + "required": false, + "description": "Either the id or identifier of the user that performed the change", + "schema": { + "type": "string" + } + }, + { + "name": "currency", + "in": "query", + "required": false, + "description": "Either id or internal name of the currency", + "schema": { + "type": "string" + } + }, + { + "name": "customAmountLimit", + "in": "query", + "required": false, + "description": "When set, returns only accounts that have a custom (if true) or have default (false) payment amount limit.", + "schema": { + "type": "boolean" + } + }, + { + "name": "customAmountLimitRange", + "in": "query", + "required": false, + "description": "The minimum / maximum customized payment amount limit. Is only used when `customAmountLimit` is set to true. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "number" + } + } + }, + { + "name": "customAmountPerDayLimit", + "in": "query", + "required": false, + "description": "When set, returns only accounts that have a custom (if true) or have default (false) payment amount per day limit.", + "schema": { + "type": "boolean" + } + }, + { + "name": "customAmountPerDayLimitRange", + "in": "query", + "required": false, + "description": "The minimum / maximum customized payment amount per day limit. Is only used when `customAmountPerDayLimit` is set to true. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "number" + } + } + }, + { + "name": "customAmountPerMonthLimit", + "in": "query", + "required": false, + "description": "When set, returns only accounts that have a custom (if true) or have default (false) payment amount per month limit.", + "schema": { + "type": "boolean" + } + }, + { + "name": "customAmountPerMonthLimitRange", + "in": "query", + "required": false, + "description": "The minimum / maximum customized payment amount per month limit. Is only used when `customAmountPerMonthLimit` is set to true. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "number" + } + } + }, + { + "name": "customAmountPerWeekLimit", + "in": "query", + "required": false, + "description": "When set, returns only accounts that have a custom (if true) or have default (false) payment amount per week limit.", + "schema": { + "type": "boolean" + } + }, + { + "name": "customAmountPerWeekLimitRange", + "in": "query", + "required": false, + "description": "The minimum / maximum customized payment amount per week limit. Is only used when `customAmountPerWeekLimit` is set to true. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "number" + } + } + }, + { + "name": "customAmountPerYearLimit", + "in": "query", + "required": false, + "description": "When set, returns only accounts that have a custom (if true) or have default (false) payment amount per year limit.", + "schema": { + "type": "boolean" + } + }, + { + "name": "customAmountPerYearLimitRange", + "in": "query", + "required": false, + "description": "The minimum / maximum customized payment amount per year limit. Is only used when `customAmountPerYearLimit` is set to true. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "number" + } + } + }, + { + "name": "groups", + "in": "query", + "required": false, + "description": "Either the ids or internal names of user group", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number (zero-based) of the search. The default value is zero.", + "schema": { + "type": "integer" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", + "schema": { + "type": "integer" + } + }, + { + "name": "skipTotalCount", + "in": "query", + "required": false, + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", + "schema": { + "type": "boolean" + } + }, + { + "name": "user", + "in": "query", + "required": false, + "description": "Either the id or identifier of the account owner", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The data for searching account payment limits", + "headers": { + "X-Total-Count": { + "schema": { + "type": "integer" + }, + "description": "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." + }, + "X-Page-Size": { + "schema": { + "type": "integer" + }, + "description": "The maximum number of results per page" + }, + "X-Current-Page": { + "schema": { + "type": "integer" + }, + "description": "The current page the results are in" + }, + "X-Has-Next-Page": { + "schema": { + "type": "boolean" + }, + "description": "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." } - } - }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + }, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GeneralAccountPaymentLimitsResult" + } } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -30376,121 +27658,304 @@ } } }, - "/easy-invoices/qr-code/{to}" : { - "get" : { - "operationId" : "getEasyInvoiceQrCode", - "summary" : "Returns the QR-code image for the given easy invoice's parameters", - "description" : "The generated image could be scanned (e.g by the mobile application) to create a payment ready to be confirmed. The `easyInvoice` channel will be used to perform this operation, i.e the access and perform payment configurations of that channel will be applied.", - "tags" : [ "EasyInvoices" ], - "parameters" : [ { - "name" : "to", - "in" : "path", - "x-dotInPath" : true, - "required" : true, - "description" : "The user which will receive the easy invoice. Unlike other cases of user reference, in this case `self` cannot be used, because the URL may be shared with others, hence, `self` makes no sense.", - "schema" : { - "type" : "string" - } - }, { - "name" : "amount", - "in" : "query", - "required" : false, - "description" : "The easy invoice amount. If provided and the user has multiple currencies, either `type` or `currency` is required.", - "schema" : { - "type" : "string", - "format" : "number" - } - }, { - "name" : "currency", - "in" : "query", - "required" : false, - "description" : "The currency id or internal name. Either this or `type` should be informed if an `amount` was given and the user has multiple currencies.", - "schema" : { - "type" : "string" - } - }, { - "name" : "description", - "in" : "query", - "required" : false, - "description" : "The payment description", - "schema" : { - "type" : "string" - } - }, { - "name" : "type", - "in" : "query", - "description" : "The payment type id or qualified internal name (in the form `fromAccountType.paymentType`). Either this or `currency` should be informed if an `amount` was given and the user has multiple currencies.", - "schema" : { - "type" : "string" - } - }, { - "$ref" : "#/components/parameters/customFields" - }, { - "name" : "size", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/ImageSizeEnum" + "/accounts/payment-limits/export/{format}": { + "parameters": [ + { + "$ref": "#/components/parameters/format" + } + ], + "get": { + "operationId": "exportAccountPaymentLimits", + "summary": "Exports the account payment limits results as file.", + "description": "Generates a file containing the search results. The available export formats are returned in `GET /accounts/data-for-payment-limits`.", + "tags": [ + "PaymentLimits" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "name": "accountType", + "in": "query", + "required": false, + "description": "Either id or internal name of the account type", + "schema": { + "type": "string" + } + }, + { + "name": "brokers", + "in": "query", + "required": false, + "description": "Either the ids or identification methods of users' broker", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "by", + "in": "query", + "required": false, + "description": "Either the id or identifier of the user that performed the change", + "schema": { + "type": "string" + } + }, + { + "name": "currency", + "in": "query", + "required": false, + "description": "Either id or internal name of the currency", + "schema": { + "type": "string" + } + }, + { + "name": "customAmountLimit", + "in": "query", + "required": false, + "description": "When set, returns only accounts that have a custom (if true) or have default (false) payment amount limit.", + "schema": { + "type": "boolean" + } + }, + { + "name": "customAmountLimitRange", + "in": "query", + "required": false, + "description": "The minimum / maximum customized payment amount limit. Is only used when `customAmountLimit` is set to true. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "number" + } + } + }, + { + "name": "customAmountPerDayLimit", + "in": "query", + "required": false, + "description": "When set, returns only accounts that have a custom (if true) or have default (false) payment amount per day limit.", + "schema": { + "type": "boolean" + } + }, + { + "name": "customAmountPerDayLimitRange", + "in": "query", + "required": false, + "description": "The minimum / maximum customized payment amount per day limit. Is only used when `customAmountPerDayLimit` is set to true. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "number" + } + } + }, + { + "name": "customAmountPerMonthLimit", + "in": "query", + "required": false, + "description": "When set, returns only accounts that have a custom (if true) or have default (false) payment amount per month limit.", + "schema": { + "type": "boolean" + } + }, + { + "name": "customAmountPerMonthLimitRange", + "in": "query", + "required": false, + "description": "The minimum / maximum customized payment amount per month limit. Is only used when `customAmountPerMonthLimit` is set to true. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "number" + } + } + }, + { + "name": "customAmountPerWeekLimit", + "in": "query", + "required": false, + "description": "When set, returns only accounts that have a custom (if true) or have default (false) payment amount per week limit.", + "schema": { + "type": "boolean" + } + }, + { + "name": "customAmountPerWeekLimitRange", + "in": "query", + "required": false, + "description": "The minimum / maximum customized payment amount per week limit. Is only used when `customAmountPerWeekLimit` is set to true. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "number" + } + } + }, + { + "name": "customAmountPerYearLimit", + "in": "query", + "required": false, + "description": "When set, returns only accounts that have a custom (if true) or have default (false) payment amount per year limit.", + "schema": { + "type": "boolean" + } + }, + { + "name": "customAmountPerYearLimitRange", + "in": "query", + "required": false, + "description": "The minimum / maximum customized payment amount per year limit. Is only used when `customAmountPerYearLimit` is set to true. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "number" + } + } + }, + { + "name": "groups", + "in": "query", + "required": false, + "description": "Either the ids or internal names of user group", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number (zero-based) of the search. The default value is zero.", + "schema": { + "type": "integer" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", + "schema": { + "type": "integer" + } + }, + { + "name": "skipTotalCount", + "in": "query", + "required": false, + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", + "schema": { + "type": "boolean" + } + }, + { + "name": "user", + "in": "query", + "required": false, + "description": "Either the id or identifier of the account owner", + "schema": { + "type": "string" + } } - } ], - "responses" : { - "200" : { - "description" : "The image content", - "content" : { - "image/png" : { - "schema" : { - "type" : "string", - "format" : "binary" + ], + "responses": { + "200": { + "description": "The file content", + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -30498,108 +27963,87 @@ } } }, - "/easy-invoices/data-for-perform/{to}" : { - "get" : { - "operationId" : "dataForPerformEasyInvoice", - "summary" : "Returns data for an easy invoice to the given user.", - "description" : "An easy invoice is a pre-filled payment from the authenticated user to another user. Other users can use this for a payment template to that user, with pre-filled data. If an amount is specified, then either there must be only payment types of a single currency to the given user, or either a payment type or currency must be informed. The `easyInvoice` channel will be used to perform this operation, i.e the access and perform payment configurations of that channel will be applied.", - "tags" : [ "EasyInvoices" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "to", - "in" : "path", - "x-dotInPath" : true, - "required" : true, - "description" : "The user which will receive the easy invoice. Unlike other cases of user reference, in this case `self` cannot be used, because the URL may be shared with others, hence, `self` makes no sense.", - "schema" : { - "type" : "string" - } - }, { - "name" : "amount", - "in" : "query", - "required" : false, - "description" : "The easy invoice amount. If provided and the user has multiple currencies, either `type` or `currency` is required.", - "schema" : { - "type" : "string", - "format" : "number" - } - }, { - "name" : "type", - "in" : "query", - "required" : false, - "description" : "The payment type id or qualified internal name (in the form `fromAccountType.paymentType`). Either this or `currency` should be informed if an `amount` was given and the user has multiple currencies.", - "schema" : { - "type" : "string" + "/transfers/data-for-search": { + "get": { + "operationId": "getTransferDataForSearch", + "summary": "Returns configuration data for searching transfers over multiple accounts.", + "description": "Returns configuration data for searching transfers over multiple accounts.", + "tags": [ + "Transfers" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] } - }, { - "name" : "currency", - "in" : "query", - "required" : false, - "description" : "The currency id or internal name. Either this or `type` should be informed if an `amount` was given and the user has multiple currencies.", - "schema" : { - "type" : "string" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" } - }, { - "$ref" : "#/components/parameters/customFields" - } ], - "responses" : { - "200" : { - "description" : "The data for easy invoice", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DataForEasyInvoice" + ], + "responses": { + "200": { + "description": "Transaction details", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TransferDataForSearch" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -30607,323 +28051,1153 @@ } } }, - "/easy-invoices" : { - "post" : { - "operationId" : "performEasyInvoice", - "summary" : "Performs a direct payment from an easy invoice.", - "description" : "Performs a direct payment from the authenticated user to the owner specified on the body. The destination user should be informed in the `subject` parameter (the subject `system` is not allowed). The payment id is returned on the response, and a link to the transaction details is returned on the `Location` header. The `easyInvoice` channel will be used to perform this operation, i.e the access and perform payment configurations of that channel will be applied.", - "tags" : [ "EasyInvoices" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/confirmationPassword" - } ], - "responses" : { - "201" : { - "description" : "The created payment", - "headers" : { - "Location" : { - "description" : "URL for viewing the transaction details", - "schema" : { - "type" : "string" - } + "/transfers": { + "get": { + "operationId": "searchTransfers", + "summary": "Searches for transfers over multiple accounts.", + "description": "Searches for transfers over multiple accounts. Only transfers which can really be seen are returned. So, admins can search over any visible member / system accounts. Brokers can search over their managed members or themselves, and regular members can only search own transfers.", + "tags": [ + "Transfers" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "accessClients", + "in": "query", + "required": false, + "description": "References to access clients (id or token) used to perform / receive the transfer.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "amountRange", + "in": "query", + "required": false, + "description": "The minimum / maximum amount. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "number" + } + } + }, + { + "name": "brokers", + "in": "query", + "required": false, + "description": "Reference to the broker of users involved in transfers. Is only taken into account if authenticated as administrator.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "by", + "in": "query", + "required": false, + "description": "Reference to the user that was authenticated when the transfer was performed. Is only taken into account if authenticated as administrator.", + "schema": { + "type": "string" + } + }, + { + "name": "channels", + "in": "query", + "required": false, + "description": "Reference to the channel used to perform / receive the transfer. Only taken into account if authenticated as administrator.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "chargedBack", + "in": "query", + "required": false, + "description": "When set to either `true` will only return transfers that were charged-back. When set to `false`, will only return transfers that were not charged-back. When left blank will not filter by this creterion.", + "schema": { + "type": "boolean" + } + }, + { + "name": "currencies", + "in": "query", + "required": false, + "description": "Either ids or internal names of the currency", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "customFields", + "in": "query", + "required": false, + "description": "Transaction custom field values used as filters. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by : (colon). For example, `customFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, customFields=field1:valueA|valueB. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `customFields=rank:bronze|silver,documentDate:2000-01-01|2001-12-31` would match results whose custom field with internal name `rank` is either `bronze` or `silver`, and whose `documentDate` is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `customFields=documentDate:|2001-12-31`. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `customFields=dynamic:a|b|c`. However, it is also possible to perform a partial-match search using the dynamic value label. In this case a single value, prefixed or enclosed by single quotes should be used. For example: `customFields=dynamic:'business` or `customFields=dynamic:'business'`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "datePeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum transfer date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "excludedIds", + "in": "query", + "required": false, + "description": "List of transfers ids to be excluded from the result.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "fromAccountTypes", + "in": "query", + "required": false, + "description": "Either ids or internal names of the origin account type", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "fromCurrentAccessClient", + "in": "query", + "required": false, + "description": "Flag indicating whether to include only transfers by the current access client.", + "schema": { + "type": "boolean" + } + }, + { + "name": "groups", + "in": "query", + "required": false, + "description": "Reference to the user group used to perform / receive the transfer. Only taken into account if authenticated as administrator.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "includeGeneratedByAccessClient", + "in": "query", + "required": false, + "description": "Flag indicating whether to include or not the generated transfer. Only valid if there is at least one access client specified. For example if a `ticket` or `paymentRequest` was processed then a new transfer will be generated.", + "schema": { + "type": "boolean" + } + }, + { + "name": "kinds", + "in": "query", + "required": false, + "description": "The kind of transfers to return", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TransferKind" + } + } + }, + { + "name": "orderBy", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/TransOrderByEnum" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number (zero-based) of the search. The default value is zero.", + "schema": { + "type": "integer" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", + "schema": { + "type": "integer" + } + }, + { + "name": "skipTotalCount", + "in": "query", + "required": false, + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", + "schema": { + "type": "boolean" + } + }, + { + "name": "statuses", + "in": "query", + "required": false, + "description": "Transfer statuses used as search criteria. Each array element should be either the identifier or the status qualified internal name, composed by flow internal name, a dot, and the status internal name. For example, `loan.open` would be a valid internal name.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "toAccountTypes", + "in": "query", + "required": false, + "description": "Either ids or internal names of the destination account type", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "transactionNumber", + "in": "query", + "required": false, + "description": "The transaction number of the matching transfer", + "schema": { + "type": "string" + } + }, + { + "name": "transferFilters", + "in": "query", + "required": false, + "description": "Reference to the transfer filters, which filters transfers by type. May be either the internal id or qualified transfer filter internal name, in the format `accountType.transferFilter`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "transferTypes", + "in": "query", + "required": false, + "description": "Reference to the transfer types for filter. May be either the internal id or qualified transfer type internal name, in the format `accountType.transferType`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "user", + "in": "query", + "required": false, + "description": "Reference a user that should have either received / performed the transfer.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The visible transfers matching the search filters", + "headers": { + "X-Total-Count": { + "schema": { + "type": "integer" + }, + "description": "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." + }, + "X-Page-Size": { + "schema": { + "type": "integer" + }, + "description": "The maximum number of results per page" + }, + "X-Current-Page": { + "schema": { + "type": "integer" + }, + "description": "The current page the results are in" + }, + "X-Has-Next-Page": { + "schema": { + "type": "boolean" + }, + "description": "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." } }, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Transaction" + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TransferResult" + } } } } }, - "500" : { - "description" : "If a payment error has occurred", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PaymentError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } - } - }, - "requestBody" : { - "description" : "The perform payment parameters", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PerformPayment" + }, + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } } } - } - } - } - }, - "/easy-invoices/preview" : { - "post" : { - "operationId" : "previewEasyInvoice", - "summary" : "Previews a direct payment from an easy invoice before performing it.", - "description" : "Previews a direct payment from the logged created from an easy invoice. The actual balance checking is not performed in the preview. The `easyInvoice` channel will be used to perform this operation, i.e the access and perform payment configurations of that channel will be applied.", - "tags" : [ "EasyInvoices" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The payment preview", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PaymentPreview" + }, + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/transfers/summary": { + "get": { + "operationId": "searchTransfersSummary", + "summary": "Returns totals per currency for the transfers search.", + "description": "For each returned currency, according to the visibility and filters, a summary is returned for the total visible transactions.", + "tags": [ + "Transfers" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "accessClients", + "in": "query", + "required": false, + "description": "References to access clients (id or token) used to perform / receive the transfer.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "amountRange", + "in": "query", + "required": false, + "description": "The minimum / maximum amount. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "number" + } + } + }, + { + "name": "brokers", + "in": "query", + "required": false, + "description": "Reference to the broker of users involved in transfers. Is only taken into account if authenticated as administrator.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "by", + "in": "query", + "required": false, + "description": "Reference to the user that was authenticated when the transfer was performed. Is only taken into account if authenticated as administrator.", + "schema": { + "type": "string" + } + }, + { + "name": "channels", + "in": "query", + "required": false, + "description": "Reference to the channel used to perform / receive the transfer. Only taken into account if authenticated as administrator.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "chargedBack", + "in": "query", + "required": false, + "description": "When set to either `true` will only return transfers that were charged-back. When set to `false`, will only return transfers that were not charged-back. When left blank will not filter by this creterion.", + "schema": { + "type": "boolean" + } + }, + { + "name": "currencies", + "in": "query", + "required": false, + "description": "Either ids or internal names of the currency", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "customFields", + "in": "query", + "required": false, + "description": "Transaction custom field values used as filters. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by : (colon). For example, `customFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, customFields=field1:valueA|valueB. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `customFields=rank:bronze|silver,documentDate:2000-01-01|2001-12-31` would match results whose custom field with internal name `rank` is either `bronze` or `silver`, and whose `documentDate` is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `customFields=documentDate:|2001-12-31`. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `customFields=dynamic:a|b|c`. However, it is also possible to perform a partial-match search using the dynamic value label. In this case a single value, prefixed or enclosed by single quotes should be used. For example: `customFields=dynamic:'business` or `customFields=dynamic:'business'`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "datePeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum transfer date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "excludedIds", + "in": "query", + "required": false, + "description": "List of transfers ids to be excluded from the result.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "fromAccountTypes", + "in": "query", + "required": false, + "description": "Either ids or internal names of the origin account type", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "fromCurrentAccessClient", + "in": "query", + "required": false, + "description": "Flag indicating whether to include only transfers by the current access client.", + "schema": { + "type": "boolean" + } + }, + { + "name": "groups", + "in": "query", + "required": false, + "description": "Reference to the user group used to perform / receive the transfer. Only taken into account if authenticated as administrator.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "includeGeneratedByAccessClient", + "in": "query", + "required": false, + "description": "Flag indicating whether to include or not the generated transfer. Only valid if there is at least one access client specified. For example if a `ticket` or `paymentRequest` was processed then a new transfer will be generated.", + "schema": { + "type": "boolean" + } + }, + { + "name": "kinds", + "in": "query", + "required": false, + "description": "The kind of transfers to return", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TransferKind" + } + } + }, + { + "name": "orderBy", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/TransOrderByEnum" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number (zero-based) of the search. The default value is zero.", + "schema": { + "type": "integer" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", + "schema": { + "type": "integer" + } + }, + { + "name": "skipTotalCount", + "in": "query", + "required": false, + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", + "schema": { + "type": "boolean" + } + }, + { + "name": "statuses", + "in": "query", + "required": false, + "description": "Transfer statuses used as search criteria. Each array element should be either the identifier or the status qualified internal name, composed by flow internal name, a dot, and the status internal name. For example, `loan.open` would be a valid internal name.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "toAccountTypes", + "in": "query", + "required": false, + "description": "Either ids or internal names of the destination account type", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "transactionNumber", + "in": "query", + "required": false, + "description": "The transaction number of the matching transfer", + "schema": { + "type": "string" + } + }, + { + "name": "transferFilters", + "in": "query", + "required": false, + "description": "Reference to the transfer filters, which filters transfers by type. May be either the internal id or qualified transfer filter internal name, in the format `accountType.transferFilter`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "transferTypes", + "in": "query", + "required": false, + "description": "Reference to the transfer types for filter. May be either the internal id or qualified transfer type internal name, in the format `accountType.transferType`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "user", + "in": "query", + "required": false, + "description": "Reference a user that should have either received / performed the transfer.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The summaries for each account", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CurrencyAmountSummary" + } } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } - } - }, - "requestBody" : { - "description" : "The perform payment parameters", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PerformPayment" + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } } } } } } }, - "/scheduled-payments/{key}/block" : { - "post" : { - "operationId" : "blockScheduledPayment", - "summary" : "Blocks a scheduled payment.", - "description" : "Blocks a scheduled payment, preventing its installments from being automatically processed. The scheduled payment status must be `open`. This action is to be performed by the scheduled payment payer.", - "tags" : [ "ScheduledPayments" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/confirmationPassword" - }, { - "name" : "key", - "in" : "path", - "required" : true, - "description" : "Either the id or transaction number.", - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "204" : { - "description" : "The scheduled payment is blocked and nothing is returned." - }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } + "/transfers/export/{format}": { + "parameters": [ + { + "$ref": "#/components/parameters/format" + } + ], + "get": { + "operationId": "exportTransfers", + "summary": "Exports the transfers search results as file", + "description": "Generates a file containing the search results. The available export formats are returned in `GET /transfers/data-for-search`.", + "tags": [ + "Transfers" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "name": "accessClients", + "in": "query", + "required": false, + "description": "References to access clients (id or token) used to perform / receive the transfer.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "amountRange", + "in": "query", + "required": false, + "description": "The minimum / maximum amount. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "number" + } + } + }, + { + "name": "brokers", + "in": "query", + "required": false, + "description": "Reference to the broker of users involved in transfers. Is only taken into account if authenticated as administrator.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "by", + "in": "query", + "required": false, + "description": "Reference to the user that was authenticated when the transfer was performed. Is only taken into account if authenticated as administrator.", + "schema": { + "type": "string" + } + }, + { + "name": "channels", + "in": "query", + "required": false, + "description": "Reference to the channel used to perform / receive the transfer. Only taken into account if authenticated as administrator.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "chargedBack", + "in": "query", + "required": false, + "description": "When set to either `true` will only return transfers that were charged-back. When set to `false`, will only return transfers that were not charged-back. When left blank will not filter by this creterion.", + "schema": { + "type": "boolean" + } + }, + { + "name": "currencies", + "in": "query", + "required": false, + "description": "Either ids or internal names of the currency", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "customFields", + "in": "query", + "required": false, + "description": "Transaction custom field values used as filters. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by : (colon). For example, `customFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, customFields=field1:valueA|valueB. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `customFields=rank:bronze|silver,documentDate:2000-01-01|2001-12-31` would match results whose custom field with internal name `rank` is either `bronze` or `silver`, and whose `documentDate` is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `customFields=documentDate:|2001-12-31`. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `customFields=dynamic:a|b|c`. However, it is also possible to perform a partial-match search using the dynamic value label. In this case a single value, prefixed or enclosed by single quotes should be used. For example: `customFields=dynamic:'business` or `customFields=dynamic:'business'`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "datePeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum transfer date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "excludedIds", + "in": "query", + "required": false, + "description": "List of transfers ids to be excluded from the result.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "fromAccountTypes", + "in": "query", + "required": false, + "description": "Either ids or internal names of the origin account type", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "fromCurrentAccessClient", + "in": "query", + "required": false, + "description": "Flag indicating whether to include only transfers by the current access client.", + "schema": { + "type": "boolean" + } + }, + { + "name": "groups", + "in": "query", + "required": false, + "description": "Reference to the user group used to perform / receive the transfer. Only taken into account if authenticated as administrator.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "includeGeneratedByAccessClient", + "in": "query", + "required": false, + "description": "Flag indicating whether to include or not the generated transfer. Only valid if there is at least one access client specified. For example if a `ticket` or `paymentRequest` was processed then a new transfer will be generated.", + "schema": { + "type": "boolean" + } + }, + { + "name": "kinds", + "in": "query", + "required": false, + "description": "The kind of transfers to return", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TransferKind" + } + } + }, + { + "name": "orderBy", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/TransOrderByEnum" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number (zero-based) of the search. The default value is zero.", + "schema": { + "type": "integer" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", + "schema": { + "type": "integer" + } + }, + { + "name": "skipTotalCount", + "in": "query", + "required": false, + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", + "schema": { + "type": "boolean" + } + }, + { + "name": "statuses", + "in": "query", + "required": false, + "description": "Transfer statuses used as search criteria. Each array element should be either the identifier or the status qualified internal name, composed by flow internal name, a dot, and the status internal name. For example, `loan.open` would be a valid internal name.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" - } + { + "name": "toAccountTypes", + "in": "query", + "required": false, + "description": "Either ids or internal names of the destination account type", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" - } + { + "name": "transactionNumber", + "in": "query", + "required": false, + "description": "The transaction number of the matching transfer", + "schema": { + "type": "string" + } + }, + { + "name": "transferFilters", + "in": "query", + "required": false, + "description": "Reference to the transfer filters, which filters transfers by type. May be either the internal id or qualified transfer filter internal name, in the format `accountType.transferFilter`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" - } + { + "name": "transferTypes", + "in": "query", + "required": false, + "description": "Reference to the transfer types for filter. May be either the internal id or qualified transfer type internal name, in the format `accountType.transferType`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + { + "name": "user", + "in": "query", + "required": false, + "description": "Reference a user that should have either received / performed the transfer.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The file content", + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" } } } - } - } - } - }, - "/scheduled-payments/{key}/unblock" : { - "post" : { - "operationId" : "unblockScheduledPayment", - "summary" : "Unblocks a scheduled payment.", - "description" : "Unblocks a previously blocked scheduled payment The scheduled payment status must be `blocked`. This action is to be performed by the scheduled payment payer.", - "tags" : [ "ScheduledPayments" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/confirmationPassword" - }, { - "name" : "key", - "in" : "path", - "required" : true, - "description" : "Either the id or transaction number.", - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "204" : { - "description" : "The scheduled payment is unblocked and nothing is returned." }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -30931,80 +29205,96 @@ } } }, - "/scheduled-payments/{key}/cancel" : { - "post" : { - "operationId" : "cancelScheduledPayment", - "summary" : "Cancels a scheduled payment.", - "description" : "Permanently cancels a scheduled payment. The scheduled payment status must be either `open` or `blocked`. This action is to be performed by the scheduled payment payer.", - "tags" : [ "ScheduledPayments" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/confirmationPassword" - }, { - "name" : "key", - "in" : "path", - "required" : true, - "description" : "Either the id or transaction number.", - "schema" : { - "type" : "string" + "/transfers/{key}": { + "get": { + "operationId": "viewTransfer", + "summary": "Returns details about a transfer", + "description": "Returns details about a transfer.", + "tags": [ + "Transfers" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "key", + "in": "path", + "required": true, + "description": "Either the id or transaction number", + "schema": { + "type": "string" + } } - } ], - "responses" : { - "204" : { - "description" : "The scheduled payment is canceled and nothing is returned." + ], + "responses": { + "200": { + "description": "Transaction details", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TransferView" + } + } + } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -31012,80 +29302,97 @@ } } }, - "/scheduled-payments/{key}/settle-remaining" : { - "post" : { - "operationId" : "settleScheduledPayment", - "summary" : "Settles all remaining installments in a scheduled payment.", - "description" : "Settles all remaining installments, closing the scheduled payment. The scheduled payment status must be either `open` or `blocked`. This action is to be performed by the scheduled payment payee.", - "tags" : [ "ScheduledPayments" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/confirmationPassword" - }, { - "name" : "key", - "in" : "path", - "required" : true, - "description" : "Either the id or transaction number.", - "schema" : { - "type" : "string" + "/transfers/{key}/export/{format}": { + "parameters": [ + { + "name": "key", + "in": "path", + "required": true, + "description": "Either the id or transaction number", + "schema": { + "type": "string" + } + }, + { + "$ref": "#/components/parameters/format" + } + ], + "get": { + "operationId": "exportTransfer", + "summary": "Exports the transfer details to a file.", + "description": "Exports the transfer details to a file. The available formats are available in `TransferView`", + "tags": [ + "Transfers" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] } - } ], - "responses" : { - "204" : { - "description" : "The scheduled payment is closed and nothing is returned." + ], + "responses": { + "200": { + "description": "The file content", + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -31093,80 +29400,93 @@ } } }, - "/recurring-payments/{key}/cancel" : { - "post" : { - "operationId" : "cancelRecurringPayment", - "summary" : "Cancels a recurring payment.", - "description" : "Permanently cancels a recurring payment. The recurring payment status must be `open`.", - "tags" : [ "RecurringPayments" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/confirmationPassword" - }, { - "name" : "key", - "in" : "path", - "required" : true, - "description" : "Either the id or transaction number.", - "schema" : { - "type" : "string" + "/transfers/{key}/chargeback": { + "post": { + "operationId": "chargebackTransfer", + "summary": "Perform the chargeback of a transfer", + "description": "The chargeback generates a new transaction with `kind` = `chargeback`. A new transfer is generated with the same from / to, and negative amount. This will effectively return the amount to the original account. Only top-level transfers can be charged back. For example, a transfer used to charge a fee cannot be charged back. Also, the hability to chargeback a transfer depends on permissions and configuration like the maximum allowed time for the chargeback.", + "tags": [ + "Transfers" + ], + "parameters": [ + { + "name": "key", + "in": "path", + "required": true, + "description": "Either the id or transaction number", + "schema": { + "type": "string" + } + }, + { + "$ref": "#/components/parameters/confirmationPassword" } - } ], - "responses" : { - "204" : { - "description" : "The recurring payment is canceled and nothing is returned." + ], + "responses": { + "201": { + "description": "The chargeback id", + "headers": { + "Location": { + "description": "URL for viewing the created chargeback", + "schema": { + "type": "string" + } + } + }, + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "There was an error while creating the chargeback payment", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentError" } } } @@ -31174,192 +29494,614 @@ } } }, - "/recurring-payments/{key}/modify" : { - "put" : { - "operationId" : "modifyRecurringPayment", - "summary" : "Modifies a recurring payment.", - "description" : "Modifies a recurring payment by changing occurrences count and scheduling. The recurring payment status must be `open`.", - "tags" : [ "RecurringPayments" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/confirmationPassword" - }, { - "name" : "key", - "in" : "path", - "required" : true, - "description" : "Either the id or transaction number.", - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "204" : { - "description" : "The recurring payemt was modified." + "/{owner}/transactions/data-for-search": { + "get": { + "operationId": "getTransactionsDataForSearch", + "summary": "Returns data for searching transactions of an account owner", + "description": "Returns data which can be used to filter a transaction search", + "tags": [ + "Transactions" + ], + "security": [ + { + "basic": [] }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" - } - } - } + { + "session": [] }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/owner" + } + ], + "responses": { + "200": { + "description": "Data for searching transactions of an account owner", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TransactionDataForSearch" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - }, - "requestBody" : { - "description" : "The recurring payment to be edited.", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/RecurringPaymentEdit" - } - } - } } } }, - "/recurring-payments/{key}/block" : { - "post" : { - "operationId" : "blockRecurringPayment", - "summary" : "Blocks a recurring payment.", - "description" : "Blocks a recurring payment, preventing its installments from being automatically processed. The recurring payment status must be `open`. This action is to be performed by the recurring payment payer.", - "tags" : [ "RecurringPayments" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/confirmationPassword" - }, { - "name" : "key", - "in" : "path", - "required" : true, - "description" : "Either the id or transaction number.", - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "204" : { - "description" : "The recurring payment is blocked and nothing is returned." + "/{owner}/transactions": { + "parameters": [ + { + "$ref": "#/components/parameters/owner" + } + ], + "get": { + "operationId": "searchTransactions", + "summary": "Searches transactions of an account owner", + "description": "Returns the transactions of a given account owner that match the specified criteria. Each result will will be relative to this owner. The amount may be positive or negative, depending on whether this owner has performed or received the transaction.", + "tags": [ + "Transactions" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "accessClients", + "in": "query", + "required": false, + "description": "References to access clients (id or token) used to perform / receive the transfer.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "accountTypes", + "in": "query", + "required": false, + "description": "The account types", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "amountRange", + "in": "query", + "required": false, + "description": "The minimum / maximum amount. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "number" + } + } + }, + { + "name": "authorizationPerformedBy", + "in": "query", + "required": false, + "description": "Id or other identifier (login name, email, etc) of the user that performed an authorization action (authorize, deny or cancel).", + "schema": { + "type": "string" + } + }, + { + "name": "authorizationRoles", + "in": "query", + "required": false, + "description": "Either internal names or ids of authorization roles. To match, transactions must be pending authorization in a level which can be authorized by any of the given roles.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "authorizationStatuses", + "in": "query", + "required": false, + "description": "Authorization statuses used as search criteria. When set, only kinds that can go through authorization are returned (`payment`, `order`, `recurringPayment` or `scheduledPayment`).", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TransactionAuthorizationStatusEnum" + } + } + }, + { + "name": "authorized", + "in": "query", + "required": false, + "description": "When set, will only return transactions that went through the authorization process (if true) or that never went through it (when false). In either case, only kinds that can go through authorization are returned (`payment`, `order`, `recurringPayment` or `scheduledPayment`).", + "schema": { + "type": "boolean" + } + }, + { + "name": "brokers", + "in": "query", + "required": false, + "description": "Reference to the broker of users involved in transfers. Is only taken into account if authenticated as administrator.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "by", + "in": "query", + "required": false, + "description": "Reference to the user that was authenticated when the transfer was performed. Is only taken into account if authenticated as administrator.", + "schema": { + "type": "string" + } + }, + { + "name": "channels", + "in": "query", + "required": false, + "description": "Reference to the channel used to perform / receive the transfer. Only taken into account if authenticated as administrator.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "creationTypes", + "in": "query", + "required": false, + "description": "Include only payments created as one of these. This filter only applies to the following kinds: `payment`, `scheduledPayment` and `recurringPayment`. It doesn't affect other kinds of returned transactions. If you only want payments to be returned, set these in the `kinds` filter.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PaymentCreationTypeEnum" + } + } + }, + { + "name": "customFields", + "in": "query", + "required": false, + "description": "Transaction custom field values used as filters. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by : (colon). For example, `customFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, customFields=field1:valueA|valueB. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `customFields=rank:bronze|silver,documentDate:2000-01-01|2001-12-31` would match results whose custom field with internal name `rank` is either `bronze` or `silver`, and whose `documentDate` is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `customFields=documentDate:|2001-12-31`. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `customFields=dynamic:a|b|c`. However, it is also possible to perform a partial-match search using the dynamic value label. In this case a single value, prefixed or enclosed by single quotes should be used. For example: `customFields=dynamic:'business` or `customFields=dynamic:'business'`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "datePeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum transfer date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "direction", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/TransferDirectionEnum" + } + }, + { + "name": "excludedIds", + "in": "query", + "required": false, + "description": "List of transfers ids to be excluded from the result.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "externalPaymentExpiration", + "in": "query", + "required": false, + "description": "The minimum / maximum date for external payment expiration. Only affects external payments. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "externalPaymentStatuses", + "in": "query", + "required": false, + "description": "Statuses used as search criteria applied only to transactions of kind `externalPayment`.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExternalPaymentStatusEnum" + } + } + }, + { + "name": "fromCurrentAccessClient", + "in": "query", + "required": false, + "description": "Flag indicating whether to include only transfers by the current access client.", + "schema": { + "type": "boolean" + } + }, + { + "name": "groups", + "in": "query", + "required": false, + "description": "Reference to the user group used to perform / receive the transfer. Only taken into account if authenticated as administrator.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "includeGeneratedByAccessClient", + "in": "query", + "required": false, + "description": "Flag indicating whether to include or not the generated transfer. Only valid if there is at least one access client specified. For example if a `ticket` or `paymentRequest` was processed then a new transfer will be generated.", + "schema": { + "type": "boolean" + } + }, + { + "name": "kinds", + "in": "query", + "required": false, + "description": "The kinds of transactions to include", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TransactionKind" + } + } + }, + { + "name": "orderBy", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/TransOrderByEnum" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number (zero-based) of the search. The default value is zero.", + "schema": { + "type": "integer" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", + "schema": { + "type": "integer" + } + }, + { + "name": "paymentRequestExpiration", + "in": "query", + "required": false, + "description": "The minimum / maximum date for payment request expiration. Only affects payment requests. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "paymentRequestStatuses", + "in": "query", + "required": false, + "description": "Statuses used as search criteria applied only to transactions of kind `paymentRequest`.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PaymentRequestStatusEnum" + } + } + }, + { + "name": "recurringPaymentStatuses", + "in": "query", + "required": false, + "description": "Statuses used as search criteria applied only to transactions of kind `recurringPayment`. If this filter is not empty then pending recurring payments will be excluded from the result. Pending recurring payments does not have a status.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RecurringPaymentStatusEnum" + } + } + }, + { + "name": "scheduledPaymentStatuses", + "in": "query", + "required": false, + "description": "Statuses used as search criteria applied only to transactions of kind `scheduledPayment`. If this filter is not empty then pending scheduled payments will be excluded from the result. Pending scheduled payments does not have a status.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduledPaymentStatusEnum" + } + } + }, + { + "name": "skipTotalCount", + "in": "query", + "required": false, + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", + "schema": { + "type": "boolean" + } + }, + { + "name": "ticketExpiration", + "in": "query", + "required": false, + "description": "The minimum / maximum date for ticket expiration. Only affects tickets. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "ticketStatuses", + "in": "query", + "required": false, + "description": "Statuses used as search criteria applied only to transactions of kind `ticket`.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TicketStatusEnum" + } + } + }, + { + "name": "transactionNumber", + "in": "query", + "required": false, + "description": "The transaction number of the matching transfer", + "schema": { + "type": "string" + } + }, + { + "name": "transferFilters", + "in": "query", + "required": false, + "description": "Reference to the transfer filters, which filters transfers by type. May be either the internal id or qualified transfer filter internal name, in the format `accountType.transferFilter`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "transferTypes", + "in": "query", + "required": false, + "description": "Reference to the transfer types for filter. May be either the internal id or qualified transfer type internal name, in the format `accountType.transferType`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "user", + "in": "query", + "required": false, + "description": "Reference a user that should have either received / performed the transfer.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The transaction entries matching the criteria", + "headers": { + "X-Total-Count": { + "schema": { + "type": "integer" + }, + "description": "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." + }, + "X-Page-Size": { + "schema": { + "type": "integer" + }, + "description": "The maximum number of results per page" + }, + "X-Current-Page": { + "schema": { + "type": "integer" + }, + "description": "The current page the results are in" + }, + "X-Has-Next-Page": { + "schema": { + "type": "boolean" + }, + "description": "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." + } + }, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TransactionResult" + } + } + } + } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -31367,168 +30109,505 @@ } } }, - "/recurring-payments/{key}/unblock" : { - "post" : { - "operationId" : "unblockRecurringPayment", - "summary" : "Unblocks a recurring payment.", - "description" : "Unblocks a previously blocked recurring payment. The recurring payment status must be `blocked`. This action is to be performed by the recurring payment payer.", - "tags" : [ "RecurringPayments" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/confirmationPassword" - }, { - "name" : "key", - "in" : "path", - "required" : true, - "description" : "Either the id or transaction number.", - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "204" : { - "description" : "The recurring payment is unblocked and nothing is returned." + "/{owner}/transactions/export/{format}": { + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/format" + } + ], + "get": { + "operationId": "exportTransactions", + "summary": "Exports the owner transactions search results as file", + "description": "Generates a file containing the search results. The available export formats are returned in `GET /{owner}/transactions/data-for-search`.", + "tags": [ + "Transactions" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "name": "accessClients", + "in": "query", + "required": false, + "description": "References to access clients (id or token) used to perform / receive the transfer.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "accountTypes", + "in": "query", + "required": false, + "description": "The account types", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "amountRange", + "in": "query", + "required": false, + "description": "The minimum / maximum amount. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "number" + } + } + }, + { + "name": "authorizationPerformedBy", + "in": "query", + "required": false, + "description": "Id or other identifier (login name, email, etc) of the user that performed an authorization action (authorize, deny or cancel).", + "schema": { + "type": "string" + } + }, + { + "name": "authorizationRoles", + "in": "query", + "required": false, + "description": "Either internal names or ids of authorization roles. To match, transactions must be pending authorization in a level which can be authorized by any of the given roles.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "authorizationStatuses", + "in": "query", + "required": false, + "description": "Authorization statuses used as search criteria. When set, only kinds that can go through authorization are returned (`payment`, `order`, `recurringPayment` or `scheduledPayment`).", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TransactionAuthorizationStatusEnum" + } + } + }, + { + "name": "authorized", + "in": "query", + "required": false, + "description": "When set, will only return transactions that went through the authorization process (if true) or that never went through it (when false). In either case, only kinds that can go through authorization are returned (`payment`, `order`, `recurringPayment` or `scheduledPayment`).", + "schema": { + "type": "boolean" + } + }, + { + "name": "brokers", + "in": "query", + "required": false, + "description": "Reference to the broker of users involved in transfers. Is only taken into account if authenticated as administrator.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "by", + "in": "query", + "required": false, + "description": "Reference to the user that was authenticated when the transfer was performed. Is only taken into account if authenticated as administrator.", + "schema": { + "type": "string" + } + }, + { + "name": "channels", + "in": "query", + "required": false, + "description": "Reference to the channel used to perform / receive the transfer. Only taken into account if authenticated as administrator.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "creationTypes", + "in": "query", + "required": false, + "description": "Include only payments created as one of these. This filter only applies to the following kinds: `payment`, `scheduledPayment` and `recurringPayment`. It doesn't affect other kinds of returned transactions. If you only want payments to be returned, set these in the `kinds` filter.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PaymentCreationTypeEnum" + } + } + }, + { + "name": "customFields", + "in": "query", + "required": false, + "description": "Transaction custom field values used as filters. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by : (colon). For example, `customFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, customFields=field1:valueA|valueB. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `customFields=rank:bronze|silver,documentDate:2000-01-01|2001-12-31` would match results whose custom field with internal name `rank` is either `bronze` or `silver`, and whose `documentDate` is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `customFields=documentDate:|2001-12-31`. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `customFields=dynamic:a|b|c`. However, it is also possible to perform a partial-match search using the dynamic value label. In this case a single value, prefixed or enclosed by single quotes should be used. For example: `customFields=dynamic:'business` or `customFields=dynamic:'business'`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "datePeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum transfer date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "direction", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/TransferDirectionEnum" + } + }, + { + "name": "excludedIds", + "in": "query", + "required": false, + "description": "List of transfers ids to be excluded from the result.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "externalPaymentExpiration", + "in": "query", + "required": false, + "description": "The minimum / maximum date for external payment expiration. Only affects external payments. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "externalPaymentStatuses", + "in": "query", + "required": false, + "description": "Statuses used as search criteria applied only to transactions of kind `externalPayment`.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExternalPaymentStatusEnum" + } + } + }, + { + "name": "fromCurrentAccessClient", + "in": "query", + "required": false, + "description": "Flag indicating whether to include only transfers by the current access client.", + "schema": { + "type": "boolean" + } + }, + { + "name": "groups", + "in": "query", + "required": false, + "description": "Reference to the user group used to perform / receive the transfer. Only taken into account if authenticated as administrator.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "includeGeneratedByAccessClient", + "in": "query", + "required": false, + "description": "Flag indicating whether to include or not the generated transfer. Only valid if there is at least one access client specified. For example if a `ticket` or `paymentRequest` was processed then a new transfer will be generated.", + "schema": { + "type": "boolean" + } + }, + { + "name": "kinds", + "in": "query", + "required": false, + "description": "The kinds of transactions to include", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TransactionKind" + } + } + }, + { + "name": "orderBy", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/TransOrderByEnum" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number (zero-based) of the search. The default value is zero.", + "schema": { + "type": "integer" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", + "schema": { + "type": "integer" + } + }, + { + "name": "paymentRequestExpiration", + "in": "query", + "required": false, + "description": "The minimum / maximum date for payment request expiration. Only affects payment requests. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "paymentRequestStatuses", + "in": "query", + "required": false, + "description": "Statuses used as search criteria applied only to transactions of kind `paymentRequest`.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PaymentRequestStatusEnum" + } + } + }, + { + "name": "recurringPaymentStatuses", + "in": "query", + "required": false, + "description": "Statuses used as search criteria applied only to transactions of kind `recurringPayment`. If this filter is not empty then pending recurring payments will be excluded from the result. Pending recurring payments does not have a status.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RecurringPaymentStatusEnum" + } + } + }, + { + "name": "scheduledPaymentStatuses", + "in": "query", + "required": false, + "description": "Statuses used as search criteria applied only to transactions of kind `scheduledPayment`. If this filter is not empty then pending scheduled payments will be excluded from the result. Pending scheduled payments does not have a status.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduledPaymentStatusEnum" + } + } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } + { + "name": "skipTotalCount", + "in": "query", + "required": false, + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", + "schema": { + "type": "boolean" + } + }, + { + "name": "ticketExpiration", + "in": "query", + "required": false, + "description": "The minimum / maximum date for ticket expiration. Only affects tickets. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" - } + { + "name": "ticketStatuses", + "in": "query", + "required": false, + "description": "Statuses used as search criteria applied only to transactions of kind `ticket`.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TicketStatusEnum" } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" - } + { + "name": "transactionNumber", + "in": "query", + "required": false, + "description": "The transaction number of the matching transfer", + "schema": { + "type": "string" + } + }, + { + "name": "transferFilters", + "in": "query", + "required": false, + "description": "Reference to the transfer filters, which filters transfers by type. May be either the internal id or qualified transfer filter internal name, in the format `accountType.transferFilter`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" - } + { + "name": "transferTypes", + "in": "query", + "required": false, + "description": "Reference to the transfer types for filter. May be either the internal id or qualified transfer type internal name, in the format `accountType.transferType`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + { + "name": "user", + "in": "query", + "required": false, + "description": "Reference a user that should have either received / performed the transfer.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The file content", + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" } } } - } - } - } - }, - "/recurring-payments/{key}/data-for-edit" : { - "get" : { - "operationId" : "getRecurringPaymentDataForEdit", - "summary" : "Returns data to edit an existing recurring payment", - "description" : "Returns configuration data for editing a recurring payment, plus the current `RecurringPaymentEdit` object that can be altered and sent back", - "tags" : [ "RecurringPayments" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "key", - "in" : "path", - "required" : true, - "description" : "Either the id or transaction number.", - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "The data for editing a recurring payment", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/RecurringPaymentDataForEdit" + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -31536,97 +30615,96 @@ } } }, - "/{owner}/payment-requests/data-for-send" : { - "get" : { - "operationId" : "dataForSendPaymentRequest", - "summary" : "Returns configuration data for sending a payment request", - "description" : "Returns configuration data for sending a payment request", - "tags" : [ "PaymentRequests" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/owner" - }, { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "to", - "in" : "query", - "required" : false, - "description" : "The payment request destination, which is either string `system` for a payment request to system or a user identification. The payment request destination is the one that performs the payment once it is accepted.", - "schema" : { - "type" : "string" + "/transactions/data-for-search": { + "get": { + "operationId": "getTransactionsOverviewDataForSearch", + "summary": "Returns data for searching transactions regardless of a owner", + "description": "Returns data which can be used to filter a transaction search", + "tags": [ + "Transactions" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] } - }, { - "name" : "type", - "in" : "query", - "required" : false, - "description" : "The payment type id or qualified internal name (in the form `fromAccountType.paymentType`). If no payment type is provided, the possible types will be returned, so the payer can choose.", - "schema" : { - "type" : "string" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "pendingMyAuthorization", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + }, + "description": "When set to true will search for transactions which are currently pending authorization, and the authenticated user can authorize." } - } ], - "responses" : { - "200" : { - "description" : "The data for sending a payment request", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DataForTransaction" + ], + "responses": { + "200": { + "description": "Data for searching transactions of an account owner", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TransactionOverviewDataForSearch" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -31634,302 +30712,1075 @@ } } }, - "/{owner}/payment-requests" : { - "post" : { - "operationId" : "sendPaymentRequest", - "summary" : "Sends a payment request from the given owner", - "description" : "Sends a payment request from the owner indicated on the path (which will receive the payment once the request is accepted) to the owner specified on the body (which will perform the payment once the request is accepted). The destination user should be informed in the `subject` parameter. If the `subject` is `system`, the payment request is sent to a system account, and has to be accepted by an administrator. The payment request id is returned on the response, and a link to the transaction details is returned on the `Location` header.", - "tags" : [ "PaymentRequests" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/owner" - } ], - "responses" : { - "201" : { - "description" : "The created payment request", - "headers" : { - "Location" : { - "description" : "URL for viewing the transaction details", - "schema" : { - "type" : "string" - } + "/transactions": { + "get": { + "operationId": "searchTransactionsOverview", + "summary": "Searches transactions regardless of a owner", + "description": "Searches transactions regardless of a owner that match the specified criteria.", + "tags": [ + "Transactions" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "accessClients", + "in": "query", + "required": false, + "description": "References to access clients (id or token) used to perform / receive the transfer.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "amountRange", + "in": "query", + "required": false, + "description": "The minimum / maximum amount. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "number" + } + } + }, + { + "name": "authorizationPerformedBy", + "in": "query", + "required": false, + "description": "Id or other identifier (login name, email, etc) of the user that performed an authorization action (authorize, deny or cancel).", + "schema": { + "type": "string" + } + }, + { + "name": "authorizationRoles", + "in": "query", + "required": false, + "description": "Either internal names or ids of authorization roles. To match, transactions must be pending authorization in a level which can be authorized by any of the given roles.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "authorizationStatuses", + "in": "query", + "required": false, + "description": "Authorization statuses used as search criteria. When set, only kinds that can go through authorization are returned (`payment`, `order`, `recurringPayment` or `scheduledPayment`).", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TransactionAuthorizationStatusEnum" + } + } + }, + { + "name": "authorized", + "in": "query", + "required": false, + "description": "When set, will only return transactions that went through the authorization process (if true) or that never went through it (when false). In either case, only kinds that can go through authorization are returned (`payment`, `order`, `recurringPayment` or `scheduledPayment`).", + "schema": { + "type": "boolean" + } + }, + { + "name": "brokers", + "in": "query", + "required": false, + "description": "Reference to the broker of users involved in transfers. Is only taken into account if authenticated as administrator.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "by", + "in": "query", + "required": false, + "description": "Reference to the user that was authenticated when the transfer was performed. Is only taken into account if authenticated as administrator.", + "schema": { + "type": "string" + } + }, + { + "name": "channels", + "in": "query", + "required": false, + "description": "Reference to the channel used to perform / receive the transfer. Only taken into account if authenticated as administrator.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "creationTypes", + "in": "query", + "required": false, + "description": "Include only payments created as one of these. This filter only applies to the following kinds: `payment`, `scheduledPayment` and `recurringPayment`. It doesn't affect other kinds of returned transactions. If you only want payments to be returned, set these in the `kinds` filter.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PaymentCreationTypeEnum" + } + } + }, + { + "name": "currencies", + "in": "query", + "required": false, + "description": "The currencies internal names or ids.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "customFields", + "in": "query", + "required": false, + "description": "Transaction custom field values used as filters. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by : (colon). For example, `customFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, customFields=field1:valueA|valueB. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `customFields=rank:bronze|silver,documentDate:2000-01-01|2001-12-31` would match results whose custom field with internal name `rank` is either `bronze` or `silver`, and whose `documentDate` is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `customFields=documentDate:|2001-12-31`. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `customFields=dynamic:a|b|c`. However, it is also possible to perform a partial-match search using the dynamic value label. In this case a single value, prefixed or enclosed by single quotes should be used. For example: `customFields=dynamic:'business` or `customFields=dynamic:'business'`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "datePeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum transfer date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "excludedIds", + "in": "query", + "required": false, + "description": "List of transfers ids to be excluded from the result.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "externalPaymentExpiration", + "in": "query", + "required": false, + "description": "The minimum / maximum date for external payment expiration. Only affects external payments. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "externalPaymentStatuses", + "in": "query", + "required": false, + "description": "Statuses used as search criteria applied only to transactions of kind `externalPayment`.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExternalPaymentStatusEnum" + } + } + }, + { + "name": "fromAccountTypes", + "in": "query", + "required": false, + "description": "The source account types internal names or ids.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "fromCurrentAccessClient", + "in": "query", + "required": false, + "description": "Flag indicating whether to include only transfers by the current access client.", + "schema": { + "type": "boolean" + } + }, + { + "name": "groups", + "in": "query", + "required": false, + "description": "Reference to the user group used to perform / receive the transfer. Only taken into account if authenticated as administrator.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "includeGeneratedByAccessClient", + "in": "query", + "required": false, + "description": "Flag indicating whether to include or not the generated transfer. Only valid if there is at least one access client specified. For example if a `ticket` or `paymentRequest` was processed then a new transfer will be generated.", + "schema": { + "type": "boolean" + } + }, + { + "name": "kinds", + "in": "query", + "required": false, + "description": "The kinds of transactions to include", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TransactionKind" + } + } + }, + { + "name": "orderBy", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/TransOrderByEnum" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number (zero-based) of the search. The default value is zero.", + "schema": { + "type": "integer" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", + "schema": { + "type": "integer" + } + }, + { + "name": "paymentRequestExpiration", + "in": "query", + "required": false, + "description": "The minimum / maximum date for payment request expiration. Only affects payment requests. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "paymentRequestStatuses", + "in": "query", + "required": false, + "description": "Statuses used as search criteria applied only to transactions of kind `paymentRequest`.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PaymentRequestStatusEnum" + } + } + }, + { + "name": "pendingMyAuthorization", + "in": "query", + "required": false, + "description": "When set to true will only return transactions (`payment`, `recurringPayment` or `scheduledPayment`) in pending authorization state that the logged user can authorize", + "schema": { + "type": "boolean" + } + }, + { + "name": "recurringPaymentStatuses", + "in": "query", + "required": false, + "description": "Statuses used as search criteria applied only to transactions of kind `recurringPayment`. If this filter is not empty then pending recurring payments will be excluded from the result. Pending recurring payments does not have a status.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RecurringPaymentStatusEnum" + } + } + }, + { + "name": "scheduledPaymentStatuses", + "in": "query", + "required": false, + "description": "Statuses used as search criteria applied only to transactions of kind `scheduledPayment`. If this filter is not empty then pending scheduled payments will be excluded from the result. Pending scheduled payments does not have a status.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduledPaymentStatusEnum" + } + } + }, + { + "name": "skipTotalCount", + "in": "query", + "required": false, + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", + "schema": { + "type": "boolean" + } + }, + { + "name": "ticketExpiration", + "in": "query", + "required": false, + "description": "The minimum / maximum date for ticket expiration. Only affects tickets. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "ticketStatuses", + "in": "query", + "required": false, + "description": "Statuses used as search criteria applied only to transactions of kind `ticket`.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TicketStatusEnum" + } + } + }, + { + "name": "toAccountTypes", + "in": "query", + "required": false, + "description": "The source account types internal names or ids.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "transactionNumber", + "in": "query", + "required": false, + "description": "The transaction number of the matching transfer", + "schema": { + "type": "string" + } + }, + { + "name": "transferFilters", + "in": "query", + "required": false, + "description": "Reference to the transfer filters, which filters transfers by type. May be either the internal id or qualified transfer filter internal name, in the format `accountType.transferFilter`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "transferTypes", + "in": "query", + "required": false, + "description": "Reference to the transfer types for filter. May be either the internal id or qualified transfer type internal name, in the format `accountType.transferType`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "user", + "in": "query", + "required": false, + "description": "Reference a user that should have either received / performed the transfer.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The transaction entries matching the criteria", + "headers": { + "X-Total-Count": { + "schema": { + "type": "integer" + }, + "description": "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." + }, + "X-Page-Size": { + "schema": { + "type": "integer" + }, + "description": "The maximum number of results per page" + }, + "X-Current-Page": { + "schema": { + "type": "integer" + }, + "description": "The current page the results are in" + }, + "X-Has-Next-Page": { + "schema": { + "type": "boolean" + }, + "description": "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." } }, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Transaction" + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TransactionOverviewResult" + } } } } }, - "500" : { - "description" : "If a payment error has occurred", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PaymentError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } - } - }, - "requestBody" : { - "description" : "The send payment request parameters", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SendPaymentRequest" - } - } - } - } - } - }, - "/payment-requests/{key}/accept" : { - "post" : { - "operationId" : "acceptPaymentRequest", - "summary" : "Accepts a payment request.", - "description" : "Accepts a payment request in status `open`. After accepting the payment request its resultant status could be `processed` (and the corresponding sheduled or direct payment was generated) or `scheduled`. This can be done only by managers or the payer (i.e the request's recipient) with permission to accept.", - "tags" : [ "PaymentRequests" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/confirmationPassword" - }, { - "name" : "key", - "in" : "path", - "required" : true, - "description" : "Either the id or transaction number.", - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "201" : { - "description" : "The performed payment. Only if the process date was not given (i.e the request was processed immediately).", - "headers" : { - "Location" : { - "description" : "URL for viewing the payment details", - "schema" : { - "type" : "string" + }, + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } - }, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Transaction" + } + }, + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "204" : { - "description" : "The payment request was accepted and scheduled for processing at the given date. Nothing is returned." + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } + } }, - "500" : { - "description" : "If a payment error has occurred", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PaymentError" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - }, - "requestBody" : { - "description" : "The parameters to accept a payment request", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AcceptOrReschedulePaymentRequest" - } - } - } - } - } - }, - "/payment-requests/{key}/reschedule" : { - "post" : { - "operationId" : "reschedulePaymentRequest", - "summary" : "Reschedules a payment request.", - "description" : "Reschedules an already accepted and scheduled payment request (i.e with status `scheduled`). If the new processing date is null then the payment request will be processed immediately generating the corresponding payment. Otherwise it will be scheduled to be processed at the given date. This can be done only by managers or the payer (i.e the request's recipient) with permission to accept.", - "tags" : [ "PaymentRequests" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/confirmationPassword" - }, { - "name" : "key", - "in" : "path", - "required" : true, - "description" : "Either the id or transaction number.", - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "201" : { - "description" : "The performed payment. Only if the process date was not given (i.e the request was processed immediately).", - "headers" : { - "Location" : { - "description" : "URL for viewing the payment details", - "schema" : { - "type" : "string" - } + } + } + }, + "/transactions/export/{format}": { + "parameters": [ + { + "$ref": "#/components/parameters/format" + } + ], + "get": { + "operationId": "exportTransactionsOverview", + "summary": "Exports the transactions overview search results as file", + "description": "Generates a file containing the search results. The available export formats are returned in `GET /transactions/data-for-search`.", + "tags": [ + "Transactions" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "name": "accessClients", + "in": "query", + "required": false, + "description": "References to access clients (id or token) used to perform / receive the transfer.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "amountRange", + "in": "query", + "required": false, + "description": "The minimum / maximum amount. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "number" + } + } + }, + { + "name": "authorizationPerformedBy", + "in": "query", + "required": false, + "description": "Id or other identifier (login name, email, etc) of the user that performed an authorization action (authorize, deny or cancel).", + "schema": { + "type": "string" + } + }, + { + "name": "authorizationRoles", + "in": "query", + "required": false, + "description": "Either internal names or ids of authorization roles. To match, transactions must be pending authorization in a level which can be authorized by any of the given roles.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "authorizationStatuses", + "in": "query", + "required": false, + "description": "Authorization statuses used as search criteria. When set, only kinds that can go through authorization are returned (`payment`, `order`, `recurringPayment` or `scheduledPayment`).", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TransactionAuthorizationStatusEnum" + } + } + }, + { + "name": "authorized", + "in": "query", + "required": false, + "description": "When set, will only return transactions that went through the authorization process (if true) or that never went through it (when false). In either case, only kinds that can go through authorization are returned (`payment`, `order`, `recurringPayment` or `scheduledPayment`).", + "schema": { + "type": "boolean" + } + }, + { + "name": "brokers", + "in": "query", + "required": false, + "description": "Reference to the broker of users involved in transfers. Is only taken into account if authenticated as administrator.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "by", + "in": "query", + "required": false, + "description": "Reference to the user that was authenticated when the transfer was performed. Is only taken into account if authenticated as administrator.", + "schema": { + "type": "string" + } + }, + { + "name": "channels", + "in": "query", + "required": false, + "description": "Reference to the channel used to perform / receive the transfer. Only taken into account if authenticated as administrator.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "creationTypes", + "in": "query", + "required": false, + "description": "Include only payments created as one of these. This filter only applies to the following kinds: `payment`, `scheduledPayment` and `recurringPayment`. It doesn't affect other kinds of returned transactions. If you only want payments to be returned, set these in the `kinds` filter.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PaymentCreationTypeEnum" + } + } + }, + { + "name": "currencies", + "in": "query", + "required": false, + "description": "The currencies internal names or ids.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "customFields", + "in": "query", + "required": false, + "description": "Transaction custom field values used as filters. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by : (colon). For example, `customFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, customFields=field1:valueA|valueB. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `customFields=rank:bronze|silver,documentDate:2000-01-01|2001-12-31` would match results whose custom field with internal name `rank` is either `bronze` or `silver`, and whose `documentDate` is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `customFields=documentDate:|2001-12-31`. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `customFields=dynamic:a|b|c`. However, it is also possible to perform a partial-match search using the dynamic value label. In this case a single value, prefixed or enclosed by single quotes should be used. For example: `customFields=dynamic:'business` or `customFields=dynamic:'business'`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "datePeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum transfer date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "excludedIds", + "in": "query", + "required": false, + "description": "List of transfers ids to be excluded from the result.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "externalPaymentExpiration", + "in": "query", + "required": false, + "description": "The minimum / maximum date for external payment expiration. Only affects external payments. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "externalPaymentStatuses", + "in": "query", + "required": false, + "description": "Statuses used as search criteria applied only to transactions of kind `externalPayment`.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExternalPaymentStatusEnum" + } + } + }, + { + "name": "fromAccountTypes", + "in": "query", + "required": false, + "description": "The source account types internal names or ids.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "fromCurrentAccessClient", + "in": "query", + "required": false, + "description": "Flag indicating whether to include only transfers by the current access client.", + "schema": { + "type": "boolean" + } + }, + { + "name": "groups", + "in": "query", + "required": false, + "description": "Reference to the user group used to perform / receive the transfer. Only taken into account if authenticated as administrator.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "includeGeneratedByAccessClient", + "in": "query", + "required": false, + "description": "Flag indicating whether to include or not the generated transfer. Only valid if there is at least one access client specified. For example if a `ticket` or `paymentRequest` was processed then a new transfer will be generated.", + "schema": { + "type": "boolean" + } + }, + { + "name": "kinds", + "in": "query", + "required": false, + "description": "The kinds of transactions to include", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TransactionKind" + } + } + }, + { + "name": "orderBy", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/TransOrderByEnum" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number (zero-based) of the search. The default value is zero.", + "schema": { + "type": "integer" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", + "schema": { + "type": "integer" + } + }, + { + "name": "paymentRequestExpiration", + "in": "query", + "required": false, + "description": "The minimum / maximum date for payment request expiration. Only affects payment requests. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "paymentRequestStatuses", + "in": "query", + "required": false, + "description": "Statuses used as search criteria applied only to transactions of kind `paymentRequest`.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PaymentRequestStatusEnum" + } + } + }, + { + "name": "pendingMyAuthorization", + "in": "query", + "required": false, + "description": "When set to true will only return transactions (`payment`, `recurringPayment` or `scheduledPayment`) in pending authorization state that the logged user can authorize", + "schema": { + "type": "boolean" + } + }, + { + "name": "recurringPaymentStatuses", + "in": "query", + "required": false, + "description": "Statuses used as search criteria applied only to transactions of kind `recurringPayment`. If this filter is not empty then pending recurring payments will be excluded from the result. Pending recurring payments does not have a status.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RecurringPaymentStatusEnum" + } + } + }, + { + "name": "scheduledPaymentStatuses", + "in": "query", + "required": false, + "description": "Statuses used as search criteria applied only to transactions of kind `scheduledPayment`. If this filter is not empty then pending scheduled payments will be excluded from the result. Pending scheduled payments does not have a status.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduledPaymentStatusEnum" + } + } + }, + { + "name": "skipTotalCount", + "in": "query", + "required": false, + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", + "schema": { + "type": "boolean" + } + }, + { + "name": "ticketExpiration", + "in": "query", + "required": false, + "description": "The minimum / maximum date for ticket expiration. Only affects tickets. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "ticketStatuses", + "in": "query", + "required": false, + "description": "Statuses used as search criteria applied only to transactions of kind `ticket`.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TicketStatusEnum" } - }, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Transaction" - } + } + }, + { + "name": "toAccountTypes", + "in": "query", + "required": false, + "description": "The source account types internal names or ids.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" } } }, - "204" : { - "description" : "The payment request was rescheduled. Nothing is returned." + { + "name": "transactionNumber", + "in": "query", + "required": false, + "description": "The transaction number of the matching transfer", + "schema": { + "type": "string" + } }, - "500" : { - "description" : "If a payment error has occurred", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PaymentError" - } + { + "name": "transferFilters", + "in": "query", + "required": false, + "description": "Reference to the transfer filters, which filters transfers by type. May be either the internal id or qualified transfer filter internal name, in the format `accountType.transferFilter`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" } } - } - }, - "requestBody" : { - "description" : "The parameters to reschedule a payment request.", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AcceptOrReschedulePaymentRequest" + }, + { + "name": "transferTypes", + "in": "query", + "required": false, + "description": "Reference to the transfer types for filter. May be either the internal id or qualified transfer type internal name, in the format `accountType.transferType`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" } } + }, + { + "name": "user", + "in": "query", + "required": false, + "description": "Reference a user that should have either received / performed the transfer.", + "schema": { + "type": "string" + } } - } - } - }, - "/payment-requests/{key}/preview" : { - "get" : { - "operationId" : "previewPaymentRequest", - "summary" : "Previews the payment performed when accepting the given payment request.", - "description" : "Previews the payment ony if the payment request status is `open` or `scheduled`.", - "tags" : [ "PaymentRequests" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "key", - "in" : "path", - "required" : true, - "description" : "Either the id or transaction number.", - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "The payment preview", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PaymentRequestPreview" + ], + "responses": { + "200": { + "description": "The file content", + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -31937,830 +31788,1199 @@ } } }, - "/payment-requests/{key}/change-expiration" : { - "post" : { - "operationId" : "changePaymentRequestExpirationDate", - "summary" : "Changes the payment request expiration.", - "description" : "Change the expiration date of a payment request in status `open` or `expired`. This can be done only by managers or the payee (i.e the request's sender) with permission to change the expiration.", - "tags" : [ "PaymentRequests" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/confirmationPassword" - }, { - "name" : "key", - "in" : "path", - "required" : true, - "description" : "Either the id or transaction number.", - "schema" : { - "type" : "string" + "/transactions/{key}": { + "get": { + "operationId": "viewTransaction", + "summary": "Returns details about a transaction", + "description": "Returns details about a transaction.", + "tags": [ + "Transactions" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] } - } ], - "responses" : { - "204" : { - "description" : "The payment request expiration date was changed. Nothing is returned." + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" }, - "500" : { - "description" : "If a payment error has occurred", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PaymentError" - } - } + { + "name": "key", + "in": "path", + "required": true, + "description": "Either the id or transaction number", + "schema": { + "type": "string" } } - }, - "requestBody" : { - "description" : "The parameters to change the payment request's expiration date", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ChangePaymentRequestExpirationDate" + ], + "responses": { + "200": { + "description": "Transaction details", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TransactionView" + } } } - } - } - } - }, - "/payment-requests/{key}/reject" : { - "post" : { - "operationId" : "rejectPaymentRequest", - "summary" : "Rejects a payment request.", - "description" : "Rejects a payment request in status `open`. This can be done only by managers or the payer (i.e the request's recipient) with permission to accept.", - "tags" : [ "PaymentRequests" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/confirmationPassword" - }, { - "name" : "key", - "in" : "path", - "required" : true, - "description" : "Either the id or transaction number", - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "204" : { - "description" : "The payment request was rejected. Nothing is returned." }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - }, - "requestBody" : { - "description" : "A comment for the reject action the payer can set.", - "content" : { - "text/plain" : { - "schema" : { - "type" : "string" - } - } - } } } }, - "/payment-requests/{key}/cancel" : { - "post" : { - "operationId" : "cancelPaymentRequest", - "summary" : "Cancels a payment request.", - "description" : "Cancels a payment request in status `open`. This can be done only by managers or the payee with permission to cancel.", - "tags" : [ "PaymentRequests" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/confirmationPassword" - }, { - "name" : "key", - "in" : "path", - "required" : true, - "description" : "Either the id or transaction number", - "schema" : { - "type" : "string" + "/transactions/{key}/export/{format}": { + "parameters": [ + { + "name": "key", + "in": "path", + "required": true, + "description": "Either the id or transaction number", + "schema": { + "type": "string" } - } ], - "responses" : { - "204" : { - "description" : "The payment request was cancelled. Nothing is returned." + }, + { + "$ref": "#/components/parameters/format" + } + ], + "get": { + "operationId": "exportTransaction", + "summary": "Exports the transaction details to a file.", + "description": "Exports the transaction details to a file. The available formats are available in `TransactionView`", + "tags": [ + "Transactions" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + { + "accessClient": [] + } + ], + "responses": { + "200": { + "description": "The file content", + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } - } - }, - "requestBody" : { - "description" : "A comment for the cancel action the payee/manager can set.", - "content" : { - "text/plain" : { - "schema" : { - "type" : "string" + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } } } } } } }, - "/pending-payments/{key}/authorize" : { - "post" : { - "operationId" : "authorizePendingPayment", - "summary" : "Authorizes a pending payment.", - "description" : "Authorizes a payment / scheduled payment / recurring payment whose authorization status is `pending`.", - "tags" : [ "PendingPayments" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/confirmationPassword" - }, { - "name" : "key", - "in" : "path", - "required" : true, - "description" : "Either the id or transaction number.", - "schema" : { - "type" : "string" + "/{owner}/installments/data-for-search": { + "parameters": [ + { + "$ref": "#/components/parameters/owner" + } + ], + "get": { + "operationId": "getInstallmentsDataForSearch", + "summary": "Returns data for searching installments of an account owner", + "description": "Returns data which can be used to filter a installment search", + "tags": [ + "Installments" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] } - } ], - "responses" : { - "200" : { - "description" : "The payment is authorized. The next authorization level is returned, in case the payment is still pending another authorization, or returns a no-content when the payment is authorized.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/TransactionAuthorizationLevelData" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "Data for searching installments of an account owner", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InstallmentDataForSearch" } } } }, - "204" : { - "description" : "Nothing is returned if the transaction authorization process is finished, and the transaction is processed." - }, - "500" : { - "description" : "If a payment error has occurred", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PaymentError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } - } - }, - "requestBody" : { - "description" : "Contains the action comments", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PendingPaymentActionParams" - } - } - } - } - } - }, - "/pending-payments/{key}/deny" : { - "post" : { - "operationId" : "denyPendingPayment", - "summary" : "Denies a pending payment.", - "description" : "Denies a payment / scheduled payment / recurring payment whose authorization status is `pending`.", - "tags" : [ "PendingPayments" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/confirmationPassword" - }, { - "name" : "key", - "in" : "path", - "required" : true, - "description" : "Either the id or transaction number.", - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "204" : { - "description" : "The payment is denied. Nothing is returned." }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } - }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" - } - } - } - } - }, - "requestBody" : { - "description" : "Contains the action comments", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PendingPaymentActionParams" - } - } } } } }, - "/pending-payments/{key}/cancel" : { - "post" : { - "operationId" : "cancelPendingPayment", - "summary" : "Cancels the authorization process of a pending payment.", - "description" : "Cancels a payment / scheduled payment / recurring payment whose authorization status is `pending`. This action is performed by the payer.", - "tags" : [ "PendingPayments" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/confirmationPassword" - }, { - "name" : "key", - "in" : "path", - "required" : true, - "description" : "Either the id or transaction number.", - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "204" : { - "description" : "The payment is canceled. Nothing is returned." - }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "/{owner}/installments": { + "parameters": [ + { + "$ref": "#/components/parameters/owner" + } + ], + "get": { + "operationId": "searchInstallments", + "summary": "Searches installments of an account owner", + "description": "Returns the installments of a given account owner that match the specified criteria. Each result will will be relative to this owner. The amount may be positive or negative, depending on whether this owner has performed or received the transaction.", + "tags": [ + "Installments" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "accessClients", + "in": "query", + "required": false, + "description": "References to access clients (id or token) used to perform / receive the transfer.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "accountTypes", + "in": "query", + "required": false, + "description": "The account types", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "amountRange", + "in": "query", + "required": false, + "description": "The minimum / maximum amount. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "number" + } + } + }, + { + "name": "authorizationPerformedBy", + "in": "query", + "required": false, + "description": "Id or other identifier (login name, email, etc) of the user that performed an authorization action (authorize, deny or cancel).", + "schema": { + "type": "string" + } + }, + { + "name": "authorizationStatuses", + "in": "query", + "required": false, + "description": "Authorization statuses used as search criteria. When set, only kinds that can go through authorization are returned (`payment`, `order`, `recurringPayment` or `scheduledPayment`).", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TransactionAuthorizationStatusEnum" + } + } + }, + { + "name": "authorized", + "in": "query", + "required": false, + "description": "When set, will only return transactions that went through the authorization process (if true) or that never went through it (when false). In either case, only kinds that can go through authorization are returned (`payment`, `order`, `recurringPayment` or `scheduledPayment`).", + "schema": { + "type": "boolean" + } + }, + { + "name": "brokers", + "in": "query", + "required": false, + "description": "Reference to the broker of users involved in transfers. Is only taken into account if authenticated as administrator.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "by", + "in": "query", + "required": false, + "description": "Reference to the user that was authenticated when the transfer was performed. Is only taken into account if authenticated as administrator.", + "schema": { + "type": "string" + } + }, + { + "name": "channels", + "in": "query", + "required": false, + "description": "Reference to the channel used to perform / receive the transfer. Only taken into account if authenticated as administrator.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "creationTypes", + "in": "query", + "required": false, + "description": "Include only payments created as one of these. This filter only applies to the following kinds: `payment`, `scheduledPayment` and `recurringPayment`. It doesn't affect other kinds of returned transactions. If you only want payments to be returned, set these in the `kinds` filter.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PaymentCreationTypeEnum" + } + } + }, + { + "name": "customFields", + "in": "query", + "required": false, + "description": "Transaction custom field values used as filters. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by : (colon). For example, `customFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, customFields=field1:valueA|valueB. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `customFields=rank:bronze|silver,documentDate:2000-01-01|2001-12-31` would match results whose custom field with internal name `rank` is either `bronze` or `silver`, and whose `documentDate` is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `customFields=documentDate:|2001-12-31`. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `customFields=dynamic:a|b|c`. However, it is also possible to perform a partial-match search using the dynamic value label. In this case a single value, prefixed or enclosed by single quotes should be used. For example: `customFields=dynamic:'business` or `customFields=dynamic:'business'`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "datePeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum transfer date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "direction", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/TransferDirectionEnum" + } + }, + { + "name": "excludedIds", + "in": "query", + "required": false, + "description": "List of transfers ids to be excluded from the result.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "fromCurrentAccessClient", + "in": "query", + "required": false, + "description": "Flag indicating whether to include only transfers by the current access client.", + "schema": { + "type": "boolean" + } + }, + { + "name": "groups", + "in": "query", + "required": false, + "description": "Reference to the user group used to perform / receive the transfer. Only taken into account if authenticated as administrator.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "includeGeneratedByAccessClient", + "in": "query", + "required": false, + "description": "Flag indicating whether to include or not the generated transfer. Only valid if there is at least one access client specified. For example if a `ticket` or `paymentRequest` was processed then a new transfer will be generated.", + "schema": { + "type": "boolean" + } + }, + { + "name": "kinds", + "in": "query", + "required": false, + "description": "The kinds of transactions to include", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TransactionKind" + } + } + }, + { + "name": "orderBy", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/TransOrderByEnum" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number (zero-based) of the search. The default value is zero.", + "schema": { + "type": "integer" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", + "schema": { + "type": "integer" + } + }, + { + "name": "skipTotalCount", + "in": "query", + "required": false, + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", + "schema": { + "type": "boolean" + } + }, + { + "name": "statuses", + "in": "query", + "required": false, + "description": "Possible statuses for installments.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InstallmentStatusEnum" + } + } + }, + { + "name": "transactionNumber", + "in": "query", + "required": false, + "description": "The transaction number of the matching transfer", + "schema": { + "type": "string" + } + }, + { + "name": "transferFilters", + "in": "query", + "required": false, + "description": "Reference to the transfer filters, which filters transfers by type. May be either the internal id or qualified transfer filter internal name, in the format `accountType.transferFilter`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "transferTypes", + "in": "query", + "required": false, + "description": "Reference to the transfer types for filter. May be either the internal id or qualified transfer type internal name, in the format `accountType.transferType`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "user", + "in": "query", + "required": false, + "description": "Reference a user that should have either received / performed the transfer.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The installment entries matching the criteria", + "headers": { + "X-Total-Count": { + "schema": { + "type": "integer" + }, + "description": "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." + }, + "X-Page-Size": { + "schema": { + "type": "integer" + }, + "description": "The maximum number of results per page" + }, + "X-Current-Page": { + "schema": { + "type": "integer" + }, + "description": "The current page the results are in" + }, + "X-Has-Next-Page": { + "schema": { + "type": "boolean" + }, + "description": "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." + } + }, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InstallmentResult" + } } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } - } - }, - "requestBody" : { - "description" : "Contains the action comments", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PendingPaymentActionParams" + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } } } } } } }, - "/{owner}/external-payments/data-for-perform" : { - "get" : { - "operationId" : "dataForPerformExternalPayment", - "summary" : "Returns configuration data for performing an external payment", - "description" : "Returns configuration data for performing an external payment", - "tags" : [ "ExternalPayments" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/owner" - }, { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "type", - "in" : "query", - "required" : false, - "description" : "The payment type id or qualified internal name (in the form `fromAccountType.paymentType`). If no payment type is provided, the possible types will be returned, so the payer can choose.", - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "The data for performing an external payment", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DataForTransaction" - } - } + "/{owner}/installments/export/{format}": { + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/format" + } + ], + "get": { + "operationId": "exportInstallments", + "summary": "Exports the owner installments search results as file", + "description": "Generates a file containing the search results. The available export formats are returned in `GET /{owner}/installments/data-for-search`.", + "tags": [ + "Installments" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "name": "accessClients", + "in": "query", + "required": false, + "description": "References to access clients (id or token) used to perform / receive the transfer.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "accountTypes", + "in": "query", + "required": false, + "description": "The account types", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "amountRange", + "in": "query", + "required": false, + "description": "The minimum / maximum amount. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "number" + } + } + }, + { + "name": "authorizationPerformedBy", + "in": "query", + "required": false, + "description": "Id or other identifier (login name, email, etc) of the user that performed an authorization action (authorize, deny or cancel).", + "schema": { + "type": "string" + } + }, + { + "name": "authorizationStatuses", + "in": "query", + "required": false, + "description": "Authorization statuses used as search criteria. When set, only kinds that can go through authorization are returned (`payment`, `order`, `recurringPayment` or `scheduledPayment`).", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TransactionAuthorizationStatusEnum" + } + } + }, + { + "name": "authorized", + "in": "query", + "required": false, + "description": "When set, will only return transactions that went through the authorization process (if true) or that never went through it (when false). In either case, only kinds that can go through authorization are returned (`payment`, `order`, `recurringPayment` or `scheduledPayment`).", + "schema": { + "type": "boolean" + } + }, + { + "name": "brokers", + "in": "query", + "required": false, + "description": "Reference to the broker of users involved in transfers. Is only taken into account if authenticated as administrator.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "by", + "in": "query", + "required": false, + "description": "Reference to the user that was authenticated when the transfer was performed. Is only taken into account if authenticated as administrator.", + "schema": { + "type": "string" + } + }, + { + "name": "channels", + "in": "query", + "required": false, + "description": "Reference to the channel used to perform / receive the transfer. Only taken into account if authenticated as administrator.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "creationTypes", + "in": "query", + "required": false, + "description": "Include only payments created as one of these. This filter only applies to the following kinds: `payment`, `scheduledPayment` and `recurringPayment`. It doesn't affect other kinds of returned transactions. If you only want payments to be returned, set these in the `kinds` filter.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PaymentCreationTypeEnum" + } + } + }, + { + "name": "customFields", + "in": "query", + "required": false, + "description": "Transaction custom field values used as filters. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by : (colon). For example, `customFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, customFields=field1:valueA|valueB. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `customFields=rank:bronze|silver,documentDate:2000-01-01|2001-12-31` would match results whose custom field with internal name `rank` is either `bronze` or `silver`, and whose `documentDate` is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `customFields=documentDate:|2001-12-31`. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `customFields=dynamic:a|b|c`. However, it is also possible to perform a partial-match search using the dynamic value label. In this case a single value, prefixed or enclosed by single quotes should be used. For example: `customFields=dynamic:'business` or `customFields=dynamic:'business'`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "datePeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum transfer date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "direction", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/TransferDirectionEnum" + } + }, + { + "name": "excludedIds", + "in": "query", + "required": false, + "description": "List of transfers ids to be excluded from the result.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "fromCurrentAccessClient", + "in": "query", + "required": false, + "description": "Flag indicating whether to include only transfers by the current access client.", + "schema": { + "type": "boolean" + } + }, + { + "name": "groups", + "in": "query", + "required": false, + "description": "Reference to the user group used to perform / receive the transfer. Only taken into account if authenticated as administrator.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "includeGeneratedByAccessClient", + "in": "query", + "required": false, + "description": "Flag indicating whether to include or not the generated transfer. Only valid if there is at least one access client specified. For example if a `ticket` or `paymentRequest` was processed then a new transfer will be generated.", + "schema": { + "type": "boolean" + } + }, + { + "name": "kinds", + "in": "query", + "required": false, + "description": "The kinds of transactions to include", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TransactionKind" + } + } + }, + { + "name": "orderBy", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/TransOrderByEnum" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number (zero-based) of the search. The default value is zero.", + "schema": { + "type": "integer" } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } - } + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", + "schema": { + "type": "integer" } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" - } - } + { + "name": "skipTotalCount", + "in": "query", + "required": false, + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", + "schema": { + "type": "boolean" } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" - } + { + "name": "statuses", + "in": "query", + "required": false, + "description": "Possible statuses for installments.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InstallmentStatusEnum" } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" - } - } + { + "name": "transactionNumber", + "in": "query", + "required": false, + "description": "The transaction number of the matching transfer", + "schema": { + "type": "string" } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" - } - } - } - } - } - } - }, - "/{owner}/external-payments" : { - "post" : { - "operationId" : "performExternalPayment", - "summary" : "Performs an external payment from the given owner", - "description" : "Performs an external payment to either an e-mail or mobile phone. When a user registers using that e-mail or phone, the funds are actually transfered. The external id is returned on the response, and a link to the transaction details is returned on the `Location` header.", - "tags" : [ "ExternalPayments" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/owner" - }, { - "$ref" : "#/components/parameters/confirmationPassword" - } ], - "responses" : { - "201" : { - "description" : "The created external payment", - "headers" : { - "Location" : { - "description" : "URL for viewing the transaction details", - "schema" : { - "type" : "string" - } - } - }, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Transaction" - } + { + "name": "transferFilters", + "in": "query", + "required": false, + "description": "Reference to the transfer filters, which filters transfers by type. May be either the internal id or qualified transfer filter internal name, in the format `accountType.transferFilter`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" } } }, - "500" : { - "description" : "If a payment error has occurred", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PaymentError" - } + { + "name": "transferTypes", + "in": "query", + "required": false, + "description": "Reference to the transfer types for filter. May be either the internal id or qualified transfer type internal name, in the format `accountType.transferType`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" } } - } - }, - "requestBody" : { - "description" : "The perform external payment parameters", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PerformExternalPayment" - } + }, + { + "name": "user", + "in": "query", + "required": false, + "description": "Reference a user that should have either received / performed the transfer.", + "schema": { + "type": "string" } } - } - } - }, - "/{owner}/external-payments/preview" : { - "post" : { - "operationId" : "previewExternalPayment", - "summary" : "Previews an external payment before performing it", - "description" : "The actual balance checking is not performed in the preview.", - "tags" : [ "ExternalPayments" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/owner" - }, { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The external payment preview", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ExternalPaymentPreview" + ], + "responses": { + "200": { + "description": "The file content", + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - }, - "requestBody" : { - "description" : "The perform external payment parameters", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PerformExternalPayment" - } - } - } - } - } - }, - "/external-payments/{key}/cancel" : { - "post" : { - "operationId" : "cancelExternalPayment", - "summary" : "Cancels an external payment.", - "description" : "The external payment status must be `pending`.", - "tags" : [ "ExternalPayments" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/confirmationPassword" - }, { - "name" : "key", - "in" : "path", - "required" : true, - "description" : "Either the id or transaction number.", - "schema" : { - "type" : "string" - } - } ], - "requestBody" : { - "description" : "A comment for the cancel action the payer/manager can set.", - "content" : { - "text/plain" : { - "schema" : { - "type" : "string" + } + } + }, + "/installments/data-for-search": { + "get": { + "operationId": "getInstallmentsOverviewDataForSearch", + "summary": "Returns data for searching installments regardless of a owner", + "description": "Returns data which can be used to filter a installment search", + "tags": [ + "Installments" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "Data for searching installments of an account owner", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InstallmentOverviewDataForSearch" + } } } - } - }, - "responses" : { - "204" : { - "description" : "The external payment is canceled and nothing is returned." }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -32768,95 +32988,433 @@ } } }, - "/pos/data-for-pos" : { - "get" : { - "operationId" : "dataForReceivePayment", - "summary" : "Returns configuration data for receiving a payment (POS)", - "description" : "Returns configuration data for receiving a payment in POS operation", - "tags" : [ "POS" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "from", - "in" : "query", - "required" : false, - "description" : "Identification of the payer user", - "schema" : { - "type" : "string" - } - }, { - "name" : "type", - "in" : "query", - "required" : false, - "description" : "The payment type id or qualified internal name (in the form `fromAccountType.paymentType`). If no payment type is provided, the possible types will be returned, so the payer can choose.", - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "The data for receiving a payment", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DataForTransaction" + "/installments": { + "get": { + "operationId": "searchInstallmentsOverview", + "summary": "Searches installments regardless of a owner", + "description": "Searches installments regardless of a owner that match the specified criteria.", + "tags": [ + "Installments" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "accessClients", + "in": "query", + "required": false, + "description": "References to access clients (id or token) used to perform / receive the transfer.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "amountRange", + "in": "query", + "required": false, + "description": "The minimum / maximum amount. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "number" + } + } + }, + { + "name": "authorizationPerformedBy", + "in": "query", + "required": false, + "description": "Id or other identifier (login name, email, etc) of the user that performed an authorization action (authorize, deny or cancel).", + "schema": { + "type": "string" + } + }, + { + "name": "authorizationStatuses", + "in": "query", + "required": false, + "description": "Authorization statuses used as search criteria. When set, only kinds that can go through authorization are returned (`payment`, `order`, `recurringPayment` or `scheduledPayment`).", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TransactionAuthorizationStatusEnum" + } + } + }, + { + "name": "authorized", + "in": "query", + "required": false, + "description": "When set, will only return transactions that went through the authorization process (if true) or that never went through it (when false). In either case, only kinds that can go through authorization are returned (`payment`, `order`, `recurringPayment` or `scheduledPayment`).", + "schema": { + "type": "boolean" + } + }, + { + "name": "brokers", + "in": "query", + "required": false, + "description": "Reference to the broker of users involved in transfers. Is only taken into account if authenticated as administrator.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "by", + "in": "query", + "required": false, + "description": "Reference to the user that was authenticated when the transfer was performed. Is only taken into account if authenticated as administrator.", + "schema": { + "type": "string" + } + }, + { + "name": "channels", + "in": "query", + "required": false, + "description": "Reference to the channel used to perform / receive the transfer. Only taken into account if authenticated as administrator.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "creationTypes", + "in": "query", + "required": false, + "description": "Include only payments created as one of these. This filter only applies to the following kinds: `payment`, `scheduledPayment` and `recurringPayment`. It doesn't affect other kinds of returned transactions. If you only want payments to be returned, set these in the `kinds` filter.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PaymentCreationTypeEnum" + } + } + }, + { + "name": "currencies", + "in": "query", + "required": false, + "description": "The currencies internal names or ids.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "customFields", + "in": "query", + "required": false, + "description": "Transaction custom field values used as filters. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by : (colon). For example, `customFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, customFields=field1:valueA|valueB. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `customFields=rank:bronze|silver,documentDate:2000-01-01|2001-12-31` would match results whose custom field with internal name `rank` is either `bronze` or `silver`, and whose `documentDate` is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `customFields=documentDate:|2001-12-31`. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `customFields=dynamic:a|b|c`. However, it is also possible to perform a partial-match search using the dynamic value label. In this case a single value, prefixed or enclosed by single quotes should be used. For example: `customFields=dynamic:'business` or `customFields=dynamic:'business'`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "datePeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum transfer date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "excludedIds", + "in": "query", + "required": false, + "description": "List of transfers ids to be excluded from the result.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "fromAccountTypes", + "in": "query", + "required": false, + "description": "The source account types internal names or ids.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "fromCurrentAccessClient", + "in": "query", + "required": false, + "description": "Flag indicating whether to include only transfers by the current access client.", + "schema": { + "type": "boolean" + } + }, + { + "name": "groups", + "in": "query", + "required": false, + "description": "Reference to the user group used to perform / receive the transfer. Only taken into account if authenticated as administrator.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "includeGeneratedByAccessClient", + "in": "query", + "required": false, + "description": "Flag indicating whether to include or not the generated transfer. Only valid if there is at least one access client specified. For example if a `ticket` or `paymentRequest` was processed then a new transfer will be generated.", + "schema": { + "type": "boolean" + } + }, + { + "name": "kinds", + "in": "query", + "required": false, + "description": "The kinds of transactions to include", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TransactionKind" + } + } + }, + { + "name": "orderBy", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/TransOrderByEnum" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number (zero-based) of the search. The default value is zero.", + "schema": { + "type": "integer" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", + "schema": { + "type": "integer" + } + }, + { + "name": "skipTotalCount", + "in": "query", + "required": false, + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", + "schema": { + "type": "boolean" + } + }, + { + "name": "statuses", + "in": "query", + "required": false, + "description": "Possible statuses for installments.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InstallmentStatusEnum" + } + } + }, + { + "name": "toAccountTypes", + "in": "query", + "required": false, + "description": "The source account types internal names or ids.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "transactionNumber", + "in": "query", + "required": false, + "description": "The transaction number of the matching transfer", + "schema": { + "type": "string" + } + }, + { + "name": "transferFilters", + "in": "query", + "required": false, + "description": "Reference to the transfer filters, which filters transfers by type. May be either the internal id or qualified transfer filter internal name, in the format `accountType.transferFilter`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "transferTypes", + "in": "query", + "required": false, + "description": "Reference to the transfer types for filter. May be either the internal id or qualified transfer type internal name, in the format `accountType.transferType`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "user", + "in": "query", + "required": false, + "description": "Reference a user that should have either received / performed the transfer.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The installment entries matching the criteria", + "headers": { + "X-Total-Count": { + "schema": { + "type": "integer" + }, + "description": "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." + }, + "X-Page-Size": { + "schema": { + "type": "integer" + }, + "description": "The maximum number of results per page" + }, + "X-Current-Page": { + "schema": { + "type": "integer" + }, + "description": "The current page the results are in" + }, + "X-Has-Next-Page": { + "schema": { + "type": "boolean" + }, + "description": "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." + } + }, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InstallmentOverviewResult" + } } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "If a POS error has occurred", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PosError" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -32864,304 +33422,527 @@ } } }, - "/pos" : { - "post" : { - "operationId" : "receivePayment", - "summary" : "Receives a payment (POS)", - "description" : "Receives either a direct or scheduled payment in a POS operation for the authenticated user. The payer user should be informed in the `subject` parameter. The payment id is returned on the response, and a link to the transaction details is returned on the `Location` header.", - "tags" : [ "POS" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/confirmationPassword" - } ], - "responses" : { - "201" : { - "description" : "The created payment", - "headers" : { - "Location" : { - "description" : "URL for viewing the transaction details", - "schema" : { - "type" : "string" - } + "/installments/export/{format}": { + "parameters": [ + { + "$ref": "#/components/parameters/format" + } + ], + "get": { + "operationId": "exportInstallmentsOverview", + "summary": "Exports the installments overview search results as file", + "description": "Generates a file containing the search results. The available export formats are returned in `GET /installments/data-for-search`.", + "tags": [ + "Installments" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "name": "accessClients", + "in": "query", + "required": false, + "description": "References to access clients (id or token) used to perform / receive the transfer.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "amountRange", + "in": "query", + "required": false, + "description": "The minimum / maximum amount. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "number" + } + } + }, + { + "name": "authorizationPerformedBy", + "in": "query", + "required": false, + "description": "Id or other identifier (login name, email, etc) of the user that performed an authorization action (authorize, deny or cancel).", + "schema": { + "type": "string" + } + }, + { + "name": "authorizationStatuses", + "in": "query", + "required": false, + "description": "Authorization statuses used as search criteria. When set, only kinds that can go through authorization are returned (`payment`, `order`, `recurringPayment` or `scheduledPayment`).", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TransactionAuthorizationStatusEnum" + } + } + }, + { + "name": "authorized", + "in": "query", + "required": false, + "description": "When set, will only return transactions that went through the authorization process (if true) or that never went through it (when false). In either case, only kinds that can go through authorization are returned (`payment`, `order`, `recurringPayment` or `scheduledPayment`).", + "schema": { + "type": "boolean" + } + }, + { + "name": "brokers", + "in": "query", + "required": false, + "description": "Reference to the broker of users involved in transfers. Is only taken into account if authenticated as administrator.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "by", + "in": "query", + "required": false, + "description": "Reference to the user that was authenticated when the transfer was performed. Is only taken into account if authenticated as administrator.", + "schema": { + "type": "string" + } + }, + { + "name": "channels", + "in": "query", + "required": false, + "description": "Reference to the channel used to perform / receive the transfer. Only taken into account if authenticated as administrator.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "creationTypes", + "in": "query", + "required": false, + "description": "Include only payments created as one of these. This filter only applies to the following kinds: `payment`, `scheduledPayment` and `recurringPayment`. It doesn't affect other kinds of returned transactions. If you only want payments to be returned, set these in the `kinds` filter.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PaymentCreationTypeEnum" + } + } + }, + { + "name": "currencies", + "in": "query", + "required": false, + "description": "The currencies internal names or ids.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "customFields", + "in": "query", + "required": false, + "description": "Transaction custom field values used as filters. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by : (colon). For example, `customFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, customFields=field1:valueA|valueB. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `customFields=rank:bronze|silver,documentDate:2000-01-01|2001-12-31` would match results whose custom field with internal name `rank` is either `bronze` or `silver`, and whose `documentDate` is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `customFields=documentDate:|2001-12-31`. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `customFields=dynamic:a|b|c`. However, it is also possible to perform a partial-match search using the dynamic value label. In this case a single value, prefixed or enclosed by single quotes should be used. For example: `customFields=dynamic:'business` or `customFields=dynamic:'business'`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "datePeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum transfer date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "excludedIds", + "in": "query", + "required": false, + "description": "List of transfers ids to be excluded from the result.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "fromAccountTypes", + "in": "query", + "required": false, + "description": "The source account types internal names or ids.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "fromCurrentAccessClient", + "in": "query", + "required": false, + "description": "Flag indicating whether to include only transfers by the current access client.", + "schema": { + "type": "boolean" + } + }, + { + "name": "groups", + "in": "query", + "required": false, + "description": "Reference to the user group used to perform / receive the transfer. Only taken into account if authenticated as administrator.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "includeGeneratedByAccessClient", + "in": "query", + "required": false, + "description": "Flag indicating whether to include or not the generated transfer. Only valid if there is at least one access client specified. For example if a `ticket` or `paymentRequest` was processed then a new transfer will be generated.", + "schema": { + "type": "boolean" + } + }, + { + "name": "kinds", + "in": "query", + "required": false, + "description": "The kinds of transactions to include", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TransactionKind" + } + } + }, + { + "name": "orderBy", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/TransOrderByEnum" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number (zero-based) of the search. The default value is zero.", + "schema": { + "type": "integer" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", + "schema": { + "type": "integer" + } + }, + { + "name": "skipTotalCount", + "in": "query", + "required": false, + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", + "schema": { + "type": "boolean" + } + }, + { + "name": "statuses", + "in": "query", + "required": false, + "description": "Possible statuses for installments.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InstallmentStatusEnum" } - }, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Transaction" - } + } + }, + { + "name": "toAccountTypes", + "in": "query", + "required": false, + "description": "The source account types internal names or ids.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" } } }, - "500" : { - "description" : "If a payment error has occurred", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PaymentError" - } + { + "name": "transactionNumber", + "in": "query", + "required": false, + "description": "The transaction number of the matching transfer", + "schema": { + "type": "string" + } + }, + { + "name": "transferFilters", + "in": "query", + "required": false, + "description": "Reference to the transfer filters, which filters transfers by type. May be either the internal id or qualified transfer filter internal name, in the format `accountType.transferFilter`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" } } - } - }, - "requestBody" : { - "description" : "The receive payment parameters", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PerformPayment" + }, + { + "name": "transferTypes", + "in": "query", + "required": false, + "description": "Reference to the transfer types for filter. May be either the internal id or qualified transfer type internal name, in the format `accountType.transferType`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" } } + }, + { + "name": "user", + "in": "query", + "required": false, + "description": "Reference a user that should have either received / performed the transfer.", + "schema": { + "type": "string" + } } - } - } - }, - "/pos/preview" : { - "post" : { - "operationId" : "previewReceivePayment", - "summary" : "Previews a POS payment before receiving it", - "description" : "Previews a payment or scheduled payment. The actual balance checking is not performed in the preview.", - "tags" : [ "POS" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The payment preview", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PaymentPreview" + ], + "responses": { + "200": { + "description": "The file content", + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "If a POS error has occurred", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PosError" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - }, - "requestBody" : { - "description" : "The receive payment parameters", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PerformPayment" - } - } - } - } - } - }, - "/pos/installments" : { - "get" : { - "operationId" : "calculateReceivePaymentInstallments", - "summary" : "Calculates the default installments for a scheduled payment", - "description" : "Used to calculate installments for a scheduled payment. Will return an installment every month. When later receiving the payment, these can be (optionally) customized (such as changing some due dates or amounts) and used on the payment installments.", - "tags" : [ "POS" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "from", - "in" : "query", - "required" : true, - "description" : "The payment origin", - "schema" : { - "type" : "string" - } - }, { - "name" : "count", - "in" : "query", - "required" : true, - "description" : "The number of installments", - "schema" : { - "type" : "integer" - } - }, { - "name" : "amount", - "in" : "query", - "required" : true, - "description" : "The total scheduled payment amount", - "schema" : { - "type" : "string", - "format" : "number" - } - }, { - "name" : "currency", - "in" : "query", - "required" : false, - "description" : "The payment currency. Used when no `type` is not provided, to narrow the possible payment types by currency.", - "schema" : { - "type" : "string" - } - }, { - "name" : "type", - "in" : "query", - "required" : false, - "description" : "The payment type id or qualified internal name (in the form `fromAccountType.paymentType`). If not provided, will use the first possible type (possibly narrowed by the `currency` parameter). However, if more than one type is available, a validation error will be raised.", - "schema" : { - "type" : "string" - } - }, { - "name" : "firstDate", - "in" : "query", - "required" : false, - "description" : "The due date of the first installment. If none is provided, it is assumed that the first installment is paid immediately, and others will be with regular 1 month interval", - "schema" : { - "type" : "string", - "format" : "date-time" - } - } ], - "responses" : { - "200" : { - "description" : "The calculated installments", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PerformInstallment" - } + } + } + }, + "/installments/{key}/process": { + "parameters": [ + { + "name": "key", + "in": "path", + "required": true, + "description": "Either the id or a string in the form `number@transaction`, beging transaction either the id or transaction number.", + "schema": { + "type": "string" + } + } + ], + "post": { + "operationId": "processInstallment", + "summary": "Processes a installment, generating its corresponding transfer.", + "description": "Processes an installment. The installment status must be either `scheduled`, `failed` or `blocked`. This action must be performed by the payer or manager.", + "tags": [ + "Installments" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/confirmationPassword" + } + ], + "responses": { + "201": { + "description": "The installment is processed and the transfer is returned", + "headers": { + "Location": { + "description": "URL for viewing the transfer details", + "schema": { + "type": "string" } } - } - }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Transfer" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "If a POS error has occurred", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PosError" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -33169,496 +33950,565 @@ } } }, - "/pos/otp" : { - "post" : { - "operationId" : "receivePaymentOtp", - "summary" : "Generates a new One-Time-Password (OTP) for a pos payment", - "description" : "Sends a new OTP for the customer of the POS for a payment. The OTP belongs to the payer, not the authenticated user. The entire payment object must be sent on the request body. This is the same object which is sent both either preview or actually receive the payment.", - "tags" : [ "POS" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "name" : "medium", - "in" : "query", - "required" : true, - "description" : "The medium the user wants to receive the otp", - "schema" : { - "$ref" : "#/components/schemas/SendMediumEnum" + "/installments/{key}/settle": { + "parameters": [ + { + "name": "key", + "in": "path", + "required": true, + "description": "Either the id or a string in the form `number@transaction`, beging transaction either the id or transaction number.", + "schema": { + "type": "string" } - } ], - "responses" : { - "204" : { - "description" : "The OTP is sent to the user, and no content is returned" + } + ], + "post": { + "operationId": "settleInstallment", + "summary": "Settles a scheduled payment installment.", + "description": "Settles a single installment. It must be a scheduled payment installment (not recurring payment), and the status must be either `scheduled`, `failed` or `blocked`. This action must be performed by the payment receiver or manager.", + "tags": [ + "Installments" + ], + "security": [ + { + "basic": [] }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } - } - } + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/confirmationPassword" + } + ], + "responses": { + "204": { + "description": "The installment is unblocked and nothing is returned." }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - }, - "requestBody" : { - "description" : "The receive payment parameters", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PerformPayment" - } - } - } } } }, - "/pos/device-confirmations" : { - "post" : { - "operationId" : "receivePaymentCreateDeviceConfirmation", - "summary" : "Creates a pending device confirmation for a pos payment.", - "description" : "Creates a device confirmation to confirm a pos payment. The confirmation will have a QR code that can be read (e.g with the Mobile App) to be approved / rejected by the payer. The confirmation belongs to the payer, not the authenticated user. The entire payment object must be sent on the request body. This is the same object which is sent both either preview or actually receive the payment.", - "tags" : [ "POS" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ ], - "responses" : { - "201" : { - "description" : "Returns the identifier of the new confirmation.", - "content" : { - "text/plain" : { - "schema" : { - "type" : "string" - } - } + "/{owner}/payments/data-for-perform": { + "get": { + "operationId": "dataForPerformPayment", + "summary": "Returns configuration data for performing a payment", + "description": "Returns configuration data for performing a payment", + "tags": [ + "Payments" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + }, + { + "oidc": [ + "payment" + ] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "to", + "in": "query", + "required": false, + "description": "The payment destination. Either the string `system` for a payment to system or a user identification.", + "schema": { + "type": "string" } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + { + "name": "type", + "in": "query", + "required": false, + "description": "The payment type id or qualified internal name (in the form `fromAccountType.paymentType`). If no payment type is provided, the possible types will be returned, so the payer can choose.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The data for performing a payment", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DataForTransaction" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - }, - "requestBody" : { - "description" : "The receive payment parameters", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PerformPayment" - } - } - } } } }, - "/pos/device-confirmations/{id}" : { - "get" : { - "operationId" : "receivePaymentViewDeviceConfirmation", - "summary" : "Shows the details of a device confirmation for a POS payer.", - "description" : "Shows the details of a device confirmation for POS payer. The confirmation belongs to the payer but must had been created by the authenticated user. The entire payment object must be sent on the request body. This is the same object which is sent both either preview or actually receive the payment", - "tags" : [ "POS" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/id" - }, { - "name" : "payer", - "in" : "query", - "required" : true, - "description" : "A user identification value, such as id, username, e-mail, phone, etc. Id is always allowed, others depend on Cyclos configuration. Note that a valid numeric value is always considered as id. For example, when using another identification method that can be numeric only, prefix the value with a single quote (like in Excel spreadsheets), for example, `'1234567890`;", - "schema" : { - "type" : "string" - } - }, { - "name" : "currency", - "in" : "query", - "required" : false, - "description" : "The currency id or internal name. Only used when not specifying a payment type. In this case, will narrow the search for the payment type.", - "schema" : { - "type" : "string" + "/{owner}/payments": { + "post": { + "operationId": "performPayment", + "summary": "Performs a payment from the given owner", + "description": "Performs either a direct, scheduled or recurring payment from the owner indicated on the path to the owner specified on the body. The destination user should be informed in the `subject` parameter. If the `subject` is `system`, it will be a payment to a system account. The payment id is returned on the response, and a link to the transaction details is returned on the `Location` header.", + "tags": [ + "Payments" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + }, + { + "oidc": [ + "payment" + ] } - }, { - "name" : "type", - "in" : "query", - "required" : false, - "description" : "The payment type, either the id or qualified internal name (in the form `fromAccountType.paymentType`). If no payment type is specified, if a single one is possible, it will be used. If a currency is specified, it will be taken into account in order to find the payment type. If, however, there would be multiple possibilities, a validation error is returned.", - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "The device confirmation details.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DeviceConfirmationView" - } - } - } - }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } - } - } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/owner" }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + { + "$ref": "#/components/parameters/confirmationPassword" + } + ], + "responses": { + "201": { + "description": "The created payment", + "headers": { + "Location": { + "description": "URL for viewing the transaction details", + "schema": { + "type": "string" } } - } - }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Transaction" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "500": { + "description": "If a payment error has occurred", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentError" } } } - }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" - } + } + }, + "requestBody": { + "description": "The perform payment parameters", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PerformPayment" } } } } - }, - "delete" : { - "operationId" : "receivePaymentDeleteDeviceConfirmation", - "summary" : "Deletes a device confirmation for a POS payer.", - "description" : "Deletes a device confirmation for the payer of pos payment. The confirmation belongs to the payer, not the authenticated user. The entire payment object must be sent on the request body. This is the same object which is sent both either preview or actually receive the payment.", - "tags" : [ "POS" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/id" - }, { - "name" : "payer", - "in" : "query", - "required" : true, - "description" : "A user identification value, such as id, username, e-mail, phone, etc. Id is always allowed, others depend on Cyclos configuration. Note that a valid numeric value is always considered as id. For example, when using another identification method that can be numeric only, prefix the value with a single quote (like in Excel spreadsheets), for example, `'1234567890`;", - "schema" : { - "type" : "string" - } - }, { - "name" : "currency", - "in" : "query", - "required" : false, - "description" : "The currency id or internal name. Only used when not specifying a payment type. In this case, will narrow the search for the payment type.", - "schema" : { - "type" : "string" + } + }, + "/{owner}/payments/preview": { + "post": { + "operationId": "previewPayment", + "summary": "Previews a payment before performing it", + "description": "Previews a payment, scheduled or recurring payment. The actual balance checking is not performed in the preview.", + "tags": [ + "Payments" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + }, + { + "oidc": [ + "payment" + ] } - }, { - "name" : "type", - "in" : "query", - "required" : false, - "description" : "The payment type, either the id or qualified internal name (in the form `fromAccountType.paymentType`). If no payment type is specified, if a single one is possible, it will be used. If a currency is specified, it will be taken into account in order to find the payment type. If, however, there would be multiple possibilities, a validation error is returned.", - "schema" : { - "type" : "string" + ], + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/fields" } - } ], - "responses" : { - "204" : { - "description" : "The device confirmation was removed." + ], + "responses": { + "200": { + "description": "The payment preview", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentPreview" + } + } + } }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } + }, + "requestBody": { + "description": "The perform payment parameters", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PerformPayment" + } + } + } } } }, - "/pos/device-confirmations/{id}/qr-code" : { - "get" : { - "operationId" : "receivePaymentDeviceConfirmationQrCode", - "summary" : "Returns the QR-code image for the given device confirmation only if it was not yet approved / rejected", - "description" : "This request will return the image contents as expected but our api documentation page (or any other usage of an <img> tag), created using swagger-ui, generates a second request to include the image in the page. This new (GET) request won't send the authentication parameters and as this path requires authentication the image will be shown as broken. Optionally, to solve the problem described above and to allow authenticate the user when using sessions, a `sessionToken` or `accessClientToken` query parameter could be specified.", - "tags" : [ "POS" ], - "parameters" : [ { - "$ref" : "#/components/parameters/id" - }, { - "name" : "payer", - "description" : "The payer, either a user principal (id, login name, etc) or the word `system` when the payment is to be performed to / from a system account. Note that a valid numeric value is always considered as id. For example, when using another identification method that can be numeric only, prefix the value with a single quote (like in Excel spreadsheets), for example, `'1234567890`.", - "in" : "query", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "size", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/ImageSizeEnum" - } - } ], - "responses" : { - "200" : { - "description" : "The image content", - "content" : { - "image/png" : { - "schema" : { - "type" : "string", - "format" : "binary" + "/{owner}/payments/installments": { + "get": { + "operationId": "calculatePerformPaymentInstallments", + "summary": "Calculates the default installments for a scheduled payment", + "description": "Used to calculate installments for a scheduled payment. Will return an installment every month. When later performing the payment, these can be (optionally) customized (such as changing some due dates or amounts) and used on the payment installments.", + "tags": [ + "Payments" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + }, + { + "oidc": [ + "payment" + ] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "to", + "in": "query", + "required": true, + "description": "The payment destination", + "schema": { + "type": "string" + } + }, + { + "name": "count", + "in": "query", + "required": true, + "description": "The number of installments", + "schema": { + "type": "integer" + } + }, + { + "name": "amount", + "in": "query", + "required": true, + "description": "The total scheduled payment amount", + "schema": { + "type": "string", + "format": "number" + } + }, + { + "name": "currency", + "in": "query", + "required": false, + "description": "The payment currency. Used when no `type` is not provided, to narrow the possible payment types by currency.", + "schema": { + "type": "string" + } + }, + { + "name": "type", + "in": "query", + "required": false, + "description": "The payment type id or qualified internal name (in the form `fromAccountType.paymentType`). If not provided, will use the first possible type (possibly narrowed by the `currency` parameter). However, if more than one type is available, a validation error will be raised.", + "schema": { + "type": "string" + } + }, + { + "name": "firstDate", + "in": "query", + "required": false, + "description": "The due date of the first installment. If none is provided, it is assumed that the first installment is paid immediately, and others will be with regular 1 month interval", + "schema": { + "type": "string", + "format": "date-time" + } + } + ], + "responses": { + "200": { + "description": "The calculated installments", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PerformInstallment" + } } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -33666,91 +34516,131 @@ } } }, - "/{user}/client-types" : { - "get" : { - "operationId" : "listClientTypesForUser", - "summary" : "Returns the list of access clients types for a user", - "description" : "Returns the access client types for a given user that the authenticated user has access.", - "tags" : [ "Clients" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/user" - }, { - "name" : "channel", - "in" : "query", - "description" : "If a channel id or internal name is specified, will only list access client types that can be used to access that channel", - "schema" : { - "type" : "string" + "/easy-invoices/qr-code/{to}": { + "get": { + "operationId": "getEasyInvoiceQrCode", + "summary": "Returns the QR-code image for the given easy invoice's parameters", + "description": "The generated image could be scanned (e.g by the mobile application) to create a payment ready to be confirmed. The `easyInvoice` channel will be used to perform this operation, i.e the access and perform payment configurations of that channel will be applied.", + "tags": [ + "EasyInvoices" + ], + "parameters": [ + { + "name": "to", + "in": "path", + "x-dotInPath": true, + "required": true, + "description": "The user which will receive the easy invoice. Unlike other cases of user reference, in this case `self` cannot be used, because the URL may be shared with others, hence, `self` makes no sense.", + "schema": { + "type": "string" + } + }, + { + "name": "amount", + "in": "query", + "required": false, + "description": "The easy invoice amount. If provided and the user has multiple currencies, either `type` or `currency` is required.", + "schema": { + "type": "string", + "format": "number" + } + }, + { + "name": "currency", + "in": "query", + "required": false, + "description": "The currency id or internal name. Either this or `type` should be informed if an `amount` was given and the user has multiple currencies.", + "schema": { + "type": "string" + } + }, + { + "name": "description", + "in": "query", + "required": false, + "description": "The payment description", + "schema": { + "type": "string" + } + }, + { + "name": "type", + "in": "query", + "description": "The payment type id or qualified internal name (in the form `fromAccountType.paymentType`). Either this or `currency` should be informed if an `amount` was given and the user has multiple currencies.", + "schema": { + "type": "string" + } + }, + { + "$ref": "#/components/parameters/customFields" + }, + { + "name": "size", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/ImageSizeEnum" + } } - } ], - "responses" : { - "200" : { - "description" : "The list of access clients types, with permissions, for the user", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/UserClientTypePermissions" - } + ], + "responses": { + "200": { + "description": "The image content", + "content": { + "image/png": { + "schema": { + "type": "string", + "format": "binary" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -33758,93 +34648,117 @@ } } }, - "/clients/activate" : { - "post" : { - "operationId" : "activateClient", - "summary" : "Activates an access client", - "description" : "Activates an access client belonging to the currently authenticated user.", - "tags" : [ "Clients" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "name" : "code", - "required" : true, - "in" : "query", - "description" : "The activation code. Must match the activation code obtained in Cyclos, which belongs to the authenticated user.", - "schema" : { - "type" : "string" - } - }, { - "name" : "prefix", - "required" : false, - "in" : "query", - "description" : "A prefix to be added to the generated access client token. Can be used to increase the size of the generated token, and to increase the security on clients that have to store the token. This can be accomplished by using some sort of client application hash or identifier, which should be stable. The prefix is not returned by this method. When later passing in the full token, the prefix should prepend the returned token without any separator.", - "schema" : { - "type" : "string" + "/easy-invoices/data-for-perform/{to}": { + "get": { + "operationId": "dataForPerformEasyInvoice", + "summary": "Returns data for an easy invoice to the given user.", + "description": "An easy invoice is a pre-filled payment from the authenticated user to another user. Other users can use this for a payment template to that user, with pre-filled data. If an amount is specified, then either there must be only payment types of a single currency to the given user, or either a payment type or currency must be informed. The `easyInvoice` channel will be used to perform this operation, i.e the access and perform payment configurations of that channel will be applied.", + "tags": [ + "EasyInvoices" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "to", + "in": "path", + "x-dotInPath": true, + "required": true, + "description": "The user which will receive the easy invoice. Unlike other cases of user reference, in this case `self` cannot be used, because the URL may be shared with others, hence, `self` makes no sense.", + "schema": { + "type": "string" + } + }, + { + "name": "amount", + "in": "query", + "required": false, + "description": "The easy invoice amount. If provided and the user has multiple currencies, either `type` or `currency` is required.", + "schema": { + "type": "string", + "format": "number" + } + }, + { + "name": "type", + "in": "query", + "required": false, + "description": "The payment type id or qualified internal name (in the form `fromAccountType.paymentType`). Either this or `currency` should be informed if an `amount` was given and the user has multiple currencies.", + "schema": { + "type": "string" + } + }, + { + "name": "currency", + "in": "query", + "required": false, + "description": "The currency id or internal name. Either this or `type` should be informed if an `amount` was given and the user has multiple currencies.", + "schema": { + "type": "string" + } + }, + { + "$ref": "#/components/parameters/customFields" } - } ], - "responses" : { - "200" : { - "description" : "Returns the token to be used on subsequent requests", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ActivateClientResult" + ], + "responses": { + "200": { + "description": "The data for easy invoice", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DataForEasyInvoice" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -33852,273 +34766,268 @@ } } }, - "/clients/{key}" : { - "get" : { - "operationId" : "viewClient", - "summary" : "Returns details of an access client", - "description" : "Returns the access client details, together with permissions", - "tags" : [ "Clients" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "key", - "in" : "path", - "required" : true, - "description" : "The access client id or token", - "schema" : { - "type" : "string" + "/easy-invoices": { + "post": { + "operationId": "performEasyInvoice", + "summary": "Performs a direct payment from an easy invoice.", + "description": "Performs a direct payment from the authenticated user to the owner specified on the body. The destination user should be informed in the `subject` parameter (the subject `system` is not allowed). The payment id is returned on the response, and a link to the transaction details is returned on the `Location` header. The `easyInvoice` channel will be used to perform this operation, i.e the access and perform payment configurations of that channel will be applied.", + "tags": [ + "EasyInvoices" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/confirmationPassword" } - } ], - "responses" : { - "200" : { - "description" : "The access client details", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ClientView" + ], + "responses": { + "201": { + "description": "The created payment", + "headers": { + "Location": { + "description": "URL for viewing the transaction details", + "schema": { + "type": "string" } } - } - }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Transaction" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "500": { + "description": "If a payment error has occurred", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentError" } } } - }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" - } + } + }, + "requestBody": { + "description": "The perform payment parameters", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PerformPayment" } } + } + } + } + }, + "/easy-invoices/preview": { + "post": { + "operationId": "previewEasyInvoice", + "summary": "Previews a direct payment from an easy invoice before performing it.", + "description": "Previews a direct payment from the logged created from an easy invoice. The actual balance checking is not performed in the preview. The `easyInvoice` channel will be used to perform this operation, i.e the access and perform payment configurations of that channel will be applied.", + "tags": [ + "EasyInvoices" + ], + "security": [ + { + "basic": [] }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The payment preview", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentPreview" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } - } - } - } - }, - "/clients/{key}/unassign" : { - "post" : { - "operationId" : "unassignClient", - "summary" : "Unassign (disconnects) an access client", - "description" : "Unassigns an access client by id or token. It must be currently assigned. After this call, the client can be assigned again if needed.", - "tags" : [ "Clients" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "name" : "key", - "in" : "path", - "required" : true, - "description" : "The access client id or token", - "schema" : { - "type" : "string" - } - }, { - "$ref" : "#/components/parameters/confirmationPassword" - } ], - "responses" : { - "204" : { - "description" : "Nothing is returned, and the access client is unassigned" }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } + }, + "requestBody": { + "description": "The perform payment parameters", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PerformPayment" + } + } + } } } }, - "/mobile/data-for-guest" : { - "get" : { - "operationId" : "dataForMobileGuest", - "summary" : "Returns data the mobile application uses while in guest mode", - "description" : "The data returned can be controlled with a cache key. Each data type has a parameter, such as `headerIf`, which returns the data only if it has changed since the last request.", - "tags" : [ "Mobile" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/cyclosVersion" - }, { - "$ref" : "#/components/parameters/headerIf" - }, { - "$ref" : "#/components/parameters/footerIf" - }, { - "$ref" : "#/components/parameters/themeIf" - }, { - "name" : "translationsIf", - "in" : "query", - "required" : false, - "description" : "Controls the translations cache. If is a boolean value (`true` or `false`) will forcibly return or skip the content. Otherwise, it should be a string in the form `id|version`. In this case, the content will be returned only when changed. When blank will always return it.", - "schema" : { - "type" : "string" - } - }, { - "name" : "deviceId", - "in" : "query", - "required" : false, - "description" : "Trusted device identification. If given and the device is active then a pending device confirmation will be created that will be validated\n after the user logs-in. If the validation passes then no confirmation\npassword will be used only for that session.", - "schema" : { - "type" : "string" - } - }, { - "name" : "pinPrincipal", - "in" : "query", - "required" : false, - "description" : "Device PIN principal. If given then the information about whether it is active or not will be given in the returned `dataForLogin`.", - "schema" : { - "type" : "string" + "/scheduled-payments/{key}/block": { + "post": { + "operationId": "blockScheduledPayment", + "summary": "Blocks a scheduled payment.", + "description": "Blocks a scheduled payment, preventing its installments from being automatically processed. The scheduled payment status must be `open`. This action is to be performed by the scheduled payment payer.", + "tags": [ + "ScheduledPayments" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] } - } ], - "responses" : { - "200" : { - "description" : "The data for the mobile guest page", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DataForMobileGuest" - } - } + ], + "parameters": [ + { + "$ref": "#/components/parameters/confirmationPassword" + }, + { + "name": "key", + "in": "path", + "required": true, + "description": "Either the id or transaction number.", + "schema": { + "type": "string" } + } + ], + "responses": { + "204": { + "description": "The scheduled payment is blocked and nothing is returned." }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -34126,107 +35035,89 @@ } } }, - "/mobile/data-for-user" : { - "get" : { - "operationId" : "dataForMobileUser", - "summary" : "Returns data the mobile application uses in either user or POS mode", - "description" : "The data returned can be controlled with a cache key. Each data type has a parameter, such as `helpIf`, which returns the data only if it has changed since the last request.", - "tags" : [ "Mobile" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/cyclosVersion" - }, { - "$ref" : "#/components/parameters/themeIf" - }, { - "name" : "translationsIf", - "in" : "query", - "required" : false, - "description" : "Controls the translations cache. If is a boolean value (`true` or `false`) will forcibly return or skip the content. Otherwise, it should be a string in the form `id|version`. In this case, the content will be returned only when changed. When blank will always return it.", - "schema" : { - "type" : "string" - } - }, { - "name" : "mobileHelpIf", - "in" : "query", - "required" : false, - "description" : "Controls the mobile help cache. If is a boolean value (`true` or `false`) will forcibly return or skip the content. Otherwise, it should be a string in the form `id|version`. In this case, the content will be returned only when changed. When blank will always return it. Only taken into account when not accessing as access client (not in POS mode).", - "schema" : { - "type" : "string" - } - }, { - "name" : "posHelpIf", - "in" : "query", - "required" : false, - "description" : "Controls the POS help cache. If is a boolean value (`true` or `false`) will forcibly return or skip the content. Otherwise, it should be a string in the form `id|version`. In this case, the content will be returned only when changed. When blank will always return it. Only taken into account when accessing as access client (POS mode).", - "schema" : { - "type" : "string" + "/scheduled-payments/{key}/unblock": { + "post": { + "operationId": "unblockScheduledPayment", + "summary": "Unblocks a scheduled payment.", + "description": "Unblocks a previously blocked scheduled payment The scheduled payment status must be `blocked`. This action is to be performed by the scheduled payment payer.", + "tags": [ + "ScheduledPayments" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] } - } ], - "responses" : { - "200" : { - "description" : "The data for the mobile user page", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DataForMobileUser" - } - } + ], + "parameters": [ + { + "$ref": "#/components/parameters/confirmationPassword" + }, + { + "name": "key", + "in": "path", + "required": true, + "description": "Either the id or transaction number.", + "schema": { + "type": "string" } + } + ], + "responses": { + "204": { + "description": "The scheduled payment is unblocked and nothing is returned." }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -34234,78 +35125,89 @@ } } }, - "/mobile/page/{id}" : { - "get" : { - "operationId" : "mobilePageContent", - "summary" : "Returns the content of a mobile page", - "description" : "Returns the content of a mobile page, either by id or internal name", - "tags" : [ "Mobile" ], - "parameters" : [ { - "name" : "id", - "in" : "path", - "required" : true, - "description" : "The mobile page id", - "schema" : { - "type" : "string" + "/scheduled-payments/{key}/cancel": { + "post": { + "operationId": "cancelScheduledPayment", + "summary": "Cancels a scheduled payment.", + "description": "Permanently cancels a scheduled payment. The scheduled payment status must be either `open` or `blocked`. This action is to be performed by the scheduled payment payer.", + "tags": [ + "ScheduledPayments" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] } - } ], - "responses" : { - "200" : { - "description" : "The page content", - "content" : { - "text/html" : { - "schema" : { - "type" : "string" - } - } + ], + "parameters": [ + { + "$ref": "#/components/parameters/confirmationPassword" + }, + { + "name": "key", + "in": "path", + "required": true, + "description": "Either the id or transaction number.", + "schema": { + "type": "string" } + } + ], + "responses": { + "204": { + "description": "The scheduled payment is canceled and nothing is returned." }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -34313,80 +35215,89 @@ } } }, - "/frontend/data" : { - "get" : { - "operationId" : "dataForFrontend", - "summary" : "Returns data required for displaying the new frontend.", - "description" : "Data for the new frontend.", - "tags" : [ "Frontend" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "screenSize", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/FrontendScreenSizeEnum" + "/scheduled-payments/{key}/settle-remaining": { + "post": { + "operationId": "settleScheduledPayment", + "summary": "Settles all remaining installments in a scheduled payment.", + "description": "Settles all remaining installments, closing the scheduled payment. The scheduled payment status must be either `open` or `blocked`. This action is to be performed by the scheduled payment payee.", + "tags": [ + "ScheduledPayments" + ], + "security": [ + { + "basic": [] }, - "description" : "The currently displayed screen size in the frontend. Will only return content applicable to that screen size." - } ], - "responses" : { - "200" : { - "description" : "Returns the data for display the new frontend", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DataForFrontend" - } - } + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/confirmationPassword" + }, + { + "name": "key", + "in": "path", + "required": true, + "description": "Either the id or transaction number.", + "schema": { + "type": "string" } + } + ], + "responses": { + "204": { + "description": "The scheduled payment is closed and nothing is returned." }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -34394,80 +35305,89 @@ } } }, - "/frontend/home" : { - "get" : { - "operationId" : "dataForFrontendHome", - "summary" : "Returns the data for the home page / dashboard.", - "description" : "The returned data depends on whether there'a a logged user and on the Cyclos configuration.", - "tags" : [ "Frontend" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "screenSize", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/FrontendScreenSizeEnum" + "/recurring-payments/{key}/cancel": { + "post": { + "operationId": "cancelRecurringPayment", + "summary": "Cancels a recurring payment.", + "description": "Permanently cancels a recurring payment. The recurring payment status must be `open`.", + "tags": [ + "RecurringPayments" + ], + "security": [ + { + "basic": [] }, - "description" : "The currently displayed screen size in the frontend. Will only return content applicable to that screen size." - } ], - "responses" : { - "200" : { - "description" : "Returns the content of the home page displayed for guests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DataForFrontendHome" - } - } + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/confirmationPassword" + }, + { + "name": "key", + "in": "path", + "required": true, + "description": "Either the id or transaction number.", + "schema": { + "type": "string" } + } + ], + "responses": { + "204": { + "description": "The recurring payment is canceled and nothing is returned." }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -34475,153 +35395,210 @@ } } }, - "/frontend/page/{key}" : { - "get" : { - "operationId" : "viewFrontendPage", - "summary" : "Returns a frontend page with its content.", - "description" : "Returns a frontend page with its content.", - "tags" : [ "Frontend" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "key", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" + "/recurring-payments/{key}/modify": { + "put": { + "operationId": "modifyRecurringPayment", + "summary": "Modifies a recurring payment.", + "description": "Modifies a recurring payment by changing occurrences count and scheduling. The recurring payment status must be `open`.", + "tags": [ + "RecurringPayments" + ], + "security": [ + { + "basic": [] }, - "description" : "Either id or internal name of the content page." - } ], - "responses" : { - "200" : { - "description" : "The HTML content.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/FrontendPageWithContent" + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/confirmationPassword" + }, + { + "name": "key", + "in": "path", + "required": true, + "description": "Either the id or transaction number.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "The recurring payemt was modified." + }, + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" + } + } + } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } + }, + "requestBody": { + "description": "The recurring payment to be edited.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecurringPaymentEdit" + } + } + } } } }, - "/frontend/settings" : { - "post" : { - "operationId" : "saveFrontendSettings", - "summary" : "Saves user preferences regarding the Cyclos frontend", - "description" : "Currently only allowed for administrators to choose whether to use the classic or new frontend", - "tags" : [ "Frontend" ], - "requestBody" : { - "description" : "The settings to save", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/FrontendSettings" - } + "/recurring-payments/{key}/block": { + "post": { + "operationId": "blockRecurringPayment", + "summary": "Blocks a recurring payment.", + "description": "Blocks a recurring payment, preventing its installments from being automatically processed. The recurring payment status must be `open`. This action is to be performed by the recurring payment payer.", + "tags": [ + "RecurringPayments" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/confirmationPassword" + }, + { + "name": "key", + "in": "path", + "required": true, + "description": "Either the id or transaction number.", + "schema": { + "type": "string" } } - }, - "responses" : { - "204" : { - "description" : "The settings were saved." + ], + "responses": { + "204": { + "description": "The recurring payment is blocked and nothing is returned." }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -34629,85 +35606,89 @@ } } }, - "/frontend/icons" : { - "get" : { - "operationId" : "getFrontendIcons", - "summary" : "Returns a JSON object keyed by icon name and whose values are the SVG contents", - "description" : "Returns the HTML content of a given page.", - "tags" : [ "Frontend" ], - "parameters" : [ { - "name" : "names", - "in" : "query", - "required" : false, - "explode" : false, - "schema" : { - "type" : "array", - "items" : { - "type" : "string" - } + "/recurring-payments/{key}/unblock": { + "post": { + "operationId": "unblockRecurringPayment", + "summary": "Unblocks a recurring payment.", + "description": "Unblocks a previously blocked recurring payment. The recurring payment status must be `blocked`. This action is to be performed by the recurring payment payer.", + "tags": [ + "RecurringPayments" + ], + "security": [ + { + "basic": [] }, - "description" : "The icon names to return" - } ], - "responses" : { - "200" : { - "description" : "The JSON content.", - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "additionalProperties" : { - "type" : "string" - } - } - } + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/confirmationPassword" + }, + { + "name": "key", + "in": "path", + "required": true, + "description": "Either the id or transaction number.", + "schema": { + "type": "string" } + } + ], + "responses": { + "204": { + "description": "The recurring payment is unblocked and nothing is returned." }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -34715,122 +35696,96 @@ } } }, - "/notifications" : { - "get" : { - "operationId" : "searchNotifications", - "summary" : "Searches for the notifications the authenticated user has received.", - "description" : "Returns an ordered page of notifications the authenticated user has received (newest first).", - "tags" : [ "Notifications" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "onlyNew", - "in" : "query", - "required" : false, - "description" : "Boolean value indicating wether return only the new notifications received after the last view date tracked using `POST /notifications/viewed`", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "onlyUnread", - "in" : "query", - "required" : false, - "description" : "Boolean value indicating wether return only the unread notifications", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "page", - "in" : "query", - "required" : false, - "description" : "The page number (zero-based) of the search. The default value is zero.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "pageSize", - "in" : "query", - "required" : false, - "description" : "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", - "schema" : { - "type" : "integer" + "/recurring-payments/{key}/data-for-edit": { + "get": { + "operationId": "getRecurringPaymentDataForEdit", + "summary": "Returns data to edit an existing recurring payment", + "description": "Returns configuration data for editing a recurring payment, plus the current `RecurringPaymentEdit` object that can be altered and sent back", + "tags": [ + "RecurringPayments" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] } - }, { - "name" : "skipTotalCount", - "in" : "query", - "required" : false, - "description" : "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", - "schema" : { - "type" : "boolean" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "key", + "in": "path", + "required": true, + "description": "Either the id or transaction number.", + "schema": { + "type": "string" + } } - } ], - "responses" : { - "200" : { - "description" : "The notifications page", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Notification" - } + ], + "responses": { + "200": { + "description": "The data for editing a recurring payment", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecurringPaymentDataForEdit" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -34838,283 +35793,449 @@ } } }, - "/notifications/{id}" : { - "get" : { - "operationId" : "viewNotification", - "summary" : "Returns the notification details.", - "description" : "Returns the notification details.", - "tags" : [ "Notifications" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/id" - } ], - "responses" : { - "200" : { - "description" : "The notification details", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Notification" + "/{owner}/payment-requests/data-for-send": { + "get": { + "operationId": "dataForSendPaymentRequest", + "summary": "Returns configuration data for sending a payment request", + "description": "Returns configuration data for sending a payment request", + "tags": [ + "PaymentRequests" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "to", + "in": "query", + "required": false, + "description": "The payment request destination, which is either string `system` for a payment request to system or a user identification. The payment request destination is the one that performs the payment once it is accepted.", + "schema": { + "type": "string" + } + }, + { + "name": "type", + "in": "query", + "required": false, + "description": "The payment type id or qualified internal name (in the form `fromAccountType.paymentType`). If no payment type is provided, the possible types will be returned, so the payer can choose.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The data for sending a payment request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DataForTransaction" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - }, - "delete" : { - "operationId" : "deleteNotification", - "summary" : "Removes a notification by id.", - "description" : "Removes a notification for the authenticated user by id.", - "tags" : [ "Notifications" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/id" - } ], - "responses" : { - "204" : { - "description" : "The notification was removed" + } + }, + "/{owner}/payment-requests": { + "post": { + "operationId": "sendPaymentRequest", + "summary": "Sends a payment request from the given owner", + "description": "Sends a payment request from the owner indicated on the path (which will receive the payment once the request is accepted) to the owner specified on the body (which will perform the payment once the request is accepted). The destination user should be informed in the `subject` parameter. If the `subject` is `system`, the payment request is sent to a system account, and has to be accepted by an administrator. The payment request id is returned on the response, and a link to the transaction details is returned on the `Location` header.", + "tags": [ + "PaymentRequests" + ], + "security": [ + { + "basic": [] }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/owner" + } + ], + "responses": { + "201": { + "description": "The created payment request", + "headers": { + "Location": { + "description": "URL for viewing the transaction details", + "schema": { + "type": "string" } } - } - }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Transaction" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "500": { + "description": "If a payment error has occurred", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentError" } } } - }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" - } + } + }, + "requestBody": { + "description": "The send payment request parameters", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SendPaymentRequest" } } + } + } + } + }, + "/payment-requests/{key}/accept": { + "post": { + "operationId": "acceptPaymentRequest", + "summary": "Accepts a payment request.", + "description": "Accepts a payment request in status `open`. After accepting the payment request its resultant status could be `processed` (and the corresponding sheduled or direct payment was generated) or `scheduled`. This can be done only by managers or the payer (i.e the request's recipient) with permission to accept.", + "tags": [ + "PaymentRequests" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/confirmationPassword" + }, + { + "name": "key", + "in": "path", + "required": true, + "description": "Either the id or transaction number.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "201": { + "description": "The performed payment. Only if the process date was not given (i.e the request was processed immediately).", + "headers": { + "Location": { + "description": "URL for viewing the payment details", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Transaction" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "204": { + "description": "The payment request was accepted and scheduled for processing at the given date. Nothing is returned." + }, + "500": { + "description": "If a payment error has occurred", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentError" } } } } + }, + "requestBody": { + "description": "The parameters to accept a payment request", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptOrReschedulePaymentRequest" + } + } + } } } }, - "/notifications/mark-as-read" : { - "post" : { - "operationId" : "markNotificationsAsRead", - "summary" : "Marks a list of notifications as read.", - "description" : "Marks a list of notifications, given by id, as read.", - "tags" : [ "Notifications" ], - "parameters" : [ { - "name" : "ids", - "description" : "The notifications (comma-separated list of identifiers) to mark as read.", - "in" : "query", - "required" : true, - "schema" : { - "type" : "array", - "items" : { - "type" : "string" + "/payment-requests/{key}/reschedule": { + "post": { + "operationId": "reschedulePaymentRequest", + "summary": "Reschedules a payment request.", + "description": "Reschedules an already accepted and scheduled payment request (i.e with status `scheduled`). If the new processing date is null then the payment request will be processed immediately generating the corresponding payment. Otherwise it will be scheduled to be processed at the given date. This can be done only by managers or the payer (i.e the request's recipient) with permission to accept.", + "tags": [ + "PaymentRequests" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/confirmationPassword" + }, + { + "name": "key", + "in": "path", + "required": true, + "description": "Either the id or transaction number.", + "schema": { + "type": "string" } } - } ], - "responses" : { - "204" : { - "description" : "The notifications were marked as read." + ], + "responses": { + "201": { + "description": "The performed payment. Only if the process date was not given (i.e the request was processed immediately).", + "headers": { + "Location": { + "description": "URL for viewing the payment details", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Transaction" + } + } + } }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" + "204": { + "description": "The payment request was rescheduled. Nothing is returned." + }, + "500": { + "description": "If a payment error has occurred", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentError" } } } } + }, + "requestBody": { + "description": "The parameters to reschedule a payment request.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptOrReschedulePaymentRequest" + } + } + } } } }, - "/notifications/status" : { - "get" : { - "operationId" : "notificationsStatus", - "summary" : "Return information about the received notifications.", - "description" : "Return information about the status of the received notifications (unread, new, etc).", - "tags" : [ "Notifications" ], - "responses" : { - "200" : { - "description" : "The notifications status information", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotificationsStatus" + "/payment-requests/{key}/preview": { + "get": { + "operationId": "previewPaymentRequest", + "summary": "Previews the payment performed when accepting the given payment request.", + "description": "Previews the payment ony if the payment request status is `open` or `scheduled`.", + "tags": [ + "PaymentRequests" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "key", + "in": "path", + "required": true, + "description": "Either the id or transaction number.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The payment preview", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentRequestPreview" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } - } - } - } - }, - "/notifications/viewed" : { - "post" : { - "operationId" : "updateLastViewDateForNotifications", - "summary" : "Update the last view date for the notifications.", - "description" : "Update the last view date for the notifications. This will be used to calculate the number of new notifications returned by the `GET /notifications/status` operation.", - "tags" : [ "Notifications" ], - "responses" : { - "204" : { - "description" : "The last view date was updated." }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -35122,985 +36243,1030 @@ } } }, - "/{user}/notification-settings" : { - "parameters" : [ { - "$ref" : "#/components/parameters/user" - } ], - "get" : { - "operationId" : "viewNotificationSettings", - "summary" : "Returns the notification settings for a given user.", - "description" : "Returns the notification settings for a given operator / user / administrator.", - "tags" : [ "NotificationSettings" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The notification settings", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotificationSettingsView" - } - } - } + "/payment-requests/{key}/change-expiration": { + "post": { + "operationId": "changePaymentRequestExpirationDate", + "summary": "Changes the payment request expiration.", + "description": "Change the expiration date of a payment request in status `open` or `expired`. This can be done only by managers or the payee (i.e the request's sender) with permission to change the expiration.", + "tags": [ + "PaymentRequests" + ], + "security": [ + { + "basic": [] }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } - } - } + { + "session": [] }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" - } - } - } + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" - } - } + { + "$ref": "#/components/parameters/confirmationPassword" + }, + { + "name": "key", + "in": "path", + "required": true, + "description": "Either the id or transaction number.", + "schema": { + "type": "string" } + } + ], + "responses": { + "204": { + "description": "The payment request expiration date was changed. Nothing is returned." }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "500": { + "description": "If a payment error has occurred", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentError" } } } - }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" - } + } + }, + "requestBody": { + "description": "The parameters to change the payment request's expiration date", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangePaymentRequestExpirationDate" } } } } - }, - "post" : { - "operationId" : "saveNotificationSettings", - "summary" : "Saves the notification settings for a given user.", - "description" : "Saves the notification settings for a given operator / user / administrator.", - "tags" : [ "NotificationSettings" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "requestBody" : { - "description" : "The parameters to save", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotificationSettingsEdit" - } + } + }, + "/payment-requests/{key}/reject": { + "post": { + "operationId": "rejectPaymentRequest", + "summary": "Rejects a payment request.", + "description": "Rejects a payment request in status `open`. This can be done only by managers or the payer (i.e the request's recipient) with permission to accept.", + "tags": [ + "PaymentRequests" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/confirmationPassword" + }, + { + "name": "key", + "in": "path", + "required": true, + "description": "Either the id or transaction number", + "schema": { + "type": "string" } } - }, - "responses" : { - "204" : { - "description" : "The notification settings are saved and nothing is returned" + ], + "responses": { + "204": { + "description": "The payment request was rejected. Nothing is returned." }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } - }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" - } + } + }, + "requestBody": { + "description": "A comment for the reject action the payer can set.", + "content": { + "text/plain": { + "schema": { + "type": "string" } } } } } }, - "/{user}/notification-settings/data-for-edit" : { - "parameters" : [ { - "$ref" : "#/components/parameters/user" - } ], - "get" : { - "operationId" : "getNotificationSettingsDataForEdit", - "summary" : "Returns configuration data to edit the notification settings of a user.", - "description" : "Returns data to edit the nofitication settings od a given operator / user / administrator.", - "tags" : [ "NotificationSettings" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The notification settings", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotificationSettingsDataForEdit" - } - } + "/payment-requests/{key}/cancel": { + "post": { + "operationId": "cancelPaymentRequest", + "summary": "Cancels a payment request.", + "description": "Cancels a payment request in status `open`. This can be done only by managers or the payee with permission to cancel.", + "tags": [ + "PaymentRequests" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/confirmationPassword" + }, + { + "name": "key", + "in": "path", + "required": true, + "description": "Either the id or transaction number", + "schema": { + "type": "string" } + } + ], + "responses": { + "204": { + "description": "The payment request was cancelled. Nothing is returned." }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - } - } - }, - "/email-unsubscribe/{key}" : { - "parameters" : [ { - "name" : "key", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" }, - "description" : "The key which was received by e-mail" - } ], - "get" : { - "operationId" : "getDataForEmailUnsubscribe", - "summary" : "Returns data for unsubscribing a specific type of received e-mail.", - "description" : "It should be used the key received by e-mail. That key already contains the information on whether the e-mail type is either notification, forwarded message or mailing list.", - "tags" : [ "NotificationSettings" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The data for unsubscribing from a give e-mail type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DataForEmailUnsubscribe" - } + "requestBody": { + "description": "A comment for the cancel action the payee/manager can set.", + "content": { + "text/plain": { + "schema": { + "type": "string" } } + } + } + } + }, + "/pending-payments/{key}/authorize": { + "post": { + "operationId": "authorizePendingPayment", + "summary": "Authorizes a pending payment.", + "description": "Authorizes a payment / scheduled payment / recurring payment whose authorization status is `pending`.", + "tags": [ + "PendingPayments" + ], + "security": [ + { + "basic": [] }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } - } - } + { + "session": [] }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" - } - } - } + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + { + "$ref": "#/components/parameters/confirmationPassword" + }, + { + "name": "key", + "in": "path", + "required": true, + "description": "Either the id or transaction number.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The payment is authorized. The next authorization level is returned, in case the payment is still pending another authorization, or returns a no-content when the payment is authorized.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TransactionAuthorizationLevelData" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "204": { + "description": "Nothing is returned if the transaction authorization process is finished, and the transaction is processed." + }, + "500": { + "description": "If a payment error has occurred", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentError" } } } - }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" - } + } + }, + "requestBody": { + "description": "Contains the action comments", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PendingPaymentActionParams" } } } } - }, - "post" : { - "operationId" : "emailUnsubscribe", - "summary" : "Unsubscribes from a specific type of received e-mail.", - "description" : "Modifies the notification settings of the user which received the key, by removing the given e-mail type.", - "tags" : [ "NotificationSettings" ], - "responses" : { - "204" : { - "description" : "The notification settings are changed and nothing is returned." + } + }, + "/pending-payments/{key}/deny": { + "post": { + "operationId": "denyPendingPayment", + "summary": "Denies a pending payment.", + "description": "Denies a payment / scheduled payment / recurring payment whose authorization status is `pending`.", + "tags": [ + "PendingPayments" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/confirmationPassword" + }, + { + "name": "key", + "in": "path", + "required": true, + "description": "Either the id or transaction number.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "The payment is denied. Nothing is returned." + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } + }, + "requestBody": { + "description": "Contains the action comments", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PendingPaymentActionParams" + } + } + } } } }, - "/messages/data-for-search" : { - "get" : { - "operationId" : "getMessageDataForSearch", - "summary" : "Returns configuration data for searching messages.", - "description" : "Returns configuration data for searching messages.", - "tags" : [ "Messages" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The data for searching messages", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/MessageDataForSearch" - } - } + "/pending-payments/{key}/cancel": { + "post": { + "operationId": "cancelPendingPayment", + "summary": "Cancels the authorization process of a pending payment.", + "description": "Cancels a payment / scheduled payment / recurring payment whose authorization status is `pending`. This action is performed by the payer.", + "tags": [ + "PendingPayments" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/confirmationPassword" + }, + { + "name": "key", + "in": "path", + "required": true, + "description": "Either the id or transaction number.", + "schema": { + "type": "string" } + } + ], + "responses": { + "204": { + "description": "The payment is canceled. Nothing is returned." }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } + }, + "requestBody": { + "description": "Contains the action comments", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PendingPaymentActionParams" + } + } + } } } }, - "/messages/data-for-send" : { - "get" : { - "operationId" : "getMessageDataForSend", - "summary" : "Returns configuration data for sending messages.", - "description" : "Returns configuration data for sending messages.", - "tags" : [ "Messages" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "user", - "required" : false, - "in" : "query", - "description" : "A user identification value, such as id, username, e-mail, phone, etc. Id is always allowed, others depend on Cyclos configuration. Note that a valid numeric value is always considered as id. For example, when using another identification method that can be numeric only, prefix the value with a single quote (like in Excel spreadsheets), for example, `'1234567890`;", - "schema" : { - "type" : "string" + "/{owner}/external-payments/data-for-perform": { + "get": { + "operationId": "dataForPerformExternalPayment", + "summary": "Returns configuration data for performing an external payment", + "description": "Returns configuration data for performing an external payment", + "tags": [ + "ExternalPayments" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] } - } ], - "responses" : { - "200" : { - "description" : "The data for sending messages", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/MessageDataForSend" - } - } - } + ], + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/fields" }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + { + "name": "type", + "in": "query", + "required": false, + "description": "The payment type id or qualified internal name (in the form `fromAccountType.paymentType`). If no payment type is provided, the possible types will be returned, so the payer can choose.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The data for performing an external payment", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DataForTransaction" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" - } - } - } - } - } - } - }, - "/messages" : { - "get" : { - "operationId" : "searchMessages", - "summary" : "Searches for the messages of a user.", - "description" : "Returns the messages (paged) in descending order (newest first) a user has received, sent or moved to trash.", - "tags" : [ "Messages" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "category", - "in" : "query", - "required" : false, - "description" : "The category to filter by.", - "schema" : { - "type" : "string" - } - }, { - "name" : "destination", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/MessageDestinationEnum" - } - }, { - "name" : "keywords", - "in" : "query", - "required" : false, - "description" : "The keywords to filter by. Used to match the subject or the body of the messages.", - "schema" : { - "type" : "string" - } - }, { - "name" : "messageBox", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/MessageBoxEnum" - } - }, { - "name" : "onlyUnread", - "in" : "query", - "required" : false, - "description" : "Boolean value indicating wether return only the unread messages", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "page", - "in" : "query", - "required" : false, - "description" : "The page number (zero-based) of the search. The default value is zero.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "pageSize", - "in" : "query", - "required" : false, - "description" : "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "period", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "skipTotalCount", - "in" : "query", - "required" : false, - "description" : "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "user", - "in" : "query", - "required" : false, - "description" : "Either the id or identifier of the from / to user", - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "The messages page", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/MessageResult" - } + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } + } + } + } + }, + "/{owner}/external-payments": { + "post": { + "operationId": "performExternalPayment", + "summary": "Performs an external payment from the given owner", + "description": "Performs an external payment to either an e-mail or mobile phone. When a user registers using that e-mail or phone, the funds are actually transfered. The external id is returned on the response, and a link to the transaction details is returned on the `Location` header.", + "tags": [ + "ExternalPayments" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/confirmationPassword" + } + ], + "responses": { + "201": { + "description": "The created external payment", + "headers": { + "Location": { + "description": "URL for viewing the transaction details", + "schema": { + "type": "string" } } - } - }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Transaction" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "500": { + "description": "If a payment error has occurred", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentError" } } } - }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" - } + } + }, + "requestBody": { + "description": "The perform external payment parameters", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PerformExternalPayment" } } } } - }, - "post" : { - "operationId" : "sendMessage", - "summary" : "Sends a new message.", - "description" : "Sends a new user / system message.", - "tags" : [ "Messages" ], - "parameters" : [ ], - "responses" : { - "201" : { - "description" : "The id of the message sent.", - "headers" : { - "Location" : { - "description" : "URL for viewing the message details", - "schema" : { - "type" : "string" - } - } - }, - "content" : { - "text/plain" : { - "schema" : { - "type" : "string" + } + }, + "/{owner}/external-payments/preview": { + "post": { + "operationId": "previewExternalPayment", + "summary": "Previews an external payment before performing it", + "description": "The actual balance checking is not performed in the preview.", + "tags": [ + "ExternalPayments" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The external payment preview", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalPaymentPreview" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } }, - "requestBody" : { - "description" : "The message to be send.", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SendMessage" + "requestBody": { + "description": "The perform external payment parameters", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PerformExternalPayment" } } } } } }, - "/messages/{id}" : { - "get" : { - "operationId" : "viewMessage", - "summary" : "Returns the message details.", - "description" : "Returns the message details from its id.", - "tags" : [ "Messages" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/id" - } ], - "responses" : { - "200" : { - "description" : "The message details", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/MessageView" - } + "/external-payments/{key}/cancel": { + "post": { + "operationId": "cancelExternalPayment", + "summary": "Cancels an external payment.", + "description": "The external payment status must be `pending`.", + "tags": [ + "ExternalPayments" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/confirmationPassword" + }, + { + "name": "key", + "in": "path", + "required": true, + "description": "Either the id or transaction number.", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "A comment for the cancel action the payer/manager can set.", + "content": { + "text/plain": { + "schema": { + "type": "string" } } + } + }, + "responses": { + "204": { + "description": "The external payment is canceled and nothing is returned." }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - }, - "delete" : { - "operationId" : "deleteMessage", - "summary" : "Removes a message.", - "description" : "Removes a message for the authenticated user by id.", - "tags" : [ "Messages" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/id" - } ], - "responses" : { - "204" : { - "description" : "The message was removed" + } + }, + "/pos/data-for-pos": { + "get": { + "operationId": "dataForReceivePayment", + "summary": "Returns configuration data for receiving a payment (POS)", + "description": "Returns configuration data for receiving a payment in POS operation", + "tags": [ + "POS" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "from", + "in": "query", + "required": false, + "description": "Identification of the payer user", + "schema": { + "type": "string" + } }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" + { + "name": "type", + "in": "query", + "required": false, + "description": "The payment type id or qualified internal name (in the form `fromAccountType.paymentType`). If no payment type is provided, the possible types will be returned, so the payer can choose.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The data for receiving a payment", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DataForTransaction" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "If a POS error has occurred", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PosError" } } } @@ -36108,189 +37274,335 @@ } } }, - "/messages/mark-as-read" : { - "post" : { - "operationId" : "markMessagesAsRead", - "summary" : "Marks a list of messages as read.", - "description" : "Marks a list of messages, given by id, as read.", - "tags" : [ "Messages" ], - "parameters" : [ { - "name" : "ids", - "description" : "The messages (comma-separated list of identifiers) to mark as read.", - "in" : "query", - "required" : true, - "schema" : { - "type" : "array", - "items" : { - "type" : "string" - } + "/pos": { + "post": { + "operationId": "receivePayment", + "summary": "Receives a payment (POS)", + "description": "Receives either a direct or scheduled payment in a POS operation for the authenticated user. The payer user should be informed in the `subject` parameter. The payment id is returned on the response, and a link to the transaction details is returned on the `Location` header.", + "tags": [ + "POS" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] } - } ], - "responses" : { - "204" : { - "description" : "The messages were marked as read." + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" + { + "$ref": "#/components/parameters/confirmationPassword" + } + ], + "responses": { + "201": { + "description": "The created payment", + "headers": { + "Location": { + "description": "URL for viewing the transaction details", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Transaction" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "500": { + "description": "If a payment error has occurred", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentError" } } } + } + }, + "requestBody": { + "description": "The receive payment parameters", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PerformPayment" + } + } + } + } + } + }, + "/pos/preview": { + "post": { + "operationId": "previewReceivePayment", + "summary": "Previews a POS payment before receiving it", + "description": "Previews a payment or scheduled payment. The actual balance checking is not performed in the preview.", + "tags": [ + "POS" + ], + "security": [ + { + "basic": [] }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The payment preview", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentPreview" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } - } + }, + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" + } + } + } + }, + "500": { + "description": "If a POS error has occurred", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PosError" + } + } + } + } + }, + "requestBody": { + "description": "The receive payment parameters", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PerformPayment" + } + } + } } } }, - "/messages/mark-as-unread" : { - "post" : { - "operationId" : "markMessagesAsUnread", - "summary" : "Marks a list of messages as unread.", - "description" : "Marks a list of messages, given by id, as unread.", - "tags" : [ "Messages" ], - "parameters" : [ { - "name" : "ids", - "description" : "The messages (comma-separated list of identifiers) to mark as unread.", - "in" : "query", - "required" : true, - "schema" : { - "type" : "array", - "items" : { - "type" : "string" - } - } - } ], - "responses" : { - "204" : { - "description" : "The messages were marked as unread." - }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" + "/pos/installments": { + "get": { + "operationId": "calculateReceivePaymentInstallments", + "summary": "Calculates the default installments for a scheduled payment", + "description": "Used to calculate installments for a scheduled payment. Will return an installment every month. When later receiving the payment, these can be (optionally) customized (such as changing some due dates or amounts) and used on the payment installments.", + "tags": [ + "POS" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "from", + "in": "query", + "required": true, + "description": "The payment origin", + "schema": { + "type": "string" + } + }, + { + "name": "count", + "in": "query", + "required": true, + "description": "The number of installments", + "schema": { + "type": "integer" + } + }, + { + "name": "amount", + "in": "query", + "required": true, + "description": "The total scheduled payment amount", + "schema": { + "type": "string", + "format": "number" + } + }, + { + "name": "currency", + "in": "query", + "required": false, + "description": "The payment currency. Used when no `type` is not provided, to narrow the possible payment types by currency.", + "schema": { + "type": "string" + } + }, + { + "name": "type", + "in": "query", + "required": false, + "description": "The payment type id or qualified internal name (in the form `fromAccountType.paymentType`). If not provided, will use the first possible type (possibly narrowed by the `currency` parameter). However, if more than one type is available, a validation error will be raised.", + "schema": { + "type": "string" + } + }, + { + "name": "firstDate", + "in": "query", + "required": false, + "description": "The due date of the first installment. If none is provided, it is assumed that the first installment is paid immediately, and others will be with regular 1 month interval", + "schema": { + "type": "string", + "format": "date-time" + } + } + ], + "responses": { + "200": { + "description": "The calculated installments", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PerformInstallment" + } } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "If a POS error has occurred", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PosError" } } } @@ -36298,342 +37610,443 @@ } } }, - "/messages/move-to-trash" : { - "post" : { - "operationId" : "moveMessagesToTrash", - "summary" : "Moves a list of messages to the trash message box.", - "description" : "Moves a list of messages, given by id, to the trash message box.", - "tags" : [ "Messages" ], - "parameters" : [ { - "name" : "ids", - "description" : "The messages (comma-separated list of identifiers) to move to trash.", - "in" : "query", - "required" : true, - "schema" : { - "type" : "array", - "items" : { - "type" : "string" + "/pos/otp": { + "post": { + "operationId": "receivePaymentOtp", + "summary": "Generates a new One-Time-Password (OTP) for a pos payment", + "description": "Sends a new OTP for the customer of the POS for a payment. The OTP belongs to the payer, not the authenticated user. The entire payment object must be sent on the request body. This is the same object which is sent both either preview or actually receive the payment.", + "tags": [ + "POS" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "name": "medium", + "in": "query", + "required": true, + "description": "The medium the user wants to receive the otp", + "schema": { + "$ref": "#/components/schemas/SendMediumEnum" } } - } ], - "responses" : { - "204" : { - "description" : "The messages were moded to trash." + ], + "responses": { + "204": { + "description": "The OTP is sent to the user, and no content is returned" }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } - }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" - } + } + }, + "requestBody": { + "description": "The receive payment parameters", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PerformPayment" } } } } } }, - "/messages/restore-from-trash" : { - "post" : { - "operationId" : "restoreMessagesFromTrash", - "summary" : "Restores a list of messages from the trash message box.", - "description" : "Restores a list of messages, given by id, previously moved to the trash message box.", - "tags" : [ "Messages" ], - "parameters" : [ { - "name" : "ids", - "description" : "The messages (comma-separated list of identifiers) to restore from trash.", - "in" : "query", - "required" : true, - "schema" : { - "type" : "array", - "items" : { - "type" : "string" - } - } - } ], - "responses" : { - "204" : { - "description" : "The messages were restored from trash." + "/pos/device-confirmations": { + "post": { + "operationId": "receivePaymentCreateDeviceConfirmation", + "summary": "Creates a pending device confirmation for a pos payment.", + "description": "Creates a device confirmation to confirm a pos payment. The confirmation will have a QR code that can be read (e.g with the Mobile App) to be approved / rejected by the payer. The confirmation belongs to the payer, not the authenticated user. The entire payment object must be sent on the request body. This is the same object which is sent both either preview or actually receive the payment.", + "tags": [ + "POS" + ], + "security": [ + { + "basic": [] }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [], + "responses": { + "201": { + "description": "Returns the identifier of the new confirmation.", + "content": { + "text/plain": { + "schema": { + "type": "string" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } + }, + "requestBody": { + "description": "The receive payment parameters", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PerformPayment" + } + } + } } } }, - "/messages/status" : { - "get" : { - "operationId" : "messagesStatus", - "summary" : "Returns information about the received messages.", - "description" : "Returns information about the status of the received messages: unread, new and last view date.", - "tags" : [ "Messages" ], - "responses" : { - "200" : { - "description" : "The messages status information", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/MessagesStatus" + "/pos/device-confirmations/{id}": { + "get": { + "operationId": "receivePaymentViewDeviceConfirmation", + "summary": "Shows the details of a device confirmation for a POS payer.", + "description": "Shows the details of a device confirmation for POS payer. The confirmation belongs to the payer but must had been created by the authenticated user. The entire payment object must be sent on the request body. This is the same object which is sent both either preview or actually receive the payment", + "tags": [ + "POS" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/id" + }, + { + "name": "payer", + "in": "query", + "required": true, + "description": "A user identification value, such as id, username, e-mail, phone, etc. Id is always allowed, others depend on Cyclos configuration. Note that a valid numeric value is always considered as id. For example, when using another identification method that can be numeric only, prefix the value with a single quote (like in Excel spreadsheets), for example, `'1234567890`;", + "schema": { + "type": "string" + } + }, + { + "name": "currency", + "in": "query", + "required": false, + "description": "The currency id or internal name. Only used when not specifying a payment type. In this case, will narrow the search for the payment type.", + "schema": { + "type": "string" + } + }, + { + "name": "type", + "in": "query", + "required": false, + "description": "The payment type, either the id or qualified internal name (in the form `fromAccountType.paymentType`). If no payment type is specified, if a single one is possible, it will be used. If a currency is specified, it will be taken into account in order to find the payment type. If, however, there would be multiple possibilities, a validation error is returned.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The device confirmation details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceConfirmationView" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - } - }, - "/messages/viewed" : { - "post" : { - "operationId" : "updateLastViewDateForMessages", - "summary" : "Updates the last view date for the messages.", - "description" : "Updates the last view date for the messages with the current date. This new date will be used as the base to calculate the number of new messages returned by the `GET /messages/status` operation.", - "tags" : [ "Messages" ], - "responses" : { - "204" : { - "description" : "The last view date was updated." + }, + "delete": { + "operationId": "receivePaymentDeleteDeviceConfirmation", + "summary": "Deletes a device confirmation for a POS payer.", + "description": "Deletes a device confirmation for the payer of pos payment. The confirmation belongs to the payer, not the authenticated user. The entire payment object must be sent on the request body. This is the same object which is sent both either preview or actually receive the payment.", + "tags": [ + "POS" + ], + "security": [ + { + "basic": [] }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" - } - } + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/id" + }, + { + "name": "payer", + "in": "query", + "required": true, + "description": "A user identification value, such as id, username, e-mail, phone, etc. Id is always allowed, others depend on Cyclos configuration. Note that a valid numeric value is always considered as id. For example, when using another identification method that can be numeric only, prefix the value with a single quote (like in Excel spreadsheets), for example, `'1234567890`;", + "schema": { + "type": "string" + } + }, + { + "name": "currency", + "in": "query", + "required": false, + "description": "The currency id or internal name. Only used when not specifying a payment type. In this case, will narrow the search for the payment type.", + "schema": { + "type": "string" } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + { + "name": "type", + "in": "query", + "required": false, + "description": "The payment type, either the id or qualified internal name (in the form `fromAccountType.paymentType`). If no payment type is specified, if a single one is possible, it will be used. If a currency is specified, it will be taken into account in order to find the payment type. If, however, there would be multiple possibilities, a validation error is returned.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "The device confirmation was removed." + }, + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -36641,81 +38054,94 @@ } } }, - "/messages/{id}/data-for-reply" : { - "get" : { - "operationId" : "getMessageDataForReply", - "summary" : "Returns configuration data for replying a message.", - "description" : "Returns configuration data for replying a message.", - "tags" : [ "Messages" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/id" - } ], - "responses" : { - "200" : { - "description" : "The data for replying a message.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/MessageDataForReply" + "/pos/device-confirmations/{id}/qr-code": { + "get": { + "operationId": "receivePaymentDeviceConfirmationQrCode", + "summary": "Returns the QR-code image for the given device confirmation only if it was not yet approved / rejected", + "description": "This request will return the image contents as expected but our api documentation page (or any other usage of an <img> tag), created using swagger-ui, generates a second request to include the image in the page. This new (GET) request won't send the authentication parameters and as this path requires authentication the image will be shown as broken. Optionally, to solve the problem described above and to allow authenticate the user when using sessions, a `sessionToken` or `accessClientToken` query parameter could be specified.", + "tags": [ + "POS" + ], + "parameters": [ + { + "$ref": "#/components/parameters/id" + }, + { + "name": "payer", + "description": "The payer, either a user principal (id, login name, etc) or the word `system` when the payment is to be performed to / from a system account. Note that a valid numeric value is always considered as id. For example, when using another identification method that can be numeric only, prefix the value with a single quote (like in Excel spreadsheets), for example, `'1234567890`.", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "size", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/ImageSizeEnum" + } + } + ], + "responses": { + "200": { + "description": "The image content", + "content": { + "image/png": { + "schema": { + "type": "string", + "format": "binary" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -36723,850 +38149,301 @@ } } }, - "/messages/{id}/reply" : { - "post" : { - "operationId" : "replyMessage", - "summary" : "Replies a message.", - "description" : "Replies a message.", - "tags" : [ "Messages" ], - "parameters" : [ { - "$ref" : "#/components/parameters/id" - } ], - "responses" : { - "201" : { - "description" : "The id of the new message.", - "headers" : { - "Location" : { - "description" : "URL for viewing the message details", - "schema" : { - "type" : "string" - } - } - }, - "content" : { - "text/plain" : { - "schema" : { - "type" : "string" - } - } - } - }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "/{user}/client-types": { + "get": { + "operationId": "listClientTypesForUser", + "summary": "Returns the list of access clients types for a user", + "description": "Returns the access client types for a given user that the authenticated user has access. For access client activation for the authenticated user please use [GET] `/clients/data-for-activation`.", + "tags": [ + "Clients" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/user" + }, + { + "name": "channel", + "in": "query", + "description": "If a channel id or internal name is specified, will only list access client types that can be used to access that channel", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The list of access clients types, with permissions, for the user", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserClientTypePermissions" + } } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - }, - "requestBody" : { - "description" : "The reply message.", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ReplyMessage" - } - } - } } } }, - "/vouchers/data-for-search" : { - "get" : { - "operationId" : "getGeneralVouchersDataForSearch", - "summary" : "Returns data for searching vouchers as admin", - "description" : "Returns configuration data used to search vouchers as admin", - "tags" : [ "Vouchers" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The configuration data for searching a vouchers as admin", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/GeneralVouchersDataForSearch" - } - } - } + "/clients/activate": { + "post": { + "operationId": "activateClient", + "summary": "Activates an unassigned access client", + "description": "Activates an unassigned access client belonging to the currently authenticated user through a manual activation code obtained from Cyclos.", + "tags": [ + "Clients" + ], + "security": [ + { + "basic": [] }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } - } - } + { + "session": [] }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" - } - } + { + "accessClient": [] + } + ], + "parameters": [ + { + "name": "code", + "required": true, + "in": "query", + "description": "The activation code. Must match the activation code obtained in Cyclos, which belongs to the authenticated user.", + "schema": { + "type": "string" } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" - } - } - } - }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" - } - } - } - }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" - } - } - } - } - } - } - }, - "/vouchers" : { - "get" : { - "operationId" : "searchVouchers", - "summary" : "Searches for vouchers as admin", - "description" : "Returns the list of matching vouchers the authenticated admin can view", - "tags" : [ "Vouchers" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "amountRange", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum voucher amount", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "number" - } - } - }, { - "name" : "buyer", - "in" : "query", - "required" : false, - "description" : "The buyer of the voucher. A user identification value, such as id, username, e-mail, phone, etc. Id is always allowed, others depend on Cyclos configuration. Note that a valid numeric value is always considered as id. For example, when using another identification method that can be numeric only, prefix the value with a single quote (like in Excel spreadsheets), for example, `'1234567890`;", - "schema" : { - "type" : "string" - } - }, { - "name" : "buyerGroups", - "in" : "query", - "required" : false, - "description" : "The ids or internal names of buyers groups", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "creationPeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum voucher creation date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "creationType", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/VoucherCreationTypeEnum" - } - }, { - "name" : "customFields", - "in" : "query", - "required" : false, - "description" : "Voucher custom field values used as filters. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by : (colon). For example, `customFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, customFields=field1:valueA|valueB. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `customFields=tradeType:offer|search,extraDate:2000-01-01|2001-12-31` would match results whose custom field with internal name `tradeType` is either `offer` or `search`, and whose `extraDate` is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `customFields=extraDate:|2001-12-31`. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `customFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `customFields=dynamic:'business`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "email", - "in" : "query", - "required" : false, - "description" : "The e-mail to which vouchers were either sent or had the PIN sent", - "schema" : { - "type" : "string" - } - }, { - "name" : "expirationPeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum voucher expiration date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "mobilePhone", - "in" : "query", - "required" : false, - "description" : "The mobile phone to which vouchers had the PIN sent via SMS", - "schema" : { - "type" : "string" - } - }, { - "name" : "orderBy", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/VoucherOrderByEnum" - } - }, { - "name" : "page", - "in" : "query", - "required" : false, - "description" : "The page number (zero-based) of the search. The default value is zero.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "pageSize", - "in" : "query", - "required" : false, - "description" : "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "printed", - "in" : "query", - "required" : false, - "description" : "If it is passed, filter if the voucher was printed or not.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "redeemPeriod", - "in" : "query", - "required" : false, - "description" : "Use `transactionPeriod` instead", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "redeemer", - "in" : "query", - "required" : false, - "description" : "Use `transactionUser` instead.", - "schema" : { - "type" : "string" - } - }, { - "name" : "redeemerGroups", - "in" : "query", - "required" : false, - "description" : "Use `transactionUserGroups` instead.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "skipTotalCount", - "in" : "query", - "required" : false, - "description" : "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "statuses", - "in" : "query", - "required" : false, - "description" : "", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/VoucherStatusEnum" - } - } - }, { - "name" : "token", - "in" : "query", - "required" : false, - "description" : "The voucher token (with or without mask)", - "schema" : { - "type" : "string" - } - }, { - "name" : "transactionPeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum date for a transaction in this voucher. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "transactionUser", - "in" : "query", - "required" : false, - "description" : "A user that has performed at least one redeem or top-up for the voucher. A user identification value, such as id, username, e-mail, phone, etc. Id is always allowed, others depend on Cyclos configuration. Note that a valid numeric value is always considered as id. For example, when using another identification method that can be numeric only, prefix the value with a single quote (like in Excel spreadsheets), for example, `'1234567890`;", - "schema" : { - "type" : "string" - } - }, { - "name" : "transactionUserGroups", - "in" : "query", - "required" : false, - "description" : "The ids or internal names of groups of users that performed at least one redeem or top-up for the voucher.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "types", - "in" : "query", - "required" : false, - "description" : "The ids or internal names of voucher types", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - } ], - "responses" : { - "200" : { - "description" : "The list of matching vouchers.", - "headers" : { - "X-Total-Count" : { - "schema" : { - "type" : "integer" - }, - "description" : "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." - }, - "X-Page-Size" : { - "schema" : { - "type" : "integer" - }, - "description" : "The maximum number of results per page" - }, - "X-Current-Page" : { - "schema" : { - "type" : "integer" - }, - "description" : "The current page the results are in" - }, - "X-Has-Next-Page" : { - "schema" : { - "type" : "boolean" - }, - "description" : "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." - } - }, - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/VoucherResult" - } + { + "name": "prefix", + "required": false, + "in": "query", + "description": "A prefix to be added to the generated access client token. Can be used to increase the size of the generated token, and to increase the security on clients that have to store the token. This can be accomplished by using some sort of client application hash or identifier, which should be stable. The prefix is not returned by this method. When later passing in the full token, the prefix should prepend the returned token without any separator.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Returns the token to be used on subsequent requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ActivateClientResult" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - } - }, - "/vouchers/export/{format}" : { - "parameters" : [ { - "$ref" : "#/components/parameters/format" - } ], - "get" : { - "operationId" : "exportVouchers", - "summary" : "Exports the vouchers search results as file.", - "description" : "Generates a file containing the search results. The available export formats are returned in `GET /vouchers/data-for-search`.", - "tags" : [ "Vouchers" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "name" : "amountRange", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum voucher amount", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "number" - } - } - }, { - "name" : "buyer", - "in" : "query", - "required" : false, - "description" : "The buyer of the voucher. A user identification value, such as id, username, e-mail, phone, etc. Id is always allowed, others depend on Cyclos configuration. Note that a valid numeric value is always considered as id. For example, when using another identification method that can be numeric only, prefix the value with a single quote (like in Excel spreadsheets), for example, `'1234567890`;", - "schema" : { - "type" : "string" - } - }, { - "name" : "buyerGroups", - "in" : "query", - "required" : false, - "description" : "The ids or internal names of buyers groups", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "creationPeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum voucher creation date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "creationType", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/VoucherCreationTypeEnum" - } - }, { - "name" : "customFields", - "in" : "query", - "required" : false, - "description" : "Voucher custom field values used as filters. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by : (colon). For example, `customFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, customFields=field1:valueA|valueB. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `customFields=tradeType:offer|search,extraDate:2000-01-01|2001-12-31` would match results whose custom field with internal name `tradeType` is either `offer` or `search`, and whose `extraDate` is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `customFields=extraDate:|2001-12-31`. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `customFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `customFields=dynamic:'business`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "email", - "in" : "query", - "required" : false, - "description" : "The e-mail to which vouchers were either sent or had the PIN sent", - "schema" : { - "type" : "string" - } - }, { - "name" : "expirationPeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum voucher expiration date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "mobilePhone", - "in" : "query", - "required" : false, - "description" : "The mobile phone to which vouchers had the PIN sent via SMS", - "schema" : { - "type" : "string" - } - }, { - "name" : "orderBy", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/VoucherOrderByEnum" - } - }, { - "name" : "page", - "in" : "query", - "required" : false, - "description" : "The page number (zero-based) of the search. The default value is zero.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "pageSize", - "in" : "query", - "required" : false, - "description" : "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "printed", - "in" : "query", - "required" : false, - "description" : "If it is passed, filter if the voucher was printed or not.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "redeemPeriod", - "in" : "query", - "required" : false, - "description" : "Use `transactionPeriod` instead", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "redeemer", - "in" : "query", - "required" : false, - "description" : "Use `transactionUser` instead.", - "schema" : { - "type" : "string" - } - }, { - "name" : "redeemerGroups", - "in" : "query", - "required" : false, - "description" : "Use `transactionUserGroups` instead.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "skipTotalCount", - "in" : "query", - "required" : false, - "description" : "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "statuses", - "in" : "query", - "required" : false, - "description" : "", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/VoucherStatusEnum" - } - } - }, { - "name" : "token", - "in" : "query", - "required" : false, - "description" : "The voucher token (with or without mask)", - "schema" : { - "type" : "string" - } - }, { - "name" : "transactionPeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum date for a transaction in this voucher. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "transactionUser", - "in" : "query", - "required" : false, - "description" : "A user that has performed at least one redeem or top-up for the voucher. A user identification value, such as id, username, e-mail, phone, etc. Id is always allowed, others depend on Cyclos configuration. Note that a valid numeric value is always considered as id. For example, when using another identification method that can be numeric only, prefix the value with a single quote (like in Excel spreadsheets), for example, `'1234567890`;", - "schema" : { - "type" : "string" - } - }, { - "name" : "transactionUserGroups", - "in" : "query", - "required" : false, - "description" : "The ids or internal names of groups of users that performed at least one redeem or top-up for the voucher.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" + } + }, + "/clients/{key}": { + "get": { + "operationId": "viewClient", + "summary": "Returns details of an access client", + "description": "Returns the access client details, together with permissions", + "tags": [ + "Clients" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "key", + "in": "path", + "required": true, + "description": "The access client id or token", + "schema": { + "type": "string" } - } - }, { - "name" : "types", - "in" : "query", - "required" : false, - "description" : "The ids or internal names of voucher types", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "markAsPrinted", - "in" : "query", - "required" : false, - "schema" : { - "type" : "boolean" - }, - "description" : "Should the exported vouchers be marked as printed? By default doesn't mark vouchers as printed." - } ], - "responses" : { - "200" : { - "description" : "The file content", - "content" : { - "*/*" : { - "schema" : { - "type" : "string", - "format" : "binary" - } - } - } - }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + } + ], + "responses": { + "200": { + "description": "The access client details", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClientView" } - } - } - }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + } + } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -37574,93 +38451,89 @@ } } }, - "/vouchers/data-for-generate" : { - "get" : { - "operationId" : "getVoucherDataForGenerate", - "summary" : "Returns data for generate vouchers of a specified type or the list of types to generate.", - "description" : "If a type is passed it returns the data for generate vouchers, otherwise it returns the list of types the authenticated user can generate. If a user is passed it return its data", - "tags" : [ "Vouchers" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "user", - "in" : "query", - "schema" : { - "type" : "string" + "/clients/{key}/unassign": { + "post": { + "operationId": "unassignClient", + "summary": "Unassign (disconnects) an access client", + "description": "Unassigns an access client by id or token. It must be currently assigned. After this call, the client can be assigned again if needed.", + "tags": [ + "Clients" + ], + "security": [ + { + "basic": [] }, - "description" : "A user identification value, such as id, username, e-mail, phone, etc. Id is always allowed, others depend on Cyclos configuration. Note that a valid numeric value is always considered as id. For example, when using another identification method that can be numeric only, prefix\\ the value with a single quote (like in Excel spreadsheets);" - }, { - "name" : "type", - "description" : "Either the `id` or `internalName` of the voucher type. Left empty to get the list of available types for generate.", - "in" : "query", - "schema" : { - "type" : "string" + { + "session": [] + }, + { + "accessClient": [] } - } ], - "responses" : { - "200" : { - "description" : "The data for generate vouchers", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/VoucherDataForGenerate" - } - } + ], + "parameters": [ + { + "name": "key", + "in": "path", + "required": true, + "description": "The access client id or token", + "schema": { + "type": "string" } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + { + "$ref": "#/components/parameters/confirmationPassword" + } + ], + "responses": { + "204": { + "description": "Nothing is returned, and the access client is unassigned" + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -37668,507 +38541,434 @@ } } }, - "/vouchers/generate" : { - "post" : { - "operationId" : "generateVouchers", - "summary" : "Generate one or more vouchers.", - "description" : "Generate vouchers. If a user is passed it will be the vouchers' owner.", - "tags" : [ "Vouchers" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/confirmationPassword" - } ], - "responses" : { - "200" : { - "description" : "The identifiers of all generated vouchers", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "type" : "string" - } + "/clients/data-for-activation": { + "get": { + "operationId": "getDataForClientActivation", + "summary": "Returns data for a client creation and activation.", + "description": "Returns the data needed to automatically create an activate a new access client for the authenticated user. Unassigned clients can also be activated using a manual activation code through [POST] `/clients/activate`.", + "tags": [ + "Clients" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "channel", + "in": "query", + "description": "If a channel id or internal name is specified, the returned data will only include access client types that can be used to access that channel", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The data needed to activate a new access client.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DataForClientActivation" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } - } - }, - "requestBody" : { - "description" : "The generate voucher parameters", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/GenerateVoucher" + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } } } } } } }, - "/vouchers/{key}" : { - "get" : { - "operationId" : "viewVoucher", - "summary" : "Returns data for a particular voucher", - "description" : "Returns details about a particular voucher and the possible actions the authenticated user can perform on it.", - "tags" : [ "Vouchers" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "key", - "description" : "The voucher `id` or `token`. When the token is fully numeric, it must be preceded by a single quote (`'`).", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" + "/clients/send-activaction-code": { + "post": { + "operationId": "sendClientActivationCode", + "summary": "Sends an activation code, so the user identity is validated before activating a new client.", + "description": "Sends an activation code through a selected medium (e.g: SMS, email), so the user identity is validated before activating a new client.", + "tags": [ + "Clients" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] } - } ], - "responses" : { - "200" : { - "description" : "The voucher details", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/VoucherView" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The code was sent to the user.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OtpResult" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } - } - } - }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" - } - } - } - }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" - } - } - } - }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" - } - } - } - }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" - } - } - } - } - } - } - }, - "/vouchers/{key}/transactions" : { - "get" : { - "operationId" : "searchVoucherTransactions", - "summary" : "Searches for transactions of a particular voucher.", - "description" : "A voucher transaction can be a redeem or a top-up.", - "tags" : [ "Vouchers" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "key", - "description" : "The voucher `id` or `token`. When the token is fully numeric, it must be preceded by a single quote (`'`).", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "page", - "in" : "query", - "required" : false, - "description" : "The page number (zero-based) of the search. The default value is zero.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "pageSize", - "in" : "query", - "required" : false, - "description" : "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "skipTotalCount", - "in" : "query", - "required" : false, - "description" : "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", - "schema" : { - "type" : "boolean" - } - } ], - "responses" : { - "200" : { - "description" : "The list of matching voucher transactions.", - "headers" : { - "X-Total-Count" : { - "schema" : { - "type" : "integer" - }, - "description" : "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." - }, - "X-Page-Size" : { - "schema" : { - "type" : "integer" - }, - "description" : "The maximum number of results per page" - }, - "X-Current-Page" : { - "schema" : { - "type" : "integer" - }, - "description" : "The current page the results are in" - }, - "X-Has-Next-Page" : { - "schema" : { - "type" : "boolean" - }, - "description" : "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." - } - }, - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/VoucherTransaction" - } + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } + }, + "requestBody": { + "description": "The parameters for sending the activation code for activating a new client.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SendOtp" + } + } + } } } }, - "/vouchers/{key}/export/{format}" : { - "parameters" : [ { - "name" : "key", - "description" : "The voucher `id` or `token`. When the token is fully numeric, it must be preceded by a single quote (`'`).", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "$ref" : "#/components/parameters/format" - } ], - "get" : { - "operationId" : "exportVoucher", - "summary" : "Exports a voucher details as file.", - "description" : "Generates a file containing the voucher details. The available export formats are returned in `VoucherView`.", - "parameters" : [ { - "name" : "markAsPrinted", - "in" : "query", - "required" : false, - "schema" : { - "type" : "boolean" + "/clients/{type}": { + "post": { + "operationId": "createAndActivateClient", + "summary": "Creates and activates a new access client.", + "description": "Creates and activates a new access client for the authenticated user.", + "tags": [ + "Clients" + ], + "security": [ + { + "basic": [] }, - "description" : "Should the exported voucher be marked as printed? By default doesn't mark vouchers as printed." - } ], - "tags" : [ "Vouchers" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "200" : { - "description" : "The file content", - "content" : { - "*/*" : { - "schema" : { - "type" : "string", - "format" : "binary" + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "name": "type", + "description": "The client type internal name or id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Returns the token to be used on subsequent requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ActivateClientResult" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } - }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" - } + } + }, + "requestBody": { + "description": "The parameters for creating the new client.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateClientParams" } } } } } }, - "/vouchers/{key}/qr-code" : { - "get" : { - "operationId" : "getVoucherQrCode", - "summary" : "Returns the QR-code image for the given voucher", - "description" : "The api documentation page, using swagger-ui (or any direct usage of an image tag), generates a second request to show the image contents on the preview. This is a new GET request, without passing-in the authentication parameters. As this path requires authentication, the image is shown broken, but the first request works as expected, returning the image content. Optionally, to solve the problem described above and allow to authenticate the user when using sessions, a `sessionToken` or `accessClientToken` plus a `channel` query parameters could be specified.", - "tags" : [ "Vouchers" ], - "parameters" : [ { - "name" : "key", - "description" : "The voucher `id` or `token`. When the token is fully numeric, it must be preceded by a single quote (`'`).", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "size", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/ImageSizeEnum" + "/mobile/data-for-guest": { + "get": { + "operationId": "dataForMobileGuest", + "summary": "Returns data the mobile application uses while in guest mode", + "description": "The data returned can be controlled with a cache key. Each data type has a parameter, such as `headerIf`, which returns the data only if it has changed since the last request.", + "tags": [ + "Mobile" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/cyclosVersion" + }, + { + "$ref": "#/components/parameters/headerIf" + }, + { + "$ref": "#/components/parameters/footerIf" + }, + { + "$ref": "#/components/parameters/themeIf" + }, + { + "name": "welcomePageIf", + "in": "query", + "schema": { + "type": "string" + }, + "required": false, + "description": "Controls the footer cache. If is a boolean value (`true` or `false`) will forcibly return or skip the content. Otherwise, it should be the content hash (SHA-256) returned in the corresponding data. In this case, the translated content (if any) or the content itself will be returned only when changed. When blank will always return it." + }, + { + "name": "translationsIf", + "in": "query", + "required": false, + "description": "Controls the translations cache. If is a boolean value (`true` or `false`) will forcibly return or skip the content. Otherwise, it should be a string in the form `id|version`. In this case, the content will be returned only when changed. When blank will always return it.", + "schema": { + "type": "string" + } + }, + { + "name": "deviceId", + "in": "query", + "required": false, + "description": "Trusted device identification. If given and the device is active then a pending device confirmation will be created that will be validated\n after the user logs-in. If the validation passes then no confirmation\npassword will be used only for that session.", + "schema": { + "type": "string" + } + }, + { + "name": "pinPrincipal", + "in": "query", + "required": false, + "description": "Device PIN principal. If given then the information about whether it is active or not will be given in the returned `dataForLogin`.", + "schema": { + "type": "string" + } } - } ], - "responses" : { - "200" : { - "description" : "The image content", - "content" : { - "image/png" : { - "schema" : { - "type" : "string", - "format" : "binary" + ], + "responses": { + "200": { + "description": "The data for the mobile guest page", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DataForMobileGuest" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -38176,393 +38976,298 @@ } } }, - "/vouchers/{key}/change-expiration" : { - "post" : { - "operationId" : "changeVoucherExpirationDate", - "summary" : "Changes the voucher expiration.", - "description" : "Change the expiration date of a voucher in status `open` or `expired`. This can be done only by admin with permission to change the expiration.", - "tags" : [ "Vouchers" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/confirmationPassword" - }, { - "name" : "key", - "in" : "path", - "required" : true, - "description" : "Either the id or token.", - "schema" : { - "type" : "string" + "/mobile/data-for-user": { + "get": { + "operationId": "dataForMobileUser", + "summary": "Returns data the mobile application uses in either user or POS mode", + "description": "The data returned can be controlled with a cache key. Each data type has a parameter, such as `helpIf`, which returns the data only if it has changed since the last request.", + "tags": [ + "Mobile" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] } - } ], - "responses" : { - "204" : { - "description" : "The voucher expiration date was changed. Nothing is returned." + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } - } - } + { + "$ref": "#/components/parameters/cyclosVersion" }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" - } - } + { + "$ref": "#/components/parameters/themeIf" + }, + { + "name": "translationsIf", + "in": "query", + "required": false, + "description": "Controls the translations cache. If is a boolean value (`true` or `false`) will forcibly return or skip the content. Otherwise, it should be a string in the form `id|version`. In this case, the content will be returned only when changed. When blank will always return it.", + "schema": { + "type": "string" } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" - } - } + { + "name": "mobileHelpIf", + "in": "query", + "required": false, + "description": "Controls the mobile help cache. If is a boolean value (`true` or `false`) will forcibly return or skip the content. Otherwise, it should be a string in the form `id|version`. In this case, the content will be returned only when changed. When blank will always return it. Only taken into account when not accessing as access client (not in POS mode).", + "schema": { + "type": "string" } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" - } - } + { + "name": "posHelpIf", + "in": "query", + "required": false, + "description": "Controls the POS help cache. If is a boolean value (`true` or `false`) will forcibly return or skip the content. Otherwise, it should be a string in the form `id|version`. In this case, the content will be returned only when changed. When blank will always return it. Only taken into account when accessing as access client (POS mode).", + "schema": { + "type": "string" } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" - } - } + { + "name": "homePageIf", + "in": "query", + "required": false, + "description": "Controls the mobile custom home cache. If is a boolean value (`true` or `false`) will forcibly return or skip the content. Otherwise, it should be a string in the form `id|version`. In this case, the content will be returned only when changed. When blank will always return it.", + "schema": { + "type": "string" } } - }, - "requestBody" : { - "description" : "The parameters to change the voucher's expiration date", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ChangeVoucherExpirationDate" + ], + "responses": { + "200": { + "description": "The data for the mobile user page", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DataForMobileUser" + } } } - } - } - } - }, - "/vouchers/{key}/assign" : { - "post" : { - "operationId" : "assignVoucher", - "summary" : "Assigns a generated and open voucher to a user.", - "description" : "Assigining a voucher means that the voucher will show up in the user's bought vouchers list.", - "tags" : [ "Vouchers" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "name" : "key", - "in" : "path", - "required" : true, - "description" : "Either the id or token.", - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "204" : { - "description" : "The voucher was assigned to the user, and nothing changed." }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - }, - "requestBody" : { - "description" : "The parameters to assign the voucher", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AssignVoucher" - } - } - } } } }, - "/vouchers/{key}/change-notification-settings" : { - "post" : { - "operationId" : "changeVoucherNotificationSettings", - "summary" : "Changes a voucher's notification settings.", - "description" : "Changes the e-mail and / or mobile phone the voucher uses to receive notifications of events. Can also enable / disable notifications. For sent e-mails, is also used to change the e-mail the voucher was sent to. In this case, the new e-mail will receive the attached voucher.", - "tags" : [ "Vouchers" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/confirmationPassword" - }, { - "name" : "key", - "in" : "path", - "required" : true, - "description" : "Either the id or token.", - "schema" : { - "type" : "string" + "/mobile/page/{key}": { + "get": { + "operationId": "mobilePageContent", + "summary": "Returns the content of a mobile page", + "description": "Returns the content of a mobile page, either by id or internal name", + "tags": [ + "Mobile" + ], + "parameters": [ + { + "name": "key", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "Either id or internal name of the mobile page." } - } ], - "responses" : { - "204" : { - "description" : "The voucher's notification settings are changed and nothing is returned" - }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + ], + "responses": { + "200": { + "description": "The page content", + "content": { + "text/html": { + "schema": { + "type": "string" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } - } - }, - "requestBody" : { - "description" : "The parameters to change the voucher's notification settings", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ChangeVoucherNotificationSettings" + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } } } } } } }, - "/vouchers/{key}/resend-email" : { - "post" : { - "operationId" : "resendVoucherEmail", - "summary" : "Re-sends a sent voucher to its destination e-mail address.", - "description" : "Re-sends the voucher PDF as attachment to the e-mail address. The voucher must have been created by sending it, and its status must be `open`. This can be done by the voucher buyer or by one of their manager (administrator or broker with view vouchers permission).", - "tags" : [ "Vouchers" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "name" : "key", - "in" : "path", - "required" : true, - "description" : "Either the id or token.", - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "204" : { - "description" : "The voucher PDF is mailed to the voucher's e-mail address" + "/frontend/data": { + "get": { + "operationId": "dataForFrontend", + "summary": "Returns data required for displaying the new frontend.", + "description": "Data for the new frontend.", + "tags": [ + "Frontend" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + { + "name": "screenSize", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/FrontendScreenSizeEnum" + }, + "description": "The currently displayed screen size in the frontend. Will only return content applicable to that screen size." + } + ], + "responses": { + "200": { + "description": "Returns the data for display the new frontend", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DataForFrontend" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } - } - } - } - }, - "/vouchers/{key}/cancel" : { - "post" : { - "operationId" : "cancelVoucher", - "summary" : "Cancels the voucher", - "description" : "Cancels a voucher in status `open`, `expired` or `pending`. If its creation type is `bought` also refund the buyer. This can be done by users with permission to refund over its open or expired vouchers, or by admins with permission to cancel/refund for generated/bought vouchers respectively.", - "tags" : [ "Vouchers" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/confirmationPassword" - }, { - "name" : "key", - "in" : "path", - "required" : true, - "description" : "Either the id or token.", - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "204" : { - "description" : "The voucher was canceled. Nothing is returned." }, - "500" : { - "description" : "If a payment error has occurred", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PaymentError" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -38570,698 +39275,246 @@ } } }, - "/vouchers/{key}/unblock-pin" : { - "post" : { - "operationId" : "unblockVoucherPin", - "summary" : "Unblocks the voucher PIN", - "description" : "When redeeming a voucher with PIN, if many invalid attempts are performed, that voucher redeeming will be blocked for 24h. This action allows voucher buyer / owner, or administrators, to manually unblock a voucher's PIN.", - "tags" : [ "Vouchers" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "name" : "key", - "in" : "path", - "required" : true, - "description" : "Either the id or token.", - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "204" : { - "description" : "The voucher PIN was unblocked. Nothing is returned." + "/frontend/home": { + "get": { + "operationId": "dataForFrontendHome", + "summary": "Returns the data for the home page / dashboard.", + "description": "The returned data depends on whether there'a a logged user and on the Cyclos configuration.", + "tags": [ + "Frontend" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" }, - "500" : { - "description" : "If a payment error has occurred", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PaymentError" + { + "name": "screenSize", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/FrontendScreenSizeEnum" + }, + "description": "The currently displayed screen size in the frontend. Will only return content applicable to that screen size." + } + ], + "responses": { + "200": { + "description": "Returns the content of the home page displayed for guests.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DataForFrontendHome" } } } - } - } - } - }, - "/vouchers/{key}/change-pin" : { - "post" : { - "operationId" : "changeVoucherPin", - "summary" : "Changes the pin of a particular voucher.", - "description" : "Changes the current pin of a particular voucher. Only if pin is used. The confirmation password parameter must be sent if `VoucherView.requireOldPinForChange` is false and `VoucherView.confirmationPasswordInput` is not null.", - "tags" : [ "Vouchers" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "name" : "key", - "in" : "path", - "required" : true, - "description" : "Either the id or token.", - "schema" : { - "type" : "string" - } - }, { - "$ref" : "#/components/parameters/confirmationPassword" - } ], - "responses" : { - "204" : { - "description" : "The pin was changed. Nothing is returned." }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - }, - "requestBody" : { - "description" : "The parameters for changing the pin", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ChangeVoucherPin" - } - } - } } } }, - "/{user}/vouchers/data-for-search" : { - "get" : { - "operationId" : "getUserVouchersDataForSearch", - "summary" : "Returns data for searching vouchers owned by a user", - "description" : "In versions before 4.15 this could also be used to search for redeemed vouchers. However, as 4.15 has introduced the concept of partial redeems, voucher transactions, etc, it is not correct that a shop can search for full vouchers it has redeemed / top-up, but only to see such transactions. However, as we keep the deprecation window of 2 versions, in 4.17 this operation will no longer be usable for redeemed vouchers. When searching for redeemed transactions, only very basic information of the vouchers will be returned, and the returned amount will be the redeemed amount.", - "tags" : [ "Vouchers" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/user" - }, { - "name" : "relation", - "deprecated" : true, - "x-remove-version" : 4.17, - "in" : "query", - "description" : "This operation will be only for owned vouchers. For voucher transactions, use `GET /{user}/voucher-transactions/data-for-search` or `GET /{user}/voucher-transactions`.", - "schema" : { - "$ref" : "#/components/schemas/VoucherRelationEnum" - } - } ], - "responses" : { - "200" : { - "description" : "The configuration data for searching a user's vouchers", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UserVouchersDataForSearch" - } - } - } + "/frontend/page/{key}": { + "get": { + "operationId": "viewFrontendPage", + "summary": "Returns a frontend page with its content.", + "description": "Returns a frontend page with its content.", + "tags": [ + "Frontend" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } - } - } - }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" - } - } - } - }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" - } - } - } - }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" - } - } - } - }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" - } - } - } - } - } - } - }, - "/{user}/vouchers" : { - "get" : { - "operationId" : "searchUserVouchers", - "summary" : "Searches for vouchers a user owns or has bought.", - "description" : "In versions before 4.15 this could also be used to search for redeemed vouchers. However, as 4.15 has introduced the concept of partial redeems, voucher transactions, etc, it is not correct that a shop can search for full vouchers it has redeemed / top-up, but only to see such transactions. However, as we keep the deprecation window of 2 versions, in 4.17 this operation will no longer be usable for redeemed vouchers. When searching for redeemed transactions, only very basic information of the vouchers will be returned, and the returned amount will be the redeemed amount.", - "tags" : [ "Vouchers" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/user" - }, { - "name" : "amountRange", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum voucher amount", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "number" - } - } - }, { - "name" : "creationPeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum voucher creation date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "creationType", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/VoucherCreationTypeEnum" - } - }, { - "name" : "expirationPeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum voucher expiration date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "orderBy", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/VoucherOrderByEnum" - } - }, { - "name" : "page", - "in" : "query", - "required" : false, - "description" : "The page number (zero-based) of the search. The default value is zero.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "pageSize", - "in" : "query", - "required" : false, - "description" : "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "redeemBy", - "in" : "query", - "required" : false, - "description" : "For redeemed, or starting with 4.15, voucher transactions, use `GET /voucher-transactions` instead.\n\nThe user who perform the transaction action. Only used when searching for redeemed, not bought vouchers. A user identification value, such as id, username, e-mail, phone, etc. Id is always allowed, others depend on Cyclos configuration. Note that a valid numeric value is always considered as id. For example, when using another identification method that can be numeric only, prefix the value with a single quote (like in Excel spreadsheets), for example, `'1234567890`;", - "schema" : { - "type" : "string" - } - }, { - "name" : "redeemPeriod", - "in" : "query", - "required" : false, - "description" : "For redeemed, or starting with 4.15, voucher transactions, use `GET /voucher-transactions` instead.\n\nThe minimum / maximum voucher transaction date. Only used when searching for redeemed, not bought vouchers. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "relation", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/VoucherRelationEnum" - } - }, { - "name" : "skipTotalCount", - "in" : "query", - "required" : false, - "description" : "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "statuses", - "in" : "query", - "required" : false, - "description" : "", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/VoucherStatusEnum" - } - } - }, { - "name" : "token", - "in" : "query", - "required" : false, - "description" : "The voucher token (with or without mask)", - "schema" : { - "type" : "string" - } - }, { - "name" : "types", - "in" : "query", - "required" : false, - "description" : "The ids or internal names of voucher types", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - } ], - "responses" : { - "200" : { - "description" : "The list of matching vouchers.", - "headers" : { - "X-Total-Count" : { - "schema" : { - "type" : "integer" - }, - "description" : "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." - }, - "X-Page-Size" : { - "schema" : { - "type" : "integer" - }, - "description" : "The maximum number of results per page" - }, - "X-Current-Page" : { - "schema" : { - "type" : "integer" - }, - "description" : "The current page the results are in" - }, - "X-Has-Next-Page" : { - "schema" : { - "type" : "boolean" - }, - "description" : "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." - } + { + "name": "key", + "in": "path", + "required": true, + "schema": { + "type": "string" }, - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/VoucherResult" - } + "description": "Either id or internal name of the content page." + } + ], + "responses": { + "200": { + "description": "The HTML content.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FrontendPageWithContent" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - } - }, - "/{user}/vouchers/export/{format}" : { - "parameters" : [ { - "$ref" : "#/components/parameters/format" - } ], - "get" : { - "operationId" : "exportUserVouchers", - "summary" : "Exports the vouchers search results as file.", - "description" : "Generates a file containing the search results. The available export formats are returned in `GET /{user/vouchers/data-for-search`.", - "tags" : [ "Vouchers" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/user" - }, { - "name" : "amountRange", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum voucher amount", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "number" - } - } - }, { - "name" : "creationPeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum voucher creation date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "creationType", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/VoucherCreationTypeEnum" - } - }, { - "name" : "expirationPeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum voucher expiration date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "orderBy", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/VoucherOrderByEnum" - } - }, { - "name" : "page", - "in" : "query", - "required" : false, - "description" : "The page number (zero-based) of the search. The default value is zero.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "pageSize", - "in" : "query", - "required" : false, - "description" : "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "redeemBy", - "in" : "query", - "required" : false, - "description" : "For redeemed, or starting with 4.15, voucher transactions, use `GET /voucher-transactions` instead.\n\nThe user who perform the transaction action. Only used when searching for redeemed, not bought vouchers. A user identification value, such as id, username, e-mail, phone, etc. Id is always allowed, others depend on Cyclos configuration. Note that a valid numeric value is always considered as id. For example, when using another identification method that can be numeric only, prefix the value with a single quote (like in Excel spreadsheets), for example, `'1234567890`;", - "schema" : { - "type" : "string" - } - }, { - "name" : "redeemPeriod", - "in" : "query", - "required" : false, - "description" : "For redeemed, or starting with 4.15, voucher transactions, use `GET /voucher-transactions` instead.\n\nThe minimum / maximum voucher transaction date. Only used when searching for redeemed, not bought vouchers. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "relation", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/VoucherRelationEnum" - } - }, { - "name" : "skipTotalCount", - "in" : "query", - "required" : false, - "description" : "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "statuses", - "in" : "query", - "required" : false, - "description" : "", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/VoucherStatusEnum" - } - } - }, { - "name" : "token", - "in" : "query", - "required" : false, - "description" : "The voucher token (with or without mask)", - "schema" : { - "type" : "string" - } - }, { - "name" : "types", - "in" : "query", - "required" : false, - "description" : "The ids or internal names of voucher types", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - } ], - "responses" : { - "200" : { - "description" : "The file content", - "content" : { - "*/*" : { - "schema" : { - "type" : "string", - "format" : "binary" - } - } - } - }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } + } + }, + "/frontend/settings": { + "post": { + "operationId": "saveFrontendSettings", + "summary": "Saves user preferences regarding the Cyclos frontend", + "description": "Currently only allowed for administrators to choose whether to use the classic or new frontend", + "tags": [ + "Frontend" + ], + "requestBody": { + "description": "The settings to save", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FrontendSettings" } } + } + }, + "responses": { + "204": { + "description": "The settings were saved." }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -39269,88 +39522,89 @@ } } }, - "/{user}/vouchers/data-for-buy" : { - "get" : { - "operationId" : "getVoucherDataForBuy", - "summary" : "Returns data for buying a voucher of a specified type or the list of types to buy.", - "description" : "If a type is passed it returns the data for buying vouchers, otherwise it returns the list of types the atuhenticated user can buy to the given user (or himself).", - "tags" : [ "Vouchers" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/user" - }, { - "name" : "type", - "description" : "Either the `id` or `internalName` of the voucher type. Left empty to get the list of available types for buy.", - "in" : "query", - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "The data for buying vouchers", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/VoucherDataForBuy" + "/frontend/icons": { + "get": { + "operationId": "getFrontendIcons", + "summary": "Returns a JSON object keyed by icon name and whose values are the SVG contents", + "description": "Returns the HTML content of a given page.", + "tags": [ + "Frontend" + ], + "parameters": [ + { + "name": "names", + "in": "query", + "required": false, + "explode": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": "The icon names to return" + } + ], + "responses": { + "200": { + "description": "The JSON content.", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -39358,370 +39612,376 @@ } } }, - "/{user}/vouchers/preview-buy" : { - "post" : { - "operationId" : "previewBuyVouchers", - "summary" : "Previews the buying of one or more vouchers for the given user.", - "description" : "Validates the given fields and returns preview information for buying a voucher.", - "tags" : [ "Vouchers" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/user" - } ], - "responses" : { - "200" : { - "description" : "The preview result", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/VoucherBuyingPreview" + "/frontend/{user}/quick-access": { + "parameters": [ + { + "$ref": "#/components/parameters/user" + } + ], + "get": { + "operationId": "getDataForUserQuickAccess", + "summary": "Returns data for quick access settings in the new frontend.", + "description": "Returns data for quick access settings in the new frontend.", + "tags": [ + "Frontend" + ], + "responses": { + "200": { + "description": "The data for quick access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DataForUserQuickAccess" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "An error occurred while buying the voucher(s)", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/BuyVoucherError" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - }, - "requestBody" : { - "description" : "The buy voucher parameters", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/BuyVoucher" - } - } - } - } - } - }, - "/{user}/vouchers/buy" : { - "post" : { - "operationId" : "buyVouchers", - "summary" : "Buys one or more vouchers for the given user", - "description" : "Buys vouchers. If the payment type has custom fields, the values should be passed as well. This service only returns the vouchers list, if you need information about the voucher status please use /{user}/vouchers/buy-with-status.", - "tags" : [ "Vouchers" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/user" - }, { - "$ref" : "#/components/parameters/confirmationPassword" - } ], - "responses" : { - "200" : { - "description" : "The identifiers of all generated vouchers", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "type" : "string" - } + } + }, + "put": { + "operationId": "saveUserQuickAccess", + "summary": "Saves the quick access items.", + "description": "Saves the quick access items.", + "tags": [ + "Frontend" + ], + "responses": { + "204": { + "description": "The quick access settings were saved" + }, + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" + } + } + } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "An error occurred while buying the voucher(s)", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/BuyVoucherError" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } }, - "requestBody" : { - "description" : "The buy voucher parameters", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/BuyVoucher" + "requestBody": { + "description": "The parameters", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserQuickAccessSettingsEdit" } } } } } }, - "/{user}/vouchers/buy-with-status" : { - "post" : { - "operationId" : "buyVouchersWithStatus", - "summary" : "Buys one or more vouchers for the given user returning the status.", - "description" : "Buys vouchers. If the payment type has custom fields, the values should be passed as well. The status returned in the result is shared by all vouchers.", - "tags" : [ "Vouchers" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/user" - }, { - "$ref" : "#/components/parameters/confirmationPassword" - } ], - "responses" : { - "200" : { - "description" : "The status of all bougth vouchers and their identifiers.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/VoucherBoughtResult" - } - } - } + "/frontend/{user}/quick-access/defaults": { + "parameters": [ + { + "$ref": "#/components/parameters/user" + } + ], + "post": { + "operationId": "restoreUserQuickAccessDefaults", + "summary": "Restores the default quick access items.", + "description": "Restores the default quick access items.", + "tags": [ + "Frontend" + ], + "responses": { + "204": { + "description": "The quick access were restored to defaults" }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "An error occurred while buying the voucher(s)", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/BuyVoucherError" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - }, - "requestBody" : { - "description" : "The buy voucher parameters", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/BuyVoucher" - } - } - } } } }, - "/{user}/vouchers/data-for-send" : { - "get" : { - "operationId" : "getVoucherDataForSend", - "summary" : "Returns data for sending a voucher by e-mail of a specified type or the list of types to send.", - "description" : "If a type is passed it returns the data for sending a voucher, otherwise it returns the list of types the atuhenticated user can buy and send.", - "tags" : [ "Vouchers" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/user" - }, { - "name" : "type", - "description" : "Either the `id` or `internalName` of the voucher type. Left empty to get the list of available types for buy.", - "in" : "query", - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "The data for sending a voucher", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/VoucherDataForBuy" + "/notifications": { + "get": { + "operationId": "searchNotifications", + "summary": "Searches for the notifications the authenticated user has received.", + "description": "Returns an ordered page of notifications the authenticated user has received (newest first).", + "tags": [ + "Notifications" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "onlyNew", + "in": "query", + "required": false, + "description": "Boolean value indicating wether return only the new notifications received after the last view date tracked using `POST /notifications/viewed`", + "schema": { + "type": "boolean" + } + }, + { + "name": "onlyUnread", + "in": "query", + "required": false, + "description": "Boolean value indicating wether return only the unread notifications", + "schema": { + "type": "boolean" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number (zero-based) of the search. The default value is zero.", + "schema": { + "type": "integer" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", + "schema": { + "type": "integer" + } + }, + { + "name": "skipTotalCount", + "in": "query", + "required": false, + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "The notifications page", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Notification" + } } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -39729,267 +39989,279 @@ } } }, - "/{user}/vouchers/preview-send" : { - "post" : { - "operationId" : "previewSendVoucher", - "summary" : "Previews buingy a voucher and sending it to an e-mail address.", - "description" : "Validates the given fields and returns preview information for sending a voucher.", - "tags" : [ "Vouchers" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/user" - } ], - "responses" : { - "200" : { - "description" : "Preview result.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/VoucherSendingPreview" + "/notifications/{id}": { + "get": { + "operationId": "viewNotification", + "summary": "Returns the notification details.", + "description": "Returns the notification details.", + "tags": [ + "Notifications" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/id" + } + ], + "responses": { + "200": { + "description": "The notification details", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Notification" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "An error occurred while buying the voucher(s)", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/BuyVoucherError" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - }, - "requestBody" : { - "description" : "The send voucher parameters", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SendVoucher" - } - } - } } - } - }, - "/{user}/vouchers/send" : { - "post" : { - "operationId" : "sendVoucher", - "summary" : "Buy a voucher and send it to an e-mail address", - "description" : "Similar to buying vouchers, except that the count is always 1 and the voucher is sent to a given e-mail address. A message can be given as well, and will show up in the e-mail", - "tags" : [ "Vouchers" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/user" - }, { - "$ref" : "#/components/parameters/confirmationPassword" - } ], - "responses" : { - "200" : { - "description" : "The status of the bougth voucher and its identifier.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/VoucherBoughtResult" + }, + "delete": { + "operationId": "deleteNotification", + "summary": "Removes a notification by id.", + "description": "Removes a notification for the authenticated user by id.", + "tags": [ + "Notifications" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/id" + } + ], + "responses": { + "204": { + "description": "The notification was removed" + }, + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "An error occurred while buying the voucher(s)", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/BuyVoucherError" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - }, - "requestBody" : { - "description" : "The send voucher parameters", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SendVoucher" + } + } + }, + "/notifications/mark-as-read": { + "post": { + "operationId": "markNotificationsAsRead", + "summary": "Marks a list of notifications as read.", + "description": "Marks a list of notifications, given by id, as read.", + "tags": [ + "Notifications" + ], + "parameters": [ + { + "name": "ids", + "description": "The notifications (comma-separated list of identifiers) to mark as read.", + "in": "query", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "204": { + "description": "The notifications were marked as read." + }, + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" + } } } } } } }, - "/{user}/vouchers/data-for-redeem" : { - "get" : { - "operationId" : "getVoucherInitialDataForRedeem", - "summary" : "Returns initial data for redeeming vouchers", - "description" : "Returns initial data for redeeming vouchers", - "tags" : [ "Vouchers" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/user" - } ], - "responses" : { - "200" : { - "description" : "The data for redeeming vouchers", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/VoucherInitialDataForTransaction" + "/notifications/status": { + "get": { + "operationId": "notificationsStatus", + "summary": "Return information about the received notifications.", + "description": "Return information about the status of the received notifications (unread, new, etc).", + "tags": [ + "Notifications" + ], + "responses": { + "200": { + "description": "The notifications status information", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotificationsStatus" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -39997,377 +40269,305 @@ } } }, - "/{user}/vouchers/{token}/data-for-redeem" : { - "get" : { - "operationId" : "getVoucherDataForRedeem", - "summary" : "Returns data for redeeming a voucher by token", - "description" : "Data for redeeming a specific voucher", - "tags" : [ "Vouchers" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/user" - }, { - "name" : "token", - "description" : "The voucher token to be redeemed", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "The data for redeeming vouchers", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/VoucherDataForRedeem" - } - } - } + "/notifications/viewed": { + "post": { + "operationId": "updateLastViewDateForNotifications", + "summary": "Update the last view date for the notifications.", + "description": "Update the last view date for the notifications. This will be used to calculate the number of new notifications returned by the `GET /notifications/status` operation.", + "tags": [ + "Notifications" + ], + "responses": { + "204": { + "description": "The last view date was updated." }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" } } } + } + } + } + }, + "/{user}/notification-settings": { + "parameters": [ + { + "$ref": "#/components/parameters/user" + } + ], + "get": { + "operationId": "viewNotificationSettings", + "summary": "Returns the notification settings for a given user.", + "description": "Returns the notification settings for a given operator / user / administrator.", + "tags": [ + "NotificationSettings" + ], + "security": [ + { + "basic": [] }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" - } - } - } + { + "session": [] }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The notification settings", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotificationSettingsView" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "500" : { - "description" : "An error occurred while retrieving data for redeeming the voucher", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/RedeemVoucherError" - } - } - } - } - } - } - }, - "/{user}/vouchers/{token}/preview-redeem" : { - "post" : { - "operationId" : "previewVoucherRedeem", - "summary" : "Previews a voucher top-up for the given user.", - "description" : "Validates the given fields and returns preview information about a voucher top-up", - "tags" : [ "Vouchers" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/user" - }, { - "name" : "token", - "description" : "The voucher token to be redeemed", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "Information about the redeem", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/VoucherRedeemPreview" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } + } + } + }, + "post": { + "operationId": "saveNotificationSettings", + "summary": "Saves the notification settings for a given user.", + "description": "Saves the notification settings for a given operator / user / administrator.", + "tags": [ + "NotificationSettings" + ], + "security": [ + { + "basic": [] }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" - } - } - } + { + "session": [] }, - "500" : { - "description" : "An error occurred while previewing the voucher redeem.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/RedeemVoucherError" - } + { + "accessClient": [] + } + ], + "requestBody": { + "description": "The parameters to save", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotificationSettingsEdit" } } } }, - "requestBody" : { - "description" : "Additional redeem data", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/RedeemVoucher" - } - } - } - } - } - }, - "/{user}/vouchers/{token}/redeem" : { - "post" : { - "operationId" : "redeemVoucher", - "summary" : "Redeems a voucher for the given user", - "description" : "Redeems a voucher", - "tags" : [ "Vouchers" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/user" - }, { - "name" : "token", - "description" : "The voucher token to be redeemed", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "201" : { - "description" : "The identifiers of the voucher and the generated payment for redeem", - "headers" : { - "Location" : { - "description" : "URL for viewing the redeemed voucher transaction", - "schema" : { - "type" : "string" - } - } - }, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/VoucherRedeemResult" + "responses": { + "204": { + "description": "The notification settings are saved and nothing is returned" + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "An error occurred while redeeming the voucher", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/RedeemVoucherError" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - }, - "requestBody" : { - "description" : "Additional redeem data", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/RedeemVoucher" - } - } - } } } }, - "/{user}/vouchers/data-for-top-up" : { - "get" : { - "operationId" : "getVoucherInitialDataForTopUp", - "summary" : "Returns initial data for topping-up vouchers", - "description" : "Returns initial data for topping-up vouchers", - "tags" : [ "Vouchers" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/user" - } ], - "responses" : { - "200" : { - "description" : "The data for redeeming vouchers", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/VoucherInitialDataForTransaction" + "/{user}/notification-settings/data-for-edit": { + "parameters": [ + { + "$ref": "#/components/parameters/user" + } + ], + "get": { + "operationId": "getNotificationSettingsDataForEdit", + "summary": "Returns configuration data to edit the notification settings of a user.", + "description": "Returns data to edit the nofitication settings od a given operator / user / administrator.", + "tags": [ + "NotificationSettings" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The notification settings", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotificationSettingsDataForEdit" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -40375,567 +40575,335 @@ } } }, - "/{user}/vouchers/{token}/data-for-top-up" : { - "get" : { - "operationId" : "getVoucherDataForTopUp", - "summary" : "Returns data for topping-up a voucher by token", - "description" : "Data for topping-up a specific voucher", - "tags" : [ "Vouchers" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/user" - }, { - "name" : "token", - "description" : "The voucher token to be topped-up", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" + "/email-unsubscribe/{key}": { + "parameters": [ + { + "name": "key", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The key which was received by e-mail" + } + ], + "get": { + "operationId": "getDataForEmailUnsubscribe", + "summary": "Returns data for unsubscribing a specific type of received e-mail.", + "description": "It should be used the key received by e-mail. That key already contains the information on whether the e-mail type is either notification, forwarded message or mailing list.", + "tags": [ + "NotificationSettings" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" } - } ], - "responses" : { - "200" : { - "description" : "The data for topping-up the given voucher", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/VoucherDataForTopUp" + ], + "responses": { + "200": { + "description": "The data for unsubscribing from a give e-mail type", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DataForEmailUnsubscribe" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "An error occurred while retrieving data for topping-up the voucher", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/TopUpVoucherError" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - } - }, - "/{user}/vouchers/{token}/preview-top-up" : { - "post" : { - "operationId" : "previewVoucherTopUp", - "summary" : "Previews a voucher top-up for the given user.", - "description" : "Validates the given fields and returns preview information about a voucher top-up", - "tags" : [ "Vouchers" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/user" - }, { - "name" : "token", - "description" : "The voucher token to be topped-up", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "Information about the top-up", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/VoucherTopUpPreview" - } - } - } + }, + "post": { + "operationId": "emailUnsubscribe", + "summary": "Unsubscribes from a specific type of received e-mail.", + "description": "Modifies the notification settings of the user which received the key, by removing the given e-mail type.", + "tags": [ + "NotificationSettings" + ], + "responses": { + "204": { + "description": "The notification settings are changed and nothing is returned." }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "An error occurred while previewing the voucher top-up.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/TopUpVoucherError" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - }, - "requestBody" : { - "description" : "Additional top-up data", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/TopUpVoucher" - } - } - } - } - } - }, - "/{user}/vouchers/{token}/top-up" : { - "post" : { - "operationId" : "topUpVoucher", - "summary" : "Tops-up a voucher for the given user.", - "description" : "If the voucher was still inactive, it is activated.", - "tags" : [ "Vouchers" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/user" - }, { - "name" : "token", - "description" : "The voucher token to be topped-up", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "$ref" : "#/components/parameters/confirmationPassword" - } ], - "responses" : { - "201" : { - "description" : "The identifiers of the voucher and the generated payment for top-up", - "headers" : { - "Location" : { - "description" : "URL for viewing the voucher transaction", - "schema" : { - "type" : "string" - } - } - }, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/VoucherTransactionResult" + } + } + }, + "/messages/data-for-search": { + "get": { + "operationId": "getMessageDataForSearch", + "summary": "Returns configuration data for searching messages.", + "description": "Returns configuration data for searching messages.", + "tags": [ + "Messages" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The data for searching messages", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageDataForSearch" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "An error occurred while topping-up the voucher", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/TopUpVoucherError" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - }, - "requestBody" : { - "description" : "Additional top-up data", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/TopUpVoucher" - } - } - } } } }, - "/{user}/voucher-transactions/data-for-search" : { - "get" : { - "operationId" : "getUserVoucherTransactionsDataForSearch", - "summary" : "Returns configuration data for searching for voucher transactions", - "description" : "A voucher transaction can be a redeem or a top-up.", - "tags" : [ "Vouchers" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/user" - } ], - "responses" : { - "200" : { - "description" : "The configuration data for searching for voucher transactions of a user.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UserVoucherTransactionsDataForSearch" - } - } - } + "/messages/data-for-send": { + "get": { + "operationId": "getMessageDataForSend", + "summary": "Returns configuration data for sending messages.", + "description": "Returns configuration data for sending messages.", + "tags": [ + "Messages" + ], + "security": [ + { + "basic": [] }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } - } - } + { + "session": [] }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" - } - } - } + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" - } - } - } - }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" - } - } - } - }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" - } - } - } - } - } - } - }, - "/{user}/voucher-transactions" : { - "get" : { - "operationId" : "searchUserVoucherTransactions", - "summary" : "Searches for vouchers transactions a user has performed.", - "description" : "A voucher transaction can be a redeem or a top-up.", - "tags" : [ "Vouchers" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/user" - }, { - "name" : "amountRange", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum amount. For bought vouchers, is the voucher amount. For redeemed vouchers, is the redeem amount.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "number" - } - } - }, { - "name" : "by", - "in" : "query", - "required" : false, - "description" : "The user who performed the voucher transaction. A user identification value, such as id, username, e-mail, phone, etc. Id is always allowed, others depend on Cyclos configuration. Note that a valid numeric value is always considered as id. For example, when using another identification method that can be numeric only, prefix the value with a single quote (like in Excel spreadsheets), for example, `'1234567890`;", - "schema" : { - "type" : "string" - } - }, { - "name" : "datePeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum voucher transaction date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "kind", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/VoucherTransactionKind" - } - }, { - "name" : "page", - "in" : "query", - "required" : false, - "description" : "The page number (zero-based) of the search. The default value is zero.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "pageSize", - "in" : "query", - "required" : false, - "description" : "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "skipTotalCount", - "in" : "query", - "required" : false, - "description" : "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "types", - "in" : "query", - "required" : false, - "description" : "The ids or internal names of voucher types", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - } ], - "responses" : { - "200" : { - "description" : "The list of matching voucher transactions.", - "headers" : { - "X-Total-Count" : { - "schema" : { - "type" : "integer" - }, - "description" : "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." - }, - "X-Page-Size" : { - "schema" : { - "type" : "integer" - }, - "description" : "The maximum number of results per page" - }, - "X-Current-Page" : { - "schema" : { - "type" : "integer" - }, - "description" : "The current page the results are in" - }, - "X-Has-Next-Page" : { - "schema" : { - "type" : "boolean" - }, - "description" : "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." - } - }, - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/VoucherTransactionResult" - } + { + "name": "user", + "required": false, + "in": "query", + "description": "A user identification value, such as id, username, e-mail, phone, etc. Id is always allowed, others depend on Cyclos configuration. Note that a valid numeric value is always considered as id. For example, when using another identification method that can be numeric only, prefix the value with a single quote (like in Excel spreadsheets), for example, `'1234567890`;", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The data for sending messages", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageDataForSend" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -40943,331 +40911,452 @@ } } }, - "/voucher-transactions/{id}" : { - "get" : { - "operationId" : "viewVoucherTransaction", - "summary" : "Returns details about a voucher transaction", - "description" : "Information of a particular voucher transaction", - "tags" : [ "Vouchers" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/id" - } ], - "responses" : { - "200" : { - "description" : "The voucher transaction", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/VoucherTransactionView" + "/messages": { + "get": { + "operationId": "searchMessages", + "summary": "Searches for the messages of a user.", + "description": "Returns the messages (paged) in descending order (newest first) a user has received, sent or moved to trash.", + "tags": [ + "Messages" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "category", + "in": "query", + "required": false, + "description": "The category to filter by.", + "schema": { + "type": "string" + } + }, + { + "name": "destination", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/MessageDestinationEnum" + } + }, + { + "name": "keywords", + "in": "query", + "required": false, + "description": "The keywords to filter by. Used to match the subject or the body of the messages.", + "schema": { + "type": "string" + } + }, + { + "name": "messageBox", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/MessageBoxEnum" + } + }, + { + "name": "onlyUnread", + "in": "query", + "required": false, + "description": "Boolean value indicating wether return only the unread messages", + "schema": { + "type": "boolean" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number (zero-based) of the search. The default value is zero.", + "schema": { + "type": "integer" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", + "schema": { + "type": "integer" + } + }, + { + "name": "period", + "in": "query", + "required": false, + "description": "The minimum / maximum date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "skipTotalCount", + "in": "query", + "required": false, + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", + "schema": { + "type": "boolean" + } + }, + { + "name": "user", + "in": "query", + "required": false, + "description": "Either the id or identifier of the from / to user", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The messages page", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MessageResult" + } } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - } - }, - "/voucher-transactions/{id}/export/{format}" : { - "parameters" : [ { - "$ref" : "#/components/parameters/id" - }, { - "$ref" : "#/components/parameters/format" - } ], - "get" : { - "operationId" : "exportVoucherTransaction", - "summary" : "Exports the given voucher transaction as file.", - "description" : "Generates a file containing the voucher transaction details results. The available export formats are returned in `GET /voucher-transactions/{id}`.", - "tags" : [ "Vouchers" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "200" : { - "description" : "The file content", - "content" : { - "*/*" : { - "schema" : { - "type" : "string", - "format" : "binary" + }, + "post": { + "operationId": "sendMessage", + "summary": "Sends a new message.", + "description": "Sends a new user / system message.", + "tags": [ + "Messages" + ], + "parameters": [], + "responses": { + "201": { + "description": "The id of the message sent.", + "headers": { + "Location": { + "description": "URL for viewing the message details", + "schema": { + "type": "string" + } + } + }, + "content": { + "text/plain": { + "schema": { + "type": "string" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } + }, + "requestBody": { + "description": "The message to be send.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SendMessage" + } + } + } } } }, - "/voucher-info" : { - "get" : { - "operationId" : "getVoucherInfoData", - "summary" : "Returns data for the voucher information page", - "description" : "Returns data for the voucher information page", - "tags" : [ "VoucherInfo" ], - "responses" : { - "200" : { - "description" : "The data for the voucher information page", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DataForVoucherInfo" + "/messages/{id}": { + "get": { + "operationId": "viewMessage", + "summary": "Returns the message details.", + "description": "Returns the message details from its id.", + "tags": [ + "Messages" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/id" + } + ], + "responses": { + "200": { + "description": "The message details", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageView" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - } - }, - "/voucher-info/{token}" : { - "get" : { - "operationId" : "getVoucherInfo", - "summary" : "Returns data for the voucher information page", - "description" : "Returns data for the voucher information page", - "tags" : [ "VoucherInfo" ], - "parameters" : [ { - "name" : "token", - "description" : "The voucher token", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" + }, + "delete": { + "operationId": "deleteMessage", + "summary": "Removes a message.", + "description": "Removes a message for the authenticated user by id.", + "tags": [ + "Messages" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] } - }, { - "name" : "pin", - "description" : "The voucher pin", - "in" : "header", - "required" : false, - "schema" : { - "type" : "string" + ], + "parameters": [ + { + "$ref": "#/components/parameters/id" } - } ], - "responses" : { - "200" : { - "description" : "The voucher information", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/VoucherInfo" + ], + "responses": { + "204": { + "description": "The message was removed" + }, + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -41275,139 +41364,98 @@ } } }, - "/voucher-info/{token}/transactions" : { - "get" : { - "operationId" : "searchVoucherInfoTransactions", - "summary" : "Searches for transactions of a particular voucher in the information page", - "description" : "Returns the transactions of the voucher", - "tags" : [ "VoucherInfo" ], - "parameters" : [ { - "name" : "token", - "description" : "The voucher token", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "pin", - "description" : "The voucher pin", - "in" : "header", - "required" : false, - "schema" : { - "type" : "string" - } - }, { - "name" : "page", - "in" : "query", - "required" : false, - "description" : "The page number (zero-based) of the search. The default value is zero.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "pageSize", - "in" : "query", - "required" : false, - "description" : "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "skipTotalCount", - "in" : "query", - "required" : false, - "description" : "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", - "schema" : { - "type" : "boolean" + "/messages/mark-as-read": { + "post": { + "operationId": "markMessagesAsRead", + "summary": "Marks a list of messages as read.", + "description": "Marks a list of messages, given by id, as read.", + "tags": [ + "Messages" + ], + "parameters": [ + { + "name": "ids", + "description": "The messages (comma-separated list of identifiers) to mark as read.", + "in": "query", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } } - } ], - "responses" : { - "200" : { - "description" : "The list of matching voucher transactions.", - "headers" : { - "X-Total-Count" : { - "schema" : { - "type" : "integer" - }, - "description" : "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." - }, - "X-Page-Size" : { - "schema" : { - "type" : "integer" - }, - "description" : "The maximum number of results per page" - }, - "X-Current-Page" : { - "schema" : { - "type" : "integer" - }, - "description" : "The current page the results are in" - }, - "X-Has-Next-Page" : { - "schema" : { - "type" : "boolean" - }, - "description" : "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." + ], + "responses": { + "204": { + "description": "The messages were marked as read." + }, + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" + } } - }, - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/VoucherTransaction" - } + } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -41415,374 +41463,368 @@ } } }, - "/voucher-info/{token}/resend-pin" : { - "post" : { - "operationId" : "resendVoucherInfoPin", - "summary" : "Re-sends the voucher pin to its e-mail/mobile phone.", - "description" : "Re-sends the voucher pin to the associatyed e-mail address and/or mobile phone. The voucher status must be `open`. In case the voucher doesn't have associated an e-mail nor a mobile phone then this operation ends silently.", - "tags" : [ "VoucherInfo" ], - "parameters" : [ { - "name" : "token", - "description" : "The voucher token", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" + "/messages/mark-as-unread": { + "post": { + "operationId": "markMessagesAsUnread", + "summary": "Marks a list of messages as unread.", + "description": "Marks a list of messages, given by id, as unread.", + "tags": [ + "Messages" + ], + "parameters": [ + { + "name": "ids", + "description": "The messages (comma-separated list of identifiers) to mark as unread.", + "in": "query", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } } - } ], - "responses" : { - "200" : { - "description" : "The e-mail address and/or mobile phone where the pin was sent", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "type" : "string" - } + ], + "responses": { + "204": { + "description": "The messages were marked as unread." + }, + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } - } - }, - "requestBody" : { - "description" : "The captcha response is required when requesting a pin resend.", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/CaptchaResponse" + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } } } } } } }, - "/voucher-info/{token}/change-pin" : { - "post" : { - "operationId" : "changeVoucherInfoPin", - "summary" : "Changes the pin of a particular voucher.", - "description" : "Changes the current pin of a particular voucher. Only if pin is used.", - "tags" : [ "VoucherInfo" ], - "parameters" : [ { - "name" : "token", - "description" : "The voucher token", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "pin", - "description" : "The voucher pin", - "in" : "header", - "required" : true, - "schema" : { - "type" : "string" + "/messages/move-to-trash": { + "post": { + "operationId": "moveMessagesToTrash", + "summary": "Moves a list of messages to the trash message box.", + "description": "Moves a list of messages, given by id, to the trash message box.", + "tags": [ + "Messages" + ], + "parameters": [ + { + "name": "ids", + "description": "The messages (comma-separated list of identifiers) to move to trash.", + "in": "query", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } } - } ], - "responses" : { - "204" : { - "description" : "The pin was changed. Nothing is returned." + ], + "responses": { + "204": { + "description": "The messages were moded to trash." }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } - } - }, - "requestBody" : { - "description" : "The parameters for changing the pin", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SimpleChangeVoucherPin" + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } } } } } } }, - "/voucher-info/{token}/notification-settings" : { - "post" : { - "operationId" : "changeVoucherInfoNotificationSettings", - "summary" : "Changes the voucher notifications configuration.", - "description" : "Changes the voucher notifications configuration (email/mobile phone, enable/disable).", - "tags" : [ "VoucherInfo" ], - "parameters" : [ { - "name" : "token", - "description" : "The voucher token", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "pin", - "description" : "The voucher pin", - "in" : "header", - "required" : true, - "schema" : { - "type" : "string" + "/messages/restore-from-trash": { + "post": { + "operationId": "restoreMessagesFromTrash", + "summary": "Restores a list of messages from the trash message box.", + "description": "Restores a list of messages, given by id, previously moved to the trash message box.", + "tags": [ + "Messages" + ], + "parameters": [ + { + "name": "ids", + "description": "The messages (comma-separated list of identifiers) to restore from trash.", + "in": "query", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } } - } ], - "responses" : { - "204" : { - "description" : "The configuration was changed. Nothing is returned" + ], + "responses": { + "204": { + "description": "The messages were restored from trash." }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } - } - }, - "requestBody" : { - "description" : "The parameters for changing the configuration", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ChangeVoucherNotificationSettings" + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } } } } } } }, - "/voucher-info/{token}/unblock" : { - "post" : { - "operationId" : "unblockVoucherInfo", - "summary" : "Unblock a voucher.", - "description" : "Unblock a blocked voucher.", - "tags" : [ "VoucherInfo" ], - "parameters" : [ { - "name" : "token", - "description" : "The voucher token", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "pin", - "description" : "The voucher pin", - "in" : "header", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "204" : { - "description" : "The voucher was unblocked. Nothing is returned." + "/messages/status": { + "get": { + "operationId": "messagesStatus", + "summary": "Returns information about the received messages.", + "description": "Returns information about the status of the received messages: unread, new and last view date.", + "tags": [ + "Messages" + ], + "responses": { + "200": { + "description": "The messages status information", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessagesStatus" + } + } + } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -41790,190 +41832,175 @@ } } }, - "/voucher-info/{token}/activate-gift" : { - "post" : { - "operationId" : "activateGiftVoucher", - "summary" : "Activates a gift voucher with a PIN.", - "description" : "Activates a gift voucher with a PIN.", - "tags" : [ "VoucherInfo" ], - "parameters" : [ { - "name" : "token", - "description" : "The voucher token", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "The voucher info is returned", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/VoucherInfo" + "/messages/viewed": { + "post": { + "operationId": "updateLastViewDateForMessages", + "summary": "Updates the last view date for the messages.", + "description": "Updates the last view date for the messages with the current date. This new date will be used as the base to calculate the number of new messages returned by the `GET /messages/status` operation.", + "tags": [ + "Messages" + ], + "responses": { + "204": { + "description": "The last view date was updated." + }, + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - }, - "requestBody" : { - "description" : "The parameters for changing the pin", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ActivateGiftVoucher" - } - } - } } } }, - "/{user}/tickets/data-for-new" : { - "parameters" : [ { - "$ref" : "#/components/parameters/user" - } ], - "get" : { - "operationId" : "dataForNewTicket", - "summary" : "Returns data for create a new ticket for the given user.", - "tags" : [ "Tickets" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "type", - "in" : "query", - "required" : false, - "description" : "The payment type id or qualified internal name (in the form `fromAccountType.paymentType`). If no payment type is provided, the possible types will be returned, so the payer can choose.", - "schema" : { - "type" : "string" + "/messages/{id}/data-for-reply": { + "get": { + "operationId": "getMessageDataForReply", + "summary": "Returns configuration data for replying a message.", + "description": "Returns configuration data for replying a message.", + "tags": [ + "Messages" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] } - }, { - "name" : "payer", - "in" : "query", - "required" : false, - "description" : "Will only be used if no specific payment type is given. An identification for the user which will pay the ticket. Is optional, and in most cases, should be left empty. If specified, the returned payment types will take into account those that can be paid by the given user.", - "schema" : { - "type" : "string" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/id" } - } ], - "responses" : { - "200" : { - "description" : "The data for creating a ticket", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DataForTransaction" + ], + "responses": { + "200": { + "description": "The data for replying a message.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageDataForReply" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -41981,192 +42008,193 @@ } } }, - "/{user}/tickets" : { - "parameters" : [ { - "$ref" : "#/components/parameters/user" - } ], - "post" : { - "operationId" : "newTicket", - "summary" : "Creates a new ticket with status `open` for the given user.", - "description" : "The given user will be the ticket's owner and then the receiver of the payment generated after processing the ticket only if was previously approved by the payer.", - "tags" : [ "Tickets" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "201" : { - "description" : "The created ticket", - "headers" : { - "Location" : { - "description" : "URL for viewing the ticket details", - "schema" : { - "type" : "string" + "/messages/{id}/reply": { + "post": { + "operationId": "replyMessage", + "summary": "Replies a message.", + "description": "Replies a message.", + "tags": [ + "Messages" + ], + "parameters": [ + { + "$ref": "#/components/parameters/id" + } + ], + "responses": { + "201": { + "description": "The id of the new message.", + "headers": { + "Location": { + "description": "URL for viewing the message details", + "schema": { + "type": "string" } } }, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/TransactionView" + "content": { + "text/plain": { + "schema": { + "type": "string" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } }, - "requestBody" : { - "description" : "The data to create the new ticket", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/TicketNew" + "requestBody": { + "description": "The reply message.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReplyMessage" } } } } } }, - "/tickets/{ticket}" : { - "get" : { - "operationId" : "viewTicket", - "summary" : "Returns details about a ticket by ticket number", - "description" : "Returns details about a ticket by ticket number.", - "tags" : [ "Tickets" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "ticket", - "in" : "path", - "required" : true, - "description" : "The ticket number", - "schema" : { - "type" : "string" + "/vouchers/data-for-search": { + "get": { + "operationId": "getGeneralVouchersDataForSearch", + "summary": "Returns data for searching vouchers as admin", + "description": "Returns configuration data used to search vouchers as admin", + "tags": [ + "Vouchers" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] } - } ], - "responses" : { - "200" : { - "description" : "Transaction details", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/TransactionView" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The configuration data for searching a vouchers as admin", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GeneralVouchersDataForSearch" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -42174,86 +42202,369 @@ } } }, - "/tickets/{ticket}/qr-code" : { - "get" : { - "operationId" : "getTicketQrCode", - "summary" : "Returns the QR-code image for the given ticket only if its status is `open`", - "description" : "This request will return the image contents as expected but our api documentation page (or any other usage of an <img> tag), created using swagger-ui, generates a second request to include the image in the page. This new (GET) request won't send the authentication parameters and as this path requires authentication the image will be shown as broken. Optionally, to solve the problem described above and to allow authenticate the user when using sessions, a `sessionToken` or `accessClientToken` query parameter could be specified.", - "tags" : [ "Tickets" ], - "parameters" : [ { - "name" : "ticket", - "description" : "The ticket number.", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "size", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/ImageSizeEnum" - } - } ], - "responses" : { - "200" : { - "description" : "The image content", - "content" : { - "image/png" : { - "schema" : { - "type" : "string", - "format" : "binary" + "/vouchers": { + "get": { + "operationId": "searchVouchers", + "summary": "Searches for vouchers as admin", + "description": "Returns the list of matching vouchers the authenticated admin can view", + "tags": [ + "Vouchers" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "amountRange", + "in": "query", + "required": false, + "description": "The minimum / maximum voucher amount", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "number" + } + } + }, + { + "name": "buyer", + "in": "query", + "required": false, + "description": "The buyer of the voucher. A user identification value, such as id, username, e-mail, phone, etc. Id is always allowed, others depend on Cyclos configuration. Note that a valid numeric value is always considered as id. For example, when using another identification method that can be numeric only, prefix the value with a single quote (like in Excel spreadsheets), for example, `'1234567890`;", + "schema": { + "type": "string" + } + }, + { + "name": "buyerGroups", + "in": "query", + "required": false, + "description": "The ids or internal names of buyers groups", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "creationPeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum voucher creation date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "creationType", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/VoucherCreationTypeEnum" + } + }, + { + "name": "customFields", + "in": "query", + "required": false, + "description": "Voucher custom field values used as filters. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by : (colon). For example, `customFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, customFields=field1:valueA|valueB. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `customFields=tradeType:offer|search,extraDate:2000-01-01|2001-12-31` would match results whose custom field with internal name `tradeType` is either `offer` or `search`, and whose `extraDate` is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `customFields=extraDate:|2001-12-31`. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `customFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `customFields=dynamic:'business`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "email", + "in": "query", + "required": false, + "description": "The e-mail to which vouchers were either sent or had the PIN sent", + "schema": { + "type": "string" + } + }, + { + "name": "expirationPeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum voucher expiration date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "mobilePhone", + "in": "query", + "required": false, + "description": "The mobile phone to which vouchers had the PIN sent via SMS", + "schema": { + "type": "string" + } + }, + { + "name": "orderBy", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/VoucherOrderByEnum" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number (zero-based) of the search. The default value is zero.", + "schema": { + "type": "integer" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", + "schema": { + "type": "integer" + } + }, + { + "name": "printed", + "in": "query", + "required": false, + "description": "If it is passed, filter if the voucher was printed or not.", + "schema": { + "type": "boolean" + } + }, + { + "name": "redeemPeriod", + "in": "query", + "required": false, + "description": "Use `transactionPeriod` instead", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "redeemer", + "in": "query", + "required": false, + "description": "Use `transactionUser` instead.", + "schema": { + "type": "string" + } + }, + { + "name": "redeemerGroups", + "in": "query", + "required": false, + "description": "Use `transactionUserGroups` instead.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "skipTotalCount", + "in": "query", + "required": false, + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", + "schema": { + "type": "boolean" + } + }, + { + "name": "statuses", + "in": "query", + "required": false, + "description": "", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VoucherStatusEnum" + } + } + }, + { + "name": "token", + "in": "query", + "required": false, + "description": "The voucher token (with or without mask)", + "schema": { + "type": "string" + } + }, + { + "name": "transactionPeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum date for a transaction in this voucher. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "transactionUser", + "in": "query", + "required": false, + "description": "A user that has performed at least one redeem or top-up for the voucher. A user identification value, such as id, username, e-mail, phone, etc. Id is always allowed, others depend on Cyclos configuration. Note that a valid numeric value is always considered as id. For example, when using another identification method that can be numeric only, prefix the value with a single quote (like in Excel spreadsheets), for example, `'1234567890`;", + "schema": { + "type": "string" + } + }, + { + "name": "transactionUserGroups", + "in": "query", + "required": false, + "description": "The ids or internal names of groups of users that performed at least one redeem or top-up for the voucher.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "types", + "in": "query", + "required": false, + "description": "The ids or internal names of voucher types", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "The list of matching vouchers.", + "headers": { + "X-Total-Count": { + "schema": { + "type": "integer" + }, + "description": "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." + }, + "X-Page-Size": { + "schema": { + "type": "integer" + }, + "description": "The maximum number of results per page" + }, + "X-Current-Page": { + "schema": { + "type": "integer" + }, + "description": "The current page the results are in" + }, + "X-Has-Next-Page": { + "schema": { + "type": "boolean" + }, + "description": "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." + } + }, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VoucherResult" + } } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -42261,97 +42572,362 @@ } } }, - "/tickets/{ticket}/preview" : { - "post" : { - "operationId" : "previewTicket", - "summary" : "Previews the payment generated by the ticket.", - "description" : "Previews the payment that will be generated if the ticket is approved by a user (i.e the payer). The ticket status must be`open`. The actual balance checking is not performed in the preview.", - "tags" : [ "Tickets" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "ticket", - "description" : "The ticket number", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" + "/vouchers/export/{format}": { + "parameters": [ + { + "$ref": "#/components/parameters/format" + } + ], + "get": { + "operationId": "exportVouchers", + "summary": "Exports the vouchers search results as file.", + "description": "Generates a file containing the search results. The available export formats are returned in `GET /vouchers/data-for-search`.", + "tags": [ + "Vouchers" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "name": "amountRange", + "in": "query", + "required": false, + "description": "The minimum / maximum voucher amount", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "number" + } + } + }, + { + "name": "buyer", + "in": "query", + "required": false, + "description": "The buyer of the voucher. A user identification value, such as id, username, e-mail, phone, etc. Id is always allowed, others depend on Cyclos configuration. Note that a valid numeric value is always considered as id. For example, when using another identification method that can be numeric only, prefix the value with a single quote (like in Excel spreadsheets), for example, `'1234567890`;", + "schema": { + "type": "string" + } + }, + { + "name": "buyerGroups", + "in": "query", + "required": false, + "description": "The ids or internal names of buyers groups", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "creationPeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum voucher creation date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "creationType", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/VoucherCreationTypeEnum" + } + }, + { + "name": "customFields", + "in": "query", + "required": false, + "description": "Voucher custom field values used as filters. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by : (colon). For example, `customFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, customFields=field1:valueA|valueB. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `customFields=tradeType:offer|search,extraDate:2000-01-01|2001-12-31` would match results whose custom field with internal name `tradeType` is either `offer` or `search`, and whose `extraDate` is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `customFields=extraDate:|2001-12-31`. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `customFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `customFields=dynamic:'business`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "email", + "in": "query", + "required": false, + "description": "The e-mail to which vouchers were either sent or had the PIN sent", + "schema": { + "type": "string" + } + }, + { + "name": "expirationPeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum voucher expiration date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "mobilePhone", + "in": "query", + "required": false, + "description": "The mobile phone to which vouchers had the PIN sent via SMS", + "schema": { + "type": "string" + } + }, + { + "name": "orderBy", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/VoucherOrderByEnum" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number (zero-based) of the search. The default value is zero.", + "schema": { + "type": "integer" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", + "schema": { + "type": "integer" + } + }, + { + "name": "printed", + "in": "query", + "required": false, + "description": "If it is passed, filter if the voucher was printed or not.", + "schema": { + "type": "boolean" + } + }, + { + "name": "redeemPeriod", + "in": "query", + "required": false, + "description": "Use `transactionPeriod` instead", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "redeemer", + "in": "query", + "required": false, + "description": "Use `transactionUser` instead.", + "schema": { + "type": "string" + } + }, + { + "name": "redeemerGroups", + "in": "query", + "required": false, + "description": "Use `transactionUserGroups` instead.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "skipTotalCount", + "in": "query", + "required": false, + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", + "schema": { + "type": "boolean" + } + }, + { + "name": "statuses", + "in": "query", + "required": false, + "description": "", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VoucherStatusEnum" + } + } + }, + { + "name": "token", + "in": "query", + "required": false, + "description": "The voucher token (with or without mask)", + "schema": { + "type": "string" + } + }, + { + "name": "transactionPeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum date for a transaction in this voucher. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "transactionUser", + "in": "query", + "required": false, + "description": "A user that has performed at least one redeem or top-up for the voucher. A user identification value, such as id, username, e-mail, phone, etc. Id is always allowed, others depend on Cyclos configuration. Note that a valid numeric value is always considered as id. For example, when using another identification method that can be numeric only, prefix the value with a single quote (like in Excel spreadsheets), for example, `'1234567890`;", + "schema": { + "type": "string" + } + }, + { + "name": "transactionUserGroups", + "in": "query", + "required": false, + "description": "The ids or internal names of groups of users that performed at least one redeem or top-up for the voucher.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "types", + "in": "query", + "required": false, + "description": "The ids or internal names of voucher types", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "markAsPrinted", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + }, + "description": "Should the exported vouchers be marked as printed? By default doesn't mark vouchers as printed." } - } ], - "responses" : { - "200" : { - "description" : "The approval preview", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/TicketPreview" + ], + "responses": { + "200": { + "description": "The file content", + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -42359,78 +42935,103 @@ } } }, - "/tickets/{ticket}/cancel" : { - "post" : { - "operationId" : "cancelTicket", - "summary" : "Cancels a ticket by the receiver.", - "description" : "Cancels a ticket by the receiver before being approved by the payer. The logged user must be the ticket's owner.", - "tags" : [ "Tickets" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "name" : "ticket", - "description" : "The ticket number", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" + "/vouchers/data-for-generate": { + "get": { + "operationId": "getVoucherDataForGenerate", + "summary": "Returns data for generate vouchers of a specified type or the list of types to generate.", + "description": "If a type is passed it returns the data for generate vouchers, otherwise it returns the list of types the authenticated user can generate. If a user is passed it return its data", + "tags": [ + "Vouchers" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "user", + "in": "query", + "schema": { + "type": "string" + }, + "description": "A user identification value, such as id, username, e-mail, phone, etc. Id is always allowed, others depend on Cyclos configuration. Note that a valid numeric value is always considered as id. For example, when using another identification method that can be numeric only, prefix\\ the value with a single quote (like in Excel spreadsheets);" + }, + { + "name": "type", + "description": "Either the `id` or `internalName` of the voucher type. Left empty to get the list of available types for generate.", + "in": "query", + "schema": { + "type": "string" + } } - } ], - "responses" : { - "204" : { - "description" : "The ticket was canceled. Nothing is returned." + ], + "responses": { + "200": { + "description": "The data for generate vouchers", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VoucherDataForGenerate" + } + } + } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -42438,204 +43039,188 @@ } } }, - "/tickets/{ticket}/approve" : { - "post" : { - "operationId" : "approveTicket", - "summary" : "Approves a ticket by the payer.", - "description" : "After a successful approval, a new direct payment from the logged user (i.e the payer) to the user who created the ticket will be generated ONLY if the ticket doesn't have a defined `successUrl` nor `successWebhook`, in that case the ticket goes to `processed` status. Otherwise the ticket just goes to the `approved` status and the corresponding payment will be generated only after the ticket is processed by the receiver.", - "tags" : [ "Tickets" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/confirmationPassword" - }, { - "name" : "ticket", - "description" : "The ticket number", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "The approval result.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/TicketApprovalResult" + "/vouchers/generate": { + "post": { + "operationId": "generateVouchers", + "summary": "Generate one or more vouchers.", + "description": "Generate vouchers. If a user is passed it will be the vouchers' owner.", + "tags": [ + "Vouchers" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/confirmationPassword" + } + ], + "responses": { + "200": { + "description": "The identifiers of all generated vouchers", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } } } } }, - "500" : { - "description" : "If a payment error has occurred", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PaymentError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } - } - } - } - }, - "/tickets/{ticket}/process" : { - "post" : { - "operationId" : "processTicket", - "summary" : "Processes a ticket by the receiver.", - "description" : "Processes an already approved ticket generating a new direct payment from the user who approve the ticket to the logged user (i.e the ticket's creator). A ticket can be processed only if its status is `approved` and the `orderId` (if any) matches the one given at ticket creation. After successfully processing it goes to the final status: `processed`.", - "tags" : [ "Tickets" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "ticket", - "description" : "The ticket number", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "orderId", - "description" : "The order id given at ticket creation. Must be specified only if an `orderId` was given when the ticket was created.", - "in" : "query", - "required" : false, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "The process result", - "headers" : { - "Location" : { - "description" : "URL for viewing the payment details", - "schema" : { - "type" : "string" + }, + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } - }, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/TicketProcessResult" + } + }, + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "500" : { - "description" : "If a payment error has occurred", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PaymentError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } } + }, + "requestBody": { + "description": "The generate voucher parameters", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GenerateVoucher" + } + } + } } } }, - "/tickets/data-for-new" : { - "get" : { - "operationId" : "dataForNewTicketDeprecated", - "summary" : "Returns data for create a new ticket for the logged user.", - "description" : "Use `GET /{user}/tickets/data-for-new` instead", - "tags" : [ "Tickets" ], - "deprecated" : true, - "x-remove-version" : 4.17, - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "type", - "in" : "query", - "required" : false, - "description" : "The payment type id or qualified internal name (in the form `fromAccountType.paymentType`). If no payment type is provided, the possible types will be returned, so the payer can choose.", - "schema" : { - "type" : "string" + "/vouchers/{key}": { + "get": { + "operationId": "viewVoucher", + "summary": "Returns data for a particular voucher", + "description": "Returns details about a particular voucher and the possible actions the authenticated user can perform on it.", + "tags": [ + "Vouchers" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] } - }, { - "name" : "payer", - "in" : "query", - "required" : false, - "description" : "Will only be used if no specific payment type is given. An identification for the user which will pay the ticket. Is optional, and in most cases, should be left empty. If specified, the returned payment types will take into account those that can be paid by the given user.", - "schema" : { - "type" : "string" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "key", + "description": "The voucher `id` or `token`. When the token is fully numeric, it must be preceded by a single quote (`'`).", + "in": "path", + "required": true, + "schema": { + "type": "string" + } } - } ], - "responses" : { - "200" : { - "description" : "The data for creating a ticket", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DataForTransaction" + ], + "responses": { + "200": { + "description": "The voucher details", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VoucherView" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -42643,195 +43228,271 @@ } } }, - "/tickets" : { - "post" : { - "operationId" : "newTicketDeprecated", - "summary" : "Creates a new ticket with status `open` for the logged user.", - "description" : "Use `POST /{user}/tickets` instead.\n\n\nThe logged user will be the ticket's owner and then the receiver of the payment generated after processing the ticket only if was previously approved by the payer.", - "tags" : [ "Tickets" ], - "deprecated" : true, - "x-remove-version" : 4.17, - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "201" : { - "description" : "The created ticket", - "headers" : { - "Location" : { - "description" : "URL for viewing the ticket details", - "schema" : { - "type" : "string" - } + "/vouchers/{key}/transactions": { + "get": { + "operationId": "searchVoucherTransactions", + "summary": "Searches for transactions of a particular voucher.", + "description": "A voucher transaction can be a redeem or a top-up.", + "tags": [ + "Vouchers" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "key", + "description": "The voucher `id` or `token`. When the token is fully numeric, it must be preceded by a single quote (`'`).", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number (zero-based) of the search. The default value is zero.", + "schema": { + "type": "integer" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", + "schema": { + "type": "integer" + } + }, + { + "name": "skipTotalCount", + "in": "query", + "required": false, + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "The list of matching voucher transactions.", + "headers": { + "X-Total-Count": { + "schema": { + "type": "integer" + }, + "description": "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." + }, + "X-Page-Size": { + "schema": { + "type": "integer" + }, + "description": "The maximum number of results per page" + }, + "X-Current-Page": { + "schema": { + "type": "integer" + }, + "description": "The current page the results are in" + }, + "X-Has-Next-Page": { + "schema": { + "type": "boolean" + }, + "description": "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." } }, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/TransactionView" + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VoucherTransaction" + } } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } - }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + } + } + } + }, + "/vouchers/{key}/export/{format}": { + "parameters": [ + { + "name": "key", + "description": "The voucher `id` or `token`. When the token is fully numeric, it must be preceded by a single quote (`'`).", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "$ref": "#/components/parameters/format" + } + ], + "get": { + "operationId": "exportVoucher", + "summary": "Exports a voucher details as file.", + "description": "Generates a file containing the voucher details. The available export formats are returned in `VoucherView`.", + "parameters": [ + { + "name": "markAsPrinted", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + }, + "description": "Should the exported voucher be marked as printed? By default doesn't mark vouchers as printed." + } + ], + "tags": [ + "Vouchers" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "responses": { + "200": { + "description": "The file content", + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" } } } - } - }, - "requestBody" : { - "description" : "The data to create the new ticket", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/TicketNew" - } - } - } - } - } - }, - "/{owner}/record-types" : { - "get" : { - "operationId" : "listRecordTypesByOwner", - "summary" : "Lists the record types over a user or system", - "description" : "Returns the record types the authenticated user can view over the given user or system if the `system` owner is used.", - "tags" : [ "Records" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/owner" - } ], - "responses" : { - "200" : { - "description" : "The list of visible record types", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/OwnerRecordData" - } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -42839,89 +43500,91 @@ } } }, - "/{owner}/record-types/{type}" : { - "get" : { - "operationId" : "getRecordTypeByOwner", - "summary" : "Returns a single record type over a user or system", - "description" : "Returns the a specific record type the authenticated user can view over the given user or system if the `system` owner is used.", - "tags" : [ "Records" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/owner" - }, { - "name" : "type", - "description" : "Either the identifier or internal name of the record type", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" + "/vouchers/{key}/qr-code": { + "get": { + "operationId": "getVoucherQrCode", + "summary": "Returns the QR-code image for the given voucher", + "description": "The api documentation page, using swagger-ui (or any direct usage of an image tag), generates a second request to show the image contents on the preview. This is a new GET request, without passing-in the authentication parameters. As this path requires authentication, the image is shown broken, but the first request works as expected, returning the image content. Optionally, to solve the problem described above and allow to authenticate the user when using sessions, a `sessionToken` or `accessClientToken` plus a `channel` query parameters could be specified.", + "tags": [ + "Vouchers" + ], + "parameters": [ + { + "name": "key", + "description": "The voucher `id` or `token`. When the token is fully numeric, it must be preceded by a single quote (`'`).", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "size", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/ImageSizeEnum" + } } - } ], - "responses" : { - "200" : { - "description" : "The record type details", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/OwnerRecordData" + ], + "responses": { + "200": { + "description": "The image content", + "content": { + "image/png": { + "schema": { + "type": "string", + "format": "binary" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -42929,652 +43592,386 @@ } } }, - "/{owner}/records/{type}/data-for-search" : { - "get" : { - "operationId" : "getRecordDataForOwnerSearch", - "summary" : "Returns data for searching records of a specific type and owner", - "description" : "Returns data for searching records of a specific type, either for system or user records, depending on the `owner` parameter.", - "tags" : [ "Records" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/owner" - }, { - "name" : "type", - "description" : "Either the identifier or internal name of the record type", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" + "/vouchers/{key}/change-expiration": { + "post": { + "operationId": "changeVoucherExpirationDate", + "summary": "Changes the voucher expiration.", + "description": "Change the expiration date of a voucher in status `open` or `expired`. This can be done only by admin with permission to change the expiration.", + "tags": [ + "Vouchers" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] } - } ], - "responses" : { - "200" : { - "description" : "The configuration data for searching records", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/RecordDataForSearch" - } - } - } + ], + "parameters": [ + { + "$ref": "#/components/parameters/confirmationPassword" }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } - } + { + "name": "key", + "in": "path", + "required": true, + "description": "Either the id or token.", + "schema": { + "type": "string" } + } + ], + "responses": { + "204": { + "description": "The voucher expiration date was changed. Nothing is returned." }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } - }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" - } - } - } - } - } - } - }, - "/{owner}/records/{type}" : { - "get" : { - "operationId" : "searchOwnerRecords", - "summary" : "Searches for records of a specific type and owner", - "description" : "Returns records matching the search criteria, for a specific type, either for system or user records, depending on the `owner` parameter. The custom fields returned on each record depend on the field configuration, which needs to be enabled to return on list. The profile fields available as search filters for records are assigned in the products (or admin group permissions).", - "tags" : [ "Records" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/owner" - }, { - "name" : "type", - "description" : "Either the identifier or internal name of the record type", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "createdBy", - "in" : "query", - "required" : false, - "description" : "Either the id or identifier of the user that created the record", - "schema" : { - "type" : "string" - } - }, { - "name" : "creationPeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum record creation date", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "customFields", - "in" : "query", - "required" : false, - "description" : "Record custom field values used as filters. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by : (colon). For example, `customFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, customFields=field1:valueA|valueB. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `customFields=tradeType:offer|search,extraDate:2000-01-01|2001-12-31` would match results whose custom field with internal name `tradeType` is either `offer` or `search`, and whose `extraDate` is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `customFields=extraDate:|2001-12-31`. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `customFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `customFields=dynamic:'business`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "keywords", - "in" : "query", - "required" : false, - "description" : "Textual search keywords. Sometimes, like in user search, the fields matched depends on what is configured on the products.", - "schema" : { - "type" : "string" - } - }, { - "name" : "page", - "in" : "query", - "required" : false, - "description" : "The page number (zero-based) of the search. The default value is zero.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "pageSize", - "in" : "query", - "required" : false, - "description" : "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "profileFields", - "in" : "query", - "required" : false, - "description" : "User profile fields, both basic (full name, login name, phone, e-mail, etc) and custom fields, that are used for search. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by `:` (colon). For example, `profileFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, `profileFields=field1:valueA|valueB`. The accepted fields depend on the products the authenticated user has. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `profileFields=rank:bronze|silver,birthDate:2000-01-01|2001-12-31` would match results whose custom field with internal name 'rank' is either bronze or silver, and whose 'birthDate' is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `profileFields=birthDate:|2001-12-31`.\nThe basic profile fields have one of the following identifiers:\n- `name` or `fullName`: Full name; - `username`, `loginName` or `login`: Login name; - `email`: E-mail; - `phone`: Phone; - `accountNumber`, `account`: Account number; - `image`: Image (accepts a boolean value, indicating that either it is required that users either have images or not).\n\nIf address is an allowed profile field for search, specific address fields may be searched. The allowed ones are normally returned as the `addressFieldsInSearch` field in the corresponding result from a data-for-search request. The specific address fields are:\n- `address`: Searches on any address field (not a specific field); - `address.address`: Searches on the fields that represent the street address, which are `addressLine1`, `addressLine2`, `street`, `buildingNumber` and `complement`. Note that normally only a subset of them should be enabled in the configuration (either line 1 / 2 or street + number + complement);\n- `address.zip`: Searches for matching zip (postal) code; - `address.poBox`: Searches for matching postal box; - `address.neighborhood`: Searches by neighborhood; - `address.city`: Searches by city; - `address.region`: Searches by region (or state); - `address.country`: Searches by ISO 3166-1 alpha-2 country code. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `profileFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `profileFields=dynamic:'business`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "skipTotalCount", - "in" : "query", - "required" : false, - "description" : "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", - "schema" : { - "type" : "boolean" - } - } ], - "responses" : { - "200" : { - "description" : "The records matching the search filters.", - "headers" : { - "X-Total-Count" : { - "schema" : { - "type" : "integer" - }, - "description" : "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." - }, - "X-Page-Size" : { - "schema" : { - "type" : "integer" - }, - "description" : "The maximum number of results per page" - }, - "X-Current-Page" : { - "schema" : { - "type" : "integer" - }, - "description" : "The current page the results are in" - }, - "X-Has-Next-Page" : { - "schema" : { - "type" : "boolean" - }, - "description" : "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." - } - }, - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/RecordResult" - } + }, + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } - }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" - } + } + }, + "requestBody": { + "description": "The parameters to change the voucher's expiration date", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeVoucherExpirationDate" } } + } + } + } + }, + "/vouchers/{key}/assign": { + "post": { + "operationId": "assignVoucher", + "summary": "Assigns a generated and open voucher to a user.", + "description": "Assigining a voucher means that the voucher will show up in the user's bought vouchers list.", + "tags": [ + "Vouchers" + ], + "security": [ + { + "basic": [] }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" - } - } + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "name": "key", + "in": "path", + "required": true, + "description": "Either the id or token.", + "schema": { + "type": "string" } + } + ], + "responses": { + "204": { + "description": "The voucher was assigned to the user, and nothing changed." }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } - } - } - }, - "post" : { - "operationId" : "createRecord", - "summary" : "Creates a new record for the given owner and type", - "description" : "Creates a new record for the given owner and type. If the owner is `system` will be a system record. Otherwise will be a user record.", - "tags" : [ "Records" ], - "parameters" : [ { - "$ref" : "#/components/parameters/owner" - }, { - "name" : "type", - "description" : "Either the identifier or internal name of the record type", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "201" : { - "description" : "Returns the identifier of the new record", - "headers" : { - "Location" : { - "description" : "URL for viewing the record details", - "schema" : { - "type" : "string" - } - } - }, - "content" : { - "text/plain" : { - "schema" : { - "type" : "string" + }, + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } - }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" - } + } + }, + "requestBody": { + "description": "The parameters to assign the voucher", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AssignVoucher" } } + } + } + } + }, + "/vouchers/{key}/change-notification-settings": { + "post": { + "operationId": "changeVoucherNotificationSettings", + "summary": "Changes a voucher's notification settings.", + "description": "Changes the e-mail and / or mobile phone the voucher uses to receive notifications of events. Can also enable / disable notifications. For sent e-mails, is also used to change the e-mail the voucher was sent to. In this case, the new e-mail will receive the attached voucher.", + "tags": [ + "Vouchers" + ], + "security": [ + { + "basic": [] }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" - } - } + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/confirmationPassword" + }, + { + "name": "key", + "in": "path", + "required": true, + "description": "Either the id or token.", + "schema": { + "type": "string" } + } + ], + "responses": { + "204": { + "description": "The voucher's notification settings are changed and nothing is returned" }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" - } - } - } - } - }, - "requestBody" : { - "description" : "The record to be created", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/RecordNew" - } - } - } - } - } - }, - "/{owner}/records/{type}/export/{format}" : { - "parameters" : [ { - "$ref" : "#/components/parameters/owner" - }, { - "name" : "type", - "description" : "Either the identifier or internal name of the record type", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "$ref" : "#/components/parameters/format" - } ], - "get" : { - "operationId" : "exportOwnerRecords", - "summary" : "Exports the records search results as file", - "description" : "Generates a file containing the search results. The available export formats are returned in `GET /{owner}/records/{type}/data-for-search`.", - "tags" : [ "Records" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "name" : "createdBy", - "in" : "query", - "required" : false, - "description" : "Either the id or identifier of the user that created the record", - "schema" : { - "type" : "string" - } - }, { - "name" : "creationPeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum record creation date", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "customFields", - "in" : "query", - "required" : false, - "description" : "Record custom field values used as filters. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by : (colon). For example, `customFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, customFields=field1:valueA|valueB. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `customFields=tradeType:offer|search,extraDate:2000-01-01|2001-12-31` would match results whose custom field with internal name `tradeType` is either `offer` or `search`, and whose `extraDate` is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `customFields=extraDate:|2001-12-31`. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `customFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `customFields=dynamic:'business`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "keywords", - "in" : "query", - "required" : false, - "description" : "Textual search keywords. Sometimes, like in user search, the fields matched depends on what is configured on the products.", - "schema" : { - "type" : "string" - } - }, { - "name" : "page", - "in" : "query", - "required" : false, - "description" : "The page number (zero-based) of the search. The default value is zero.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "pageSize", - "in" : "query", - "required" : false, - "description" : "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "profileFields", - "in" : "query", - "required" : false, - "description" : "User profile fields, both basic (full name, login name, phone, e-mail, etc) and custom fields, that are used for search. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by `:` (colon). For example, `profileFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, `profileFields=field1:valueA|valueB`. The accepted fields depend on the products the authenticated user has. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `profileFields=rank:bronze|silver,birthDate:2000-01-01|2001-12-31` would match results whose custom field with internal name 'rank' is either bronze or silver, and whose 'birthDate' is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `profileFields=birthDate:|2001-12-31`.\nThe basic profile fields have one of the following identifiers:\n- `name` or `fullName`: Full name; - `username`, `loginName` or `login`: Login name; - `email`: E-mail; - `phone`: Phone; - `accountNumber`, `account`: Account number; - `image`: Image (accepts a boolean value, indicating that either it is required that users either have images or not).\n\nIf address is an allowed profile field for search, specific address fields may be searched. The allowed ones are normally returned as the `addressFieldsInSearch` field in the corresponding result from a data-for-search request. The specific address fields are:\n- `address`: Searches on any address field (not a specific field); - `address.address`: Searches on the fields that represent the street address, which are `addressLine1`, `addressLine2`, `street`, `buildingNumber` and `complement`. Note that normally only a subset of them should be enabled in the configuration (either line 1 / 2 or street + number + complement);\n- `address.zip`: Searches for matching zip (postal) code; - `address.poBox`: Searches for matching postal box; - `address.neighborhood`: Searches by neighborhood; - `address.city`: Searches by city; - `address.region`: Searches by region (or state); - `address.country`: Searches by ISO 3166-1 alpha-2 country code. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `profileFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `profileFields=dynamic:'business`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "skipTotalCount", - "in" : "query", - "required" : false, - "description" : "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", - "schema" : { - "type" : "boolean" - } - } ], - "responses" : { - "200" : { - "description" : "The file content", - "content" : { - "*/*" : { - "schema" : { - "type" : "string", - "format" : "binary" - } - } - } - }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } - }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" - } + } + }, + "requestBody": { + "description": "The parameters to change the voucher's notification settings", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeVoucherNotificationSettings" } } } } } }, - "/{owner}/records/{type}/data-for-new" : { - "get" : { - "operationId" : "getRecordDataForNew", - "summary" : "Returns data to create a new record", - "description" : "Returns configuration data for creating a record for the given owner and type. If the owner is `system` will be a system record. Otherwise will be a user record.", - "tags" : [ "Records" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/owner" - }, { - "name" : "type", - "required" : true, - "in" : "path", - "description" : "The record type to be created", - "schema" : { - "type" : "string" + "/vouchers/{key}/resend-email": { + "post": { + "operationId": "resendVoucherEmail", + "summary": "Re-sends a sent voucher to its destination e-mail address.", + "description": "Re-sends the voucher PDF as attachment to the e-mail address. The voucher must have been created by sending it, and its status must be `open`. This can be done by the voucher buyer or by one of their manager (administrator or broker with view vouchers permission).", + "tags": [ + "Vouchers" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] } - } ], - "responses" : { - "200" : { - "description" : "The data for creating a record", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/RecordDataForNew" - } - } + ], + "parameters": [ + { + "name": "key", + "in": "path", + "required": true, + "description": "Either the id or token.", + "schema": { + "type": "string" } + } + ], + "responses": { + "204": { + "description": "The voucher PDF is mailed to the voucher's e-mail address" }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -43582,81 +43979,96 @@ } } }, - "/records/{id}/data-for-edit" : { - "get" : { - "operationId" : "getRecordDataForEdit", - "summary" : "Returns data to edit an existing record", - "description" : "Returns configuration data for editing a record, plus the current `RecordEdit` object that can be altered and sent back", - "tags" : [ "Records" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/id" - } ], - "responses" : { - "200" : { - "description" : "The data for editing a record", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/RecordDataForEdit" + "/vouchers/{key}/resend-pin": { + "post": { + "operationId": "resendPin", + "summary": "Re-sends a the voucher PIN to the client", + "description": "Re-sends the voucher PIN to the client if there is any possible medium (e-mail or mobile phone)", + "tags": [ + "Vouchers" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "name": "key", + "in": "path", + "required": true, + "description": "Either the id or token.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Returns the masked e-mail/mobile phone where the voucher PIN was sent", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -43664,264 +44076,298 @@ } } }, - "/records/{id}" : { - "get" : { - "operationId" : "viewRecord", - "summary" : "Returns details of a specific record", - "description" : "Returns information about a record, located by id", - "tags" : [ "Records" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/id" - } ], - "responses" : { - "200" : { - "description" : "The record data", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/RecordView" - } - } - } + "/vouchers/{key}/cancel": { + "post": { + "operationId": "cancelVoucher", + "summary": "Cancels the voucher", + "description": "Cancels a voucher in status `open`, `expired` or `pending`. If its creation type is `bought` also refund the buyer. This can be done by users with permission to refund over its open or expired vouchers, or by admins with permission to cancel/refund for generated/bought vouchers respectively.", + "tags": [ + "Vouchers" + ], + "security": [ + { + "basic": [] }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } - } - } + { + "session": [] }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" - } - } + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/confirmationPassword" + }, + { + "name": "key", + "in": "path", + "required": true, + "description": "Either the id or token.", + "schema": { + "type": "string" } + } + ], + "responses": { + "204": { + "description": "The voucher was canceled. Nothing is returned." }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "500": { + "description": "If a payment error has occurred", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentError" } } } + } + } + } + }, + "/vouchers/{key}/unblock-pin": { + "post": { + "operationId": "unblockVoucherPin", + "summary": "Unblocks the voucher PIN", + "description": "When redeeming a voucher with PIN, if many invalid attempts are performed, that voucher redeeming will be blocked for 24h. This action allows voucher buyer / owner, or administrators, to manually unblock a voucher's PIN.", + "tags": [ + "Vouchers" + ], + "security": [ + { + "basic": [] }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" - } - } + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "name": "key", + "in": "path", + "required": true, + "description": "Either the id or token.", + "schema": { + "type": "string" } + } + ], + "responses": { + "204": { + "description": "The voucher PIN was unblocked. Nothing is returned." }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "If a payment error has occurred", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentError" } } } } } - }, - "put" : { - "operationId" : "updateRecord", - "summary" : "Updates an existing record", - "description" : "Updates an existing record", - "tags" : [ "Records" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/id" - } ], - "responses" : { - "204" : { - "description" : "The record was updated" + } + }, + "/vouchers/{key}/change-pin": { + "post": { + "operationId": "changeVoucherPin", + "summary": "Changes the pin of a particular voucher.", + "description": "Changes the current pin of a particular voucher. Only if pin is used. The confirmation password parameter must be sent if `VoucherView.requireOldPinForChange` is false and `VoucherView.confirmationPasswordInput` is not null.", + "tags": [ + "Vouchers" + ], + "security": [ + { + "basic": [] }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" - } - } - } + { + "session": [] }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } - } + { + "accessClient": [] + } + ], + "parameters": [ + { + "name": "key", + "in": "path", + "required": true, + "description": "Either the id or token.", + "schema": { + "type": "string" } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + { + "$ref": "#/components/parameters/confirmationPassword" + } + ], + "responses": { + "204": { + "description": "The pin was changed. Nothing is returned." + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } }, - "requestBody" : { - "description" : "The record to be edited", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/RecordEdit" + "requestBody": { + "description": "The parameters for changing the pin", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeVoucherPin" } } } } - }, - "delete" : { - "operationId" : "deleteRecord", - "summary" : "Removes a record", - "description" : "Removes a record", - "tags" : [ "Records" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/id" - } ], - "responses" : { - "204" : { - "description" : "The record was deleted" + } + }, + "/{user}/vouchers/data-for-search": { + "get": { + "operationId": "getUserVouchersDataForSearch", + "summary": "Returns data for searching vouchers owned by a user", + "description": "In versions before 4.15 this could also be used to search for redeemed vouchers. However, as 4.15 has introduced the concept of partial redeems, voucher transactions, etc, it is not correct that a shop can search for full vouchers it has redeemed / top-up, but only to see such transactions. However, as we keep the deprecation window of 2 versions, in 4.17 this operation will no longer be usable for redeemed vouchers. When searching for redeemed transactions, only very basic information of the vouchers will be returned, and the returned amount will be the redeemed amount.", + "tags": [ + "Vouchers" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" + { + "$ref": "#/components/parameters/user" + }, + { + "name": "relation", + "deprecated": true, + "x-remove-version": 4.17, + "in": "query", + "description": "This operation will be only for owned vouchers. For voucher transactions, use `GET /{user}/voucher-transactions/data-for-search` or `GET /{user}/voucher-transactions`.", + "schema": { + "$ref": "#/components/schemas/VoucherRelationEnum" + } + } + ], + "responses": { + "200": { + "description": "The configuration data for searching a user's vouchers", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserVouchersDataForSearch" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -43929,82 +44375,269 @@ } } }, - "/general-records/record-types" : { - "get" : { - "operationId" : "listRecordTypesForGeneralSearch", - "summary" : "Lists the record types for general search", - "description" : "Returns the record types the authenticated user can use to search records in general, that is, without being of a particular user, but any managed user.", - "tags" : [ "Records" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The list of visible record types", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/RecordType" + "/{user}/vouchers": { + "get": { + "operationId": "searchUserVouchers", + "summary": "Searches for vouchers a user owns or has bought.", + "description": "In versions before 4.15 this could also be used to search for redeemed vouchers. However, as 4.15 has introduced the concept of partial redeems, voucher transactions, etc, it is not correct that a shop can search for full vouchers it has redeemed / top-up, but only to see such transactions. However, as we keep the deprecation window of 2 versions, in 4.17 this operation will no longer be usable for redeemed vouchers. When searching for redeemed transactions, only very basic information of the vouchers will be returned, and the returned amount will be the redeemed amount.", + "tags": [ + "Vouchers" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/user" + }, + { + "name": "amountRange", + "in": "query", + "required": false, + "description": "The minimum / maximum voucher amount", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "number" + } + } + }, + { + "name": "creationPeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum voucher creation date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "creationType", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/VoucherCreationTypeEnum" + } + }, + { + "name": "expirationPeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum voucher expiration date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "orderBy", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/VoucherOrderByEnum" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number (zero-based) of the search. The default value is zero.", + "schema": { + "type": "integer" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", + "schema": { + "type": "integer" + } + }, + { + "name": "redeemBy", + "in": "query", + "required": false, + "description": "For redeemed, or starting with 4.15, voucher transactions, use `GET /voucher-transactions` instead.\n\nThe user who perform the transaction action. Only used when searching for redeemed, not bought vouchers. A user identification value, such as id, username, e-mail, phone, etc. Id is always allowed, others depend on Cyclos configuration. Note that a valid numeric value is always considered as id. For example, when using another identification method that can be numeric only, prefix the value with a single quote (like in Excel spreadsheets), for example, `'1234567890`;", + "schema": { + "type": "string" + } + }, + { + "name": "redeemPeriod", + "in": "query", + "required": false, + "description": "For redeemed, or starting with 4.15, voucher transactions, use `GET /voucher-transactions` instead.\n\nThe minimum / maximum voucher transaction date. Only used when searching for redeemed, not bought vouchers. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "relation", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/VoucherRelationEnum" + } + }, + { + "name": "skipTotalCount", + "in": "query", + "required": false, + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", + "schema": { + "type": "boolean" + } + }, + { + "name": "statuses", + "in": "query", + "required": false, + "description": "", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VoucherStatusEnum" + } + } + }, + { + "name": "token", + "in": "query", + "required": false, + "description": "The voucher token (with or without mask)", + "schema": { + "type": "string" + } + }, + { + "name": "types", + "in": "query", + "required": false, + "description": "The ids or internal names of voucher types", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "The list of matching vouchers.", + "headers": { + "X-Total-Count": { + "schema": { + "type": "integer" + }, + "description": "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." + }, + "X-Page-Size": { + "schema": { + "type": "integer" + }, + "description": "The maximum number of results per page" + }, + "X-Current-Page": { + "schema": { + "type": "integer" + }, + "description": "The current page the results are in" + }, + "X-Has-Next-Page": { + "schema": { + "type": "boolean" + }, + "description": "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." + } + }, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VoucherResult" } } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -44012,324 +44645,253 @@ } } }, - "/general-records/{type}/data-for-search" : { - "get" : { - "operationId" : "getRecordDataForGeneralSearch", - "summary" : "Returns data for searching records of a type over any owner", - "description" : "Returns data for searching records of a specific type over any owner. Is not tied to a particular owner (user or system), hence, is considered a general search.", - "tags" : [ "Records" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "type", - "description" : "Either the identifier or internal name of the record type", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "The configuration data for searching records of this type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/GeneralRecordsDataForSearch" - } - } + "/{user}/vouchers/export/{format}": { + "parameters": [ + { + "$ref": "#/components/parameters/format" + } + ], + "get": { + "operationId": "exportUserVouchers", + "summary": "Exports the vouchers search results as file.", + "description": "Generates a file containing the search results. The available export formats are returned in `GET /{user/vouchers/data-for-search`.", + "tags": [ + "Vouchers" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/user" + }, + { + "name": "amountRange", + "in": "query", + "required": false, + "description": "The minimum / maximum voucher amount", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "number" + } + } + }, + { + "name": "creationPeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum voucher creation date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "creationType", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/VoucherCreationTypeEnum" + } + }, + { + "name": "expirationPeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum voucher expiration date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "orderBy", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/VoucherOrderByEnum" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number (zero-based) of the search. The default value is zero.", + "schema": { + "type": "integer" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", + "schema": { + "type": "integer" + } + }, + { + "name": "redeemBy", + "in": "query", + "required": false, + "description": "For redeemed, or starting with 4.15, voucher transactions, use `GET /voucher-transactions` instead.\n\nThe user who perform the transaction action. Only used when searching for redeemed, not bought vouchers. A user identification value, such as id, username, e-mail, phone, etc. Id is always allowed, others depend on Cyclos configuration. Note that a valid numeric value is always considered as id. For example, when using another identification method that can be numeric only, prefix the value with a single quote (like in Excel spreadsheets), for example, `'1234567890`;", + "schema": { + "type": "string" } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } + { + "name": "redeemPeriod", + "in": "query", + "required": false, + "description": "For redeemed, or starting with 4.15, voucher transactions, use `GET /voucher-transactions` instead.\n\nThe minimum / maximum voucher transaction date. Only used when searching for redeemed, not bought vouchers. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" - } - } + { + "name": "relation", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/VoucherRelationEnum" } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" - } - } + { + "name": "skipTotalCount", + "in": "query", + "required": false, + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", + "schema": { + "type": "boolean" } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" - } + { + "name": "statuses", + "in": "query", + "required": false, + "description": "", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VoucherStatusEnum" } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" - } + { + "name": "token", + "in": "query", + "required": false, + "description": "The voucher token (with or without mask)", + "schema": { + "type": "string" + } + }, + { + "name": "types", + "in": "query", + "required": false, + "description": "The ids or internal names of voucher types", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" } } } - } - } - }, - "/general-records/{type}" : { - "get" : { - "operationId" : "searchGeneralRecords", - "summary" : "Searches for records of a specific type over any owner", - "description" : "Returns records matching the search criteria, for a specific type. The custom fields returned on each record depend on the field configuration, which needs to be enabled to return on list. The profile fields available as search filters for records are assigned in the products (or admin group permissions).", - "tags" : [ "Records" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "type", - "description" : "Either the identifier or internal name of the record type", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "brokers", - "in" : "query", - "required" : false, - "description" : "Either the ids or identification methods of record owners' brokers", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "createdBy", - "in" : "query", - "required" : false, - "description" : "Either the id or identifier of the user that created the record", - "schema" : { - "type" : "string" - } - }, { - "name" : "creationPeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum record creation date", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "customFields", - "in" : "query", - "required" : false, - "description" : "Record custom field values used as filters. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by : (colon). For example, `customFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, customFields=field1:valueA|valueB. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `customFields=tradeType:offer|search,extraDate:2000-01-01|2001-12-31` would match results whose custom field with internal name `tradeType` is either `offer` or `search`, and whose `extraDate` is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `customFields=extraDate:|2001-12-31`. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `customFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `customFields=dynamic:'business`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "groups", - "in" : "query", - "required" : false, - "description" : "Either the ids or internal names of record owners' groups", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "keywords", - "in" : "query", - "required" : false, - "description" : "Textual search keywords. Sometimes, like in user search, the fields matched depends on what is configured on the products.", - "schema" : { - "type" : "string" - } - }, { - "name" : "page", - "in" : "query", - "required" : false, - "description" : "The page number (zero-based) of the search. The default value is zero.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "pageSize", - "in" : "query", - "required" : false, - "description" : "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "profileFields", - "in" : "query", - "required" : false, - "description" : "User profile fields, both basic (full name, login name, phone, e-mail, etc) and custom fields, that are used for search. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by `:` (colon). For example, `profileFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, `profileFields=field1:valueA|valueB`. The accepted fields depend on the products the authenticated user has. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `profileFields=rank:bronze|silver,birthDate:2000-01-01|2001-12-31` would match results whose custom field with internal name 'rank' is either bronze or silver, and whose 'birthDate' is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `profileFields=birthDate:|2001-12-31`.\nThe basic profile fields have one of the following identifiers:\n- `name` or `fullName`: Full name; - `username`, `loginName` or `login`: Login name; - `email`: E-mail; - `phone`: Phone; - `accountNumber`, `account`: Account number; - `image`: Image (accepts a boolean value, indicating that either it is required that users either have images or not).\n\nIf address is an allowed profile field for search, specific address fields may be searched. The allowed ones are normally returned as the `addressFieldsInSearch` field in the corresponding result from a data-for-search request. The specific address fields are:\n- `address`: Searches on any address field (not a specific field); - `address.address`: Searches on the fields that represent the street address, which are `addressLine1`, `addressLine2`, `street`, `buildingNumber` and `complement`. Note that normally only a subset of them should be enabled in the configuration (either line 1 / 2 or street + number + complement);\n- `address.zip`: Searches for matching zip (postal) code; - `address.poBox`: Searches for matching postal box; - `address.neighborhood`: Searches by neighborhood; - `address.city`: Searches by city; - `address.region`: Searches by region (or state); - `address.country`: Searches by ISO 3166-1 alpha-2 country code. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `profileFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `profileFields=dynamic:'business`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "skipTotalCount", - "in" : "query", - "required" : false, - "description" : "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "user", - "in" : "query", - "required" : false, - "description" : "Either the id or identifier of the record owner", - "schema" : { - "type" : "string" - } - }, { - "name" : "userStatuses", - "in" : "query", - "required" : false, - "description" : "The possible statuses of the record's owner", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/UserStatusEnum" - } - } - } ], - "responses" : { - "200" : { - "description" : "The configuration data for searching records", - "headers" : { - "X-Total-Count" : { - "schema" : { - "type" : "integer" - }, - "description" : "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." - }, - "X-Page-Size" : { - "schema" : { - "type" : "integer" - }, - "description" : "The maximum number of results per page" - }, - "X-Current-Page" : { - "schema" : { - "type" : "integer" - }, - "description" : "The current page the results are in" - }, - "X-Has-Next-Page" : { - "schema" : { - "type" : "boolean" - }, - "description" : "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." + ], + "responses": { + "200": { + "description": "The file content", + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" + } } - }, - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/RecordWithOwnerResult" - } + } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -44337,209 +44899,98 @@ } } }, - "/general-records/{type}/export/{format}" : { - "parameters" : [ { - "name" : "type", - "description" : "Either the identifier or internal name of the record type", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "$ref" : "#/components/parameters/format" - } ], - "get" : { - "operationId" : "exportGeneralRecords", - "summary" : "Exports the general records search results as file", - "description" : "Generates a file containing the search results. The available export formats are returned in `GET /general-records/{type}/data-for-search`.", - "tags" : [ "Records" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "name" : "brokers", - "in" : "query", - "required" : false, - "description" : "Either the ids or identification methods of record owners' brokers", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "createdBy", - "in" : "query", - "required" : false, - "description" : "Either the id or identifier of the user that created the record", - "schema" : { - "type" : "string" - } - }, { - "name" : "creationPeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum record creation date", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "customFields", - "in" : "query", - "required" : false, - "description" : "Record custom field values used as filters. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by : (colon). For example, `customFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, customFields=field1:valueA|valueB. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `customFields=tradeType:offer|search,extraDate:2000-01-01|2001-12-31` would match results whose custom field with internal name `tradeType` is either `offer` or `search`, and whose `extraDate` is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `customFields=extraDate:|2001-12-31`. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `customFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `customFields=dynamic:'business`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "groups", - "in" : "query", - "required" : false, - "description" : "Either the ids or internal names of record owners' groups", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "keywords", - "in" : "query", - "required" : false, - "description" : "Textual search keywords. Sometimes, like in user search, the fields matched depends on what is configured on the products.", - "schema" : { - "type" : "string" - } - }, { - "name" : "page", - "in" : "query", - "required" : false, - "description" : "The page number (zero-based) of the search. The default value is zero.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "pageSize", - "in" : "query", - "required" : false, - "description" : "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "profileFields", - "in" : "query", - "required" : false, - "description" : "User profile fields, both basic (full name, login name, phone, e-mail, etc) and custom fields, that are used for search. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by `:` (colon). For example, `profileFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, `profileFields=field1:valueA|valueB`. The accepted fields depend on the products the authenticated user has. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `profileFields=rank:bronze|silver,birthDate:2000-01-01|2001-12-31` would match results whose custom field with internal name 'rank' is either bronze or silver, and whose 'birthDate' is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `profileFields=birthDate:|2001-12-31`.\nThe basic profile fields have one of the following identifiers:\n- `name` or `fullName`: Full name; - `username`, `loginName` or `login`: Login name; - `email`: E-mail; - `phone`: Phone; - `accountNumber`, `account`: Account number; - `image`: Image (accepts a boolean value, indicating that either it is required that users either have images or not).\n\nIf address is an allowed profile field for search, specific address fields may be searched. The allowed ones are normally returned as the `addressFieldsInSearch` field in the corresponding result from a data-for-search request. The specific address fields are:\n- `address`: Searches on any address field (not a specific field); - `address.address`: Searches on the fields that represent the street address, which are `addressLine1`, `addressLine2`, `street`, `buildingNumber` and `complement`. Note that normally only a subset of them should be enabled in the configuration (either line 1 / 2 or street + number + complement);\n- `address.zip`: Searches for matching zip (postal) code; - `address.poBox`: Searches for matching postal box; - `address.neighborhood`: Searches by neighborhood; - `address.city`: Searches by city; - `address.region`: Searches by region (or state); - `address.country`: Searches by ISO 3166-1 alpha-2 country code. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `profileFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `profileFields=dynamic:'business`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "skipTotalCount", - "in" : "query", - "required" : false, - "description" : "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "user", - "in" : "query", - "required" : false, - "description" : "Either the id or identifier of the record owner", - "schema" : { - "type" : "string" - } - }, { - "name" : "userStatuses", - "in" : "query", - "required" : false, - "description" : "The possible statuses of the record's owner", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/UserStatusEnum" - } - } - } ], - "responses" : { - "200" : { - "description" : "The file content", - "content" : { - "*/*" : { - "schema" : { - "type" : "string", - "format" : "binary" + "/{user}/vouchers/data-for-buy": { + "get": { + "operationId": "getVoucherDataForBuy", + "summary": "Returns data for buying a voucher of a specified type or the list of types to buy.", + "description": "If a type is passed it returns the data for buying vouchers, otherwise it returns the list of types the atuhenticated user can buy to the given user (or himself).", + "tags": [ + "Vouchers" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/user" + }, + { + "name": "type", + "description": "Either the `id` or `internalName` of the voucher type. Left empty to get the list of available types for buy.", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The data for buying vouchers", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VoucherDataForBuy" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -44547,962 +44998,702 @@ } } }, - "/shared-records/data-for-search" : { - "get" : { - "operationId" : "getRecordDataForSharedSearch", - "summary" : "Returns data for searching records with shared fields", - "description" : "Returns data for searching records from multiple types, using shared fields. Only user records can be shared this way.", - "tags" : [ "Records" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The configuration data for searching records with shared fields", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SharedRecordsDataForSearch" + "/{user}/vouchers/preview-buy": { + "post": { + "operationId": "previewBuyVouchers", + "summary": "Previews the buying of one or more vouchers for the given user.", + "description": "Validates the given fields and returns preview information for buying a voucher.", + "tags": [ + "Vouchers" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/user" + } + ], + "responses": { + "200": { + "description": "The preview result", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VoucherBuyingPreview" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "An error occurred while buying the voucher(s)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BuyVoucherError" } } } } + }, + "requestBody": { + "description": "The buy voucher parameters", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BuyVoucher" + } + } + } } } }, - "/shared-records" : { - "get" : { - "operationId" : "searchSharedRecords", - "summary" : "Searches for records with shared fields", - "description" : "Returns records matching the search criteria, using shared fields. This allows searching over multiple record types that use shared fields. The custom fields returned on each record depend on the field configuration, which needs to be enabled to return on list. The profile fields available as search filters for records are assigned in the products (or admin group permissions).", - "tags" : [ "Records" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "brokers", - "in" : "query", - "required" : false, - "description" : "Either the ids or identification methods of record owners' brokers", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "createdBy", - "in" : "query", - "required" : false, - "description" : "Either the id or identifier of the user that created the record", - "schema" : { - "type" : "string" - } - }, { - "name" : "creationPeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum record creation date", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "customFields", - "in" : "query", - "required" : false, - "description" : "Record custom field values used as filters. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by : (colon). For example, `customFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, customFields=field1:valueA|valueB. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `customFields=tradeType:offer|search,extraDate:2000-01-01|2001-12-31` would match results whose custom field with internal name `tradeType` is either `offer` or `search`, and whose `extraDate` is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `customFields=extraDate:|2001-12-31`. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `customFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `customFields=dynamic:'business`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "groups", - "in" : "query", - "required" : false, - "description" : "Either the ids or internal names of record owners' groups", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "keywords", - "in" : "query", - "required" : false, - "description" : "Textual search keywords. Sometimes, like in user search, the fields matched depends on what is configured on the products.", - "schema" : { - "type" : "string" - } - }, { - "name" : "page", - "in" : "query", - "required" : false, - "description" : "The page number (zero-based) of the search. The default value is zero.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "pageSize", - "in" : "query", - "required" : false, - "description" : "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "profileFields", - "in" : "query", - "required" : false, - "description" : "User profile fields, both basic (full name, login name, phone, e-mail, etc) and custom fields, that are used for search. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by `:` (colon). For example, `profileFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, `profileFields=field1:valueA|valueB`. The accepted fields depend on the products the authenticated user has. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `profileFields=rank:bronze|silver,birthDate:2000-01-01|2001-12-31` would match results whose custom field with internal name 'rank' is either bronze or silver, and whose 'birthDate' is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `profileFields=birthDate:|2001-12-31`.\nThe basic profile fields have one of the following identifiers:\n- `name` or `fullName`: Full name; - `username`, `loginName` or `login`: Login name; - `email`: E-mail; - `phone`: Phone; - `accountNumber`, `account`: Account number; - `image`: Image (accepts a boolean value, indicating that either it is required that users either have images or not).\n\nIf address is an allowed profile field for search, specific address fields may be searched. The allowed ones are normally returned as the `addressFieldsInSearch` field in the corresponding result from a data-for-search request. The specific address fields are:\n- `address`: Searches on any address field (not a specific field); - `address.address`: Searches on the fields that represent the street address, which are `addressLine1`, `addressLine2`, `street`, `buildingNumber` and `complement`. Note that normally only a subset of them should be enabled in the configuration (either line 1 / 2 or street + number + complement);\n- `address.zip`: Searches for matching zip (postal) code; - `address.poBox`: Searches for matching postal box; - `address.neighborhood`: Searches by neighborhood; - `address.city`: Searches by city; - `address.region`: Searches by region (or state); - `address.country`: Searches by ISO 3166-1 alpha-2 country code. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `profileFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `profileFields=dynamic:'business`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "skipTotalCount", - "in" : "query", - "required" : false, - "description" : "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "types", - "in" : "query", - "required" : false, - "description" : "Either the ids or identification methods of record types", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "user", - "in" : "query", - "required" : false, - "description" : "Either the id or identifier of the record owner", - "schema" : { - "type" : "string" - } - }, { - "name" : "userStatuses", - "in" : "query", - "required" : false, - "description" : "The possible statuses of the record's owner", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/UserStatusEnum" - } - } - } ], - "responses" : { - "200" : { - "description" : "The configuration data for searching records", - "headers" : { - "X-Total-Count" : { - "schema" : { - "type" : "integer" - }, - "description" : "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." - }, - "X-Page-Size" : { - "schema" : { - "type" : "integer" - }, - "description" : "The maximum number of results per page" - }, - "X-Current-Page" : { - "schema" : { - "type" : "integer" - }, - "description" : "The current page the results are in" - }, - "X-Has-Next-Page" : { - "schema" : { - "type" : "boolean" - }, - "description" : "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." - } - }, - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/RecordWithOwnerResult" + "/{user}/vouchers/buy": { + "post": { + "operationId": "buyVouchers", + "summary": "Buys one or more vouchers for the given user", + "description": "Buys vouchers. If the payment type has custom fields, the values should be passed as well. This service only returns the vouchers list, if you need information about the voucher status please use /{user}/vouchers/buy-with-status.", + "tags": [ + "Vouchers" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/user" + }, + { + "$ref": "#/components/parameters/confirmationPassword" + } + ], + "responses": { + "200": { + "description": "The identifiers of all generated vouchers", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" } } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "An error occurred while buying the voucher(s)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BuyVoucherError" } } } } - } - } - }, - "/shared-records/export/{format}" : { - "parameters" : [ { - "$ref" : "#/components/parameters/format" - } ], - "get" : { - "operationId" : "exportSharedRecords", - "summary" : "Exports the shared fields records search results as file", - "description" : "Generates a file containing the search results. The available export formats are returned in `GET /transfers/data-for-search`.", - "tags" : [ "Records" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "name" : "brokers", - "in" : "query", - "required" : false, - "description" : "Either the ids or identification methods of record owners' brokers", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "createdBy", - "in" : "query", - "required" : false, - "description" : "Either the id or identifier of the user that created the record", - "schema" : { - "type" : "string" - } - }, { - "name" : "creationPeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum record creation date", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "customFields", - "in" : "query", - "required" : false, - "description" : "Record custom field values used as filters. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by : (colon). For example, `customFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, customFields=field1:valueA|valueB. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `customFields=tradeType:offer|search,extraDate:2000-01-01|2001-12-31` would match results whose custom field with internal name `tradeType` is either `offer` or `search`, and whose `extraDate` is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `customFields=extraDate:|2001-12-31`. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `customFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `customFields=dynamic:'business`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "groups", - "in" : "query", - "required" : false, - "description" : "Either the ids or internal names of record owners' groups", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "keywords", - "in" : "query", - "required" : false, - "description" : "Textual search keywords. Sometimes, like in user search, the fields matched depends on what is configured on the products.", - "schema" : { - "type" : "string" - } - }, { - "name" : "page", - "in" : "query", - "required" : false, - "description" : "The page number (zero-based) of the search. The default value is zero.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "pageSize", - "in" : "query", - "required" : false, - "description" : "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "profileFields", - "in" : "query", - "required" : false, - "description" : "User profile fields, both basic (full name, login name, phone, e-mail, etc) and custom fields, that are used for search. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by `:` (colon). For example, `profileFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, `profileFields=field1:valueA|valueB`. The accepted fields depend on the products the authenticated user has. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `profileFields=rank:bronze|silver,birthDate:2000-01-01|2001-12-31` would match results whose custom field with internal name 'rank' is either bronze or silver, and whose 'birthDate' is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `profileFields=birthDate:|2001-12-31`.\nThe basic profile fields have one of the following identifiers:\n- `name` or `fullName`: Full name; - `username`, `loginName` or `login`: Login name; - `email`: E-mail; - `phone`: Phone; - `accountNumber`, `account`: Account number; - `image`: Image (accepts a boolean value, indicating that either it is required that users either have images or not).\n\nIf address is an allowed profile field for search, specific address fields may be searched. The allowed ones are normally returned as the `addressFieldsInSearch` field in the corresponding result from a data-for-search request. The specific address fields are:\n- `address`: Searches on any address field (not a specific field); - `address.address`: Searches on the fields that represent the street address, which are `addressLine1`, `addressLine2`, `street`, `buildingNumber` and `complement`. Note that normally only a subset of them should be enabled in the configuration (either line 1 / 2 or street + number + complement);\n- `address.zip`: Searches for matching zip (postal) code; - `address.poBox`: Searches for matching postal box; - `address.neighborhood`: Searches by neighborhood; - `address.city`: Searches by city; - `address.region`: Searches by region (or state); - `address.country`: Searches by ISO 3166-1 alpha-2 country code. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `profileFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `profileFields=dynamic:'business`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "skipTotalCount", - "in" : "query", - "required" : false, - "description" : "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "types", - "in" : "query", - "required" : false, - "description" : "Either the ids or identification methods of record types", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "user", - "in" : "query", - "required" : false, - "description" : "Either the id or identifier of the record owner", - "schema" : { - "type" : "string" - } - }, { - "name" : "userStatuses", - "in" : "query", - "required" : false, - "description" : "The possible statuses of the record's owner", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/UserStatusEnum" - } - } - } ], - "responses" : { - "200" : { - "description" : "The file content", - "content" : { - "*/*" : { - "schema" : { - "type" : "string", - "format" : "binary" - } - } - } - }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } - } - } - }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" - } - } - } - }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" - } - } - } - }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" - } - } - } - }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" - } + }, + "requestBody": { + "description": "The buy voucher parameters", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BuyVoucher" } } } } } }, - "/{user}/token-types" : { - "parameters" : [ { - "$ref" : "#/components/parameters/user" - } ], - "get" : { - "operationId" : "listUserTokenTypes", - "summary" : "Returns the permissions over token types of the given user.", - "description" : "Returns the permissions the authenticated user can perform over the tokens of the given user.", - "tags" : [ "Tokens" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The tokens", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TokenPermissions" - } + "/{user}/vouchers/buy-with-status": { + "post": { + "operationId": "buyVouchersWithStatus", + "summary": "Buys one or more vouchers for the given user returning the status.", + "description": "Buys vouchers. If the payment type has custom fields, the values should be passed as well. The status returned in the result is shared by all vouchers.", + "tags": [ + "Vouchers" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/user" + }, + { + "$ref": "#/components/parameters/confirmationPassword" + } + ], + "responses": { + "200": { + "description": "The status of all bougth vouchers and their identifiers.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VoucherBoughtResult" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "An error occurred while buying the voucher(s)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BuyVoucherError" } } } } + }, + "requestBody": { + "description": "The buy voucher parameters", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BuyVoucher" + } + } + } } } }, - "/{user}/tokens/{type}" : { - "parameters" : [ { - "$ref" : "#/components/parameters/user" - }, { - "name" : "type", - "description" : "Either the identifier or internal name of the token type", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "get" : { - "operationId" : "getUserTokens", - "summary" : "Returns the tokens of a type and user", - "description" : "Returns data containing the tokens of a given type and user, along with the tokens themselves. If the authenticated user is the requested user, will only return tokens whose `status` are either `active` or `blocked`.", - "tags" : [ "Tokens" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The tokens matching the search filters", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UserTokensListData" + "/{user}/vouchers/data-for-send": { + "get": { + "operationId": "getVoucherDataForSend", + "summary": "Returns data for sending a voucher by e-mail of a specified type or the list of types to send.", + "description": "If a type is passed it returns the data for sending a voucher, otherwise it returns the list of types the atuhenticated user can buy and send.", + "tags": [ + "Vouchers" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/user" + }, + { + "name": "type", + "description": "Either the `id` or `internalName` of the voucher type. Left empty to get the list of available types for buy.", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The data for sending a voucher", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VoucherDataForBuy" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - }, - "post" : { - "operationId" : "activateToken", - "summary" : "Activates a pending / unassigned token.", - "description" : "If the token status is `unassigned`, the token will be assigned to the given user, and activated. Otherwise, if the token status is `pending`, just activates the token, checking that the user matches. In both cases the token status is set to `active`.", - "tags" : [ "Tokens" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "200" : { - "description" : "Returns the id of the assigned token", - "content" : { - "text/plain" : { - "schema" : { - "type" : "string" - } - } - } + } + }, + "/{user}/vouchers/preview-send": { + "post": { + "operationId": "previewSendVoucher", + "summary": "Previews buingy a voucher and sending it to an e-mail address.", + "description": "Validates the given fields and returns preview information for sending a voucher.", + "tags": [ + "Vouchers" + ], + "security": [ + { + "basic": [] }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/user" + } + ], + "responses": { + "200": { + "description": "Preview result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VoucherSendingPreview" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "An error occurred while buying the voucher(s)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BuyVoucherError" } } } } }, - "requestBody" : { - "description" : "The token value to activate", - "content" : { - "text/plain" : { - "schema" : { - "type" : "string" + "requestBody": { + "description": "The send voucher parameters", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SendVoucher" } } } } } }, - "/tokens/{id}" : { - "parameters" : [ { - "$ref" : "#/components/parameters/id" - } ], - "get" : { - "operationId" : "viewToken", - "summary" : "Returns details of a specific token", - "description" : "Returns information about a token, located by either id or number", - "tags" : [ "Tokens" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The token data", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/TokenView" + "/{user}/vouchers/send": { + "post": { + "operationId": "sendVoucher", + "summary": "Buy a voucher and send it to an e-mail address", + "description": "Similar to buying vouchers, except that the count is always 1 and the voucher is sent to a given e-mail address. A message can be given as well, and will show up in the e-mail", + "tags": [ + "Vouchers" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/user" + }, + { + "$ref": "#/components/parameters/confirmationPassword" + } + ], + "responses": { + "200": { + "description": "The status of the bougth voucher and its identifier.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VoucherBoughtResult" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "An error occurred while buying the voucher(s)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BuyVoucherError" } } } } + }, + "requestBody": { + "description": "The send voucher parameters", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SendVoucher" + } + } + } } } }, - "/tokens/{id}/activate" : { - "parameters" : [ { - "$ref" : "#/components/parameters/id" - } ], - "post" : { - "operationId" : "activatePendingToken", - "summary" : "Activates a token.", - "description" : "Activates a token, which must be assigned to a user managed by the authenticated user. The token status must be `pending`.", - "tags" : [ "Tokens" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "204" : { - "description" : "The token is activated and nothing is returned" + "/{user}/vouchers/data-for-redeem": { + "get": { + "operationId": "getVoucherInitialDataForRedeem", + "summary": "Returns initial data for redeeming vouchers", + "description": "Returns initial data for redeeming vouchers", + "tags": [ + "Vouchers" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + { + "$ref": "#/components/parameters/user" + } + ], + "responses": { + "200": { + "description": "The data for redeeming vouchers", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VoucherInitialDataForTransaction" + } + } + } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -45510,72 +45701,99 @@ } } }, - "/tokens/{id}/block" : { - "parameters" : [ { - "$ref" : "#/components/parameters/id" - } ], - "post" : { - "operationId" : "blockToken", - "summary" : "Blocks a token.", - "description" : "Blocks a token, which remains blocked until being unblocked again. The token status must be `active`.", - "tags" : [ "Tokens" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "204" : { - "description" : "The token is blocked and nothing is returned" + "/{user}/vouchers/{token}/data-for-redeem": { + "get": { + "operationId": "getVoucherDataForRedeem", + "summary": "Returns data for redeeming a voucher by token", + "description": "Data for redeeming a specific voucher", + "tags": [ + "Vouchers" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + { + "$ref": "#/components/parameters/user" + }, + { + "name": "token", + "description": "The voucher token to be redeemed", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The data for redeeming vouchers", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VoucherDataForRedeem" + } + } + } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "An error occurred while retrieving data for redeeming the voucher", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RedeemVoucherError" } } } @@ -45583,303 +45801,315 @@ } } }, - "/tokens/{id}/unblock" : { - "parameters" : [ { - "$ref" : "#/components/parameters/id" - } ], - "post" : { - "operationId" : "unblockToken", - "summary" : "Unlocks a token.", - "description" : "Unlocks a token, returning its status to `active`. The token status must be `blocked`.", - "tags" : [ "Tokens" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "204" : { - "description" : "The token is unblocked and nothing is returned" + "/{user}/vouchers/{token}/preview-redeem": { + "post": { + "operationId": "previewVoucherRedeem", + "summary": "Previews a voucher top-up for the given user.", + "description": "Validates the given fields and returns preview information about a voucher top-up", + "tags": [ + "Vouchers" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/user" + }, + { + "name": "token", + "description": "The voucher token to be redeemed", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Information about the redeem", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VoucherRedeemPreview" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } - } - } - } - }, - "/tokens/{id}/cancel" : { - "parameters" : [ { - "$ref" : "#/components/parameters/id" - } ], - "post" : { - "operationId" : "cancelToken", - "summary" : "Permanently cancels a token.", - "description" : "Permanently cancels a token. The token status must be any but `canceled`.", - "tags" : [ "Tokens" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "204" : { - "description" : "The token is canceled and nothing is returned" }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "500": { + "description": "An error occurred while previewing the voucher redeem.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RedeemVoucherError" } } } - }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" - } + } + }, + "requestBody": { + "description": "Additional redeem data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RedeemVoucher" } } + } + } + } + }, + "/{user}/vouchers/{token}/redeem": { + "post": { + "operationId": "redeemVoucher", + "summary": "Redeems a voucher for the given user", + "description": "Redeems a voucher", + "tags": [ + "Vouchers" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/user" }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + { + "name": "token", + "description": "The voucher token to be redeemed", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "201": { + "description": "The identifiers of the voucher and the generated payment for redeem", + "headers": { + "Location": { + "description": "URL for viewing the redeemed voucher transaction", + "schema": { + "type": "string" } } - } - }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VoucherRedeemResult" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } - } - } - } - }, - "/tokens/{id}/assign/{user}" : { - "parameters" : [ { - "$ref" : "#/components/parameters/id" - }, { - "$ref" : "#/components/parameters/user" - } ], - "post" : { - "operationId" : "assignToken", - "summary" : "Assigns a token to a given user.", - "description" : "Assigns a token to a given user. The token status must be `unassigned`. After assigning, the token status will be `pending`.", - "tags" : [ "Tokens" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "204" : { - "description" : "The token is assigned to the user and nothing is returned" }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "500": { + "description": "An error occurred while redeeming the voucher", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RedeemVoucherError" } } } - }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" - } + } + }, + "requestBody": { + "description": "Additional redeem data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RedeemVoucher" } } } } } }, - "/tokens/{id}/set-expiry-date" : { - "parameters" : [ { - "$ref" : "#/components/parameters/id" - } ], - "post" : { - "operationId" : "setTokenExpiryDate", - "summary" : "Sets the expiry date of a specific token.", - "description" : "Updates the token expiry date. The token status must be either `active`, `blocked` or `expired`.", - "tags" : [ "Tokens" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "name" : "date", - "in" : "query", - "required" : false, - "description" : "The new expiry date. If not specified, the token will never expire.", - "schema" : { - "type" : "string", - "format" : "date-time" + "/{user}/vouchers/data-for-top-up": { + "get": { + "operationId": "getVoucherInitialDataForTopUp", + "summary": "Returns initial data for topping-up vouchers", + "description": "Returns initial data for topping-up vouchers", + "tags": [ + "Vouchers" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/user" } - } ], - "responses" : { - "204" : { - "description" : "The token expiry date is changed and nothing is returned" + ], + "responses": { + "200": { + "description": "The data for redeeming vouchers", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VoucherInitialDataForTransaction" + } + } + } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -45887,82 +46117,99 @@ } } }, - "/tokens/{id}/set-activation-deadline" : { - "parameters" : [ { - "$ref" : "#/components/parameters/id" - } ], - "post" : { - "operationId" : "setTokenActivationDeadline", - "summary" : "Sets the activation deadline date of a specific token.", - "description" : "Updates the token activation deadline date. The token status must be `pending` or `activationExpired`.", - "tags" : [ "Tokens" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "name" : "date", - "in" : "query", - "required" : false, - "description" : "The new activation deadline date. If not specified, there will be no deadline.", - "schema" : { - "type" : "string", - "format" : "date-time" + "/{user}/vouchers/{token}/data-for-top-up": { + "get": { + "operationId": "getVoucherDataForTopUp", + "summary": "Returns data for topping-up a voucher by token", + "description": "Data for topping-up a specific voucher", + "tags": [ + "Vouchers" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/user" + }, + { + "name": "token", + "description": "The voucher token to be topped-up", + "in": "path", + "required": true, + "schema": { + "type": "string" + } } - } ], - "responses" : { - "204" : { - "description" : "The token activation deadline date is changed and nothing is returned" + ], + "responses": { + "200": { + "description": "The data for topping-up the given voucher", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VoucherDataForTopUp" + } + } + } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "An error occurred while retrieving data for topping-up the voucher", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TopUpVoucherError" } } } @@ -45970,601 +46217,535 @@ } } }, - "/tokens/{id}/qr-code" : { - "parameters" : [ { - "$ref" : "#/components/parameters/id" - } ], - "get" : { - "operationId" : "getTokenQrCode", - "summary" : "Returns the QR-code image for the given token only if its physical type is `qrCode`", - "description" : "This request will return the image contents as expected but our api documentation page (or any other usage of an <img> tag), created using swagger-ui, generates a second request to include the image in the page. This new (GET) request won't send the authentication parameters and as this path requires authentication the image will be shown as broken. Optionally, to solve the problem described above and to allow authenticate the user when using sessions, a `sessionToken` or `accessClientToken` query parameter could be specified.", - "tags" : [ "Tokens" ], - "parameters" : [ { - "name" : "size", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/ImageSizeEnum" + "/{user}/vouchers/{token}/preview-top-up": { + "post": { + "operationId": "previewVoucherTopUp", + "summary": "Previews a voucher top-up for the given user.", + "description": "Validates the given fields and returns preview information about a voucher top-up", + "tags": [ + "Vouchers" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/user" + }, + { + "name": "token", + "description": "The voucher token to be topped-up", + "in": "path", + "required": true, + "schema": { + "type": "string" + } } - } ], - "responses" : { - "200" : { - "description" : "The image content", - "content" : { - "image/png" : { - "schema" : { - "type" : "string", - "format" : "binary" + ], + "responses": { + "200": { + "description": "Information about the top-up", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VoucherTopUpPreview" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "An error occurred while previewing the voucher top-up.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TopUpVoucherError" } } } } + }, + "requestBody": { + "description": "Additional top-up data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TopUpVoucher" + } + } + } } } }, - "/tokens/{type}/data-for-new" : { - "parameters" : [ { - "name" : "type", - "description" : "Either the identifier or internal name of the token type", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "get" : { - "operationId" : "getTokenDataForNew", - "summary" : "Returns data to create a new token for the given type.", - "description" : "Returns data to create a new token for the given type.", - "tags" : [ "Tokens" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "user", - "in" : "query", - "required" : false, - "schema" : { - "type" : "string" + "/{user}/vouchers/{token}/top-up": { + "post": { + "operationId": "topUpVoucher", + "summary": "Tops-up a voucher for the given user.", + "description": "If the voucher was still inactive, it is activated.", + "tags": [ + "Vouchers" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/user" + }, + { + "name": "token", + "description": "The voucher token to be topped-up", + "in": "path", + "required": true, + "schema": { + "type": "string" + } }, - "description" : "Either id or identification of the user to have the token initially assigned" - } ], - "responses" : { - "200" : { - "description" : "The data for creating a new token", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/TokenDataForNew" + { + "$ref": "#/components/parameters/confirmationPassword" + } + ], + "responses": { + "201": { + "description": "The identifiers of the voucher and the generated payment for top-up", + "headers": { + "Location": { + "description": "URL for viewing the voucher transaction", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VoucherTransactionResult" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "An error occurred while topping-up the voucher", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TopUpVoucherError" } } } } + }, + "requestBody": { + "description": "Additional top-up data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TopUpVoucher" + } + } + } } } }, - "/tokens/{type}/new" : { - "parameters" : [ { - "name" : "type", - "description" : "Either the identifier or internal name of the token type", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "post" : { - "operationId" : "createToken", - "summary" : "Creates a new token of the given type.", - "description" : "Creates a new token of the given type. If a user is specified, the token will be initially assigned to that user, and the initial status will be `pending`.", - "tags" : [ "Tokens" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "201" : { - "description" : "Returns the identifier of the new record", - "headers" : { - "Location" : { - "description" : "URL for viewing the record details", - "schema" : { - "type" : "string" - } - } - }, - "content" : { - "text/plain" : { - "schema" : { - "type" : "string" - } - } - } + "/{user}/voucher-transactions/data-for-search": { + "get": { + "operationId": "getUserVoucherTransactionsDataForSearch", + "summary": "Returns configuration data for searching for voucher transactions", + "description": "A voucher transaction can be a redeem or a top-up.", + "tags": [ + "Vouchers" + ], + "security": [ + { + "basic": [] }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/user" + } + ], + "responses": { + "200": { + "description": "The configuration data for searching for voucher transactions of a user.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserVoucherTransactionsDataForSearch" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - }, - "requestBody" : { - "description" : "Details of the token to be created", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/TokenNew" - } - } - } } } }, - "/general-tokens/{type}/data-for-search" : { - "parameters" : [ { - "name" : "type", - "description" : "Either the identifier or internal name of the token type", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "get" : { - "operationId" : "getGeneralTokensDataForSearch", - "summary" : "Returns data for searching tokens of a specific type.", - "description" : "Returns data for searching tokens of a specific type, regardless of the user.", - "tags" : [ "Tokens" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The configuration data for searching tokens", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/TokenDataForSearch" - } - } - } - }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } - } - } - }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" - } - } - } - }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" - } - } - } - }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" - } - } - } - }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" - } - } - } - } - } - } - }, - "/general-tokens/{type}" : { - "parameters" : [ { - "name" : "type", - "description" : "Either the identifier or internal name of the token type", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "get" : { - "operationId" : "searchGeneralTokens", - "summary" : "Searches for tokens of a specific type, regardless of the user.", - "description" : "Returns tokens matching the search criteria, for a specific type.", - "tags" : [ "Tokens" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "activationPeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum token activation date.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "brokers", - "in" : "query", - "required" : false, - "description" : "Either id or a principal (login name, e-mail, etc) for brokers", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "expiryPeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum token expiry date.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "groups", - "in" : "query", - "required" : false, - "description" : "Either id or internal names of groups / group sets", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "page", - "in" : "query", - "required" : false, - "description" : "The page number (zero-based) of the search. The default value is zero.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "pageSize", - "in" : "query", - "required" : false, - "description" : "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "skipTotalCount", - "in" : "query", - "required" : false, - "description" : "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "statuses", - "in" : "query", - "required" : false, - "description" : "The desired token statuses", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TokenStatusEnum" - } - } - }, { - "name" : "user", - "in" : "query", - "required" : false, - "description" : "Either id or a principal (login name, e-mail, etc) for the token owner user", - "schema" : { - "type" : "string" - } - }, { - "name" : "value", - "in" : "query", - "required" : false, - "description" : "The token value", - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "The tokens matching the search filters", - "headers" : { - "X-Total-Count" : { - "schema" : { - "type" : "integer" + "/{user}/voucher-transactions": { + "get": { + "operationId": "searchUserVoucherTransactions", + "summary": "Searches for vouchers transactions a user has performed.", + "description": "A voucher transaction can be a redeem or a top-up.", + "tags": [ + "Vouchers" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/user" + }, + { + "name": "amountRange", + "in": "query", + "required": false, + "description": "The minimum / maximum amount. For bought vouchers, is the voucher amount. For redeemed vouchers, is the redeem amount.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "number" + } + } + }, + { + "name": "by", + "in": "query", + "required": false, + "description": "The user who performed the voucher transaction. A user identification value, such as id, username, e-mail, phone, etc. Id is always allowed, others depend on Cyclos configuration. Note that a valid numeric value is always considered as id. For example, when using another identification method that can be numeric only, prefix the value with a single quote (like in Excel spreadsheets), for example, `'1234567890`;", + "schema": { + "type": "string" + } + }, + { + "name": "datePeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum voucher transaction date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "kind", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/VoucherTransactionKind" + } + }, + { + "name": "kinds", + "in": "query", + "required": false, + "description": "The kind of the voucher transaction.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VoucherTransactionKind" + } + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number (zero-based) of the search. The default value is zero.", + "schema": { + "type": "integer" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", + "schema": { + "type": "integer" + } + }, + { + "name": "skipTotalCount", + "in": "query", + "required": false, + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", + "schema": { + "type": "boolean" + } + }, + { + "name": "types", + "in": "query", + "required": false, + "description": "The ids or internal names of voucher types", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "The list of matching voucher transactions.", + "headers": { + "X-Total-Count": { + "schema": { + "type": "integer" }, - "description" : "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." + "description": "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." }, - "X-Page-Size" : { - "schema" : { - "type" : "integer" + "X-Page-Size": { + "schema": { + "type": "integer" }, - "description" : "The maximum number of results per page" + "description": "The maximum number of results per page" }, - "X-Current-Page" : { - "schema" : { - "type" : "integer" + "X-Current-Page": { + "schema": { + "type": "integer" }, - "description" : "The current page the results are in" + "description": "The current page the results are in" }, - "X-Has-Next-Page" : { - "schema" : { - "type" : "boolean" + "X-Has-Next-Page": { + "schema": { + "type": "boolean" }, - "description" : "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." + "description": "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." } }, - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TokenResult" + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VoucherTransactionResult" } } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -46572,84 +46753,90 @@ } } }, - "/{owner}/operations" : { - "get" : { - "operationId" : "listOperationsByOwner", - "summary" : "Lists the custom operations over the system or user", - "description" : "Returns the custom operations the authenticated user can run over the given user or system if the `system` owner is used.", - "tags" : [ "Operations" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/owner" - } ], - "responses" : { - "200" : { - "description" : "The list of custom operations", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Operation" - } + "/voucher-transactions/{id}": { + "get": { + "operationId": "viewVoucherTransaction", + "summary": "Returns details about a voucher transaction", + "description": "Information of a particular voucher transaction", + "tags": [ + "Vouchers" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/id" + } + ], + "responses": { + "200": { + "description": "The voucher transaction", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VoucherTransactionView" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -46657,89 +46844,101 @@ } } }, - "/{owner}/operations/{operation}/data-for-run" : { - "get" : { - "operationId" : "getOwnerOperationDataForRun", - "summary" : "Returns configuration data for running a custom operation over an owner", - "description" : "Returns data to run a specific custom operation over a given user or system if the `system` owner is used. The operation scope must match, being either `system` or `user`.", - "tags" : [ "Operations" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/owner" - }, { - "name" : "operation", - "description" : "Either the id or internal name of the custom operation", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" + "/voucher-transactions/{id}/export/{format}": { + "parameters": [ + { + "$ref": "#/components/parameters/id" + }, + { + "$ref": "#/components/parameters/format" + } + ], + "get": { + "operationId": "exportVoucherTransaction", + "summary": "Exports the given voucher transaction as file.", + "description": "Generates a file containing the voucher transaction details results. The available export formats are returned in `GET /voucher-transactions/{id}`.", + "tags": [ + "Vouchers" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] } - } ], - "responses" : { - "200" : { - "description" : "The data used to run the operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/OperationDataForRun" + ], + "responses": { + "200": { + "description": "The file content", + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -46747,268 +46946,163 @@ } } }, - "/{owner}/operations/{operation}/run" : { - "post" : { - "operationId" : "runOwnerOperation", - "summary" : "Runs a custom operation either for system or user", - "description" : "Runs a specific custom operation over a given user or system if the `system` owner is used. The operation scope must match, being either `system` or `user`. If the operation resulted in a file download (either because the `resultType` is `fileDownload` or is a `resultPage` running for either PDF or CSV) the resulting contente type will be of the file itself. Otherwise will result in an `application/json` with the result object.", - "tags" : [ "Operations" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/owner" - }, { - "name" : "operation", - "description" : "Either the id or internal name of the custom operation", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "The custom operation result, either as `RunOperationResult` or as the file itself", - "headers" : { - "X-Total-Count" : { - "schema" : { - "type" : "integer" - }, - "description" : "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." - }, - "X-Page-Size" : { - "schema" : { - "type" : "integer" - }, - "description" : "The maximum number of results per page" - }, - "X-Current-Page" : { - "schema" : { - "type" : "integer" - }, - "description" : "The current page the results are in" - }, - "X-Has-Next-Page" : { - "schema" : { - "type" : "boolean" - }, - "description" : "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." - } - }, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/RunOperationResult" - } - }, - "*/*" : { - "schema" : { - "type" : "string", - "format" : "binary" + "/voucher-info": { + "get": { + "operationId": "getVoucherInfoData", + "summary": "Returns data for the voucher information page", + "description": "Returns data for the voucher information page", + "tags": [ + "VoucherInfo" + ], + "responses": { + "200": { + "description": "The data for the voucher information page", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DataForVoucherInfo" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - }, - "requestBody" : { - "description" : "The custom operation parameters", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/RunOperation" - } - } - } - } - } - }, - "/{owner}/operations/{operation}/run-upload" : { - "post" : { - "operationId" : "runOwnerOperationWithUpload", - "summary" : "Runs a custom operation either for system or user while uploading a file", - "description" : "Runs a specific custom operation over a given user or system if the `system` owner is used. The operation scope must match, being either `system` or `user`. This path allows uploading a file, by using a `multipart-form-data` post. If the operation resulted in a file download (either because the `resultType` is `fileDownload` or is a `resultPage` running for either PDF or CSV) the resulting contente type will be of the file itself. Otherwise will result in an `application/json` with the result object.", - "tags" : [ "Operations" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/owner" - }, { - "name" : "operation", - "description" : "Either the id or internal name of the custom operation", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "The custom operation result, either as `RunOperationResult` or as the file itself", - "headers" : { - "X-Total-Count" : { - "schema" : { - "type" : "integer" - }, - "description" : "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." - }, - "X-Page-Size" : { - "schema" : { - "type" : "integer" - }, - "description" : "The maximum number of results per page" - }, - "X-Current-Page" : { - "schema" : { - "type" : "integer" - }, - "description" : "The current page the results are in" - }, - "X-Has-Next-Page" : { - "schema" : { - "type" : "boolean" - }, - "description" : "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." - } - }, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/RunOperationResult" - } - }, - "*/*" : { - "schema" : { - "type" : "string", - "format" : "binary" - } - } + } + } + }, + "/voucher-info/{token}": { + "get": { + "operationId": "getVoucherInfo", + "summary": "Returns data for the voucher information page", + "description": "Returns data for the voucher information page", + "tags": [ + "VoucherInfo" + ], + "parameters": [ + { + "name": "token", + "description": "The voucher token", + "in": "path", + "required": true, + "schema": { + "type": "string" } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + { + "name": "pin", + "description": "The voucher pin", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The voucher information", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VoucherInfo" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } - } - }, - "requestBody" : { - "content" : { - "multipart/form-data" : { - "schema" : { - "type" : "object", - "properties" : { - "params" : { - "description" : "The custom operation parameters.", - "allOf" : [ { - "$ref" : "#/components/schemas/RunOperation" - } ] - }, - "file" : { - "type" : "string", - "format" : "binary", - "description" : "The file being uploaded" - } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -47016,80 +47110,147 @@ } } }, - "/operations/{operation}/data-for-run" : { - "get" : { - "operationId" : "getOperationDataForRun", - "summary" : "Returns configuration data for running a custom operation without additional scope", - "description" : "Returns data to run a specific custom operation, which must not have any additional scope to run, such as user, contact, record or advertisement. Hence, this path is suitable for custom operations with scope `system` or `internal`.", - "tags" : [ "Operations" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "operation", - "description" : "Either the id or internal name of the custom operation", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "The data used to run the operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/OperationDataForRun" + "/voucher-info/{token}/transactions": { + "get": { + "operationId": "searchVoucherInfoTransactions", + "summary": "Searches for transactions of a particular voucher in the information page", + "description": "Returns the transactions of the voucher", + "tags": [ + "VoucherInfo" + ], + "parameters": [ + { + "name": "token", + "description": "The voucher token", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pin", + "description": "The voucher pin", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number (zero-based) of the search. The default value is zero.", + "schema": { + "type": "integer" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", + "schema": { + "type": "integer" + } + }, + { + "name": "skipTotalCount", + "in": "query", + "required": false, + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "The list of matching voucher transactions.", + "headers": { + "X-Total-Count": { + "schema": { + "type": "integer" + }, + "description": "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." + }, + "X-Page-Size": { + "schema": { + "type": "integer" + }, + "description": "The maximum number of results per page" + }, + "X-Current-Page": { + "schema": { + "type": "integer" + }, + "description": "The current page the results are in" + }, + "X-Has-Next-Page": { + "schema": { + "type": "boolean" + }, + "description": "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." + } + }, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VoucherTransaction" + } } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -47097,439 +47258,393 @@ } } }, - "/operations/{operation}/run" : { - "post" : { - "operationId" : "runOperation", - "summary" : "Runs a custom operation without additional scope", - "description" : "Runs a specific custom operation without additional scope. Is suitable for operations with scope `system` or `internal`. If the operation resulted in a file download (either because the `resultType` is `fileDownload` or is a `resultPage` running for either PDF or CSV) the resulting contente type will be of the file itself. Otherwise will result in an `application/json` with the result object.", - "tags" : [ "Operations" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "operation", - "description" : "Either the id or internal name of the custom operation", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "The custom operation result, either as `RunOperationResult` or as the file itself", - "headers" : { - "X-Total-Count" : { - "schema" : { - "type" : "integer" - }, - "description" : "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." - }, - "X-Page-Size" : { - "schema" : { - "type" : "integer" - }, - "description" : "The maximum number of results per page" - }, - "X-Current-Page" : { - "schema" : { - "type" : "integer" - }, - "description" : "The current page the results are in" - }, - "X-Has-Next-Page" : { - "schema" : { - "type" : "boolean" - }, - "description" : "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." - } - }, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/RunOperationResult" - } - }, - "*/*" : { - "schema" : { - "type" : "string", - "format" : "binary" + "/voucher-info/{token}/resend-pin": { + "post": { + "operationId": "resendVoucherInfoPin", + "summary": "Re-sends the voucher pin to its e-mail/mobile phone.", + "description": "Re-sends the voucher pin to the associated e-mail address and/or mobile phone. The voucher status must be `open`. In case the voucher doesn't have associated an e-mail nor a mobile phone then this operation ends silently.", + "tags": [ + "VoucherInfo" + ], + "parameters": [ + { + "name": "token", + "description": "The voucher token", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The e-mail address and/or mobile phone where the pin was sent", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } }, - "requestBody" : { - "description" : "The custom operation parameters", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/RunOperation" - } - } - } - } - } - }, - "/operations/{operation}/run-upload" : { - "post" : { - "operationId" : "runOperationWithUpload", - "summary" : "Runs a custom operation without additional scope while uploading a file", - "description" : "Runs a specific custom operation without additional scope. Is suitable for operations with scope `system` or `internal`. This path allows uploading a file, by using a `multipart-form-data` post. If the operation resulted in a file download (either because the `resultType` is `fileDownload` or is a `resultPage` running for either PDF or CSV) the resulting contente type will be of the file itself. Otherwise will result in an `application/json` with the result object.", - "tags" : [ "Operations" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "operation", - "description" : "Either the id or internal name of the custom operation", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "The custom operation result, either as `RunOperationResult` or as the file itself", - "headers" : { - "X-Total-Count" : { - "schema" : { - "type" : "integer" - }, - "description" : "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." - }, - "X-Page-Size" : { - "schema" : { - "type" : "integer" - }, - "description" : "The maximum number of results per page" - }, - "X-Current-Page" : { - "schema" : { - "type" : "integer" - }, - "description" : "The current page the results are in" - }, - "X-Has-Next-Page" : { - "schema" : { - "type" : "boolean" - }, - "description" : "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." + "requestBody": { + "description": "The captcha response is required when requesting a pin resend.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CaptchaResponse" } - }, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/RunOperationResult" - } - }, - "*/*" : { - "schema" : { - "type" : "string", - "format" : "binary" + } + } + } + } + }, + "/voucher-info/{token}/change-pin": { + "post": { + "operationId": "changeVoucherInfoPin", + "summary": "Changes the pin of a particular voucher.", + "description": "Changes the current pin of a particular voucher. Only if pin is used.", + "tags": [ + "VoucherInfo" + ], + "parameters": [ + { + "name": "token", + "description": "The voucher token", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pin", + "description": "The voucher pin", + "in": "header", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "The pin was changed. Nothing is returned." + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } }, - "requestBody" : { - "content" : { - "multipart/form-data" : { - "schema" : { - "type" : "object", - "properties" : { - "params" : { - "description" : "The custom operation parameters.", - "allOf" : [ { - "$ref" : "#/components/schemas/RunOperation" - } ] - }, - "file" : { - "type" : "string", - "format" : "binary", - "description" : "The file being uploaded" - } - } + "requestBody": { + "description": "The parameters for changing the pin", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimpleChangeVoucherPin" } } } } } }, - "/operations/callback/{id}" : { - "post" : { - "operationId" : "runCustomOperationCallback", - "summary" : "Runs the callback of an external redirect custom operation", - "description" : "Custom operations may be configured in Cyclos to be of result type `externalRedirect`. In such case, the regular execution returns an URL to which redirect clients. Once the external page processing is complete, the user is redirected back, so the operation can be completed. This operation should be executed to complete the payment. In order for the external service receive the correct URL, Cyclos need to have a link generation script that handles the link type `EXTERNAL_REDIRECT`.", - "tags" : [ "Operations" ], - "parameters" : [ { - "name" : "id", - "description" : "The external redirect identifier. Received as part of the URL which is generated by Cyclos to the external service to use as callback.", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "token", - "description" : "The security token which is received as part of the URL which is generated by Cyclos to the external service to use as callback.", - "in" : "query", - "required" : false, - "schema" : { - "type" : "string" + "/voucher-info/{token}/notification-settings": { + "post": { + "operationId": "changeVoucherInfoNotificationSettings", + "summary": "Changes the voucher notifications configuration.", + "description": "Changes the voucher notifications configuration (email/mobile phone, enable/disable).", + "tags": [ + "VoucherInfo" + ], + "parameters": [ + { + "name": "token", + "description": "The voucher token", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pin", + "description": "The voucher pin", + "in": "header", + "required": true, + "schema": { + "type": "string" + } } - } ], - "responses" : { - "200" : { - "description" : "The custom operation result, either as `RunOperationResult` or as the file itself", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/RunOperationResult" + ], + "responses": { + "204": { + "description": "The configuration was changed. Nothing is returned" + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } }, - "requestBody" : { - "description" : "Data of the original callback request sent by the external service", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/HttpRequestData" - } - } - } - } - } - }, - "/marketplace/{ad}/operations" : { - "get" : { - "operationId" : "listOperationsByAd", - "summary" : "Lists the custom operations over the given advertisement", - "description" : "Returns the custom operations the authenticated user can run over the given advertisement. All returned operations have the scope `advertisement`.", - "tags" : [ "Operations" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/ad" - } ], - "responses" : { - "200" : { - "description" : "The list of custom operations", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Operation" - } - } + "requestBody": { + "description": "The parameters for changing the configuration", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeVoucherNotificationSettings" } } + } + } + } + }, + "/voucher-info/{token}/unblock": { + "post": { + "operationId": "unblockVoucherInfo", + "summary": "Unblock a voucher.", + "description": "Unblock a blocked voucher.", + "tags": [ + "VoucherInfo" + ], + "parameters": [ + { + "name": "token", + "description": "The voucher token", + "in": "path", + "required": true, + "schema": { + "type": "string" + } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + { + "name": "pin", + "description": "The voucher pin", + "in": "header", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "The voucher was unblocked. Nothing is returned." + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -47537,436 +47652,410 @@ } } }, - "/marketplace/{ad}/operations/{operation}/data-for-run" : { - "get" : { - "operationId" : "getAdOperationDataForRun", - "summary" : "Returns configuration data for running a custom operation over an advertisement", - "description" : "Returns data to run a specific custom operation over an advertisement. The operation scope must be `advertisement`.", - "tags" : [ "Operations" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/ad" - }, { - "name" : "operation", - "description" : "Either the id or internal name of the custom operation", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" + "/voucher-info/{token}/activate-gift": { + "post": { + "operationId": "activateGiftVoucher", + "summary": "Activates a gift voucher with a PIN.", + "description": "Activates a gift voucher with a PIN.", + "tags": [ + "VoucherInfo" + ], + "parameters": [ + { + "name": "token", + "description": "The voucher token", + "in": "path", + "required": true, + "schema": { + "type": "string" + } } - } ], - "responses" : { - "200" : { - "description" : "The data used to run the operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/OperationDataForRun" + ], + "responses": { + "200": { + "description": "The voucher info is returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VoucherInfo" + } + } + } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } + }, + "requestBody": { + "description": "The parameters for changing the pin", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ActivateGiftVoucher" + } + } + } } } }, - "/marketplace/{ad}/operations/{operation}/run" : { - "post" : { - "operationId" : "runAdOperation", - "summary" : "Runs a custom operation over an advertisement", - "description" : "Runs a specific custom operation over a given advertisement. The operation scope must be `advertisement`. If the operation resulted in a file download (either because the `resultType` is `fileDownload` or is a `resultPage` running for either PDF or CSV) the resulting contente type will be of the file itself. Otherwise will result in an `application/json` with the result object.", - "tags" : [ "Operations" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/ad" - }, { - "name" : "operation", - "description" : "Either the id or internal name of the custom operation", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" + "/{user}/tickets/data-for-new": { + "parameters": [ + { + "$ref": "#/components/parameters/user" + } + ], + "get": { + "operationId": "dataForNewTicket", + "summary": "Returns data for create a new ticket for the given user.", + "tags": [ + "Tickets" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "type", + "in": "query", + "required": false, + "description": "The payment type id or qualified internal name (in the form `fromAccountType.paymentType`). If no payment type is provided, the possible types will be returned, so the payer can choose.", + "schema": { + "type": "string" + } + }, + { + "name": "payer", + "in": "query", + "required": false, + "description": "Will only be used if no specific payment type is given. An identification for the user which will pay the ticket. Is optional, and in most cases, should be left empty. If specified, the returned payment types will take into account those that can be paid by the given user.", + "schema": { + "type": "string" + } } - } ], - "responses" : { - "200" : { - "description" : "The custom operation result, either as `RunOperationResult` or as the file itself", - "headers" : { - "X-Total-Count" : { - "schema" : { - "type" : "integer" - }, - "description" : "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." - }, - "X-Page-Size" : { - "schema" : { - "type" : "integer" - }, - "description" : "The maximum number of results per page" - }, - "X-Current-Page" : { - "schema" : { - "type" : "integer" - }, - "description" : "The current page the results are in" - }, - "X-Has-Next-Page" : { - "schema" : { - "type" : "boolean" - }, - "description" : "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." - } - }, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/RunOperationResult" - } - }, - "*/*" : { - "schema" : { - "type" : "string", - "format" : "binary" + ], + "responses": { + "200": { + "description": "The data for creating a ticket", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DataForTransaction" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - }, - "requestBody" : { - "description" : "The custom operation parameters", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/RunOperation" - } - } - } - } - } - }, - "/marketplace/{ad}/operations/{operation}/run-upload" : { - "post" : { - "operationId" : "runAdOperationWithUpload", - "summary" : "Runs a custom operation over an advertisement while uploading a file", - "description" : "Runs a specific custom operation over a given advertisement. The operation scope must be `advertisement`. This path allows uploading a file, by using a `multipart-form-data` post. If the operation resulted in a file download (either because the `resultType` is `fileDownload` or is a `resultPage` running for either PDF or CSV) the resulting contente type will be of the file itself. Otherwise will result in an `application/json` with the result object.", - "tags" : [ "Operations" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/ad" - }, { - "name" : "operation", - "description" : "Either the id or internal name of the custom operation", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "The custom operation result, either as `RunOperationResult` or as the file itself", - "headers" : { - "X-Total-Count" : { - "schema" : { - "type" : "integer" - }, - "description" : "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." - }, - "X-Page-Size" : { - "schema" : { - "type" : "integer" - }, - "description" : "The maximum number of results per page" - }, - "X-Current-Page" : { - "schema" : { - "type" : "integer" - }, - "description" : "The current page the results are in" - }, - "X-Has-Next-Page" : { - "schema" : { - "type" : "boolean" - }, - "description" : "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." + } + } + }, + "/{user}/tickets": { + "parameters": [ + { + "$ref": "#/components/parameters/user" + } + ], + "post": { + "operationId": "newTicket", + "summary": "Creates a new ticket with status `open` for the given user.", + "description": "The given user will be the ticket's owner and then the receiver of the payment generated after processing the ticket only if was previously approved by the payer.", + "tags": [ + "Tickets" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "201": { + "description": "The created ticket", + "headers": { + "Location": { + "description": "URL for viewing the ticket details", + "schema": { + "type": "string" + } } }, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/RunOperationResult" + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TransactionView" } - }, - "*/*" : { - "schema" : { - "type" : "string", - "format" : "binary" + } + } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } }, - "requestBody" : { - "content" : { - "multipart/form-data" : { - "schema" : { - "type" : "object", - "properties" : { - "params" : { - "description" : "The custom operation parameters.", - "allOf" : [ { - "$ref" : "#/components/schemas/RunOperation" - } ] - }, - "file" : { - "type" : "string", - "format" : "binary", - "description" : "The file being uploaded" - } - } + "requestBody": { + "description": "The data to create the new ticket", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TicketNew" } } } } } }, - "/records/{id}/operations" : { - "get" : { - "operationId" : "listOperationsByRecord", - "summary" : "Lists the custom operations over the given record", - "description" : "Returns the custom operations the authenticated user can run over the given record. All returned operations have the scope `record`.", - "tags" : [ "Operations" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/id" - } ], - "responses" : { - "200" : { - "description" : "The list of custom operations", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Operation" - } + "/tickets/{ticket}": { + "get": { + "operationId": "viewTicket", + "summary": "Returns details about a ticket by ticket number", + "description": "Returns details about a ticket by ticket number.", + "tags": [ + "Tickets" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "ticket", + "in": "path", + "required": true, + "description": "The ticket number", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Transaction details", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TransactionView" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -47974,89 +48063,91 @@ } } }, - "/records/{id}/operations/{operation}/data-for-run" : { - "get" : { - "operationId" : "getRecordOperationDataForRun", - "summary" : "Returns configuration data for running a custom operation over a record", - "description" : "Returns data to run a specific custom operation over a record. The operation scope must be `record`.", - "tags" : [ "Operations" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/id" - }, { - "name" : "operation", - "description" : "Either the id or internal name of the custom operation", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" + "/tickets/{ticket}/qr-code": { + "get": { + "operationId": "getTicketQrCode", + "summary": "Returns the QR-code image for the given ticket only if its status is `open`", + "description": "This request will return the image contents as expected but our api documentation page (or any other usage of an <img> tag), created using swagger-ui, generates a second request to include the image in the page. This new (GET) request won't send the authentication parameters and as this path requires authentication the image will be shown as broken. Optionally, to solve the problem described above and to allow authenticate the user when using sessions, a `sessionToken` or `accessClientToken` query parameter could be specified.", + "tags": [ + "Tickets" + ], + "parameters": [ + { + "name": "ticket", + "description": "The ticket number.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "size", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/ImageSizeEnum" + } } - } ], - "responses" : { - "200" : { - "description" : "The data used to run the operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/OperationDataForRun" + ], + "responses": { + "200": { + "description": "The image content", + "content": { + "image/png": { + "schema": { + "type": "string", + "format": "binary" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -48064,261 +48155,193 @@ } } }, - "/records/{id}/operations/{operation}/run" : { - "post" : { - "operationId" : "runRecordOperation", - "summary" : "Runs a custom operation over a record", - "description" : "Runs a specific custom operation over a given record. The operation scope must be `record`. If the operation resulted in a file download (either because the `resultType` is `fileDownload` or is a `resultPage` running for either PDF or CSV) the resulting contente type will be of the file itself. Otherwise will result in an `application/json` with the result object.", - "tags" : [ "Operations" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/id" - }, { - "name" : "operation", - "description" : "Either the id or internal name of the custom operation", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" + "/tickets/{ticket}/preview": { + "post": { + "operationId": "previewTicket", + "summary": "Previews the payment generated by the ticket.", + "description": "Previews the payment that will be generated if the ticket is approved by a user (i.e the payer). The ticket status must be`open`. The actual balance checking is not performed in the preview.", + "tags": [ + "Tickets" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] } - } ], - "responses" : { - "200" : { - "description" : "The custom operation result, either as `RunOperationResult` or as the file itself", - "headers" : { - "X-Total-Count" : { - "schema" : { - "type" : "integer" - }, - "description" : "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." - }, - "X-Page-Size" : { - "schema" : { - "type" : "integer" - }, - "description" : "The maximum number of results per page" - }, - "X-Current-Page" : { - "schema" : { - "type" : "integer" - }, - "description" : "The current page the results are in" - }, - "X-Has-Next-Page" : { - "schema" : { - "type" : "boolean" - }, - "description" : "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." - } - }, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/RunOperationResult" - } - }, - "*/*" : { - "schema" : { - "type" : "string", - "format" : "binary" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "ticket", + "description": "The ticket number", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The approval preview", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TicketPreview" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } - } - }, - "requestBody" : { - "description" : "The custom operation parameters", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/RunOperation" - } - } - } - } - } - }, - "/records/{id}/operations/{operation}/run-upload" : { - "post" : { - "operationId" : "runRecordOperationWithUpload", - "summary" : "Runs a custom operation over a record while uploading a file", - "description" : "Runs a specific custom operation over a given record. The operation scope must be `record`. This path allows uploading a file, by using a `multipart-form-data` post. If the operation resulted in a file download (either because the `resultType` is `fileDownload` or is a `resultPage` running for either PDF or CSV) the resulting contente type will be of the file itself. Otherwise will result in an `application/json` with the result object.", - "tags" : [ "Operations" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/id" - }, { - "name" : "operation", - "description" : "Either the id or internal name of the custom operation", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "The custom operation result, either as `RunOperationResult` or as the file itself", - "headers" : { - "X-Total-Count" : { - "schema" : { - "type" : "integer" - }, - "description" : "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." - }, - "X-Page-Size" : { - "schema" : { - "type" : "integer" - }, - "description" : "The maximum number of results per page" - }, - "X-Current-Page" : { - "schema" : { - "type" : "integer" - }, - "description" : "The current page the results are in" - }, - "X-Has-Next-Page" : { - "schema" : { - "type" : "boolean" - }, - "description" : "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." - } - }, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/RunOperationResult" - } - }, - "*/*" : { - "schema" : { - "type" : "string", - "format" : "binary" + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } + } + } + } + }, + "/tickets/{ticket}/cancel": { + "post": { + "operationId": "cancelTicket", + "summary": "Cancels a ticket by the receiver.", + "description": "Cancels a ticket by the receiver before being approved by the payer. The logged user must be the ticket's owner.", + "tags": [ + "Tickets" + ], + "security": [ + { + "basic": [] }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } - } + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "name": "ticket", + "description": "The ticket number", + "in": "path", + "required": true, + "schema": { + "type": "string" } + } + ], + "responses": { + "204": { + "description": "The ticket was canceled. Nothing is returned." }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } - } - }, - "requestBody" : { - "content" : { - "multipart/form-data" : { - "schema" : { - "type" : "object", - "properties" : { - "params" : { - "description" : "The custom operation parameters.", - "allOf" : [ { - "$ref" : "#/components/schemas/RunOperation" - } ] - }, - "file" : { - "type" : "string", - "format" : "binary", - "description" : "The file being uploaded" - } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -48326,90 +48349,133 @@ } } }, - "/transfers/{key}/operations" : { - "get" : { - "operationId" : "listOperationsByTransfer", - "summary" : "Lists the custom operations over the given transfer", - "description" : "Returns the custom operations the authenticated user can run over the given transfer. All returned operations have the scope `transfer`.", - "tags" : [ "Operations" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "key", - "in" : "path", - "required" : true, - "description" : "Either the id or transaction number", - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "The list of custom operations", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Operation" - } + "/tickets/{ticket}/approve": { + "post": { + "operationId": "approveTicket", + "summary": "Approves a ticket by the payer.", + "description": "After a successful approval, a new direct payment from the logged user (i.e the payer) to the user who created the ticket will be generated ONLY if the ticket doesn't have a defined `successUrl` nor `successWebhook`, in that case the ticket goes to `processed` status. Otherwise the ticket just goes to the `approved` status and the corresponding payment will be generated only after the ticket is processed by the receiver.", + "tags": [ + "Tickets" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/confirmationPassword" + }, + { + "name": "ticket", + "description": "The ticket number", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The approval result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TicketApprovalResult" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "500": { + "description": "If a payment error has occurred", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentError" } } } + } + } + } + }, + "/tickets/{ticket}/process": { + "post": { + "operationId": "processTicket", + "summary": "Processes a ticket by the receiver.", + "description": "Processes an already approved ticket generating a new direct payment from the user who approve the ticket to the logged user (i.e the ticket's creator). A ticket can be processed only if its status is `approved` and the `orderId` (if any) matches the one given at ticket creation. After successfully processing it goes to the final status: `processed`.", + "tags": [ + "Tickets" + ], + "security": [ + { + "basic": [] }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" - } - } + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "ticket", + "description": "The ticket number", + "in": "path", + "required": true, + "schema": { + "type": "string" } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + { + "name": "orderId", + "description": "The order id given at ticket creation. Must be specified only if an `orderId` was given when the ticket was created.", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The process result", + "headers": { + "Location": { + "description": "URL for viewing the payment details", + "schema": { + "type": "string" } } - } - }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TicketProcessResult" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "If a payment error has occurred", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentError" } } } @@ -48417,95 +48483,96 @@ } } }, - "/transfer/{key}/operations/{operation}/data-for-run" : { - "get" : { - "operationId" : "getTransferOperationDataForRun", - "summary" : "Returns configuration data for running a custom operation over a transfer", - "description" : "Returns data to run a specific custom operation over a transfer. The operation scope must be `transfer`.", - "tags" : [ "Operations" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "key", - "in" : "path", - "required" : true, - "description" : "Either the id or transaction number", - "schema" : { - "type" : "string" - } - }, { - "name" : "operation", - "description" : "Either the id or internal name of the custom operation", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" + "/tickets/data-for-new": { + "get": { + "operationId": "dataForNewTicketDeprecated", + "summary": "Returns data for create a new ticket for the logged user.", + "description": "Use `GET /{user}/tickets/data-for-new` instead", + "tags": [ + "Tickets" + ], + "deprecated": true, + "x-remove-version": 4.17, + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "type", + "in": "query", + "required": false, + "description": "The payment type id or qualified internal name (in the form `fromAccountType.paymentType`). If no payment type is provided, the possible types will be returned, so the payer can choose.", + "schema": { + "type": "string" + } + }, + { + "name": "payer", + "in": "query", + "required": false, + "description": "Will only be used if no specific payment type is given. An identification for the user which will pay the ticket. Is optional, and in most cases, should be left empty. If specified, the returned payment types will take into account those that can be paid by the given user.", + "schema": { + "type": "string" + } } - } ], - "responses" : { - "200" : { - "description" : "The data used to run the operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/OperationDataForRun" + ], + "responses": { + "200": { + "description": "The data for creating a ticket", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DataForTransaction" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -48513,273 +48580,212 @@ } } }, - "/transfers/{key}/operations/{operation}/run" : { - "post" : { - "operationId" : "runTransferOperation", - "summary" : "Runs a custom operation over a transfer", - "description" : "Runs a specific custom operation over a given transfer. The operation scope must be `transfer`. If the operation resulted in a file download (either because the `resultType` is `fileDownload` or is a `resultPage` running for either PDF or CSV) the resulting contente type will be of the file itself. Otherwise will result in an `application/json` with the result object.", - "tags" : [ "Operations" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "key", - "in" : "path", - "required" : true, - "description" : "Either the id or transaction number", - "schema" : { - "type" : "string" + "/tickets": { + "post": { + "operationId": "newTicketDeprecated", + "summary": "Creates a new ticket with status `open` for the logged user.", + "description": "Use `POST /{user}/tickets` instead.\n\n\nThe logged user will be the ticket's owner and then the receiver of the payment generated after processing the ticket only if was previously approved by the payer.", + "tags": [ + "Tickets" + ], + "deprecated": true, + "x-remove-version": 4.17, + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] } - }, { - "name" : "operation", - "description" : "Either the id or internal name of the custom operation", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" } - } ], - "responses" : { - "200" : { - "description" : "The custom operation result, either as `RunOperationResult` or as the file itself", - "headers" : { - "X-Total-Count" : { - "schema" : { - "type" : "integer" - }, - "description" : "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." - }, - "X-Page-Size" : { - "schema" : { - "type" : "integer" - }, - "description" : "The maximum number of results per page" - }, - "X-Current-Page" : { - "schema" : { - "type" : "integer" - }, - "description" : "The current page the results are in" - }, - "X-Has-Next-Page" : { - "schema" : { - "type" : "boolean" - }, - "description" : "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." + ], + "responses": { + "201": { + "description": "The created ticket", + "headers": { + "Location": { + "description": "URL for viewing the ticket details", + "schema": { + "type": "string" + } } }, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/RunOperationResult" + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TransactionView" } - }, - "*/*" : { - "schema" : { - "type" : "string", - "format" : "binary" + } + } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } }, - "requestBody" : { - "description" : "The custom operation parameters", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/RunOperation" - } - } - } - } - } - }, - "/transfers/{key}/operations/{operation}/run-upload" : { - "post" : { - "operationId" : "runTransferOperationWithUpload", - "summary" : "Runs a custom operation over a transfer while uploading a file", - "description" : "Runs a specific custom operation over a given transfer. The operation scope must be `transfer`. This path allows uploading a file, by using a `multipart-form-data` post. If the operation resulted in a file download (either because the `resultType` is `fileDownload` or is a `resultPage` running for either PDF or CSV) the resulting contente type will be of the file itself. Otherwise will result in an `application/json` with the result object.", - "tags" : [ "Operations" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "key", - "in" : "path", - "required" : true, - "description" : "Either the id or transaction number", - "schema" : { - "type" : "string" - } - }, { - "name" : "operation", - "description" : "Either the id or internal name of the custom operation", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "The custom operation result, either as `RunOperationResult` or as the file itself", - "headers" : { - "X-Total-Count" : { - "schema" : { - "type" : "integer" - }, - "description" : "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." - }, - "X-Page-Size" : { - "schema" : { - "type" : "integer" - }, - "description" : "The maximum number of results per page" - }, - "X-Current-Page" : { - "schema" : { - "type" : "integer" - }, - "description" : "The current page the results are in" - }, - "X-Has-Next-Page" : { - "schema" : { - "type" : "boolean" - }, - "description" : "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." - } - }, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/RunOperationResult" - } - }, - "*/*" : { - "schema" : { - "type" : "string", - "format" : "binary" - } + "requestBody": { + "description": "The data to create the new ticket", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TicketNew" } } - }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + } + } + } + }, + "/{owner}/record-types": { + "get": { + "operationId": "listRecordTypesByOwner", + "summary": "Lists the record types over a user or system", + "description": "Returns the record types the authenticated user can view over the given user or system if the `system` owner is used.", + "tags": [ + "Records" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/owner" + } + ], + "responses": { + "200": { + "description": "The list of visible record types", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OwnerRecordData" + } } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } - } - }, - "requestBody" : { - "content" : { - "multipart/form-data" : { - "schema" : { - "type" : "object", - "properties" : { - "params" : { - "description" : "The custom operation parameters.", - "allOf" : [ { - "$ref" : "#/components/schemas/RunOperation" - } ] - }, - "file" : { - "type" : "string", - "format" : "binary", - "description" : "The file being uploaded" - } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -48787,84 +48793,99 @@ } } }, - "/contact-list/{id}/operations" : { - "get" : { - "operationId" : "listOperationsByContact", - "summary" : "Lists the custom operations over the given contact", - "description" : "Returns the custom operations the authenticated user can run over the given contact. All returned operations have the scope `contact`.", - "tags" : [ "Operations" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/id" - } ], - "responses" : { - "200" : { - "description" : "The list of custom operations", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Operation" - } + "/{owner}/record-types/{type}": { + "get": { + "operationId": "getRecordTypeByOwner", + "summary": "Returns a single record type over a user or system", + "description": "Returns the a specific record type the authenticated user can view over the given user or system if the `system` owner is used.", + "tags": [ + "Records" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/owner" + }, + { + "name": "type", + "description": "Either the identifier or internal name of the record type", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The record type details", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OwnerRecordData" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -48872,89 +48893,99 @@ } } }, - "/contact-list/{id}/operations/{operation}/data-for-run" : { - "get" : { - "operationId" : "getContactOperationDataForRun", - "summary" : "Returns configuration data for running a custom operation over a contact", - "description" : "Returns data to run a specific custom operation over a contact. The operation scope must be `contact`.", - "tags" : [ "Operations" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/id" - }, { - "name" : "operation", - "description" : "Either the id or internal name of the custom operation", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" + "/{owner}/records/{type}/data-for-search": { + "get": { + "operationId": "getRecordDataForOwnerSearch", + "summary": "Returns data for searching records of a specific type and owner", + "description": "Returns data for searching records of a specific type, either for system or user records, depending on the `owner` parameter.", + "tags": [ + "Records" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/owner" + }, + { + "name": "type", + "description": "Either the identifier or internal name of the record type", + "in": "path", + "required": true, + "schema": { + "type": "string" + } } - } ], - "responses" : { - "200" : { - "description" : "The data used to run the operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/OperationDataForRun" + ], + "responses": { + "200": { + "description": "The configuration data for searching records", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecordDataForSearch" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -48962,346 +48993,517 @@ } } }, - "/contact-list/{id}/operations/{operation}/run" : { - "post" : { - "operationId" : "runContactOperation", - "summary" : "Runs a custom operation over a contact", - "description" : "Runs a specific custom operation over a given contact. The operation scope must be `contact`. If the operation resulted in a file download (either because the `resultType` is `fileDownload` or is a `resultPage` running for either PDF or CSV) the resulting contente type will be of the file itself. Otherwise will result in an `application/json` with the result object.", - "tags" : [ "Operations" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/id" - }, { - "name" : "operation", - "description" : "Either the id or internal name of the custom operation", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "The custom operation result, either as `RunOperationResult` or as the file itself", - "headers" : { - "X-Total-Count" : { - "schema" : { - "type" : "integer" + "/{owner}/records/{type}": { + "get": { + "operationId": "searchOwnerRecords", + "summary": "Searches for records of a specific type and owner", + "description": "Returns records matching the search criteria, for a specific type, either for system or user records, depending on the `owner` parameter. The custom fields returned on each record depend on the field configuration, which needs to be enabled to return on list. The profile fields available as search filters for records are assigned in the products (or admin group permissions).", + "tags": [ + "Records" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/owner" + }, + { + "name": "type", + "description": "Either the identifier or internal name of the record type", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "createdBy", + "in": "query", + "required": false, + "description": "Either the id or identifier of the user that created the record", + "schema": { + "type": "string" + } + }, + { + "name": "creationPeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum record creation date", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "customFields", + "in": "query", + "required": false, + "description": "Record custom field values used as filters. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by : (colon). For example, `customFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, customFields=field1:valueA|valueB. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `customFields=tradeType:offer|search,extraDate:2000-01-01|2001-12-31` would match results whose custom field with internal name `tradeType` is either `offer` or `search`, and whose `extraDate` is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `customFields=extraDate:|2001-12-31`. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `customFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `customFields=dynamic:'business`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "keywords", + "in": "query", + "required": false, + "description": "Textual search keywords. Sometimes, like in user search, the fields matched depends on what is configured on the products.", + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number (zero-based) of the search. The default value is zero.", + "schema": { + "type": "integer" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", + "schema": { + "type": "integer" + } + }, + { + "name": "profileFields", + "in": "query", + "required": false, + "description": "User profile fields, both basic (full name, login name, phone, e-mail, etc) and custom fields, that are used for search. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by `:` (colon). For example, `profileFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, `profileFields=field1:valueA|valueB`. The accepted fields depend on the products the authenticated user has. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `profileFields=rank:bronze|silver,birthDate:2000-01-01|2001-12-31` would match results whose custom field with internal name 'rank' is either bronze or silver, and whose 'birthDate' is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `profileFields=birthDate:|2001-12-31`.\nThe basic profile fields have one of the following identifiers:\n- `name` or `fullName`: Full name; - `username`, `loginName` or `login`: Login name; - `email`: E-mail; - `phone`: Phone; - `accountNumber`, `account`: Account number; - `image`: Image (accepts a boolean value, indicating that either it is required that users either have images or not).\n\nIf address is an allowed profile field for search, specific address fields may be searched. The allowed ones are normally returned as the `addressFieldsInSearch` field in the corresponding result from a data-for-search request. The specific address fields are:\n- `address`: Searches on any address field (not a specific field); - `address.address`: Searches on the fields that represent the street address, which are `addressLine1`, `addressLine2`, `street`, `buildingNumber` and `complement`. Note that normally only a subset of them should be enabled in the configuration (either line 1 / 2 or street + number + complement);\n- `address.zip`: Searches for matching zip (postal) code; - `address.poBox`: Searches for matching postal box; - `address.neighborhood`: Searches by neighborhood; - `address.city`: Searches by city; - `address.region`: Searches by region (or state); - `address.country`: Searches by ISO 3166-1 alpha-2 country code. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `profileFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `profileFields=dynamic:'business`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "skipTotalCount", + "in": "query", + "required": false, + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "The records matching the search filters.", + "headers": { + "X-Total-Count": { + "schema": { + "type": "integer" }, - "description" : "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." + "description": "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." }, - "X-Page-Size" : { - "schema" : { - "type" : "integer" + "X-Page-Size": { + "schema": { + "type": "integer" }, - "description" : "The maximum number of results per page" + "description": "The maximum number of results per page" }, - "X-Current-Page" : { - "schema" : { - "type" : "integer" + "X-Current-Page": { + "schema": { + "type": "integer" }, - "description" : "The current page the results are in" + "description": "The current page the results are in" }, - "X-Has-Next-Page" : { - "schema" : { - "type" : "boolean" + "X-Has-Next-Page": { + "schema": { + "type": "boolean" }, - "description" : "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." + "description": "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." } }, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/RunOperationResult" - } - }, - "*/*" : { - "schema" : { - "type" : "string", - "format" : "binary" + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RecordResult" + } } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - }, - "requestBody" : { - "description" : "The custom operation parameters", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/RunOperation" - } - } - } - } - } - }, - "/contact-list/{id}/operations/{operation}/run-upload" : { - "post" : { - "operationId" : "runContactOperationWithUpload", - "summary" : "Runs a custom operation over an contact while uploading a file", - "description" : "Runs a specific custom operation over a given contact. The operation scope must be `contact`. This path allows uploading a file, by using a `multipart-form-data` post. If the operation resulted in a file download (either because the `resultType` is `fileDownload` or is a `resultPage` running for either PDF or CSV) the resulting contente type will be of the file itself. Otherwise will result in an `application/json` with the result object.", - "tags" : [ "Operations" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/id" - }, { - "name" : "operation", - "description" : "Either the id or internal name of the custom operation", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "The custom operation result, either as `RunOperationResult` or as the file itself", - "headers" : { - "X-Total-Count" : { - "schema" : { - "type" : "integer" - }, - "description" : "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." - }, - "X-Page-Size" : { - "schema" : { - "type" : "integer" - }, - "description" : "The maximum number of results per page" - }, - "X-Current-Page" : { - "schema" : { - "type" : "integer" - }, - "description" : "The current page the results are in" - }, - "X-Has-Next-Page" : { - "schema" : { - "type" : "boolean" - }, - "description" : "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." + } + }, + "post": { + "operationId": "createRecord", + "summary": "Creates a new record for the given owner and type", + "description": "Creates a new record for the given owner and type. If the owner is `system` will be a system record. Otherwise will be a user record.", + "tags": [ + "Records" + ], + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "name": "type", + "description": "Either the identifier or internal name of the record type", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "$ref": "#/components/parameters/confirmationPassword" + } + ], + "responses": { + "201": { + "description": "Returns the identifier of the new record", + "headers": { + "Location": { + "description": "URL for viewing the record details", + "schema": { + "type": "string" + } } }, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/RunOperationResult" + "content": { + "text/plain": { + "schema": { + "type": "string" } - }, - "*/*" : { - "schema" : { - "type" : "string", - "format" : "binary" + } + } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } }, - "requestBody" : { - "content" : { - "multipart/form-data" : { - "schema" : { - "type" : "object", - "properties" : { - "params" : { - "description" : "The custom operation parameters.", - "allOf" : [ { - "$ref" : "#/components/schemas/RunOperation" - } ] - }, - "file" : { - "type" : "string", - "format" : "binary", - "description" : "The file being uploaded" - } - } + "requestBody": { + "description": "The record to be created", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecordNew" } } } } } }, - "/contact-infos/{id}/operations" : { - "get" : { - "operationId" : "listOperationsByContactInfo", - "summary" : "Lists the custom operations over the given additional contact information", - "description" : "Returns the custom operations the authenticated user can run over the given additional contact iformation. All returned operations have the scope `contactInfo`.", - "tags" : [ "Operations" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/id" - } ], - "responses" : { - "200" : { - "description" : "The list of custom operations", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Operation" - } + "/{owner}/records/{type}/export/{format}": { + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "name": "type", + "description": "Either the identifier or internal name of the record type", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "$ref": "#/components/parameters/format" + } + ], + "get": { + "operationId": "exportOwnerRecords", + "summary": "Exports the records search results as file", + "description": "Generates a file containing the search results. The available export formats are returned in `GET /{owner}/records/{type}/data-for-search`.", + "tags": [ + "Records" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "name": "createdBy", + "in": "query", + "required": false, + "description": "Either the id or identifier of the user that created the record", + "schema": { + "type": "string" + } + }, + { + "name": "creationPeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum record creation date", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "customFields", + "in": "query", + "required": false, + "description": "Record custom field values used as filters. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by : (colon). For example, `customFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, customFields=field1:valueA|valueB. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `customFields=tradeType:offer|search,extraDate:2000-01-01|2001-12-31` would match results whose custom field with internal name `tradeType` is either `offer` or `search`, and whose `extraDate` is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `customFields=extraDate:|2001-12-31`. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `customFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `customFields=dynamic:'business`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "keywords", + "in": "query", + "required": false, + "description": "Textual search keywords. Sometimes, like in user search, the fields matched depends on what is configured on the products.", + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number (zero-based) of the search. The default value is zero.", + "schema": { + "type": "integer" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", + "schema": { + "type": "integer" + } + }, + { + "name": "profileFields", + "in": "query", + "required": false, + "description": "User profile fields, both basic (full name, login name, phone, e-mail, etc) and custom fields, that are used for search. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by `:` (colon). For example, `profileFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, `profileFields=field1:valueA|valueB`. The accepted fields depend on the products the authenticated user has. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `profileFields=rank:bronze|silver,birthDate:2000-01-01|2001-12-31` would match results whose custom field with internal name 'rank' is either bronze or silver, and whose 'birthDate' is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `profileFields=birthDate:|2001-12-31`.\nThe basic profile fields have one of the following identifiers:\n- `name` or `fullName`: Full name; - `username`, `loginName` or `login`: Login name; - `email`: E-mail; - `phone`: Phone; - `accountNumber`, `account`: Account number; - `image`: Image (accepts a boolean value, indicating that either it is required that users either have images or not).\n\nIf address is an allowed profile field for search, specific address fields may be searched. The allowed ones are normally returned as the `addressFieldsInSearch` field in the corresponding result from a data-for-search request. The specific address fields are:\n- `address`: Searches on any address field (not a specific field); - `address.address`: Searches on the fields that represent the street address, which are `addressLine1`, `addressLine2`, `street`, `buildingNumber` and `complement`. Note that normally only a subset of them should be enabled in the configuration (either line 1 / 2 or street + number + complement);\n- `address.zip`: Searches for matching zip (postal) code; - `address.poBox`: Searches for matching postal box; - `address.neighborhood`: Searches by neighborhood; - `address.city`: Searches by city; - `address.region`: Searches by region (or state); - `address.country`: Searches by ISO 3166-1 alpha-2 country code. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `profileFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `profileFields=dynamic:'business`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "skipTotalCount", + "in": "query", + "required": false, + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "The file content", + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -49309,89 +49511,99 @@ } } }, - "/contact-infos/{id}/operations/{operation}/data-for-run" : { - "get" : { - "operationId" : "getContactInfoOperationDataForRun", - "summary" : "Returns configuration data for running a custom operation over an additional contact information", - "description" : "Returns data to run a specific custom operation over an additional contact information. The operation scope must be `contactInfo`.", - "tags" : [ "Operations" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/id" - }, { - "name" : "operation", - "description" : "Either the id or internal name of the custom operation", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" + "/{owner}/records/{type}/data-for-new": { + "get": { + "operationId": "getRecordDataForNew", + "summary": "Returns data to create a new record", + "description": "Returns configuration data for creating a record for the given owner and type. If the owner is `system` will be a system record. Otherwise will be a user record.", + "tags": [ + "Records" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/owner" + }, + { + "name": "type", + "required": true, + "in": "path", + "description": "The record type to be created", + "schema": { + "type": "string" + } } - } ], - "responses" : { - "200" : { - "description" : "The data used to run the operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/OperationDataForRun" + ], + "responses": { + "200": { + "description": "The data for creating a record", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecordDataForNew" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -49399,600 +49611,477 @@ } } }, - "/contact-infos/{id}/operations/{operation}/run" : { - "post" : { - "operationId" : "runContactInfoOperation", - "summary" : "Runs a custom operation over an additional contact information", - "description" : "Runs a specific custom operation over a given additional contact information. The operation scope must be `contactInfo`. If the operation resulted in a file download (either because the `resultType` is `fileDownload` or is a `resultPage` running for either PDF or CSV) the resulting contente type will be of the file itself. Otherwise will result in an `application/json` with the result object.", - "tags" : [ "Operations" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/id" - }, { - "name" : "operation", - "description" : "Either the id or internal name of the custom operation", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" + "/records/{id}/data-for-edit": { + "get": { + "operationId": "getRecordDataForEdit", + "summary": "Returns data to edit an existing record", + "description": "Returns configuration data for editing a record, plus the current `RecordEdit` object that can be altered and sent back", + "tags": [ + "Records" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] } - } ], - "responses" : { - "200" : { - "description" : "The custom operation result, either as `RunOperationResult` or as the file itself", - "headers" : { - "X-Total-Count" : { - "schema" : { - "type" : "integer" - }, - "description" : "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." - }, - "X-Page-Size" : { - "schema" : { - "type" : "integer" - }, - "description" : "The maximum number of results per page" - }, - "X-Current-Page" : { - "schema" : { - "type" : "integer" - }, - "description" : "The current page the results are in" - }, - "X-Has-Next-Page" : { - "schema" : { - "type" : "boolean" - }, - "description" : "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." - } - }, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/RunOperationResult" - } - }, - "*/*" : { - "schema" : { - "type" : "string", - "format" : "binary" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/id" + } + ], + "responses": { + "200": { + "description": "The data for editing a record", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecordDataForEdit" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - }, - "requestBody" : { - "description" : "The custom operation parameters", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/RunOperation" - } - } - } - } - } - }, - "/contact-infos/{id}/operations/{operation}/run-upload" : { - "post" : { - "operationId" : "runContactInfoOperationWithUpload", - "summary" : "Runs a custom operation over an additional contact information while uploading a file", - "description" : "Runs a specific custom operation over a given additional contact information. The operation scope must be `contactInfo`. This path allows uploading a file, by using a `multipart-form-data` post. If the operation resulted in a file download (either because the `resultType` is `fileDownload` or is a `resultPage` running for either PDF or CSV) the resulting contente type will be of the file itself. Otherwise will result in an `application/json` with the result object.", - "tags" : [ "Operations" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/id" - }, { - "name" : "operation", - "description" : "Either the id or internal name of the custom operation", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "The custom operation result, either as `RunOperationResult` or as the file itself", - "headers" : { - "X-Total-Count" : { - "schema" : { - "type" : "integer" - }, - "description" : "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." - }, - "X-Page-Size" : { - "schema" : { - "type" : "integer" - }, - "description" : "The maximum number of results per page" - }, - "X-Current-Page" : { - "schema" : { - "type" : "integer" - }, - "description" : "The current page the results are in" - }, - "X-Has-Next-Page" : { - "schema" : { - "type" : "boolean" - }, - "description" : "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." - } - }, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/RunOperationResult" - } - }, - "*/*" : { - "schema" : { - "type" : "string", - "format" : "binary" + } + } + }, + "/records/{id}": { + "get": { + "operationId": "viewRecord", + "summary": "Returns details of a specific record", + "description": "Returns information about a record, located by id", + "tags": [ + "Records" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/id" + } + ], + "responses": { + "200": { + "description": "The record data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecordView" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - }, - "requestBody" : { - "content" : { - "multipart/form-data" : { - "schema" : { - "type" : "object", - "properties" : { - "params" : { - "description" : "The custom operation parameters.", - "allOf" : [ { - "$ref" : "#/components/schemas/RunOperation" - } ] - }, - "file" : { - "type" : "string", - "format" : "binary", - "description" : "The file being uploaded" - } + } + }, + "put": { + "operationId": "updateRecord", + "summary": "Updates an existing record", + "description": "Updates an existing record", + "tags": [ + "Records" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/id" + }, + { + "$ref": "#/components/parameters/confirmationPassword" + } + ], + "responses": { + "204": { + "description": "The record was updated" + }, + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" } } } - } - } - } - }, - "/menu/{menu}/operations/data-for-run" : { - "get" : { - "operationId" : "getMenuOperationDataForRun", - "summary" : "Returns configuration data for running a custom operation which is in a custom menu", - "description" : "Returns data to run a specific custom operation of a custom menu. The operation scope must be `menu`.", - "tags" : [ "Operations" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "menu", - "description" : "Either the id or internal name of the custom menu item", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "The data used to run the operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/OperationDataForRun" + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } + }, + "requestBody": { + "description": "The record to be edited", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecordEdit" + } + } + } } - } - }, - "/menu/{menu}/operations/run" : { - "post" : { - "operationId" : "runMenuOperation", - "summary" : "Runs a custom operation from a custom menu item", - "description" : "Runs a specific custom operation from a menu item. The operation scope must be `menu`. If the operation resulted in a file download (either because the `resultType` is `fileDownload` or is a `resultPage` running for either PDF or CSV) the resulting contente type will be of the file itself. Otherwise will result in an `application/json` with the result object.", - "tags" : [ "Operations" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "menu", - "description" : "Either the id or internal name of the custom menu item", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" + }, + "delete": { + "operationId": "deleteRecord", + "summary": "Removes a record", + "description": "Removes a record", + "tags": [ + "Records" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] } - } ], - "responses" : { - "200" : { - "description" : "The custom operation result, either as `RunOperationResult` or as the file itself", - "headers" : { - "X-Total-Count" : { - "schema" : { - "type" : "integer" - }, - "description" : "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." - }, - "X-Page-Size" : { - "schema" : { - "type" : "integer" - }, - "description" : "The maximum number of results per page" - }, - "X-Current-Page" : { - "schema" : { - "type" : "integer" - }, - "description" : "The current page the results are in" - }, - "X-Has-Next-Page" : { - "schema" : { - "type" : "boolean" - }, - "description" : "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." - } - }, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/RunOperationResult" - } - }, - "*/*" : { - "schema" : { - "type" : "string", - "format" : "binary" + ], + "parameters": [ + { + "$ref": "#/components/parameters/id" + }, + { + "$ref": "#/components/parameters/confirmationPassword" + } + ], + "responses": { + "204": { + "description": "The record was deleted" + }, + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - }, - "requestBody" : { - "description" : "The custom operation parameters", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/RunOperation" - } - } - } - } - } - }, - "/menu/{menu}/operations/run-upload" : { - "post" : { - "operationId" : "runMenuOperationWithUpload", - "summary" : "Runs a custom operation from a custom menu while uploading a file", - "description" : "Runs a specific custom operation from a menu. The operation scope must be `menu`. This path allows uploading a file, by using a `multipart-form-data` post. If the operation resulted in a file download (either because the `resultType` is `fileDownload` or is a `resultPage` running for either PDF or CSV) the resulting contente type will be of the file itself. Otherwise will result in an `application/json` with the result object.", - "tags" : [ "Operations" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "menu", - "description" : "Either the id or internal name of the custom menu item", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "The custom operation result, either as `RunOperationResult` or as the file itself", - "headers" : { - "X-Total-Count" : { - "schema" : { - "type" : "integer" - }, - "description" : "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." - }, - "X-Page-Size" : { - "schema" : { - "type" : "integer" - }, - "description" : "The maximum number of results per page" - }, - "X-Current-Page" : { - "schema" : { - "type" : "integer" - }, - "description" : "The current page the results are in" - }, - "X-Has-Next-Page" : { - "schema" : { - "type" : "boolean" - }, - "description" : "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." - } - }, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/RunOperationResult" - } - }, - "*/*" : { - "schema" : { - "type" : "string", - "format" : "binary" - } - } - } + } + } + }, + "/records/{id}/password-for-remove": { + "get": { + "operationId": "getPasswordInputForRemoveRecord", + "summary": "Returns a confirmation `PasswordInput` for removing a record, if any", + "description": "If a confirmation password is required to remove a record, clients should invoke this operation prior to effectively removing the record, which will return the data regarding the confirmation password.", + "tags": [ + "Records" + ], + "security": [ + { + "basic": [] }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/id" + } + ], + "responses": { + "200": { + "description": "The confirmation password input, or null", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PasswordInput" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } - } - }, - "requestBody" : { - "content" : { - "multipart/form-data" : { - "schema" : { - "type" : "object", - "properties" : { - "params" : { - "description" : "The custom operation parameters.", - "allOf" : [ { - "$ref" : "#/components/schemas/RunOperation" - } ] - }, - "file" : { - "type" : "string", - "format" : "binary", - "description" : "The file being uploaded" - } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -50000,98 +50089,90 @@ } } }, - "/wizards/{key}/start" : { - "parameters" : [ { - "name" : "key", - "in" : "path", - "required" : true, - "description" : "The custom wizard id or internal name", - "schema" : { - "type" : "string" - } - } ], - "post" : { - "operationId" : "startWizard", - "summary" : "Starts the execution of a custom wizard without a scope.", - "description" : "The data for the first step is returned. This operation is used for running wizards with `kind` either `$enum.WizardKind.registration` or `$enum.WizardKind.system`. Can also be used by logged users to run wizards with `kind` either `$enum.WizardKind.user` over themselves.", - "tags" : [ "Wizards" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "inviteToken", - "description" : "For registration wizards, this parameter indicates the token received by e-mail. Passing it has the advantage of not having to verify that same e-mail address, and if the invitation was sent by a broker, the newly registered user will already be assigned to that broker.", - "in" : "query", - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "Returns the data for the first step", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/WizardExecutionData" - } - } - } - }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "/general-records/record-types": { + "get": { + "operationId": "listRecordTypesForGeneralSearch", + "summary": "Lists the record types for general search", + "description": "Returns the record types the authenticated user can use to search records in general, that is, without being of a particular user, but any managed user.", + "tags": [ + "Records" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The list of visible record types", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RecordType" + } } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -50099,100 +50180,96 @@ } } }, - "/users/{user}/wizards/{key}/start" : { - "parameters" : [ { - "$ref" : "#/components/parameters/user" - }, { - "name" : "key", - "in" : "path", - "required" : true, - "description" : "The custom wizard id or internal name", - "schema" : { - "type" : "string" - } - } ], - "post" : { - "operationId" : "startUserWizard", - "summary" : "Starts the execution of a custom wizard over a given user.", - "description" : "The data for the first step is returned. Only wizards with `kind` = `user` can be executed in this operation.", - "tags" : [ "Wizards" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "Returns the data for the first step", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/WizardExecutionData" - } - } - } + "/general-records/{type}/data-for-search": { + "get": { + "operationId": "getRecordDataForGeneralSearch", + "summary": "Returns data for searching records of a type over any owner", + "description": "Returns data for searching records of a specific type over any owner. Is not tied to a particular owner (user or system), hence, is considered a general search.", + "tags": [ + "Records" + ], + "security": [ + { + "basic": [] }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "type", + "description": "Either the identifier or internal name of the record type", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The configuration data for searching records of this type", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GeneralRecordsDataForSearch" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -50200,91 +50277,257 @@ } } }, - "/menu/{menu}/wizards/start" : { - "parameters" : [ { - "name" : "menu", - "description" : "Either the id or internal name of the custom menu item", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "post" : { - "operationId" : "startMenuWizard", - "summary" : "Starts the execution of a custom wizard from a custom menu entry.", - "description" : "The data for the first step is returned. Only wizards with `kind` = `menu` can be executed in this operation.", - "tags" : [ "Wizards" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "Returns the data for the first step", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/WizardExecutionData" - } + "/general-records/{type}": { + "get": { + "operationId": "searchGeneralRecords", + "summary": "Searches for records of a specific type over any owner", + "description": "Returns records matching the search criteria, for a specific type. The custom fields returned on each record depend on the field configuration, which needs to be enabled to return on list. The profile fields available as search filters for records are assigned in the products (or admin group permissions).", + "tags": [ + "Records" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "type", + "description": "Either the identifier or internal name of the record type", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "brokers", + "in": "query", + "required": false, + "description": "Either the ids or identification methods of record owners' brokers", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "createdBy", + "in": "query", + "required": false, + "description": "Either the id or identifier of the user that created the record", + "schema": { + "type": "string" + } + }, + { + "name": "creationPeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum record creation date", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "customFields", + "in": "query", + "required": false, + "description": "Record custom field values used as filters. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by : (colon). For example, `customFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, customFields=field1:valueA|valueB. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `customFields=tradeType:offer|search,extraDate:2000-01-01|2001-12-31` would match results whose custom field with internal name `tradeType` is either `offer` or `search`, and whose `extraDate` is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `customFields=extraDate:|2001-12-31`. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `customFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `customFields=dynamic:'business`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "groups", + "in": "query", + "required": false, + "description": "Either the ids or internal names of record owners' groups", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "keywords", + "in": "query", + "required": false, + "description": "Textual search keywords. Sometimes, like in user search, the fields matched depends on what is configured on the products.", + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number (zero-based) of the search. The default value is zero.", + "schema": { + "type": "integer" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", + "schema": { + "type": "integer" + } + }, + { + "name": "profileFields", + "in": "query", + "required": false, + "description": "User profile fields, both basic (full name, login name, phone, e-mail, etc) and custom fields, that are used for search. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by `:` (colon). For example, `profileFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, `profileFields=field1:valueA|valueB`. The accepted fields depend on the products the authenticated user has. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `profileFields=rank:bronze|silver,birthDate:2000-01-01|2001-12-31` would match results whose custom field with internal name 'rank' is either bronze or silver, and whose 'birthDate' is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `profileFields=birthDate:|2001-12-31`.\nThe basic profile fields have one of the following identifiers:\n- `name` or `fullName`: Full name; - `username`, `loginName` or `login`: Login name; - `email`: E-mail; - `phone`: Phone; - `accountNumber`, `account`: Account number; - `image`: Image (accepts a boolean value, indicating that either it is required that users either have images or not).\n\nIf address is an allowed profile field for search, specific address fields may be searched. The allowed ones are normally returned as the `addressFieldsInSearch` field in the corresponding result from a data-for-search request. The specific address fields are:\n- `address`: Searches on any address field (not a specific field); - `address.address`: Searches on the fields that represent the street address, which are `addressLine1`, `addressLine2`, `street`, `buildingNumber` and `complement`. Note that normally only a subset of them should be enabled in the configuration (either line 1 / 2 or street + number + complement);\n- `address.zip`: Searches for matching zip (postal) code; - `address.poBox`: Searches for matching postal box; - `address.neighborhood`: Searches by neighborhood; - `address.city`: Searches by city; - `address.region`: Searches by region (or state); - `address.country`: Searches by ISO 3166-1 alpha-2 country code. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `profileFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `profileFields=dynamic:'business`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "skipTotalCount", + "in": "query", + "required": false, + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", + "schema": { + "type": "boolean" + } + }, + { + "name": "user", + "in": "query", + "required": false, + "description": "Either the id or identifier of the record owner", + "schema": { + "type": "string" + } + }, + { + "name": "userStatuses", + "in": "query", + "required": false, + "description": "The possible statuses of the record's owner", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserStatusEnum" + } + } + } + ], + "responses": { + "200": { + "description": "The configuration data for searching records", + "headers": { + "X-Total-Count": { + "schema": { + "type": "integer" + }, + "description": "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." + }, + "X-Page-Size": { + "schema": { + "type": "integer" + }, + "description": "The maximum number of results per page" + }, + "X-Current-Page": { + "schema": { + "type": "integer" + }, + "description": "The current page the results are in" + }, + "X-Has-Next-Page": { + "schema": { + "type": "boolean" + }, + "description": "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." } - } - }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + }, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RecordWithOwnerResult" + } } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -50292,240 +50535,319 @@ } } }, - "/wizard-executions/{key}" : { - "parameters" : [ { - "name" : "key", - "in" : "path", - "required" : true, - "description" : "The custom wizard execution key", - "schema" : { - "type" : "string" - } - } ], - "get" : { - "operationId" : "getCurrentWizardExecution", - "summary" : "Returns the wizard execution data for the current step.", - "description" : "Doesn't modify the wizard execution status.", - "tags" : [ "Wizards" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "Returns the data for the current step.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/WizardExecutionData" - } - } - } - }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } - } + "/general-records/{type}/export/{format}": { + "parameters": [ + { + "name": "type", + "description": "Either the identifier or internal name of the record type", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "$ref": "#/components/parameters/format" + } + ], + "get": { + "operationId": "exportGeneralRecords", + "summary": "Exports the general records search results as file", + "description": "Generates a file containing the search results. The available export formats are returned in `GET /general-records/{type}/data-for-search`.", + "tags": [ + "Records" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "name": "brokers", + "in": "query", + "required": false, + "description": "Either the ids or identification methods of record owners' brokers", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "createdBy", + "in": "query", + "required": false, + "description": "Either the id or identifier of the user that created the record", + "schema": { + "type": "string" + } + }, + { + "name": "creationPeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum record creation date", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "customFields", + "in": "query", + "required": false, + "description": "Record custom field values used as filters. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by : (colon). For example, `customFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, customFields=field1:valueA|valueB. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `customFields=tradeType:offer|search,extraDate:2000-01-01|2001-12-31` would match results whose custom field with internal name `tradeType` is either `offer` or `search`, and whose `extraDate` is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `customFields=extraDate:|2001-12-31`. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `customFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `customFields=dynamic:'business`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "groups", + "in": "query", + "required": false, + "description": "Either the ids or internal names of record owners' groups", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "keywords", + "in": "query", + "required": false, + "description": "Textual search keywords. Sometimes, like in user search, the fields matched depends on what is configured on the products.", + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number (zero-based) of the search. The default value is zero.", + "schema": { + "type": "integer" } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" - } - } + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", + "schema": { + "type": "integer" } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" - } + { + "name": "profileFields", + "in": "query", + "required": false, + "description": "User profile fields, both basic (full name, login name, phone, e-mail, etc) and custom fields, that are used for search. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by `:` (colon). For example, `profileFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, `profileFields=field1:valueA|valueB`. The accepted fields depend on the products the authenticated user has. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `profileFields=rank:bronze|silver,birthDate:2000-01-01|2001-12-31` would match results whose custom field with internal name 'rank' is either bronze or silver, and whose 'birthDate' is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `profileFields=birthDate:|2001-12-31`.\nThe basic profile fields have one of the following identifiers:\n- `name` or `fullName`: Full name; - `username`, `loginName` or `login`: Login name; - `email`: E-mail; - `phone`: Phone; - `accountNumber`, `account`: Account number; - `image`: Image (accepts a boolean value, indicating that either it is required that users either have images or not).\n\nIf address is an allowed profile field for search, specific address fields may be searched. The allowed ones are normally returned as the `addressFieldsInSearch` field in the corresponding result from a data-for-search request. The specific address fields are:\n- `address`: Searches on any address field (not a specific field); - `address.address`: Searches on the fields that represent the street address, which are `addressLine1`, `addressLine2`, `street`, `buildingNumber` and `complement`. Note that normally only a subset of them should be enabled in the configuration (either line 1 / 2 or street + number + complement);\n- `address.zip`: Searches for matching zip (postal) code; - `address.poBox`: Searches for matching postal box; - `address.neighborhood`: Searches by neighborhood; - `address.city`: Searches by city; - `address.region`: Searches by region (or state); - `address.country`: Searches by ISO 3166-1 alpha-2 country code. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `profileFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `profileFields=dynamic:'business`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" - } - } + { + "name": "skipTotalCount", + "in": "query", + "required": false, + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", + "schema": { + "type": "boolean" } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" - } - } + { + "name": "user", + "in": "query", + "required": false, + "description": "Either the id or identifier of the record owner", + "schema": { + "type": "string" } - } - } - }, - "post" : { - "operationId" : "transitionWizardExecution", - "summary" : "Transitions a wizard from a step to another, or finishes the wizard", - "description" : "Applies a transition to the current wizard step. When no transition is sent, the wizard is finished. In this case, the current step must be the last wizard step. The request body contains the step parameters, according to the step kind.", - "tags" : [ "Wizards" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "transition", - "in" : "query", - "schema" : { - "type" : "string" }, - "description" : "The transition id for the next step. Must be the id of one of the transitions returned in `WizardExecutionData.transitions`, or null, in which case the wizard finishes." - } ], - "requestBody" : { - "description" : "The current step fields", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/WizardTransitionParams" + { + "name": "userStatuses", + "in": "query", + "required": false, + "description": "The possible statuses of the record's owner", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserStatusEnum" } } } - }, - "responses" : { - "200" : { - "description" : "Returns the data for the next step, or, if finished, the wizard result.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/WizardExecutionData" + ], + "responses": { + "200": { + "description": "The file content", + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } + } + } + } + }, + "/shared-records/data-for-search": { + "get": { + "operationId": "getRecordDataForSharedSearch", + "summary": "Returns data for searching records with shared fields", + "description": "Returns data for searching records from multiple types, using shared fields. Only user records can be shared this way.", + "tags": [ + "Records" + ], + "security": [ + { + "basic": [] }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The configuration data for searching records with shared fields", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SharedRecordsDataForSearch" } } } - } - } - }, - "delete" : { - "operationId" : "cancelWizardExecution", - "summary" : "Cancels a wizard execution, removing all associated context.", - "description" : "All stored state for this execution is removed, and its key is no longer valid.", - "tags" : [ "Wizards" ], - "responses" : { - "204" : { - "description" : "The execution was canceled and nothing is returned." }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -50533,99 +50855,261 @@ } } }, - "/wizard-executions/{key}/back" : { - "parameters" : [ { - "name" : "key", - "in" : "path", - "required" : true, - "description" : "The custom wizard execution key", - "schema" : { - "type" : "string" - } - } ], - "post" : { - "operationId" : "backWizardExecution", - "summary" : "Goes back one or more steps in a wizard execution.", - "description" : "Returns the execution data for the new step.", - "tags" : [ "Wizards" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "steps", - "in" : "query", - "schema" : { - "type" : "integer" - }, - "required" : false, - "description" : "The number of steps to go back. When not informed, will be 1." - } ], - "responses" : { - "200" : { - "description" : "Returns the data for the next step", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/WizardExecutionData" - } + "/shared-records": { + "get": { + "operationId": "searchSharedRecords", + "summary": "Searches for records with shared fields", + "description": "Returns records matching the search criteria, using shared fields. This allows searching over multiple record types that use shared fields. The custom fields returned on each record depend on the field configuration, which needs to be enabled to return on list. The profile fields available as search filters for records are assigned in the products (or admin group permissions).", + "tags": [ + "Records" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "brokers", + "in": "query", + "required": false, + "description": "Either the ids or identification methods of record owners' brokers", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "createdBy", + "in": "query", + "required": false, + "description": "Either the id or identifier of the user that created the record", + "schema": { + "type": "string" + } + }, + { + "name": "creationPeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum record creation date", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "customFields", + "in": "query", + "required": false, + "description": "Record custom field values used as filters. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by : (colon). For example, `customFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, customFields=field1:valueA|valueB. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `customFields=tradeType:offer|search,extraDate:2000-01-01|2001-12-31` would match results whose custom field with internal name `tradeType` is either `offer` or `search`, and whose `extraDate` is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `customFields=extraDate:|2001-12-31`. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `customFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `customFields=dynamic:'business`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "groups", + "in": "query", + "required": false, + "description": "Either the ids or internal names of record owners' groups", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "keywords", + "in": "query", + "required": false, + "description": "Textual search keywords. Sometimes, like in user search, the fields matched depends on what is configured on the products.", + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number (zero-based) of the search. The default value is zero.", + "schema": { + "type": "integer" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", + "schema": { + "type": "integer" + } + }, + { + "name": "profileFields", + "in": "query", + "required": false, + "description": "User profile fields, both basic (full name, login name, phone, e-mail, etc) and custom fields, that are used for search. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by `:` (colon). For example, `profileFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, `profileFields=field1:valueA|valueB`. The accepted fields depend on the products the authenticated user has. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `profileFields=rank:bronze|silver,birthDate:2000-01-01|2001-12-31` would match results whose custom field with internal name 'rank' is either bronze or silver, and whose 'birthDate' is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `profileFields=birthDate:|2001-12-31`.\nThe basic profile fields have one of the following identifiers:\n- `name` or `fullName`: Full name; - `username`, `loginName` or `login`: Login name; - `email`: E-mail; - `phone`: Phone; - `accountNumber`, `account`: Account number; - `image`: Image (accepts a boolean value, indicating that either it is required that users either have images or not).\n\nIf address is an allowed profile field for search, specific address fields may be searched. The allowed ones are normally returned as the `addressFieldsInSearch` field in the corresponding result from a data-for-search request. The specific address fields are:\n- `address`: Searches on any address field (not a specific field); - `address.address`: Searches on the fields that represent the street address, which are `addressLine1`, `addressLine2`, `street`, `buildingNumber` and `complement`. Note that normally only a subset of them should be enabled in the configuration (either line 1 / 2 or street + number + complement);\n- `address.zip`: Searches for matching zip (postal) code; - `address.poBox`: Searches for matching postal box; - `address.neighborhood`: Searches by neighborhood; - `address.city`: Searches by city; - `address.region`: Searches by region (or state); - `address.country`: Searches by ISO 3166-1 alpha-2 country code. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `profileFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `profileFields=dynamic:'business`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "skipTotalCount", + "in": "query", + "required": false, + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", + "schema": { + "type": "boolean" + } + }, + { + "name": "types", + "in": "query", + "required": false, + "description": "Either the ids or identification methods of record types", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "user", + "in": "query", + "required": false, + "description": "Either the id or identifier of the record owner", + "schema": { + "type": "string" + } + }, + { + "name": "userStatuses", + "in": "query", + "required": false, + "description": "The possible statuses of the record's owner", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserStatusEnum" + } + } + } + ], + "responses": { + "200": { + "description": "The configuration data for searching records", + "headers": { + "X-Total-Count": { + "schema": { + "type": "integer" + }, + "description": "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." + }, + "X-Page-Size": { + "schema": { + "type": "integer" + }, + "description": "The maximum number of results per page" + }, + "X-Current-Page": { + "schema": { + "type": "integer" + }, + "description": "The current page the results are in" + }, + "X-Has-Next-Page": { + "schema": { + "type": "boolean" + }, + "description": "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." } - } - }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + }, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RecordWithOwnerResult" + } } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -50633,190 +51117,235 @@ } } }, - "/wizard-executions/{key}/redirect" : { - "parameters" : [ { - "name" : "key", - "in" : "path", - "required" : true, - "description" : "The custom wizard execution key", - "schema" : { - "type" : "string" - } - } ], - "post" : { - "operationId" : "redirectWizardExecution", - "summary" : "Prepares an external redirect in a wizard execution.", - "description" : "The current step must be set for external redirect (the `WizardExecutionData.action` must be `externalRedirect`). The URL to which redirect the user is returned.", - "tags" : [ "Wizards" ], - "requestBody" : { - "description" : "The current step fields", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/WizardTransitionParams" - } - } - } - }, - "responses" : { - "200" : { - "description" : "Returns the URL to where redirect the user", - "content" : { - "text/plain" : { - "schema" : { - "type" : "string" - } - } - } - }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } - } + "/shared-records/export/{format}": { + "parameters": [ + { + "$ref": "#/components/parameters/format" + } + ], + "get": { + "operationId": "exportSharedRecords", + "summary": "Exports the shared fields records search results as file", + "description": "Generates a file containing the search results. The available export formats are returned in `GET /transfers/data-for-search`.", + "tags": [ + "Records" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "name": "brokers", + "in": "query", + "required": false, + "description": "Either the ids or identification methods of record owners' brokers", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "createdBy", + "in": "query", + "required": false, + "description": "Either the id or identifier of the user that created the record", + "schema": { + "type": "string" + } + }, + { + "name": "creationPeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum record creation date", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "customFields", + "in": "query", + "required": false, + "description": "Record custom field values used as filters. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by : (colon). For example, `customFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, customFields=field1:valueA|valueB. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `customFields=tradeType:offer|search,extraDate:2000-01-01|2001-12-31` would match results whose custom field with internal name `tradeType` is either `offer` or `search`, and whose `extraDate` is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `customFields=extraDate:|2001-12-31`. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `customFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `customFields=dynamic:'business`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "groups", + "in": "query", + "required": false, + "description": "Either the ids or internal names of record owners' groups", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "keywords", + "in": "query", + "required": false, + "description": "Textual search keywords. Sometimes, like in user search, the fields matched depends on what is configured on the products.", + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number (zero-based) of the search. The default value is zero.", + "schema": { + "type": "integer" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", + "schema": { + "type": "integer" } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" - } + { + "name": "profileFields", + "in": "query", + "required": false, + "description": "User profile fields, both basic (full name, login name, phone, e-mail, etc) and custom fields, that are used for search. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by `:` (colon). For example, `profileFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, `profileFields=field1:valueA|valueB`. The accepted fields depend on the products the authenticated user has. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `profileFields=rank:bronze|silver,birthDate:2000-01-01|2001-12-31` would match results whose custom field with internal name 'rank' is either bronze or silver, and whose 'birthDate' is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `profileFields=birthDate:|2001-12-31`.\nThe basic profile fields have one of the following identifiers:\n- `name` or `fullName`: Full name; - `username`, `loginName` or `login`: Login name; - `email`: E-mail; - `phone`: Phone; - `accountNumber`, `account`: Account number; - `image`: Image (accepts a boolean value, indicating that either it is required that users either have images or not).\n\nIf address is an allowed profile field for search, specific address fields may be searched. The allowed ones are normally returned as the `addressFieldsInSearch` field in the corresponding result from a data-for-search request. The specific address fields are:\n- `address`: Searches on any address field (not a specific field); - `address.address`: Searches on the fields that represent the street address, which are `addressLine1`, `addressLine2`, `street`, `buildingNumber` and `complement`. Note that normally only a subset of them should be enabled in the configuration (either line 1 / 2 or street + number + complement);\n- `address.zip`: Searches for matching zip (postal) code; - `address.poBox`: Searches for matching postal box; - `address.neighborhood`: Searches by neighborhood; - `address.city`: Searches by city; - `address.region`: Searches by region (or state); - `address.country`: Searches by ISO 3166-1 alpha-2 country code. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `profileFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `profileFields=dynamic:'business`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" - } - } + { + "name": "skipTotalCount", + "in": "query", + "required": false, + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", + "schema": { + "type": "boolean" } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" - } + { + "name": "types", + "in": "query", + "required": false, + "description": "Either the ids or identification methods of record types", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" - } - } + { + "name": "user", + "in": "query", + "required": false, + "description": "Either the id or identifier of the record owner", + "schema": { + "type": "string" } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" - } + { + "name": "userStatuses", + "in": "query", + "required": false, + "description": "The possible statuses of the record's owner", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserStatusEnum" } } } - } - } - }, - "/wizard-executions/{key}/callback" : { - "parameters" : [ { - "name" : "key", - "in" : "path", - "required" : true, - "description" : "The custom wizard execution key", - "schema" : { - "type" : "string" - } - } ], - "post" : { - "operationId" : "runWizardCallback", - "summary" : "Runs the callback of an external redirect wizard step.", - "description" : "This operation is invoked after a step was redirected to an external application. The script should check whether the external operation was completed and act accordingly", - "tags" : [ "Wizards" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "requestBody" : { - "description" : "Data of the original callback request sent by the external service", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/HttpRequestData" - } - } - } - }, - "responses" : { - "200" : { - "description" : "The new step data after transitioning to the next step.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/WizardExecutionData" + ], + "responses": { + "200": { + "description": "The file content", + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -50824,91 +51353,95 @@ } } }, - "/wizard-executions/{key}/verification-code" : { - "parameters" : [ { - "name" : "key", - "in" : "path", - "required" : true, - "description" : "The custom wizard execution key", - "schema" : { - "type" : "string" - } - } ], - "post" : { - "operationId" : "sendWizardVerificationCode", - "summary" : "Sends a code to verify either e-mail or mobile phone.", - "description" : "The given execution must be of a registration wizard, and be in a form fields step that contain either e-mail or mobile phone, according to the given send medium.", - "tags" : [ "Wizards" ], - "requestBody" : { - "description" : "The parameters for sending the code", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/WizardVerificationCodeParams" - } - } - } - }, - "responses" : { - "204" : { - "description" : "The verification code is sent and nothing is returned." - }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "/{user}/token-types": { + "parameters": [ + { + "$ref": "#/components/parameters/user" + } + ], + "get": { + "operationId": "listUserTokenTypes", + "summary": "Returns the permissions over token types of the given user.", + "description": "Returns the permissions the authenticated user can perform over the tokens of the given user.", + "tags": [ + "Tokens" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The tokens", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TokenPermissions" + } } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -50916,272 +51449,295 @@ } } }, - "/nfc/{tokenType}/{value}" : { - "get" : { - "operationId" : "getNfcToken", - "summary" : "Retrieve the NFC token detailed data", - "description" : "Returns the token's data and the user owner of the token (i.e the assigned user, if any)", - "tags" : [ "NFC" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "name" : "tokenType", - "description" : "The internal name or id of the token type", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" + "/{user}/tokens/{type}": { + "parameters": [ + { + "$ref": "#/components/parameters/user" + }, + { + "name": "type", + "description": "Either the identifier or internal name of the token type", + "in": "path", + "required": true, + "schema": { + "type": "string" } - }, { - "name" : "value", - "description" : "The token value", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" + } + ], + "get": { + "operationId": "getUserTokens", + "summary": "Returns the tokens of a type and user", + "description": "Returns data containing the tokens of a given type and user, along with the tokens themselves. If the authenticated user is the requested user, will only return tokens whose `status` are either `active` or `blocked`.", + "tags": [ + "Tokens" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" } - } ], - "responses" : { - "200" : { - "description" : "Returns the token data", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/TokenDetailed" + ], + "responses": { + "200": { + "description": "The tokens matching the search filters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserTokensListData" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - } - }, - "/nfc/external-auth" : { - "post" : { - "operationId" : "nfcExternalAuth", - "summary" : "NFC external authentication", - "description" : "The NFC tag will normally perform a mutual authentication, by first generating a challenge that must be encrypted by the external system with the device key. With this the external system is authenticated. Cyclos also returns a challenge that should be encrypted by the NFC tag. This challenge can later be passed in specific operations (for example, when performing a payment) for Cyclos to make sure the NFC tag is present on the operation.", - "tags" : [ "NFC" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ ], - "responses" : { - "200" : { - "description" : "Returns the challenge to be encrypted by the NFC tag in a subsequent operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NfcExternalAuthenticateResult" + }, + "post": { + "operationId": "activateToken", + "summary": "Activates a pending / unassigned token.", + "description": "If the token status is `unassigned`, the token will be assigned to the given user, and activated. Otherwise, if the token status is `pending`, just activates the token, checking that the user matches. In both cases the token status is set to `active`.", + "tags": [ + "Tokens" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "responses": { + "200": { + "description": "Returns the id of the assigned token", + "content": { + "text/plain": { + "schema": { + "type": "string" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "If a NFC external authentication error has occurred", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NfcAuthError" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } }, - "requestBody" : { - "description" : "The parameters for the external authentication. If the `token` value is informed, it will be performed an external authentication with the token itself, using the Application Master Key (AMK). If the `token` is not informed, the authentication will be done using the PICC Master Key (PMK), which is useful, for example, when initializing the NFC tag.", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NfcExternalAuthenticateParameter" + "requestBody": { + "description": "The token value to activate", + "content": { + "text/plain": { + "schema": { + "type": "string" } } } } } }, - "/nfc/data-for-initialize" : { - "get" : { - "operationId" : "getNfcDataForInitialize", - "summary" : "Returns data for NFC tag initialization. Optionally the user can personalize the tag too.", - "description" : "Returns data with the NFC token types the authenticated user can use to initialize NFC tags.", - "tags" : [ "NFC" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The data for NFC tag initialization", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NfcDataForInitialize" + "/tokens/{id}": { + "parameters": [ + { + "$ref": "#/components/parameters/id" + } + ], + "get": { + "operationId": "viewToken", + "summary": "Returns details of a specific token", + "description": "Returns information about a token, located by either id or number", + "tags": [ + "Tokens" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The token data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TokenView" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -51189,194 +51745,161 @@ } } }, - "/nfc/initialize" : { - "post" : { - "operationId" : "initializeNfc", - "summary" : "Initializes a NFC tag", - "description" : "Initializes a NFC tag, creating a new `token` in Cyclos. Returns the keys (PICC Master Key, Application Master Key and the Operational Key) to be stored on the NFC tag.", - "tags" : [ "NFC" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ ], - "responses" : { - "200" : { - "description" : "The data for NFC tag initialization", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NfcInitializeResult" - } - } - } + "/tokens/{id}/activate": { + "parameters": [ + { + "$ref": "#/components/parameters/id" + } + ], + "post": { + "operationId": "activatePendingToken", + "summary": "Activates a token.", + "description": "Activates a token, which must be assigned to a user managed by the authenticated user. The token status must be `pending`.", + "tags": [ + "Tokens" + ], + "security": [ + { + "basic": [] }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } - } - } + { + "session": [] + }, + { + "accessClient": [] + } + ], + "responses": { + "204": { + "description": "The token is activated and nothing is returned" }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "If a NFC tag inititalization error has occurred", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InitializeNfcError" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - }, - "requestBody" : { - "description" : "The parameters for initializing the NFC tag. If the `user` value is left blank, the NFC tag will be only initialized, but not personalized (assigned to any user). If a user is given, the permission to personalize is required (besides the permission to initialize), and is a shortcut to initializing and later personalizing the tag. The initialization is a sensitive operation, as the result contains the plain keys that should be stored on the NFC tag. Hence, can only be performed by managers (with granted permission). Later on, other users (for example, businesses) will be able to personalize the NFC tag for customers.", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NfcInitializeParameter" - } - } - } } } }, - "/nfc/data-for-personalize" : { - "get" : { - "operationId" : "getNfcDataForPersonalize", - "summary" : "Returns data for perfornalizing an initialized NFC tag for a user", - "description" : "Returns data for personalizing a NFC tag for a given user.", - "tags" : [ "NFC" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "tokenType", - "in" : "query", - "required" : true, - "description" : "The token type reference (id or internal name) of the token principal type, which is stored on the NFC card being personalized.", - "schema" : { - "type" : "string" - } - }, { - "name" : "user", - "in" : "query", - "required" : true, - "description" : "The user reference (id or an identification method) of the user to whom the NFC tag will be personalized. When authenticated as a manager of that user (administrator or broker) no confirmation password will be required for the personalization. However, if the authenticated user is not a manager, the user will be required a confirmation password.", - "schema" : { - "type" : "string" + "/tokens/{id}/block": { + "parameters": [ + { + "$ref": "#/components/parameters/id" + } + ], + "post": { + "operationId": "blockToken", + "summary": "Blocks a token.", + "description": "Blocks a token, which remains blocked until being unblocked again. The token status must be `active`.", + "tags": [ + "Tokens" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] } - } ], - "responses" : { - "200" : { - "description" : "The data for NFC tag personalization", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NfcDataForPersonalize" - } - } - } + ], + "responses": { + "204": { + "description": "The token is blocked and nothing is returned" }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -51384,478 +51907,519 @@ } } }, - "/nfc/personalize" : { - "post" : { - "operationId" : "personalizeNfc", - "summary" : "Personalizes a NFC tag", - "description" : "Personalization requires a NFC tag that was previously initialized, but is still unassigned. This operation doesn't store any key in the NFC tag itself, hence the plain keys are not returned. What is needed is an external authentication with the NFC tag, in order to ensure the card is physically present. The flow for personalizing a tag is: - `GET /nfc/data-for-personalize?user={user}`: Obtain the data for\n personalizing NFC tags for this user. The most important information\n is which the confirmation password will be required, if any;\n- `POST /nfc/external-auth`: With a challenge previously encrypted by the\n NFC tag, invoke this operation. If the challenge matches the NFC token\n in Cyclos, it will be encrypted and returned. Also a new challenge will\n be returned, which should be then encrypted by the NFC tag for later\n being sent back;\n- `POST /nfc/personalize`: With the encrypted challenge and the\n confirmation password (if any), this operation will update the NFC\n token in Cyclos, so it is now assigned to the specified user. From\n this point on, the NFC tag is operational.", - "tags" : [ "NFC" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/confirmationPassword" - } ], - "responses" : { - "204" : { - "description" : "The NFC tag is personalized and nothing is returned" + "/tokens/{id}/unblock": { + "parameters": [ + { + "$ref": "#/components/parameters/id" + } + ], + "post": { + "operationId": "unblockToken", + "summary": "Unlocks a token.", + "description": "Unlocks a token, returning its status to `active`. The token status must be `blocked`.", + "tags": [ + "Tokens" + ], + "security": [ + { + "basic": [] }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } - } - } + { + "session": [] + }, + { + "accessClient": [] + } + ], + "responses": { + "204": { + "description": "The token is unblocked and nothing is returned" }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "If a NFC tag personalization error has occurred", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PersonalizeNfcError" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - }, - "requestBody" : { - "description" : "The parameters for the initialization.", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NfcPersonalizeParameter" - } - } - } } } }, - "/nfc/personalize/otp" : { - "post" : { - "operationId" : "getOtpForPersonalizeNfc", - "summary" : "Generates a new One-Time-Password (OTP) for personalizing a NFC tag", - "description" : "Sends a new OTP for the customer which will own the NFC tag. The OTP belongs to the NFC tag owner, not the authenticated user.", - "tags" : [ "NFC" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "name" : "medium", - "in" : "query", - "required" : true, - "description" : "The medium the user wants to receive the otp", - "schema" : { - "$ref" : "#/components/schemas/SendMediumEnum" + "/tokens/{id}/cancel": { + "parameters": [ + { + "$ref": "#/components/parameters/id" + } + ], + "post": { + "operationId": "cancelToken", + "summary": "Permanently cancels a token.", + "description": "Permanently cancels a token. The token status must be any but `canceled`.", + "tags": [ + "Tokens" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] } - } ], - "responses" : { - "204" : { - "description" : "The OTP is sent to the user, and no content is returned" + ], + "responses": { + "204": { + "description": "The token is canceled and nothing is returned" }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } + } + } + } + }, + "/tokens/{id}/assign/{user}": { + "parameters": [ + { + "$ref": "#/components/parameters/id" + }, + { + "$ref": "#/components/parameters/user" + } + ], + "post": { + "operationId": "assignToken", + "summary": "Assigns a token to a given user.", + "description": "Assigns a token to a given user. The token status must be `unassigned`. After assigning, the token status will be `pending`.", + "tags": [ + "Tokens" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "responses": { + "204": { + "description": "The token is assigned to the user and nothing is returned" }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } - } - }, - "requestBody" : { - "description" : "The parameters identifying the token and the user", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NfcPersonalizeDataParameter" + }, + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } } } - } - } - } - }, - "/nfc/personalize/device-confirmations" : { - "post" : { - "operationId" : "createDeviceConfirmationForPersonalizeNfc", - "summary" : "Creates a pending device confirmation for personalizing a NFC tag.", - "description" : "Creates a device confirmation for the customer which will own the NFC tag. The confirmation must be approved by the NFC tag owner, not the authenticated user, i.e the confirmation QR-code must be read (e.g with the Mobile App) by the customer. After the confirmation being processed the authenticated user will be notified.", - "tags" : [ "NFC" ], - "parameters" : [ ], - "responses" : { - "201" : { - "description" : "Returns the identifier of the new confirmation.", - "content" : { - "text/plain" : { - "schema" : { - "type" : "string" + }, + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } + } + } + } + }, + "/tokens/{id}/set-expiry-date": { + "parameters": [ + { + "$ref": "#/components/parameters/id" + } + ], + "post": { + "operationId": "setTokenExpiryDate", + "summary": "Sets the expiry date of a specific token.", + "description": "Updates the token expiry date. The token status must be either `active`, `blocked` or `expired`.", + "tags": [ + "Tokens" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "name": "date", + "in": "query", + "required": false, + "description": "The new expiry date. If not specified, the token will never expire.", + "schema": { + "type": "string", + "format": "date-time" + } + } + ], + "responses": { + "204": { + "description": "The token expiry date is changed and nothing is returned" }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } - } - }, - "requestBody" : { - "description" : "The parameters identifying the token and the user", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NfcPersonalizeDataParameter" + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } } } } } } }, - "/nfc/personalize/device-confirmations/{id}" : { - "get" : { - "operationId" : "viewDeviceConfirmationForPersonalizeNfc", - "summary" : "Shows the details of a device confirmation that was created to confirm the personalize nfc-tag operation.", - "description" : "Shows a device confirmation for the user which will own the NFC tag. The confirmation belongs to that user, not the authenticated user. The same parameters used for the creation must be sent for this operation too.", - "tags" : [ "NFC" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/id" - }, { - "name" : "user", - "description" : "The principal (id, login name, etc) of the user who will own the tag. Note that a valid numeric value is always considered as id. For example, when using another identification method that can be numeric only, prefix the value with a single quote (like in Excel spreadsheets), for example, `'1234567890`.", - "in" : "query", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "type", - "description" : "Either the identifier or internal name of fhe NFC token type", - "in" : "query", - "required" : true, - "schema" : { - "type" : "string" + "/tokens/{id}/set-activation-deadline": { + "parameters": [ + { + "$ref": "#/components/parameters/id" + } + ], + "post": { + "operationId": "setTokenActivationDeadline", + "summary": "Sets the activation deadline date of a specific token.", + "description": "Updates the token activation deadline date. The token status must be `pending` or `activationExpired`.", + "tags": [ + "Tokens" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] } - } ], - "responses" : { - "200" : { - "description" : "The device confirmation details.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DeviceConfirmationView" - } - } + ], + "parameters": [ + { + "name": "date", + "in": "query", + "required": false, + "description": "The new activation deadline date. If not specified, there will be no deadline.", + "schema": { + "type": "string", + "format": "date-time" } + } + ], + "responses": { + "204": { + "description": "The token activation deadline date is changed and nothing is returned" }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - }, - "delete" : { - "operationId" : "deleteDeviceConfirmationForPersonalizeNfc", - "summary" : "Deletes a device confirmation that was created to confirm the personalize nfc-tag operation.", - "description" : "Deletes a device confirmation for the user which will own the NFC tag. The confirmation belongs to that user, not the authenticated user. The same parameters used for the creation must be sent for this operation too.", - "tags" : [ "NFC" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/id" - }, { - "name" : "user", - "description" : "The principal (id, login name, etc) of the user who will own the tag. Note that a valid numeric value is always considered as id. For example, when using another identification method that can be numeric only, prefix the value with a single quote (like in Excel spreadsheets), for example, `'1234567890`.", - "in" : "query", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "type", - "description" : "Either the identifier or internal name of fhe NFC token type", - "in" : "query", - "required" : true, - "schema" : { - "type" : "string" + } + }, + "/tokens/{id}/qr-code": { + "parameters": [ + { + "$ref": "#/components/parameters/id" + } + ], + "get": { + "operationId": "getTokenQrCode", + "summary": "Returns the QR-code image for the given token only if its physical type is `qrCode`", + "description": "This request will return the image contents as expected but our api documentation page (or any other usage of an <img> tag), created using swagger-ui, generates a second request to include the image in the page. This new (GET) request won't send the authentication parameters and as this path requires authentication the image will be shown as broken. Optionally, to solve the problem described above and to allow authenticate the user when using sessions, a `sessionToken` or `accessClientToken` query parameter could be specified.", + "tags": [ + "Tokens" + ], + "parameters": [ + { + "name": "size", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/ImageSizeEnum" + } } - } ], - "responses" : { - "204" : { - "description" : "The device confirmation was removed." - }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" + ], + "responses": { + "200": { + "description": "The image content", + "content": { + "image/png": { + "schema": { + "type": "string", + "format": "binary" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -51863,96 +52427,107 @@ } } }, - "/nfc/personalize/device-confirmations/{id}/qr-code" : { - "get" : { - "operationId" : "getDeviceConfirmationQrCodeForPersonalizeNfc", - "summary" : "Returns the QR-code image for the given device confirmation only if it was not yet approved / rejected", - "description" : "This request will return the image contents as expected but our api documentation page (or any other usage of an <img> tag), created using swagger-ui, generates a second request to include the image in the page. This new (GET) request won't send the authentication parameters and as this path requires authentication the image will be shown as broken. Optionally, to solve the problem described above and to allow authenticate the user when using sessions, a `sessionToken` or `accessClientToken` query parameter could be specified.", - "tags" : [ "NFC" ], - "parameters" : [ { - "$ref" : "#/components/parameters/id" - }, { - "name" : "user", - "description" : "The principal (id, login name, etc) of the user who will own the tag. Note that a valid numeric value is always considered as id. For example, when using another identification method that can be numeric only, prefix the value with a single quote (like in Excel spreadsheets), for example, `'1234567890`.", - "in" : "query", - "required" : true, - "schema" : { - "type" : "string" + "/tokens/{type}/data-for-new": { + "parameters": [ + { + "name": "type", + "description": "Either the identifier or internal name of the token type", + "in": "path", + "required": true, + "schema": { + "type": "string" } - }, { - "name" : "type", - "description" : "Either the identifier or internal name of fhe NFC token type", - "in" : "query", - "required" : true, - "schema" : { - "type" : "string" + } + ], + "get": { + "operationId": "getTokenDataForNew", + "summary": "Returns data to create a new token for the given type.", + "description": "Returns data to create a new token for the given type.", + "tags": [ + "Tokens" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] } - }, { - "name" : "size", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/ImageSizeEnum" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "user", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "Either id or identification of the user to have the token initially assigned" } - } ], - "responses" : { - "200" : { - "description" : "The image content", - "content" : { - "image/png" : { - "schema" : { - "type" : "string", - "format" : "binary" + ], + "responses": { + "200": { + "description": "The data for creating a new token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TokenDataForNew" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -51960,334 +52535,221 @@ } } }, - "/nfc/cancel" : { - "post" : { - "operationId" : "cancelNfc", - "summary" : "Cancels a NFC tag", - "description" : "Cancels a NFC token. Must be authenticated as a manager (administrator / broker) of the token owner, and have the correct permission.", - "tags" : [ "NFC" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ ], - "responses" : { - "204" : { - "description" : "The NFC tag is canceled and nothing is returned" + "/tokens/{type}/new": { + "parameters": [ + { + "name": "type", + "description": "Either the identifier or internal name of the token type", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "post": { + "operationId": "createToken", + "summary": "Creates a new token of the given type.", + "description": "Creates a new token of the given type. If a user is specified, the token will be initially assigned to that user, and the initial status will be `pending`.", + "tags": [ + "Tokens" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + { + "accessClient": [] + } + ], + "responses": { + "201": { + "description": "Returns the identifier of the new record", + "headers": { + "Location": { + "description": "URL for viewing the record details", + "schema": { + "type": "string" } } - } - }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + }, + "content": { + "text/plain": { + "schema": { + "type": "string" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } - } - }, - "requestBody" : { - "description" : "The parameters for canceling.", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NfcTokenParameter" - } - } - } - } - } - }, - "/push/subscribe" : { - "get" : { - "operationId" : "subscribeForPushNotifications", - "summary" : "Subscribes for receiving push notifications of specific types", - "description" : "Returns an event stream of server-sent events", - "tags" : [ "Push" ], - "parameters" : [ { - "name" : "clientId", - "in" : "query", - "required" : true, - "description" : "An id generated by the client. This id is valid for the authenticated used, indicating a single session. As event streams can timeout and be reconnected, subsequent subscriptions with the same user and client id are considered the same subscription, and missed events since the last timeout will be immediately delivered. Missed events are enqueued up to a few minutes after the connection timeout. After that window, any enqueued events are discarded.", - "schema" : { - "type" : "string" - } - }, { - "name" : "kinds", - "in" : "query", - "required" : true, - "description" : "The event kinds for which the client desires to subscribe", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PushNotificationEventKind" - } - } - }, { - "name" : "ticketNumber", - "in" : "query", - "required" : false, - "description" : "When subscribing to `ticket` events, this parameter can be used to filter which ticket to monitor.", - "schema" : { - "type" : "string" - } - }, { - "name" : "deviceConfirmationId", - "in" : "query", - "required" : false, - "description" : "When subscribing to `deviceConfirmationFeedback` events, this parameter can be used to filter which device confirmation to monitor.", - "schema" : { - "type" : "string" - } - }, { - "name" : "identityProviderRequestId", - "in" : "query", - "required" : false, - "description" : "When subscribing to `identityProviderCallback` events, this parameter can be used to filter which request to monitor.", - "schema" : { - "type" : "string" - } - }, { - "name" : "lastEventId", - "in" : "header", - "required" : false, - "description" : "The last received event id, in case of reconnections. May also be passed as the standard header `Last-Event-ID`.", - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "The event stream", - "content" : { - "text/event-stream" : { - "schema" : { - "type" : "string" + }, + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "203" : { - "description" : "This status code isn't actually returned, but listed here to reference all possible data types which are sent in push events.", - "content" : { - "application/json" : { - "schema" : { - "anyOf" : [ { - "$ref" : "#/components/schemas/NewNotificationPush" - }, { - "$ref" : "#/components/schemas/NewMessagePush" - }, { - "$ref" : "#/components/schemas/Transaction" - }, { - "$ref" : "#/components/schemas/TransactionView" - }, { - "$ref" : "#/components/schemas/DeviceConfirmationView" - }, { - "$ref" : "#/components/schemas/DeviceConfirmationFeedbackPush" - }, { - "$ref" : "#/components/schemas/IdentityProviderCallbackResult" - } ] - } - } - } - }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } - } - } - }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" - } - } - } - }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } - }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" - } + } + }, + "requestBody": { + "description": "Details of the token to be created", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TokenNew" } } } } } }, - "/ui/data-for-ui" : { - "get" : { - "operationId" : "dataForUi", - "summary" : "Returns useful data required to properly display a user interface", - "description" : "The returned data contains settings and also content like header, footer and theme.", - "tags" : [ "UI" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "kind", - "in" : "query", - "required" : false, - "description" : "Specifies the kind of user interface to get data for. If null then no data related to the UI will be returned.", - "schema" : { - "$ref" : "#/components/schemas/UiKind" + "/general-tokens/{type}/data-for-search": { + "parameters": [ + { + "name": "type", + "description": "Either the identifier or internal name of the token type", + "in": "path", + "required": true, + "schema": { + "type": "string" } - }, { - "$ref" : "#/components/parameters/cyclosVersion" - }, { - "$ref" : "#/components/parameters/headerIf" - }, { - "$ref" : "#/components/parameters/footerIf" - }, { - "$ref" : "#/components/parameters/themeIf" - }, { - "$ref" : "#/components/parameters/themeByComponents" - }, { - "name" : "deviceId", - "in" : "query", - "required" : false, - "description" : "Trusted device identification. If given and the device is active then a pending device confirmation will be created that will be validated after the user logs-in. If the validation passes then no confirmation password will be used only for that session.", - "schema" : { - "type" : "string" + } + ], + "get": { + "operationId": "getGeneralTokensDataForSearch", + "summary": "Returns data for searching tokens of a specific type.", + "description": "Returns data for searching tokens of a specific type, regardless of the user.", + "tags": [ + "Tokens" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] } - }, { - "name" : "pinPrincipal", - "in" : "query", - "required" : false, - "description" : "Device PIN principal. If given then the information about whether it is active or not will be given in the returned `dataForLogin`.", - "schema" : { - "type" : "string" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" } - } ], - "responses" : { - "200" : { - "description" : "Returns the data for display a user interface", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DataForUi" + ], + "responses": { + "200": { + "description": "The configuration data for searching tokens", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TokenDataForSearch" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -52295,81 +52757,238 @@ } } }, - "/validate/email-change/{key}" : { - "parameters" : [ { - "name" : "key", - "required" : true, - "in" : "path", - "description" : "The e-mail change validation key the user has received.", - "schema" : { - "type" : "string" - } - } ], - "post" : { - "operationId" : "validateEmailChange", - "summary" : "Validate a pending e-mail change.", - "description" : "When e-mail validation on change is enabled on the configuration, when a user changes their e-mail the new e-mail will not be immediately used. In this case, an e-mail is sent to the new e-mail address, with a link to validate it. That link should include the validation key, which should be sent to the Cyclos backend to actually validate the new e-mail. Only after this the new e-mail address will be effectively used in Cyclos.", - "tags" : [ "Validation" ], - "responses" : { - "200" : { - "description" : "If the e-mail change was validated correctly." - }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } - } - } - }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" - } - } + "/general-tokens/{type}": { + "parameters": [ + { + "name": "type", + "description": "Either the identifier or internal name of the token type", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "get": { + "operationId": "searchGeneralTokens", + "summary": "Searches for tokens of a specific type, regardless of the user.", + "description": "Returns tokens matching the search criteria, for a specific type.", + "tags": [ + "Tokens" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "activationPeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum token activation date.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "brokers", + "in": "query", + "required": false, + "description": "Either id or a principal (login name, e-mail, etc) for brokers", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "expiryPeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum token expiry date.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "groups", + "in": "query", + "required": false, + "description": "Either id or internal names of groups / group sets", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number (zero-based) of the search. The default value is zero.", + "schema": { + "type": "integer" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", + "schema": { + "type": "integer" + } + }, + { + "name": "skipTotalCount", + "in": "query", + "required": false, + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", + "schema": { + "type": "boolean" + } + }, + { + "name": "statuses", + "in": "query", + "required": false, + "description": "The desired token statuses", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TokenStatusEnum" + } + } + }, + { + "name": "user", + "in": "query", + "required": false, + "description": "Either id or a principal (login name, e-mail, etc) for the token owner user", + "schema": { + "type": "string" + } + }, + { + "name": "value", + "in": "query", + "required": false, + "description": "The token value", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The tokens matching the search filters", + "headers": { + "X-Total-Count": { + "schema": { + "type": "integer" + }, + "description": "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." + }, + "X-Page-Size": { + "schema": { + "type": "integer" + }, + "description": "The maximum number of results per page" + }, + "X-Current-Page": { + "schema": { + "type": "integer" + }, + "description": "The current page the results are in" + }, + "X-Has-Next-Page": { + "schema": { + "type": "boolean" + }, + "description": "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." + } + }, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TokenResult" + } + } + } + } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -52377,88 +52996,93 @@ } } }, - "/validate/registration/{key}" : { - "parameters" : [ { - "name" : "key", - "required" : true, - "in" : "path", - "description" : "The registration validation key the user has received.", - "schema" : { - "type" : "string" - } - } ], - "post" : { - "operationId" : "validateUserRegistration", - "summary" : "Validate a pending user registration.", - "description" : "Validate a pending user registration for the given validation key. After validating the registration is completed. However, the group configuration defines if the user is initially active or not.", - "tags" : [ "Validation" ], - "responses" : { - "200" : { - "description" : "The result of the validation. The resulting status only can be `active` or `inactive`.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UserRegistrationResult" - } - } - } - }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "/{owner}/operations": { + "get": { + "operationId": "listOperationsByOwner", + "summary": "Lists the custom operations over the system or user", + "description": "Returns the custom operations the authenticated user can run over the given user or system if the `system` owner is used.", + "tags": [ + "Operations" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/owner" + } + ], + "responses": { + "200": { + "description": "The list of custom operations", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Operation" + } } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -52466,79 +53090,99 @@ } } }, - "/{user}/registration/validate" : { - "parameters" : [ { - "$ref" : "#/components/parameters/userNoSelf" - } ], - "post" : { - "operationId" : "manuallyValidateUserRegistration", - "summary" : "Manually validates a pending user / operator registration.", - "description" : "Marks the user registration as validated. Can only be performed by a manager (admin / broker) of the pending user. The actual resulting user status depends on the group configuration. The user status must be `pending`.", - "tags" : [ "Validation" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "200" : { - "description" : "The result of the e-mail validation. The resulting status only can be `active` or `inactive`.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UserRegistrationResult" + "/{owner}/operations/{operation}/data-for-run": { + "get": { + "operationId": "getOwnerOperationDataForRun", + "summary": "Returns configuration data for running a custom operation over an owner", + "description": "Returns data to run a specific custom operation over a given user or system if the `system` owner is used. The operation scope must match, being either `system` or `user`.", + "tags": [ + "Operations" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/owner" + }, + { + "name": "operation", + "description": "Either the id or internal name of the custom operation", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The data used to run the operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OperationDataForRun" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -52546,218 +53190,286 @@ } } }, - "/{user}/registration/resend" : { - "parameters" : [ { - "$ref" : "#/components/parameters/userNoSelf" - } ], - "post" : { - "operationId" : "resendUserRegistrationEmail", - "summary" : "Re-sends the e-mail to validate a pending user / operator registration.", - "description" : "Sends the validation e-mail again. This operation has to be executed by the user manager (admin or broker). The user status must be `pending`.", - "tags" : [ "Validation" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "204" : { - "description" : "The e-mail is sent and nothing is returned" - }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } + "/{owner}/operations/{operation}/run": { + "post": { + "operationId": "runOwnerOperation", + "summary": "Runs a custom operation either for system or user", + "description": "Runs a specific custom operation over a given user or system if the `system` owner is used. The operation scope must match, being either `system` or `user`. If the operation resulted in a file download (either because the `resultType` is `fileDownload` or is a `resultPage` running for either PDF or CSV) the resulting contente type will be of the file itself. Otherwise will result in an `application/json` with the result object.", + "tags": [ + "Operations" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/owner" + }, + { + "name": "operation", + "description": "Either the id or internal name of the custom operation", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The custom operation result, either as `RunOperationResult` or as the file itself", + "headers": { + "X-Total-Count": { + "schema": { + "type": "integer" + }, + "description": "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." + }, + "X-Page-Size": { + "schema": { + "type": "integer" + }, + "description": "The maximum number of results per page" + }, + "X-Current-Page": { + "schema": { + "type": "integer" + }, + "description": "The current page the results are in" + }, + "X-Has-Next-Page": { + "schema": { + "type": "boolean" + }, + "description": "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." } - } - }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunOperationResult" + } + }, + "*/*": { + "schema": { + "type": "string", + "format": "binary" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } - } - } - } - }, - "/{user}/email-change/validate" : { - "parameters" : [ { - "$ref" : "#/components/parameters/userNoSelf" - } ], - "post" : { - "operationId" : "manuallyValidateEmailChange", - "summary" : "Manually validates a pending e-mail change.", - "description" : "If the user has a new e-mail address pending validation, this operation, which has to be executed by the user manager (admin or broker) marks the new e-mail address as validating, effectively changing the user's e-mail.", - "tags" : [ "Validation" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "204" : { - "description" : "The new e-mail address is effectly used and nothing is returned" }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } - }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" - } + } + }, + "requestBody": { + "description": "The custom operation parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunOperation" } } - }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + } + } + } + }, + "/{owner}/operations/{operation}/run-upload": { + "post": { + "operationId": "runOwnerOperationWithUpload", + "summary": "Runs a custom operation either for system or user while uploading a file", + "description": "Runs a specific custom operation over a given user or system if the `system` owner is used. The operation scope must match, being either `system` or `user`. This path allows uploading a file, by using a `multipart-form-data` post. If the operation resulted in a file download (either because the `resultType` is `fileDownload` or is a `resultPage` running for either PDF or CSV) the resulting contente type will be of the file itself. Otherwise will result in an `application/json` with the result object.", + "tags": [ + "Operations" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/owner" + }, + { + "name": "operation", + "description": "Either the id or internal name of the custom operation", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The custom operation result, either as `RunOperationResult` or as the file itself", + "headers": { + "X-Total-Count": { + "schema": { + "type": "integer" + }, + "description": "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." + }, + "X-Page-Size": { + "schema": { + "type": "integer" + }, + "description": "The maximum number of results per page" + }, + "X-Current-Page": { + "schema": { + "type": "integer" + }, + "description": "The current page the results are in" + }, + "X-Has-Next-Page": { + "schema": { + "type": "boolean" + }, + "description": "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunOperationResult" + } + }, + "*/*": { + "schema": { + "type": "string", + "format": "binary" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } - } - } - } - }, - "/{user}/email-change/resend" : { - "parameters" : [ { - "$ref" : "#/components/parameters/userNoSelf" - } ], - "post" : { - "operationId" : "resendEmailChangeEmail", - "summary" : "Re-sends the e-mail to validate a pending e-mail change.", - "description" : "Sends again the e-mail to the new user e-mail address. This operation has to be executed by the user manager (admin or broker).", - "tags" : [ "Validation" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "204" : { - "description" : "The new e-mail address is effectly used and nothing is returned" }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } - }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + } + }, + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "params": { + "description": "The custom operation parameters.", + "allOf": [ + { + "$ref": "#/components/schemas/RunOperation" + } + ] + }, + "file": { + "type": "string", + "format": "binary", + "description": "The file being uploaded" + } } } } @@ -52765,79 +53477,85 @@ } } }, - "/localization/locales" : { - "get" : { - "operationId" : "getLocales", - "summary" : "Returns the list of available locales, this collection is already sent in DataForUI or MobileBaseData.", - "description" : "Returns the list of available locales.", - "tags" : [ "Localization" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "200" : { - "description" : "The list of available locales.", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/UserLocale" - } + "/operations/{operation}/data-for-run": { + "get": { + "operationId": "getOperationDataForRun", + "summary": "Returns configuration data for running a custom operation without additional scope", + "description": "Returns data to run a specific custom operation, which must not have any additional scope to run, such as user, contact, record or advertisement. Hence, this path is suitable for custom operations with scope `system` or `internal`.", + "tags": [ + "Operations" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "operation", + "description": "Either the id or internal name of the custom operation", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The data used to run the operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OperationDataForRun" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -52845,270 +53563,269 @@ } } }, - "/localization/settings" : { - "post" : { - "operationId" : "saveLocalizationSettings", - "summary" : "Saves the localization settings for the authenticated user.", - "description" : "Saves the localization settings for the authenticated user such as the preferred language.", - "parameters" : [ ], - "tags" : [ "Localization" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "204" : { - "description" : "The settings were saved" + "/operations/{operation}/run": { + "post": { + "operationId": "runOperation", + "summary": "Runs a custom operation without additional scope", + "description": "Runs a specific custom operation without additional scope. Is suitable for operations with scope `system` or `internal`. If the operation resulted in a file download (either because the `resultType` is `fileDownload` or is a `resultPage` running for either PDF or CSV) the resulting contente type will be of the file itself. Otherwise will result in an `application/json` with the result object.", + "tags": [ + "Operations" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "operation", + "description": "Either the id or internal name of the custom operation", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The custom operation result, either as `RunOperationResult` or as the file itself", + "headers": { + "X-Total-Count": { + "schema": { + "type": "integer" + }, + "description": "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." + }, + "X-Page-Size": { + "schema": { + "type": "integer" + }, + "description": "The maximum number of results per page" + }, + "X-Current-Page": { + "schema": { + "type": "integer" + }, + "description": "The current page the results are in" + }, + "X-Has-Next-Page": { + "schema": { + "type": "boolean" + }, + "description": "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunOperationResult" + } + }, + "*/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } }, - "requestBody" : { - "description" : "The localization settings.", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/LocalizationSettings" - } - } - } - } - } - }, - "/alerts/user" : { - "get" : { - "operationId" : "searchUserAlerts", - "summary" : "Searches for user alerts.", - "description" : "Searches for user alerts according to a give set of filters.", - "tags" : [ "Alerts" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "brokers", - "in" : "query", - "required" : false, - "description" : "Either the ids or identification methods the alert user's brokers", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "datePeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum alert date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "groups", - "in" : "query", - "required" : false, - "description" : "Either the ids or internal names of the alert user", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "page", - "in" : "query", - "required" : false, - "description" : "The page number (zero-based) of the search. The default value is zero.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "pageSize", - "in" : "query", - "required" : false, - "description" : "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "skipTotalCount", - "in" : "query", - "required" : false, - "description" : "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "types", - "in" : "query", - "required" : false, - "description" : "The types of user alerts to search", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/UserAlertTypeEnum" - } - } - }, { - "name" : "user", - "in" : "query", - "required" : false, - "description" : "Either the id or identifier of the alert user", - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "The accounts with their statuses.", - "headers" : { - "X-Total-Count" : { - "schema" : { - "type" : "integer" + "requestBody": { + "description": "The custom operation parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunOperation" + } + } + } + } + } + }, + "/operations/{operation}/run-upload": { + "post": { + "operationId": "runOperationWithUpload", + "summary": "Runs a custom operation without additional scope while uploading a file", + "description": "Runs a specific custom operation without additional scope. Is suitable for operations with scope `system` or `internal`. This path allows uploading a file, by using a `multipart-form-data` post. If the operation resulted in a file download (either because the `resultType` is `fileDownload` or is a `resultPage` running for either PDF or CSV) the resulting contente type will be of the file itself. Otherwise will result in an `application/json` with the result object.", + "tags": [ + "Operations" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "operation", + "description": "Either the id or internal name of the custom operation", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The custom operation result, either as `RunOperationResult` or as the file itself", + "headers": { + "X-Total-Count": { + "schema": { + "type": "integer" }, - "description" : "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." + "description": "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." }, - "X-Page-Size" : { - "schema" : { - "type" : "integer" + "X-Page-Size": { + "schema": { + "type": "integer" }, - "description" : "The maximum number of results per page" + "description": "The maximum number of results per page" }, - "X-Current-Page" : { - "schema" : { - "type" : "integer" + "X-Current-Page": { + "schema": { + "type": "integer" }, - "description" : "The current page the results are in" + "description": "The current page the results are in" }, - "X-Has-Next-Page" : { - "schema" : { - "type" : "boolean" + "X-Has-Next-Page": { + "schema": { + "type": "boolean" }, - "description" : "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." + "description": "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." } }, - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/UserAlert" - } + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunOperationResult" + } + }, + "*/*": { + "schema": { + "type": "string", + "format": "binary" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "params": { + "description": "The custom operation parameters.", + "allOf": [ + { + "$ref": "#/components/schemas/RunOperation" + } + ] + }, + "file": { + "type": "string", + "format": "binary", + "description": "The file being uploaded" + } } } } @@ -53116,337 +53833,295 @@ } } }, - "/alerts/user/data-for-search" : { - "get" : { - "operationId" : "getUserAlertDataForSearch", - "summary" : "Returns configuration data for searching user alerts.", - "description" : "Returns configuration data for searching user alerts.", - "tags" : [ "Alerts" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The data for searching user alerts", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UserAlertDataForSearch" + "/operations/callback/{id}": { + "post": { + "operationId": "runCustomOperationCallback", + "summary": "Runs the callback of an external redirect custom operation", + "description": "Custom operations may be configured in Cyclos to be of result type `externalRedirect`. In such case, the regular execution returns an URL to which redirect clients. Once the external page processing is complete, the user is redirected back, so the operation can be completed. This operation should be executed to complete the payment. In order for the external service receive the correct URL, Cyclos need to have a link generation script that handles the link type `EXTERNAL_REDIRECT`.", + "tags": [ + "Operations" + ], + "parameters": [ + { + "name": "id", + "description": "The external redirect identifier. Received as part of the URL which is generated by Cyclos to the external service to use as callback.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "token", + "description": "The security token which is received as part of the URL which is generated by Cyclos to the external service to use as callback.", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The custom operation result, either as `RunOperationResult` or as the file itself", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunOperationResult" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } + }, + "requestBody": { + "description": "Data of the original callback request sent by the external service", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpRequestData" + } + } + } } } }, - "/{user}/references/data-for-search" : { - "parameters" : [ { - "$ref" : "#/components/parameters/user" - } ], - "get" : { - "operationId" : "getUserReferencesDataForSearch", - "summary" : "Returns data for searching references of a specific user.", - "description" : "Returns data for searching references of a specific user.", - "tags" : [ "References" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The configuration data for searching references", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UserReferenceDataForSearch" + "/marketplace/{ad}/operations": { + "get": { + "operationId": "listOperationsByAd", + "summary": "Lists the custom operations over the given advertisement", + "description": "Returns the custom operations the authenticated user can run over the given advertisement. All returned operations have the scope `advertisement`.", + "tags": [ + "Operations" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/ad" + } + ], + "responses": { + "200": { + "description": "The list of custom operations", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Operation" + } } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" - } - } - } - } - } + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } } }, - "/{user}/references" : { - "parameters" : [ { - "$ref" : "#/components/parameters/user" - } ], - "get" : { - "operationId" : "searchUserReferences", - "summary" : "Searches for references of a specific user", - "description" : "Returns references matching the search criteria, for a specific user.", - "tags" : [ "References" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "direction", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/ReferenceDirectionEnum" - } - }, { - "name" : "levels", - "in" : "query", - "required" : false, - "description" : "The levels to filter", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ReferenceLevelEnum" - } - } - }, { - "name" : "page", - "in" : "query", - "required" : false, - "description" : "The page number (zero-based) of the search. The default value is zero.", - "schema" : { - "type" : "integer" + "/marketplace/{ad}/operations/{operation}/data-for-run": { + "get": { + "operationId": "getAdOperationDataForRun", + "summary": "Returns configuration data for running a custom operation over an advertisement", + "description": "Returns data to run a specific custom operation over an advertisement. The operation scope must be `advertisement`.", + "tags": [ + "Operations" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] } - }, { - "name" : "pageSize", - "in" : "query", - "required" : false, - "description" : "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "period", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum reference date", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "relatedUser", - "in" : "query", - "required" : false, - "description" : "The user that either gave or received the reference to the user specified in the path or the other user involved in the payment feedback. Should be either the id or some other allowed identification (login name, email, etc).", - "schema" : { - "type" : "string" - } - }, { - "name" : "skipTotalCount", - "in" : "query", - "required" : false, - "description" : "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", - "schema" : { - "type" : "boolean" - } - } ], - "responses" : { - "200" : { - "description" : "The references matching the search filters.", - "headers" : { - "X-Total-Count" : { - "schema" : { - "type" : "integer" - }, - "description" : "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." - }, - "X-Page-Size" : { - "schema" : { - "type" : "integer" - }, - "description" : "The maximum number of results per page" - }, - "X-Current-Page" : { - "schema" : { - "type" : "integer" - }, - "description" : "The current page the results are in" - }, - "X-Has-Next-Page" : { - "schema" : { - "type" : "boolean" - }, - "description" : "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." - } - }, - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/UserReferenceResult" - } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/ad" + }, + { + "name": "operation", + "description": "Either the id or internal name of the custom operation", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The data used to run the operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OperationDataForRun" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -53454,568 +54129,745 @@ } } }, - "/{user}/references/statistics" : { - "parameters" : [ { - "$ref" : "#/components/parameters/user" - } ], - "get" : { - "operationId" : "getUserReferenceStatistics", - "summary" : "Returns statistics for a given user references.", - "description" : "Returns statistics for a given user references.", - "tags" : [ "References" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "direction", - "in" : "query", - "required" : false, - "description" : "Whether to return statistics on received or given references. When not specified, defaults to received.", - "schema" : { - "$ref" : "#/components/schemas/ReferenceDirectionEnum" - } - }, { - "name" : "periods", - "description" : "The requested periods for statistics. The result will have the `periods` field corresponding to the input periods. When not specified, the default is to return 2 periods: all time and last 30 days. The maximum allowed number of periods is 5. Each period can either be:\n\n- Single date: in ISO 8601 format, from that date and up.\n Example: `2019-10-30`;\n\n- 2 dates, split by pipe: Both in ISO 8601 format, specifying\n a period range. Example: `2019-10-01|2019-12-31T23:59:59.999`.", - "in" : "query", - "required" : false, - "schema" : { - "type" : "array", - "items" : { - "type" : "string" - } - } - } ], - "responses" : { - "200" : { - "description" : "The reference statistics for the requested periods.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ReferenceStatistics" + "/marketplace/{ad}/operations/{operation}/run": { + "post": { + "operationId": "runAdOperation", + "summary": "Runs a custom operation over an advertisement", + "description": "Runs a specific custom operation over a given advertisement. The operation scope must be `advertisement`. If the operation resulted in a file download (either because the `resultType` is `fileDownload` or is a `resultPage` running for either PDF or CSV) the resulting contente type will be of the file itself. Otherwise will result in an `application/json` with the result object.", + "tags": [ + "Operations" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/ad" + }, + { + "name": "operation", + "description": "Either the id or internal name of the custom operation", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The custom operation result, either as `RunOperationResult` or as the file itself", + "headers": { + "X-Total-Count": { + "schema": { + "type": "integer" + }, + "description": "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." + }, + "X-Page-Size": { + "schema": { + "type": "integer" + }, + "description": "The maximum number of results per page" + }, + "X-Current-Page": { + "schema": { + "type": "integer" + }, + "description": "The current page the results are in" + }, + "X-Has-Next-Page": { + "schema": { + "type": "boolean" + }, + "description": "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunOperationResult" + } + }, + "*/*": { + "schema": { + "type": "string", + "format": "binary" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } + }, + "requestBody": { + "description": "The custom operation parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunOperation" + } + } + } } } }, - "/{from}/reference/{to}/data-for-set" : { - "parameters" : [ { - "name" : "from", - "required" : true, - "in" : "path", - "x-dotInPath" : true, - "schema" : { - "type" : "string" - }, - "description" : "The user that will give the reference. Can be `self` for the currently authenticated user, or the id or some other allowed identifier (login name, e-mail, etc)." - }, { - "name" : "to", - "required" : true, - "in" : "path", - "x-dotInPath" : true, - "schema" : { - "type" : "string" - }, - "description" : "The user that will receive the reference. Can be the id or some other allowed identifier (login name, e-mail, etc)." - } ], - "get" : { - "operationId" : "getReferenceDataForSet", - "summary" : "Returns details for setting a reference.", - "description" : "Returns details for setting a reference.", - "tags" : [ "References" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "Contains data for setting the reference, as well as the current value, if any.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ReferenceDataForSet" + "/marketplace/{ad}/operations/{operation}/run-upload": { + "post": { + "operationId": "runAdOperationWithUpload", + "summary": "Runs a custom operation over an advertisement while uploading a file", + "description": "Runs a specific custom operation over a given advertisement. The operation scope must be `advertisement`. This path allows uploading a file, by using a `multipart-form-data` post. If the operation resulted in a file download (either because the `resultType` is `fileDownload` or is a `resultPage` running for either PDF or CSV) the resulting contente type will be of the file itself. Otherwise will result in an `application/json` with the result object.", + "tags": [ + "Operations" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/ad" + }, + { + "name": "operation", + "description": "Either the id or internal name of the custom operation", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The custom operation result, either as `RunOperationResult` or as the file itself", + "headers": { + "X-Total-Count": { + "schema": { + "type": "integer" + }, + "description": "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." + }, + "X-Page-Size": { + "schema": { + "type": "integer" + }, + "description": "The maximum number of results per page" + }, + "X-Current-Page": { + "schema": { + "type": "integer" + }, + "description": "The current page the results are in" + }, + "X-Has-Next-Page": { + "schema": { + "type": "boolean" + }, + "description": "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunOperationResult" + } + }, + "*/*": { + "schema": { + "type": "string", + "format": "binary" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - } - } - }, - "/{from}/reference/{to}" : { - "parameters" : [ { - "name" : "from", - "required" : true, - "in" : "path", - "x-dotInPath" : true, - "schema" : { - "type" : "string" }, - "description" : "The user that will give the reference. Can be `self` for the currently authenticated user, or the id or some other allowed identifier (login name, e-mail, etc)." - }, { - "name" : "to", - "required" : true, - "in" : "path", - "x-dotInPath" : true, - "schema" : { - "type" : "string" - }, - "description" : "The user that will receive the reference. Can be the id or some other allowed identifier (login name, e-mail, etc)." - } ], - "post" : { - "operationId" : "setReference", - "summary" : "Creates or changes the reference between the given users.", - "description" : "Creates or changes the reference between the given users.", - "tags" : [ "References" ], - "responses" : { - "201" : { - "description" : "Returns the identifier of the created / modified reference", - "headers" : { - "Location" : { - "description" : "URL for viewing the reference details", - "schema" : { - "type" : "string" - } - } - }, - "content" : { - "text/plain" : { - "schema" : { - "type" : "string" + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "params": { + "description": "The custom operation parameters.", + "allOf": [ + { + "$ref": "#/components/schemas/RunOperation" + } + ] + }, + "file": { + "type": "string", + "format": "binary", + "description": "The file being uploaded" + } } } } - }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + } + } + } + }, + "/records/{id}/operations": { + "get": { + "operationId": "listOperationsByRecord", + "summary": "Lists the custom operations over the given record", + "description": "Returns the custom operations the authenticated user can run over the given record. All returned operations have the scope `record`.", + "tags": [ + "Operations" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/id" + } + ], + "responses": { + "200": { + "description": "The list of custom operations", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Operation" + } } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - }, - "requestBody" : { - "description" : "The reference details", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ReferenceSet" - } - } - } } } }, - "/references/{id}" : { - "parameters" : [ { - "$ref" : "#/components/parameters/id" - } ], - "get" : { - "operationId" : "viewReference", - "summary" : "Returns details of a specific reference.", - "description" : "Returns details of a specific reference.", - "tags" : [ "References" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The reference details.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ReferenceView" + "/records/{id}/operations/{operation}/data-for-run": { + "get": { + "operationId": "getRecordOperationDataForRun", + "summary": "Returns configuration data for running a custom operation over a record", + "description": "Returns data to run a specific custom operation over a record. The operation scope must be `record`.", + "tags": [ + "Operations" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/id" + }, + { + "name": "operation", + "description": "Either the id or internal name of the custom operation", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The data used to run the operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OperationDataForRun" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - }, - "put" : { - "operationId" : "updateReference", - "summary" : "Updates an existing reference.", - "description" : "Updates an existing reference.", - "tags" : [ "References" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "204" : { - "description" : "The reference is updated and nothing is returned." - }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + } + }, + "/records/{id}/operations/{operation}/run": { + "post": { + "operationId": "runRecordOperation", + "summary": "Runs a custom operation over a record", + "description": "Runs a specific custom operation over a given record. The operation scope must be `record`. If the operation resulted in a file download (either because the `resultType` is `fileDownload` or is a `resultPage` running for either PDF or CSV) the resulting contente type will be of the file itself. Otherwise will result in an `application/json` with the result object.", + "tags": [ + "Operations" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/id" + }, + { + "name": "operation", + "description": "Either the id or internal name of the custom operation", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The custom operation result, either as `RunOperationResult` or as the file itself", + "headers": { + "X-Total-Count": { + "schema": { + "type": "integer" + }, + "description": "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." + }, + "X-Page-Size": { + "schema": { + "type": "integer" + }, + "description": "The maximum number of results per page" + }, + "X-Current-Page": { + "schema": { + "type": "integer" + }, + "description": "The current page the results are in" + }, + "X-Has-Next-Page": { + "schema": { + "type": "boolean" + }, + "description": "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunOperationResult" + } + }, + "*/*": { + "schema": { + "type": "string", + "format": "binary" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } }, - "requestBody" : { - "description" : "The reference details", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ReferenceSet" + "requestBody": { + "description": "The custom operation parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunOperation" } } } } - }, - "delete" : { - "operationId" : "deleteReference", - "summary" : "Removes a reference", - "description" : "Removes a reference", - "tags" : [ "References" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "204" : { - "description" : "The reference was deleted" - }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" + } + }, + "/records/{id}/operations/{operation}/run-upload": { + "post": { + "operationId": "runRecordOperationWithUpload", + "summary": "Runs a custom operation over a record while uploading a file", + "description": "Runs a specific custom operation over a given record. The operation scope must be `record`. This path allows uploading a file, by using a `multipart-form-data` post. If the operation resulted in a file download (either because the `resultType` is `fileDownload` or is a `resultPage` running for either PDF or CSV) the resulting contente type will be of the file itself. Otherwise will result in an `application/json` with the result object.", + "tags": [ + "Operations" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/id" + }, + { + "name": "operation", + "description": "Either the id or internal name of the custom operation", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The custom operation result, either as `RunOperationResult` or as the file itself", + "headers": { + "X-Total-Count": { + "schema": { + "type": "integer" + }, + "description": "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." + }, + "X-Page-Size": { + "schema": { + "type": "integer" + }, + "description": "The maximum number of results per page" + }, + "X-Current-Page": { + "schema": { + "type": "integer" + }, + "description": "The current page the results are in" + }, + "X-Has-Next-Page": { + "schema": { + "type": "boolean" + }, + "description": "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunOperationResult" + } + }, + "*/*": { + "schema": { + "type": "string", + "format": "binary" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "params": { + "description": "The custom operation parameters.", + "allOf": [ + { + "$ref": "#/components/schemas/RunOperation" + } + ] + }, + "file": { + "type": "string", + "format": "binary", + "description": "The file being uploaded" + } } } } @@ -54023,82 +54875,99 @@ } } }, - "/references/{id}/data-for-edit" : { - "parameters" : [ { - "$ref" : "#/components/parameters/id" - } ], - "get" : { - "operationId" : "getReferenceDataForEdit", - "summary" : "Returns data to edit an existing reference.", - "description" : "Returns configuration data for editing a reference, plus the current `ReferenceSet` object that can be altered and sent back.", - "tags" : [ "References" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The data for editing a reference", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ReferenceDataForSet" + "/transfers/{key}/operations": { + "get": { + "operationId": "listOperationsByTransfer", + "summary": "Lists the custom operations over the given transfer", + "description": "Returns the custom operations the authenticated user can run over the given transfer. All returned operations have the scope `transfer`.", + "tags": [ + "Operations" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "key", + "in": "path", + "required": true, + "description": "Either the id or transaction number", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The list of custom operations", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Operation" + } } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -54106,499 +54975,393 @@ } } }, - "/marketplace/data-for-search" : { - "get" : { - "operationId" : "getAdDataForSearch", - "summary" : "Returns configuration data for searching advertisements.", - "description" : "Returns data needed on for a general advertisements search.", - "tags" : [ "Marketplace" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "kind", - "in" : "query", - "required" : false, - "description" : "Indicates the kind of advertisement that should be searched. When nothing is passed (default) all kinds will be searched.", - "schema" : { - "$ref" : "#/components/schemas/AdKind" + "/transfer/{key}/operations/{operation}/data-for-run": { + "get": { + "operationId": "getTransferOperationDataForRun", + "summary": "Returns configuration data for running a custom operation over a transfer", + "description": "Returns data to run a specific custom operation over a transfer. The operation scope must be `transfer`.", + "tags": [ + "Operations" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] } - }, { - "name" : "brokered", - "description" : "If the authenticated is a broker, passing the `true` value will indicate the advertisements to be searched are from managed users of that broker. The default is `false`.", - "in" : "query", - "required" : false, - "schema" : { - "type" : "boolean" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "key", + "in": "path", + "required": true, + "description": "Either the id or transaction number", + "schema": { + "type": "string" + } + }, + { + "name": "operation", + "description": "Either the id or internal name of the custom operation", + "in": "path", + "required": true, + "schema": { + "type": "string" + } } - } ], - "responses" : { - "200" : { - "description" : "The configuration data for advertisements search.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AdDataForSearch" + ], + "responses": { + "200": { + "description": "The data used to run the operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OperationDataForRun" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - } - }, - "/marketplace" : { - "get" : { - "operationId" : "searchAds", - "summary" : "Searches for advertisements.", - "description" : "Returns a page of advertisements that match a given criteria.", - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "addressResult", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/AdAddressResultEnum" - } - }, { - "name" : "brokers", - "in" : "query", - "required" : false, - "description" : "Either ids or an identifications, such as login name, e-mail, etc, for the brokers of the advertisement owner. Can only be used when searching with a broker himself or admin.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "category", - "in" : "query", - "required" : false, - "description" : "Either id or internal name of a category", - "schema" : { - "type" : "string" - } - }, { - "name" : "currency", - "in" : "query", - "required" : false, - "description" : "Either id or internal name of a currency for the price", - "schema" : { - "type" : "string" - } - }, { - "name" : "customFields", - "in" : "query", - "required" : false, - "description" : "Advertisement custom field values used as filters. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by : (colon). For example, `customFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, customFields=field1:valueA|valueB. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `customFields=tradeType:offer|search,extraDate:2000-01-01|2001-12-31` would match results whose custom field with internal name `tradeType` is either `offer` or `search`, and whose `extraDate` is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `customFields=extraDate:|2001-12-31`. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `customFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `customFields=dynamic:'business`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "expirationPeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum expiration date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "groups", - "in" : "query", - "required" : false, - "description" : "Array of either id or internal names of user groups the advertisement owner must belong to", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "hasImages", - "in" : "query", - "required" : false, - "description" : "When set to `true` only advertisements with images are returned", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "keywords", - "in" : "query", - "required" : false, - "description" : "Textual search keywords. Sometimes, like in user search, the fields matched depends on what is configured on the products.", - "schema" : { - "type" : "string" - } - }, { - "name" : "kind", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/AdKind" - } - }, { - "name" : "latitude", - "in" : "query", - "required" : false, - "description" : "The reference latitude for distance searches", - "schema" : { - "type" : "number", - "format" : "double" - } - }, { - "name" : "longitude", - "in" : "query", - "required" : false, - "description" : "The reference longitude for distance searches", - "schema" : { - "type" : "number", - "format" : "double" - } - }, { - "name" : "maxDistance", - "in" : "query", - "required" : false, - "description" : "Maximum straight-line distance between the informed location and the resulting address. Is measured either in kilometers or miles, depending on the configuration. Only accepted if both `longitude` and `latitude` parameters are passed with the actual reference position.", - "schema" : { - "type" : "number", - "format" : "double" - } - }, { - "name" : "orderBy", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/AdOrderByEnum" - } - }, { - "name" : "page", - "in" : "query", - "required" : false, - "description" : "The page number (zero-based) of the search. The default value is zero.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "pageSize", - "in" : "query", - "required" : false, - "description" : "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "priceRange", - "in" : "query", - "required" : false, - "description" : "The minumum / maximum price. Used only if a currency is specified. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "number" - } - } - }, { - "name" : "productNumber", - "in" : "query", - "required" : false, - "description" : "Textual search for a product number for webshop only.", - "schema" : { - "type" : "string" - } - }, { - "name" : "profileFields", - "in" : "query", - "required" : false, - "description" : "User profile fields, both basic (full name, login name, phone, e-mail, etc) and custom fields, that are used for search. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by `:` (colon). For example, `profileFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, `profileFields=field1:valueA|valueB`. The accepted fields depend on the products the authenticated user has. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `profileFields=rank:bronze|silver,birthDate:2000-01-01|2001-12-31` would match results whose custom field with internal name 'rank' is either bronze or silver, and whose 'birthDate' is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `profileFields=birthDate:|2001-12-31`.\nThe basic profile fields have one of the following identifiers:\n- `name` or `fullName`: Full name; - `username`, `loginName` or `login`: Login name; - `email`: E-mail; - `phone`: Phone; - `accountNumber`, `account`: Account number; - `image`: Image (accepts a boolean value, indicating that either it is required that users either have images or not).\n\nIf address is an allowed profile field for search, specific address fields may be searched. The allowed ones are normally returned as the `addressFieldsInSearch` field in the corresponding result from a data-for-search request. The specific address fields are:\n- `address`: Searches on any address field (not a specific field); - `address.address`: Searches on the fields that represent the street address, which are `addressLine1`, `addressLine2`, `street`, `buildingNumber` and `complement`. Note that normally only a subset of them should be enabled in the configuration (either line 1 / 2 or street + number + complement);\n- `address.zip`: Searches for matching zip (postal) code; - `address.poBox`: Searches for matching postal box; - `address.neighborhood`: Searches by neighborhood; - `address.city`: Searches by city; - `address.region`: Searches by region (or state); - `address.country`: Searches by ISO 3166-1 alpha-2 country code. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `profileFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `profileFields=dynamic:'business`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "publicationPeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum publication date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "returnEditable", - "in" : "query", - "required" : false, - "description" : "Whether to return the editable property. Passing `true` will impact the performance a bit, as for each returned advertisement some statuses and permissions need to be checked.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "skipTotalCount", - "in" : "query", - "required" : false, - "description" : "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "statuses", - "in" : "query", - "required" : false, - "description" : "", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/AdStatusEnum" - } - } - }, { - "name" : "user", - "in" : "query", - "required" : false, - "description" : "Either id or an identification, such as login name, e-mail, etc, for the advertisement owner. The allowed identification methods are those the authenticated user can use on keywords search.", - "schema" : { - "type" : "string" - } - } ], - "tags" : [ "Marketplace" ], - "responses" : { - "200" : { - "description" : "The advertisements matching the criteria.", - "headers" : { - "X-Total-Count" : { - "schema" : { - "type" : "integer" + } + }, + "/transfers/{key}/operations/{operation}/run": { + "post": { + "operationId": "runTransferOperation", + "summary": "Runs a custom operation over a transfer", + "description": "Runs a specific custom operation over a given transfer. The operation scope must be `transfer`. If the operation resulted in a file download (either because the `resultType` is `fileDownload` or is a `resultPage` running for either PDF or CSV) the resulting contente type will be of the file itself. Otherwise will result in an `application/json` with the result object.", + "tags": [ + "Operations" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "key", + "in": "path", + "required": true, + "description": "Either the id or transaction number", + "schema": { + "type": "string" + } + }, + { + "name": "operation", + "description": "Either the id or internal name of the custom operation", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The custom operation result, either as `RunOperationResult` or as the file itself", + "headers": { + "X-Total-Count": { + "schema": { + "type": "integer" }, - "description" : "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." + "description": "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." }, - "X-Page-Size" : { - "schema" : { - "type" : "integer" + "X-Page-Size": { + "schema": { + "type": "integer" }, - "description" : "The maximum number of results per page" + "description": "The maximum number of results per page" }, - "X-Current-Page" : { - "schema" : { - "type" : "integer" + "X-Current-Page": { + "schema": { + "type": "integer" }, - "description" : "The current page the results are in" + "description": "The current page the results are in" }, - "X-Has-Next-Page" : { - "schema" : { - "type" : "boolean" + "X-Has-Next-Page": { + "schema": { + "type": "boolean" }, - "description" : "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." + "description": "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." } }, - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/AdResult" - } + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunOperationResult" + } + }, + "*/*": { + "schema": { + "type": "string", + "format": "binary" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } + }, + "requestBody": { + "description": "The custom operation parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunOperation" + } + } + } } } }, - "/{user}/marketplace/data-for-search" : { - "get" : { - "operationId" : "getUserAdsDataForSearch", - "summary" : "Returns configuration data for searching advertisements of a user.", - "description" : "Returns data needed on for a user's advertisements search.", - "tags" : [ "Marketplace" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/user" - }, { - "name" : "kind", - "in" : "query", - "required" : false, - "description" : "Indicates the kind of advertisement that should be searched. When nothing is passed (default) all kinds will be searched.", - "schema" : { - "$ref" : "#/components/schemas/AdKind" - } - } ], - "responses" : { - "200" : { - "description" : "The configuration data for this user's advertisements.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UserAdsDataForSearch" - } - } - } - }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } + "/transfers/{key}/operations/{operation}/run-upload": { + "post": { + "operationId": "runTransferOperationWithUpload", + "summary": "Runs a custom operation over a transfer while uploading a file", + "description": "Runs a specific custom operation over a given transfer. The operation scope must be `transfer`. This path allows uploading a file, by using a `multipart-form-data` post. If the operation resulted in a file download (either because the `resultType` is `fileDownload` or is a `resultPage` running for either PDF or CSV) the resulting contente type will be of the file itself. Otherwise will result in an `application/json` with the result object.", + "tags": [ + "Operations" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "key", + "in": "path", + "required": true, + "description": "Either the id or transaction number", + "schema": { + "type": "string" + } + }, + { + "name": "operation", + "description": "Either the id or internal name of the custom operation", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The custom operation result, either as `RunOperationResult` or as the file itself", + "headers": { + "X-Total-Count": { + "schema": { + "type": "integer" + }, + "description": "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." + }, + "X-Page-Size": { + "schema": { + "type": "integer" + }, + "description": "The maximum number of results per page" + }, + "X-Current-Page": { + "schema": { + "type": "integer" + }, + "description": "The current page the results are in" + }, + "X-Has-Next-Page": { + "schema": { + "type": "boolean" + }, + "description": "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunOperationResult" + } + }, + "*/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "params": { + "description": "The custom operation parameters.", + "allOf": [ + { + "$ref": "#/components/schemas/RunOperation" + } + ] + }, + "file": { + "type": "string", + "format": "binary", + "description": "The file being uploaded" + } } } } @@ -54606,552 +55369,469 @@ } } }, - "/{user}/marketplace/data-for-new" : { - "get" : { - "operationId" : "getAdDataForNew", - "summary" : "Returns configuration data for creating a new advertisement for a user and kind.", - "description" : "Returns data for creating a new advertisement for the given user. The `kind` should be informed. If not set, `simple` is assumed. Currently only `simple` advertisements can be created through this API.", - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/user" - }, { - "name" : "basedOnId", - "in" : "query", - "required" : false, - "description" : "Indicates the advertisement id to be based on by copying some data (e.g publication period) to the new advertisement.", - "schema" : { - "type" : "string" - } - }, { - "name" : "kind", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/AdKind" - } - } ], - "tags" : [ "Marketplace" ], - "responses" : { - "200" : { - "description" : "The data for creating a new advertisement.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AdDataForNew" + "/contact-list/{id}/operations": { + "get": { + "operationId": "listOperationsByContact", + "summary": "Lists the custom operations over the given contact", + "description": "Returns the custom operations the authenticated user can run over the given contact. All returned operations have the scope `contact`.", + "tags": [ + "Operations" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/id" + } + ], + "responses": { + "200": { + "description": "The list of custom operations", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Operation" + } } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } - } - } - } - }, - "/{user}/marketplace" : { - "get" : { - "operationId" : "searchUserAds", - "summary" : "Searches for advertisements of a specific user.", - "description" : "Returns a page of advertisements that match a given criteria for a given user. Equivallent to calling `GET /marketplace?owner={user}`.", - "parameters" : [ { - "$ref" : "#/components/parameters/user" - }, { - "name" : "addressResult", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/AdAddressResultEnum" - } - }, { - "name" : "category", - "in" : "query", - "required" : false, - "description" : "Either id or internal name of a category", - "schema" : { - "type" : "string" - } - }, { - "name" : "currency", - "in" : "query", - "required" : false, - "description" : "Either id or internal name of a currency for the price", - "schema" : { - "type" : "string" - } - }, { - "name" : "customFields", - "in" : "query", - "required" : false, - "description" : "Advertisement custom field values used as filters. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by : (colon). For example, `customFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, customFields=field1:valueA|valueB. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `customFields=tradeType:offer|search,extraDate:2000-01-01|2001-12-31` would match results whose custom field with internal name `tradeType` is either `offer` or `search`, and whose `extraDate` is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `customFields=extraDate:|2001-12-31`. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `customFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `customFields=dynamic:'business`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "expirationPeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum expiration date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "hasImages", - "in" : "query", - "required" : false, - "description" : "When set to `true` only advertisements with images are returned", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "keywords", - "in" : "query", - "required" : false, - "description" : "Textual search keywords. Sometimes, like in user search, the fields matched depends on what is configured on the products.", - "schema" : { - "type" : "string" - } - }, { - "name" : "kind", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/AdKind" - } - }, { - "name" : "latitude", - "in" : "query", - "required" : false, - "description" : "The reference latitude for distance searches", - "schema" : { - "type" : "number", - "format" : "double" - } - }, { - "name" : "longitude", - "in" : "query", - "required" : false, - "description" : "The reference longitude for distance searches", - "schema" : { - "type" : "number", - "format" : "double" - } - }, { - "name" : "maxDistance", - "in" : "query", - "required" : false, - "description" : "Maximum straight-line distance between the informed location and the resulting address. Is measured either in kilometers or miles, depending on the configuration. Only accepted if both `longitude` and `latitude` parameters are passed with the actual reference position.", - "schema" : { - "type" : "number", - "format" : "double" - } - }, { - "name" : "orderBy", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/AdOrderByEnum" - } - }, { - "name" : "page", - "in" : "query", - "required" : false, - "description" : "The page number (zero-based) of the search. The default value is zero.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "pageSize", - "in" : "query", - "required" : false, - "description" : "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "priceRange", - "in" : "query", - "required" : false, - "description" : "The minumum / maximum price. Used only if a currency is specified. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "number" - } - } - }, { - "name" : "productNumber", - "in" : "query", - "required" : false, - "description" : "Textual search for a product number for webshop only.", - "schema" : { - "type" : "string" - } - }, { - "name" : "profileFields", - "in" : "query", - "required" : false, - "description" : "User profile fields, both basic (full name, login name, phone, e-mail, etc) and custom fields, that are used for search. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by `:` (colon). For example, `profileFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, `profileFields=field1:valueA|valueB`. The accepted fields depend on the products the authenticated user has. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `profileFields=rank:bronze|silver,birthDate:2000-01-01|2001-12-31` would match results whose custom field with internal name 'rank' is either bronze or silver, and whose 'birthDate' is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `profileFields=birthDate:|2001-12-31`.\nThe basic profile fields have one of the following identifiers:\n- `name` or `fullName`: Full name; - `username`, `loginName` or `login`: Login name; - `email`: E-mail; - `phone`: Phone; - `accountNumber`, `account`: Account number; - `image`: Image (accepts a boolean value, indicating that either it is required that users either have images or not).\n\nIf address is an allowed profile field for search, specific address fields may be searched. The allowed ones are normally returned as the `addressFieldsInSearch` field in the corresponding result from a data-for-search request. The specific address fields are:\n- `address`: Searches on any address field (not a specific field); - `address.address`: Searches on the fields that represent the street address, which are `addressLine1`, `addressLine2`, `street`, `buildingNumber` and `complement`. Note that normally only a subset of them should be enabled in the configuration (either line 1 / 2 or street + number + complement);\n- `address.zip`: Searches for matching zip (postal) code; - `address.poBox`: Searches for matching postal box; - `address.neighborhood`: Searches by neighborhood; - `address.city`: Searches by city; - `address.region`: Searches by region (or state); - `address.country`: Searches by ISO 3166-1 alpha-2 country code. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `profileFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `profileFields=dynamic:'business`.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string" - } - } - }, { - "name" : "publicationPeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum publication date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "skipTotalCount", - "in" : "query", - "required" : false, - "description" : "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "statuses", - "in" : "query", - "required" : false, - "description" : "", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/AdStatusEnum" - } - } - } ], - "tags" : [ "Marketplace" ], - "responses" : { - "200" : { - "description" : "The advertisements matching the criteria.", - "headers" : { - "X-Total-Count" : { - "schema" : { - "type" : "integer" - }, - "description" : "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." - }, - "X-Page-Size" : { - "schema" : { - "type" : "integer" - }, - "description" : "The maximum number of results per page" - }, - "X-Current-Page" : { - "schema" : { - "type" : "integer" - }, - "description" : "The current page the results are in" - }, - "X-Has-Next-Page" : { - "schema" : { - "type" : "boolean" - }, - "description" : "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." - } - }, - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/AdResult" - } + } + } + } + }, + "/contact-list/{id}/operations/{operation}/data-for-run": { + "get": { + "operationId": "getContactOperationDataForRun", + "summary": "Returns configuration data for running a custom operation over a contact", + "description": "Returns data to run a specific custom operation over a contact. The operation scope must be `contact`.", + "tags": [ + "Operations" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/id" + }, + { + "name": "operation", + "description": "Either the id or internal name of the custom operation", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The data used to run the operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OperationDataForRun" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - }, - "post" : { - "operationId" : "createAd", - "summary" : "Creates a new advertisement for the given user.", - "description" : "Creates a new advertisement for the given user.", - "tags" : [ "Marketplace" ], - "parameters" : [ { - "$ref" : "#/components/parameters/user" - } ], - "responses" : { - "201" : { - "description" : "Returns the identifier of the new advertisement.", - "headers" : { - "Location" : { - "description" : "URL for viewing the advertisement details.", - "schema" : { - "type" : "string" - } + } + }, + "/contact-list/{id}/operations/{operation}/run": { + "post": { + "operationId": "runContactOperation", + "summary": "Runs a custom operation over a contact", + "description": "Runs a specific custom operation over a given contact. The operation scope must be `contact`. If the operation resulted in a file download (either because the `resultType` is `fileDownload` or is a `resultPage` running for either PDF or CSV) the resulting contente type will be of the file itself. Otherwise will result in an `application/json` with the result object.", + "tags": [ + "Operations" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/id" + }, + { + "name": "operation", + "description": "Either the id or internal name of the custom operation", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The custom operation result, either as `RunOperationResult` or as the file itself", + "headers": { + "X-Total-Count": { + "schema": { + "type": "integer" + }, + "description": "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." + }, + "X-Page-Size": { + "schema": { + "type": "integer" + }, + "description": "The maximum number of results per page" + }, + "X-Current-Page": { + "schema": { + "type": "integer" + }, + "description": "The current page the results are in" + }, + "X-Has-Next-Page": { + "schema": { + "type": "boolean" + }, + "description": "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." } }, - "content" : { - "text/plain" : { - "schema" : { - "type" : "string" + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunOperationResult" } - } - } - }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + }, + "*/*": { + "schema": { + "type": "string", + "format": "binary" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } }, - "requestBody" : { - "description" : "The advertisement to be created.", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AdNew" + "requestBody": { + "description": "The custom operation parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunOperation" } } } } } }, - "/marketplace/{ad}/data-for-edit" : { - "get" : { - "operationId" : "getAdDataForEdit", - "summary" : "Returns configuration data for editing an advertisement.", - "description" : "Returns configuration data which can be used to edit an advertisement.", - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/ad" - } ], - "tags" : [ "Marketplace" ], - "responses" : { - "200" : { - "description" : "The data for editing an advertisement.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AdDataForEdit" + "/contact-list/{id}/operations/{operation}/run-upload": { + "post": { + "operationId": "runContactOperationWithUpload", + "summary": "Runs a custom operation over an contact while uploading a file", + "description": "Runs a specific custom operation over a given contact. The operation scope must be `contact`. This path allows uploading a file, by using a `multipart-form-data` post. If the operation resulted in a file download (either because the `resultType` is `fileDownload` or is a `resultPage` running for either PDF or CSV) the resulting contente type will be of the file itself. Otherwise will result in an `application/json` with the result object.", + "tags": [ + "Operations" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/id" + }, + { + "name": "operation", + "description": "Either the id or internal name of the custom operation", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The custom operation result, either as `RunOperationResult` or as the file itself", + "headers": { + "X-Total-Count": { + "schema": { + "type": "integer" + }, + "description": "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." + }, + "X-Page-Size": { + "schema": { + "type": "integer" + }, + "description": "The maximum number of results per page" + }, + "X-Current-Page": { + "schema": { + "type": "integer" + }, + "description": "The current page the results are in" + }, + "X-Has-Next-Page": { + "schema": { + "type": "boolean" + }, + "description": "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunOperationResult" + } + }, + "*/*": { + "schema": { + "type": "string", + "format": "binary" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "params": { + "description": "The custom operation parameters.", + "allOf": [ + { + "$ref": "#/components/schemas/RunOperation" + } + ] + }, + "file": { + "type": "string", + "format": "binary", + "description": "The file being uploaded" + } } } } @@ -55159,340 +55839,469 @@ } } }, - "/marketplace/{ad}" : { - "get" : { - "operationId" : "viewAd", - "summary" : "Returns details of an advertisement.", - "description" : "Returns detailed information of an advertisement.", - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/ad" - } ], - "tags" : [ "Marketplace" ], - "responses" : { - "200" : { - "description" : "The advertisement details.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AdView" + "/contact-infos/{id}/operations": { + "get": { + "operationId": "listOperationsByContactInfo", + "summary": "Lists the custom operations over the given additional contact information", + "description": "Returns the custom operations the authenticated user can run over the given additional contact iformation. All returned operations have the scope `contactInfo`.", + "tags": [ + "Operations" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/id" + } + ], + "responses": { + "200": { + "description": "The list of custom operations", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Operation" + } } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - }, - "put" : { - "operationId" : "updateAd", - "summary" : "Updates an existing advertisement.", - "description" : "Updates an existing advertisement.", - "tags" : [ "Marketplace" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/ad" - } ], - "responses" : { - "204" : { - "description" : "The advertisement was updated" + } + }, + "/contact-infos/{id}/operations/{operation}/data-for-run": { + "get": { + "operationId": "getContactInfoOperationDataForRun", + "summary": "Returns configuration data for running a custom operation over an additional contact information", + "description": "Returns data to run a specific custom operation over an additional contact information. The operation scope must be `contactInfo`.", + "tags": [ + "Operations" + ], + "security": [ + { + "basic": [] }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" - } - } - } + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/id" }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + { + "name": "operation", + "description": "Either the id or internal name of the custom operation", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The data used to run the operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OperationDataForRun" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - }, - "requestBody" : { - "description" : "The advertisement to be edited.", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AdEdit" - } - } - } } - }, - "delete" : { - "operationId" : "deleteAd", - "summary" : "Removes an advertisement.", - "description" : "Removes an advertisement by id.", - "tags" : [ "Marketplace" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/ad" - } ], - "responses" : { - "204" : { - "description" : "The advertisement was removed." - }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" + } + }, + "/contact-infos/{id}/operations/{operation}/run": { + "post": { + "operationId": "runContactInfoOperation", + "summary": "Runs a custom operation over an additional contact information", + "description": "Runs a specific custom operation over a given additional contact information. The operation scope must be `contactInfo`. If the operation resulted in a file download (either because the `resultType` is `fileDownload` or is a `resultPage` running for either PDF or CSV) the resulting contente type will be of the file itself. Otherwise will result in an `application/json` with the result object.", + "tags": [ + "Operations" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/id" + }, + { + "name": "operation", + "description": "Either the id or internal name of the custom operation", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The custom operation result, either as `RunOperationResult` or as the file itself", + "headers": { + "X-Total-Count": { + "schema": { + "type": "integer" + }, + "description": "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." + }, + "X-Page-Size": { + "schema": { + "type": "integer" + }, + "description": "The maximum number of results per page" + }, + "X-Current-Page": { + "schema": { + "type": "integer" + }, + "description": "The current page the results are in" + }, + "X-Has-Next-Page": { + "schema": { + "type": "boolean" + }, + "description": "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunOperationResult" + } + }, + "*/*": { + "schema": { + "type": "string", + "format": "binary" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } + }, + "requestBody": { + "description": "The custom operation parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunOperation" + } + } + } } } }, - "/marketplace/{ad}/export/{format}" : { - "parameters" : [ { - "$ref" : "#/components/parameters/ad" - }, { - "$ref" : "#/components/parameters/format" - } ], - "get" : { - "operationId" : "exportAd", - "summary" : "Exports the advertisement details to a file.", - "description" : "Exports the advertisement details to a file. The available formats are available in `AdView`", - "tags" : [ "Marketplace" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "200" : { - "description" : "The file content", - "content" : { - "*/*" : { - "schema" : { - "type" : "string", - "format" : "binary" + "/contact-infos/{id}/operations/{operation}/run-upload": { + "post": { + "operationId": "runContactInfoOperationWithUpload", + "summary": "Runs a custom operation over an additional contact information while uploading a file", + "description": "Runs a specific custom operation over a given additional contact information. The operation scope must be `contactInfo`. This path allows uploading a file, by using a `multipart-form-data` post. If the operation resulted in a file download (either because the `resultType` is `fileDownload` or is a `resultPage` running for either PDF or CSV) the resulting contente type will be of the file itself. Otherwise will result in an `application/json` with the result object.", + "tags": [ + "Operations" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/id" + }, + { + "name": "operation", + "description": "Either the id or internal name of the custom operation", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The custom operation result, either as `RunOperationResult` or as the file itself", + "headers": { + "X-Total-Count": { + "schema": { + "type": "integer" + }, + "description": "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." + }, + "X-Page-Size": { + "schema": { + "type": "integer" + }, + "description": "The maximum number of results per page" + }, + "X-Current-Page": { + "schema": { + "type": "integer" + }, + "description": "The current page the results are in" + }, + "X-Has-Next-Page": { + "schema": { + "type": "boolean" + }, + "description": "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunOperationResult" + } + }, + "*/*": { + "schema": { + "type": "string", + "format": "binary" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "params": { + "description": "The custom operation parameters.", + "allOf": [ + { + "$ref": "#/components/schemas/RunOperation" + } + ] + }, + "file": { + "type": "string", + "format": "binary", + "description": "The file being uploaded" + } } } } @@ -55500,65 +56309,85 @@ } } }, - "/marketplace/{ad}/hide" : { - "post" : { - "operationId" : "hideAd", - "summary" : "Hides an advertisement by id.", - "description" : "Hides an advertisement thus making it visible only for the owner and its managers.", - "tags" : [ "Marketplace" ], - "parameters" : [ { - "$ref" : "#/components/parameters/ad" - } ], - "responses" : { - "204" : { - "description" : "The advertisement was hidden." + "/menu/{menu}/operations/data-for-run": { + "get": { + "operationId": "getMenuOperationDataForRun", + "summary": "Returns configuration data for running a custom operation which is in a custom menu", + "description": "Returns data to run a specific custom operation of a custom menu. The operation scope must be `menu`.", + "tags": [ + "Operations" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "menu", + "description": "Either the id or internal name of the custom menu item", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The data used to run the operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OperationDataForRun" + } + } + } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -55566,274 +56395,393 @@ } } }, - "/marketplace/{ad}/unhide" : { - "post" : { - "operationId" : "unhideAd", - "summary" : "Unhides an advertisement by id.", - "description" : "Unhides an advertisement thus making it visible for other members.", - "tags" : [ "Marketplace" ], - "parameters" : [ { - "$ref" : "#/components/parameters/ad" - } ], - "responses" : { - "204" : { - "description" : "The advertisement was unhidden." + "/menu/{menu}/operations/run": { + "post": { + "operationId": "runMenuOperation", + "summary": "Runs a custom operation from a custom menu item", + "description": "Runs a specific custom operation from a menu item. The operation scope must be `menu`. If the operation resulted in a file download (either because the `resultType` is `fileDownload` or is a `resultPage` running for either PDF or CSV) the resulting contente type will be of the file itself. Otherwise will result in an `application/json` with the result object.", + "tags": [ + "Operations" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "menu", + "description": "Either the id or internal name of the custom menu item", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The custom operation result, either as `RunOperationResult` or as the file itself", + "headers": { + "X-Total-Count": { + "schema": { + "type": "integer" + }, + "description": "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." + }, + "X-Page-Size": { + "schema": { + "type": "integer" + }, + "description": "The maximum number of results per page" + }, + "X-Current-Page": { + "schema": { + "type": "integer" + }, + "description": "The current page the results are in" + }, + "X-Has-Next-Page": { + "schema": { + "type": "boolean" + }, + "description": "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunOperationResult" + } + }, + "*/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } + }, + "requestBody": { + "description": "The custom operation parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunOperation" + } + } + } } } }, - "/marketplace/{ad}/set-as-draft" : { - "post" : { - "operationId" : "setAdAsDraft", - "summary" : "Change the advertisement status to `draft`.", - "description" : "Change the advertisement status to `draft` thus making it only visible for the owner.", - "tags" : [ "Marketplace" ], - "parameters" : [ { - "$ref" : "#/components/parameters/ad" - } ], - "responses" : { - "204" : { - "description" : "The advertisement status was changed." + "/menu/{menu}/operations/run-upload": { + "post": { + "operationId": "runMenuOperationWithUpload", + "summary": "Runs a custom operation from a custom menu while uploading a file", + "description": "Runs a specific custom operation from a menu. The operation scope must be `menu`. This path allows uploading a file, by using a `multipart-form-data` post. If the operation resulted in a file download (either because the `resultType` is `fileDownload` or is a `resultPage` running for either PDF or CSV) the resulting contente type will be of the file itself. Otherwise will result in an `application/json` with the result object.", + "tags": [ + "Operations" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "menu", + "description": "Either the id or internal name of the custom menu item", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The custom operation result, either as `RunOperationResult` or as the file itself", + "headers": { + "X-Total-Count": { + "schema": { + "type": "integer" + }, + "description": "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." + }, + "X-Page-Size": { + "schema": { + "type": "integer" + }, + "description": "The maximum number of results per page" + }, + "X-Current-Page": { + "schema": { + "type": "integer" + }, + "description": "The current page the results are in" + }, + "X-Has-Next-Page": { + "schema": { + "type": "boolean" + }, + "description": "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunOperationResult" + } + }, + "*/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } }, - "requestBody" : { - "description" : "The comments for the action. Only if the authenticated user is a manager of the advertisement's owner with permissions to manage pending ads.", - "required" : false, - "content" : { - "text/plain" : { - "schema" : { - "type" : "string" + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "params": { + "description": "The custom operation parameters.", + "allOf": [ + { + "$ref": "#/components/schemas/RunOperation" + } + ] + }, + "file": { + "type": "string", + "format": "binary", + "description": "The file being uploaded" + } + } } } } } } }, - "/marketplace/{ad}/request-authorization" : { - "post" : { - "operationId" : "submitAdForAuthorization", - "summary" : "Request for authorization for an advertisement.", - "description" : "Request for authorization for an advertisement. Only if the system is configured to require authorizations and the authenticated user is the owner of the advertisement. The advertisement will remain in status `pending` until approved or rejected.", - "tags" : [ "Marketplace" ], - "parameters" : [ { - "$ref" : "#/components/parameters/ad" - } ], - "responses" : { - "204" : { - "description" : "The advertisement was submitted for authorization." + "/wizards/{key}/start": { + "parameters": [ + { + "name": "key", + "in": "path", + "required": true, + "description": "The custom wizard id or internal name", + "schema": { + "type": "string" + } + } + ], + "post": { + "operationId": "startWizard", + "summary": "Starts the execution of a custom wizard without a scope.", + "description": "The data for the first step is returned. This operation is used for running wizards with `kind` either `$enum.WizardKind.registration` or `$enum.WizardKind.system`. Can also be used by logged users to run wizards with `kind` either `$enum.WizardKind.user` over themselves.", + "tags": [ + "Wizards" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } - } + { + "name": "inviteToken", + "description": "For registration wizards, this parameter indicates the token received by e-mail. Passing it has the advantage of not having to verify that same e-mail address, and if the invitation was sent by a broker, the newly registered user will already be assigned to that broker.", + "in": "query", + "schema": { + "type": "string" } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" - } - } + { + "name": "externalPaymentToken", + "required": false, + "in": "query", + "description": "For registration wizards, this parameter indicates the external payment token sent by e-mail. Passing this token eases the registration process by pre-filling the e-mail address and avoiding the need to verify it.", + "schema": { + "type": "string" } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" - } - } + { + "name": "userAgentId", + "required": false, + "in": "query", + "description": "For registration wizards. A stable client-side generated id, which will be used to identify the device from which the user is being registered. It will be used when a trusted device activation is requested, in case the activation comes from the same device and the user's email was verified, then an activation code would not be required.", + "schema": { + "type": "string" } - }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + } + ], + "responses": { + "200": { + "description": "Returns the data for the first step", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WizardExecutionData" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } - } - } - } - }, - "/marketplace/{ad}/approve" : { - "post" : { - "operationId" : "approveAd", - "summary" : "Approves a pending advertisement.", - "description" : "Change the advertisement status from `pending` to `active`, making it publcly visible.", - "tags" : [ "Marketplace" ], - "parameters" : [ { - "$ref" : "#/components/parameters/ad" - } ], - "responses" : { - "204" : { - "description" : "The advertisement status was changed." }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -55841,542 +56789,570 @@ } } }, - "/marketplace/{ad}/reject" : { - "post" : { - "operationId" : "rejectAd", - "summary" : "Rejects a pending advertisement.", - "description" : "Change the advertisement status from `pending` to `draft`, making it visible only to its owner. A comment text is set in the request body.", - "tags" : [ "Marketplace" ], - "parameters" : [ { - "$ref" : "#/components/parameters/ad" - } ], - "responses" : { - "204" : { - "description" : "The advertisement status was changed." + "/users/{user}/wizards/{key}/start": { + "parameters": [ + { + "$ref": "#/components/parameters/user" + }, + { + "name": "key", + "in": "path", + "required": true, + "description": "The custom wizard id or internal name", + "schema": { + "type": "string" + } + } + ], + "post": { + "operationId": "startUserWizard", + "summary": "Starts the execution of a custom wizard over a given user.", + "description": "The data for the first step is returned. Only wizards with `kind` = `user` can be executed in this operation.", + "tags": [ + "Wizards" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "Returns the data for the first step", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WizardExecutionData" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } - } - }, - "requestBody" : { - "description" : "The comments for the action.", - "required" : false, - "content" : { - "text/plain" : { - "schema" : { - "type" : "string" + }, + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } } } } } } }, - "/marketplace/{ad}/questions" : { - "post" : { - "operationId" : "createAdQuestion", - "summary" : "Creates a new advertisement question.", - "description" : "Creates a new question for an advertisement and associate it to the authenticated user.", - "tags" : [ "AdQuestions" ], - "parameters" : [ { - "$ref" : "#/components/parameters/ad" - } ], - "responses" : { - "201" : { - "description" : "Returns the identifier of the new question.", - "headers" : { - "Location" : { - "description" : "URL for viewing the advertisement question details.", - "schema" : { - "type" : "string" - } - } - }, - "content" : { - "text/plain" : { - "schema" : { - "type" : "string" + "/menu/{menu}/wizards/start": { + "parameters": [ + { + "name": "menu", + "description": "Either the id or internal name of the custom menu item", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "post": { + "operationId": "startMenuWizard", + "summary": "Starts the execution of a custom wizard from a custom menu entry.", + "description": "The data for the first step is returned. Only wizards with `kind` = `menu` can be executed in this operation.", + "tags": [ + "Wizards" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "Returns the data for the first step", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WizardExecutionData" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - }, - "requestBody" : { - "required" : true, - "content" : { - "text/plain" : { - "schema" : { - "type" : "string" - } - } - } } } }, - "/questions/{id}" : { - "get" : { - "operationId" : "getAdQuestion", - "summary" : "Returns details of an advertisement question.", - "description" : "Return detailed information of an advertisement question.", - "tags" : [ "AdQuestions" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/id" - } ], - "responses" : { - "200" : { - "description" : "Returns the advertisement question information.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AdQuestionView" + "/wizard-executions/{key}": { + "parameters": [ + { + "name": "key", + "in": "path", + "required": true, + "description": "The custom wizard execution key", + "schema": { + "type": "string" + } + } + ], + "get": { + "operationId": "getCurrentWizardExecution", + "summary": "Returns the wizard execution data for the current step.", + "description": "Doesn't modify the wizard execution status.", + "tags": [ + "Wizards" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "Returns the data for the current step.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WizardExecutionData" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } }, - "delete" : { - "operationId" : "deleteAdQuestion", - "summary" : "Removes an advertisement question.", - "description" : "Removes an advertisement question created for the authenticated user.", - "tags" : [ "AdQuestions" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/id" - } ], - "responses" : { - "204" : { - "description" : "The advertisement question was removed." + "post": { + "operationId": "transitionWizardExecution", + "summary": "Transitions a wizard from a step to another, or finishes the wizard", + "description": "Applies a transition to the current wizard step. When no transition is sent, the wizard is finished. In this case, the current step must be the last wizard step. The request body contains the step parameters, according to the step kind.", + "tags": [ + "Wizards" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "transition", + "in": "query", + "schema": { + "type": "string" + }, + "description": "The transition id for the next step. Must be the id of one of the transitions returned in `WizardExecutionData.transitions`, or null, in which case the wizard finishes." + } + ], + "requestBody": { + "description": "The current step fields", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WizardTransitionParams" + } + } + } + }, + "responses": { + "200": { + "description": "Returns the data for the next step, or, if finished, the wizard result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WizardExecutionData" + } + } + } }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - } - }, - "/questions/{id}/answer" : { - "post" : { - "operationId" : "answerAdQuestion", - "summary" : "Answers an advertisement question as the authenticated user.", - "description" : "Answers a question by id (created for an advertisement of its own).", - "tags" : [ "AdQuestions" ], - "parameters" : [ { - "$ref" : "#/components/parameters/id" - } ], - "responses" : { - "204" : { - "description" : "The question was answered." + }, + "delete": { + "operationId": "cancelWizardExecution", + "summary": "Cancels a wizard execution, removing all associated context.", + "description": "All stored state for this execution is removed, and its key is no longer valid.", + "tags": [ + "Wizards" + ], + "responses": { + "204": { + "description": "The execution was canceled and nothing is returned." }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } + } + } + } + }, + "/wizard-executions/{key}/back": { + "parameters": [ + { + "name": "key", + "in": "path", + "required": true, + "description": "The custom wizard execution key", + "schema": { + "type": "string" + } + } + ], + "post": { + "operationId": "backWizardExecution", + "summary": "Goes back one or more steps in a wizard execution.", + "description": "Returns the execution data for the new step.", + "tags": [ + "Wizards" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + { + "name": "steps", + "in": "query", + "schema": { + "type": "integer" + }, + "required": false, + "description": "The number of steps to go back. When not informed, will be 1." + } + ], + "responses": { + "200": { + "description": "Returns the data for the next step", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WizardExecutionData" } } } - } - }, - "requestBody" : { - "required" : true, - "content" : { - "text/plain" : { - "schema" : { - "type" : "string" - } - } - } - } - } - }, - "/{user}/unanswered-questions" : { - "get" : { - "operationId" : "searchUnansweredAdQuestions", - "summary" : "Searches for unanswered questions for a specific user", - "description" : "Searches for unanswered questions for a specific user (currently `self` only is supported), if a type is not given then `simple` will be used. Only if the user has the ad / webshop questions enabled and the authenticated user can manage ads / webshops of the given user.", - "tags" : [ "AdQuestions" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/user" - }, { - "name" : "kind", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/AdKind" - } - }, { - "name" : "page", - "in" : "query", - "required" : false, - "description" : "The page number (zero-based) of the search. The default value is zero.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "pageSize", - "in" : "query", - "required" : false, - "description" : "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "skipTotalCount", - "in" : "query", - "required" : false, - "description" : "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", - "schema" : { - "type" : "boolean" - } - } ], - "responses" : { - "200" : { - "description" : "Returns the unanswered questions.", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/AdQuestionResult" - } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -56384,82 +57360,102 @@ } } }, - "/shopping-carts" : { - "get" : { - "operationId" : "getShoppingCarts", - "summary" : "Returns the shopping carts list.", - "description" : "Returns the shopping carts for the authenticated user. Each cart contains all webshop ads offered by the same seller and in the same currency.", - "tags" : [ "ShoppingCarts" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The shopping carts list.", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ShoppingCartResult" - } + "/wizard-executions/{key}/redirect": { + "parameters": [ + { + "name": "key", + "in": "path", + "required": true, + "description": "The custom wizard execution key", + "schema": { + "type": "string" + } + } + ], + "post": { + "operationId": "redirectWizardExecution", + "summary": "Prepares an external redirect in a wizard execution.", + "description": "The current step must be set for external redirect (the `WizardExecutionData.action` must be `externalRedirect`). The URL to which redirect the user is returned.", + "tags": [ + "Wizards" + ], + "requestBody": { + "description": "The current step fields", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WizardTransitionParams" + } + } + } + }, + "responses": { + "200": { + "description": "Returns the URL to where redirect the user", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -56467,169 +57463,193 @@ } } }, - "/shopping-carts/{id}" : { - "get" : { - "operationId" : "getShoppingCartDetails", - "summary" : "Returns details of a shopping cart.", - "description" : "Returns the details of a shopping cart by id with all webshop ads offered by the same seller and in the same currency.", - "tags" : [ "ShoppingCarts" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/id" - } ], - "responses" : { - "200" : { - "description" : "The shopping cart details.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ShoppingCartView" + "/wizard-executions/{key}/callback": { + "parameters": [ + { + "name": "key", + "in": "path", + "required": true, + "description": "The custom wizard execution key", + "schema": { + "type": "string" + } + } + ], + "post": { + "operationId": "runWizardCallback", + "summary": "Runs the callback of an external redirect wizard step.", + "description": "This operation is invoked after a step was redirected to an external application. The script should check whether the external operation was completed and act accordingly", + "tags": [ + "Wizards" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "requestBody": { + "description": "Data of the original callback request sent by the external service", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpRequestData" + } + } + } + }, + "responses": { + "200": { + "description": "The new step data after transitioning to the next step.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WizardExecutionData" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - }, - "delete" : { - "operationId" : "removeShoppingCart", - "summary" : "Removes a shopping cart.", - "description" : "Removes the given shopping cart by id and returns the total number of the webshop ads in the remaining all carts.", - "tags" : [ "ShoppingCarts" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/id" - } ], - "responses" : { - "200" : { - "description" : "The shopping cart was removed. Returns the total number of the webshop ads in all the remaining shopping carts.", - "content" : { - "application/json" : { - "schema" : { - "type" : "integer" - } - } + } + }, + "/wizard-executions/{key}/verification-code": { + "parameters": [ + { + "name": "key", + "in": "path", + "required": true, + "description": "The custom wizard execution key", + "schema": { + "type": "string" + } + } + ], + "post": { + "operationId": "sendWizardVerificationCode", + "summary": "Sends a code to verify either e-mail or mobile phone.", + "description": "The given execution must be of a registration wizard, and be in a form fields step that contain either e-mail or mobile phone, according to the given send medium.", + "tags": [ + "Wizards" + ], + "requestBody": { + "description": "The parameters for sending the code", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WizardVerificationCodeParams" + } } + } + }, + "responses": { + "204": { + "description": "The verification code is sent and nothing is returned." }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -56637,81 +57657,102 @@ } } }, - "/shopping-carts/{id}/adjust" : { - "post" : { - "operationId" : "adjustAndGetShoppingCartDetails", - "summary" : "Adjusts a shopping cart items, returning its details.", - "description" : "Works like `GET /shopping-carts/{id}`, but first adjusts the status of all items. For each item checks both the availability and the quantity, setting to corresponding `availability` or `quantityAdjustment` property if anything was modified.", - "tags" : [ "ShoppingCarts" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/id" - } ], - "responses" : { - "200" : { - "description" : "The shopping cart details.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ShoppingCartView" + "/nfc/{tokenType}/{value}": { + "get": { + "operationId": "getNfcToken", + "summary": "Retrieve the NFC token detailed data", + "description": "Returns the token's data and the user owner of the token (i.e the assigned user, if any)", + "tags": [ + "NFC" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "name": "tokenType", + "description": "The internal name or id of the token type", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "value", + "description": "The token value", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Returns the token data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TokenDetailed" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -56719,355 +57760,403 @@ } } }, - "/shopping-carts/items/{ad}" : { - "post" : { - "operationId" : "addItemToShoppingCart", - "summary" : "Adds the given webshop ad to the corresponding shopping cart.", - "description" : "Adds the given webshop ad to the corresponding shopping cart according to the seller and currency and returns the total number of webshop ads in all carts. Optionally a quantity can be specified. The different shopping carts are created dynamically according to the seller and currency.\nE.g if the user adds the following webshop ads (i.e items):\n- 1 from Seller1 in Dolars;\n- 2 from Seller1 in Euros;\n- 1 from Seller2 un Dolars.\n\nThen the following three carts will be created for the authenticated user:\n\n- 1 cart containing 1 item offered by Seller1 in Dolars;\n- 1 cart containing 2 items offered by Seller1 in Euros;\n- 1 cart containing 1 item offered by Seller2 in Dolars.\n\nFinally, the total number of wbshop ads returned will be 4. For those quantity-limited products the given quantity could have been adjusted to meet the restrictions. You can view the adjustment applied to each item when retrieving the details of a shopping cart. if you want to remove the adjustment just send a new request to modify the quantity (using `PUT /shopping-carts/items/{ad}`) and specify the current quantity (i.e the already adjusted and returned in the details of the shopping cart) as the parameter.", - "tags" : [ "ShoppingCarts" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/ad" - }, { - "name" : "quantity", - "in" : "query", - "required" : false, - "description" : "The quantity being added. It could be a decimal number only if the corresponding webshop ad allows it.", - "schema" : { - "type" : "number", - "format" : "double" + "/nfc/external-auth": { + "post": { + "operationId": "nfcExternalAuth", + "summary": "NFC external authentication", + "description": "The NFC tag will normally perform a mutual authentication, by first generating a challenge that must be encrypted by the external system with the device key. With this the external system is authenticated. Cyclos also returns a challenge that should be encrypted by the NFC tag. This challenge can later be passed in specific operations (for example, when performing a payment) for Cyclos to make sure the NFC tag is present on the operation.", + "tags": [ + "NFC" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] } - } ], - "responses" : { - "200" : { - "description" : "Returns the total number of webshop ads present in all the shopping carts.", - "content" : { - "application/json" : { - "schema" : { - "type" : "integer" + ], + "parameters": [], + "responses": { + "200": { + "description": "Returns the challenge to be encrypted by the NFC tag in a subsequent operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NfcExternalAuthenticateResult" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "If an error has occurred adding the webshop ad to the cart.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ShoppingCartError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } - } - } - }, - "delete" : { - "operationId" : "removeItemFromShoppingCart", - "summary" : "Removes the given webshop ad from the corresponding shopping cart.", - "description" : "Removes the given webshop ad from the corresponding shopping cart according to the seller and currency and returns the total number of the remaining webshop ads in all carts.", - "tags" : [ "ShoppingCarts" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/ad" - } ], - "responses" : { - "200" : { - "description" : "The webshop ad was removed from the shopping cart. Returns the total number of the remaining webshop ads in all the shopping carts.", - "content" : { - "application/json" : { - "schema" : { - "type" : "integer" + }, + "500": { + "description": "If a NFC external authentication error has occurred", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NfcAuthError" } } } + } + }, + "requestBody": { + "description": "The parameters for the external authentication. If the `token` value is informed, it will be performed an external authentication with the token itself, using the Application Master Key (AMK). If the `token` is not informed, the authentication will be done using the PICC Master Key (PMK), which is useful, for example, when initializing the NFC tag.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NfcExternalAuthenticateParameter" + } + } + } + } + } + }, + "/nfc/data-for-initialize": { + "get": { + "operationId": "getNfcDataForInitialize", + "summary": "Returns data for NFC tag initialization. Optionally the user can personalize the tag too.", + "description": "Returns data with the NFC token types the authenticated user can use to initialize NFC tags.", + "tags": [ + "NFC" + ], + "security": [ + { + "basic": [] }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The data for NFC tag initialization", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NfcDataForInitialize" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - }, - "put" : { - "operationId" : "modifyItemQuantityOnShoppingCart", - "summary" : "Modifies the corresponding cart with the new quantity for the given webshop ad.", - "description" : "Modifies the corresponding shopping cart with the new quantity for the given webshop ad only if it was already added to the cart of the authenticted user and returns the total number of webshop ads in all carts. For those quantity-limited products the given quantity could have been adjusted to met the restrictions. You can view the adjustment applied to each item when retrieving the details of a shopping cart. if you want to remove the adjustment just send a new request to modify the quantity and specify the current quantity (i.e the already adjusted and returned in the details of the shopping cart) as the parameter.", - "tags" : [ "ShoppingCarts" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/ad" - }, { - "name" : "quantity", - "in" : "query", - "required" : true, - "description" : "The new quantity for the given webshop ad. It could be a decimal number only if the corresponding webshop ad allows it. If zero then the webshop ad is removed from the cart.", - "schema" : { - "type" : "number", - "format" : "double" + } + }, + "/nfc/initialize": { + "post": { + "operationId": "initializeNfc", + "summary": "Initializes a NFC tag", + "description": "Initializes a NFC tag, creating a new `token` in Cyclos. Returns the keys (PICC Master Key, Application Master Key and the Operational Key) to be stored on the NFC tag.", + "tags": [ + "NFC" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] } - } ], - "responses" : { - "200" : { - "description" : "The quantity for the given webshop was updated. Returns the total number of webshop ads present in all the shopping carts.", - "content" : { - "application/json" : { - "schema" : { - "type" : "integer" + ], + "parameters": [], + "responses": { + "200": { + "description": "The data for NFC tag initialization", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NfcInitializeResult" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "If an error has occurred modifying the quantity.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ShoppingCartError" + "500": { + "description": "If a NFC tag inititalization error has occurred", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InitializeNfcError" } } } } + }, + "requestBody": { + "description": "The parameters for initializing the NFC tag. If the `user` value is left blank, the NFC tag will be only initialized, but not personalized (assigned to any user). If a user is given, the permission to personalize is required (besides the permission to initialize), and is a shortcut to initializing and later personalizing the tag. The initialization is a sensitive operation, as the result contains the plain keys that should be stored on the NFC tag. Hence, can only be performed by managers (with granted permission). Later on, other users (for example, businesses) will be able to personalize the NFC tag for customers.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NfcInitializeParameter" + } + } + } } } }, - "/shopping-carts/{id}/data-for-checkout" : { - "get" : { - "operationId" : "getShoppingCartDataForCheckout", - "summary" : "Returns configuration data for check-out a shopping cart.", - "description" : "Returns configuration data for check-out the given shopping cart by id.", - "tags" : [ "ShoppingCarts" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/id" - } ], - "responses" : { - "200" : { - "description" : "The configuration data for check-out.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ShoppingCartDataForCheckout" + "/nfc/data-for-personalize": { + "get": { + "operationId": "getNfcDataForPersonalize", + "summary": "Returns data for perfornalizing an initialized NFC tag for a user", + "description": "Returns data for personalizing a NFC tag for a given user.", + "tags": [ + "NFC" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "tokenType", + "in": "query", + "required": true, + "description": "The token type reference (id or internal name) of the token principal type, which is stored on the NFC card being personalized.", + "schema": { + "type": "string" + } + }, + { + "name": "user", + "in": "query", + "required": true, + "description": "The user reference (id or an identification method) of the user to whom the NFC tag will be personalized. When authenticated as a manager of that user (administrator or broker) no confirmation password will be required for the personalization. However, if the authenticated user is not a manager, the user will be required a confirmation password.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The data for NFC tag personalization", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NfcDataForPersonalize" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -57075,606 +58164,516 @@ } } }, - "/shopping-carts/{id}/checkout" : { - "post" : { - "operationId" : "checkoutShoppingCart", - "summary" : "Checks out a shopping cart.", - "description" : "Checks out the given shopping cart associated to the authenticated user. After the check-out the purchase order will be awaiting for the seller's acceptance (i. e with status `pendingSeller`).", - "tags" : [ "ShoppingCarts" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/id" - }, { - "$ref" : "#/components/parameters/confirmationPassword" - } ], - "responses" : { - "200" : { - "description" : "The shopping cart was cheked out. Returns the total number of the webshop ads in all the remaining shopping carts. The id of the purchase order is not returned because is the same as the id of the given shopping cart but a header with the url to view the details does.", - "headers" : { - "Location" : { - "description" : "URL for viewing the order details.", - "schema" : { - "type" : "string" - } - } - }, - "content" : { - "application/json" : { - "schema" : { - "type" : "integer" - } - } - } + "/nfc/personalize": { + "post": { + "operationId": "personalizeNfc", + "summary": "Personalizes a NFC tag", + "description": "Personalization requires a NFC tag that was previously initialized, but is still unassigned. This operation doesn't store any key in the NFC tag itself, hence the plain keys are not returned. What is needed is an external authentication with the NFC tag, in order to ensure the card is physically present. The flow for personalizing a tag is: - `GET /nfc/data-for-personalize?user={user}`: Obtain the data for\n personalizing NFC tags for this user. The most important information\n is which the confirmation password will be required, if any;\n- `POST /nfc/external-auth`: With a challenge previously encrypted by the\n NFC tag, invoke this operation. If the challenge matches the NFC token\n in Cyclos, it will be encrypted and returned. Also a new challenge will\n be returned, which should be then encrypted by the NFC tag for later\n being sent back;\n- `POST /nfc/personalize`: With the encrypted challenge and the\n confirmation password (if any), this operation will update the NFC\n token in Cyclos, so it is now assigned to the specified user. From\n this point on, the NFC tag is operational.", + "tags": [ + "NFC" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/confirmationPassword" + } + ], + "responses": { + "204": { + "description": "The NFC tag is personalized and nothing is returned" }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "If an error has occurred in the check-out process.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ShoppingCartCheckoutError" + "500": { + "description": "If a NFC tag personalization error has occurred", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PersonalizeNfcError" } } } } }, - "requestBody" : { - "description" : "The data for check-out.", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ShoppingCartCheckout" - } - } - } - } - } - }, - "/{user}/orders" : { - "get" : { - "operationId" : "searchUserOrders", - "summary" : "Searches for orders of a specific user.", - "description" : "Returns a page of orders that match a given criteria for a given user. The authenticated user must be the seller, buyer or a manager user with permission to view purchases or sales. A list of statuses is accepted but at this moment only one status can be specified.", - "tags" : [ "Orders" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/user" - }, { - "name" : "creationPeriod", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum order creation date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "number", - "in" : "query", - "required" : false, - "description" : "The generated order number according to the webshop settings.", - "schema" : { - "type" : "string" - } - }, { - "name" : "page", - "in" : "query", - "required" : false, - "description" : "The page number (zero-based) of the search. The default value is zero.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "pageSize", - "in" : "query", - "required" : false, - "description" : "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "productNumber", - "in" : "query", - "required" : false, - "description" : "The product number (with the mask if there is one) of an advertisement contained in the orders.", - "schema" : { - "type" : "string" - } - }, { - "name" : "relatedUser", - "in" : "query", - "required" : false, - "description" : "Either id or an identification, such as login name, e-mail, etc, for the seller or buyer according whether we are searching for purchases or sales. The allowed identification methods are those the authenticated user can use on keywords search.", - "schema" : { - "type" : "string" - } - }, { - "name" : "sales", - "in" : "query", - "required" : false, - "description" : "Are we searching for sales or purchases? If not specified it's assumed purchases (i.e `false`)", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "skipTotalCount", - "in" : "query", - "required" : false, - "description" : "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "statuses", - "in" : "query", - "required" : false, - "description" : "", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/OrderStatusEnum" - } - } - } ], - "responses" : { - "200" : { - "description" : "The orders matching the criteria.", - "headers" : { - "X-Total-Count" : { - "schema" : { - "type" : "integer" - }, - "description" : "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." - }, - "X-Page-Size" : { - "schema" : { - "type" : "integer" - }, - "description" : "The maximum number of results per page" - }, - "X-Current-Page" : { - "schema" : { - "type" : "integer" - }, - "description" : "The current page the results are in" - }, - "X-Has-Next-Page" : { - "schema" : { - "type" : "boolean" - }, - "description" : "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." + "requestBody": { + "description": "The parameters for the initialization.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NfcPersonalizeParameter" } - }, - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/UserOrderResult" - } + } + } + } + } + }, + "/nfc/personalize/otp": { + "post": { + "operationId": "getOtpForPersonalizeNfc", + "summary": "Generates a new One-Time-Password (OTP) for personalizing a NFC tag", + "description": "Sends a new OTP for the customer which will own the NFC tag. The OTP belongs to the NFC tag owner, not the authenticated user.", + "tags": [ + "NFC" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "name": "medium", + "in": "query", + "required": true, + "description": "The medium the user wants to receive the otp", + "schema": { + "$ref": "#/components/schemas/SendMediumEnum" + } + } + ], + "responses": { + "204": { + "description": "The OTP is sent to the user, and no content is returned" + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - } - }, - "post" : { - "operationId" : "createOrder", - "summary" : "Creates a new order as the seller for a specific buyer", - "description" : "Creates a new order as the seller (i.e the user given in the path must resolve to the authenticated user) for a specific buyer (given in the request body). By default the status of the order will be `draft`. If the order contains all the required information and the seller wants to send it to the buyer then he can do it changing the `draft` boolean field to `false` before submit.", - "tags" : [ "Orders" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/user" - } ], - "responses" : { - "201" : { - "description" : "Returns the identifier of the new order", - "headers" : { - "Location" : { - "description" : "URL for viewing the order details", - "schema" : { - "type" : "string" - } + }, + "requestBody": { + "description": "The parameters identifying the token and the user", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NfcPersonalizeDataParameter" } - }, - "content" : { - "text/plain" : { - "schema" : { - "type" : "string" + } + } + } + } + }, + "/nfc/personalize/device-confirmations": { + "post": { + "operationId": "createDeviceConfirmationForPersonalizeNfc", + "summary": "Creates a pending device confirmation for personalizing a NFC tag.", + "description": "Creates a device confirmation for the customer which will own the NFC tag. The confirmation must be approved by the NFC tag owner, not the authenticated user, i.e the confirmation QR-code must be read (e.g with the Mobile App) by the customer. After the confirmation being processed the authenticated user will be notified.", + "tags": [ + "NFC" + ], + "parameters": [], + "responses": { + "201": { + "description": "Returns the identifier of the new confirmation.", + "content": { + "text/plain": { + "schema": { + "type": "string" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } }, - "requestBody" : { - "description" : "The order to be created with status `draft`", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/OrderNew" + "requestBody": { + "description": "The parameters identifying the token and the user", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NfcPersonalizeDataParameter" } } } } } }, - "/{user}/orders/data-for-new" : { - "get" : { - "operationId" : "getOrderDataForNew", - "summary" : "Returns data for creating orders as the seller for a specific buyer.", - "description" : "The authenticated user must be the seller (i.e the user given in the path must resolve to the authenticated user) with webshop enable permission.", - "tags" : [ "Orders" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/user" - }, { - "name" : "buyer", - "in" : "query", - "required" : true, - "description" : "The user for whom the order will be created. It could be a user identification value, such as id, username, e-mail, phone, etc. Id is always allowed, others depend on Cyclos configuration. Note that a valid numeric value is always considered as id. For example, when using another identification method that can be numeric only, prefix\\ the value with a single quote (like in Excel spreadsheets);", - "schema" : { - "type" : "string" - } - }, { - "name" : "currency", - "in" : "query", - "required" : false, - "description" : "Either id or internal name of the currency for the new order. If not given a list with the available currencies for the given buyer will be returned. At the moment of create the order a currency is required.", - "schema" : { - "type" : "string" + "/nfc/personalize/device-confirmations/{id}": { + "get": { + "operationId": "viewDeviceConfirmationForPersonalizeNfc", + "summary": "Shows the details of a device confirmation that was created to confirm the personalize nfc-tag operation.", + "description": "Shows a device confirmation for the user which will own the NFC tag. The confirmation belongs to that user, not the authenticated user. The same parameters used for the creation must be sent for this operation too.", + "tags": [ + "NFC" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] } - } ], - "responses" : { - "200" : { - "description" : "The order data for create sales.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/OrderDataForNew" - } - } + ], + "parameters": [ + { + "$ref": "#/components/parameters/id" + }, + { + "name": "user", + "description": "The principal (id, login name, etc) of the user who will own the tag. Note that a valid numeric value is always considered as id. For example, when using another identification method that can be numeric only, prefix the value with a single quote (like in Excel spreadsheets), for example, `'1234567890`.", + "in": "query", + "required": true, + "schema": { + "type": "string" } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + { + "name": "type", + "description": "Either the identifier or internal name of fhe NFC token type", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The device confirmation details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceConfirmationView" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - } - }, - "/{user}/orders/data-for-search" : { - "get" : { - "operationId" : "getOrderDataForSearch", - "summary" : "Returns data for searching orders (purchases / sales) of a specific user.", - "description" : "The authenticated user must be the seller, buyer or a manager user with permission to view purchases or sales.", - "tags" : [ "Orders" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/user" - }, { - "name" : "sales", - "in" : "query", - "required" : false, - "description" : "Whether we are getting data for searching purchases or sales. If not specified it's assumed purchases (i.e false)", - "schema" : { - "type" : "boolean" + }, + "delete": { + "operationId": "deleteDeviceConfirmationForPersonalizeNfc", + "summary": "Deletes a device confirmation that was created to confirm the personalize nfc-tag operation.", + "description": "Deletes a device confirmation for the user which will own the NFC tag. The confirmation belongs to that user, not the authenticated user. The same parameters used for the creation must be sent for this operation too.", + "tags": [ + "NFC" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/id" + }, + { + "name": "user", + "description": "The principal (id, login name, etc) of the user who will own the tag. Note that a valid numeric value is always considered as id. For example, when using another identification method that can be numeric only, prefix the value with a single quote (like in Excel spreadsheets), for example, `'1234567890`.", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "type", + "description": "Either the identifier or internal name of fhe NFC token type", + "in": "query", + "required": true, + "schema": { + "type": "string" + } } - } ], - "responses" : { - "200" : { - "description" : "The order data fo search.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/OrderDataForSearch" + ], + "responses": { + "204": { + "description": "The device confirmation was removed." + }, + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -57682,259 +58681,354 @@ } } }, - "/orders/{order}" : { - "parameters" : [ { - "$ref" : "#/components/parameters/order" - } ], - "get" : { - "operationId" : "viewOrder", - "summary" : "Returns details of an order.", - "description" : "Returns detailed information of an order.", - "tags" : [ "Orders" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The order details.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/OrderView" - } - } + "/nfc/personalize/device-confirmations/{id}/qr-code": { + "get": { + "operationId": "getDeviceConfirmationQrCodeForPersonalizeNfc", + "summary": "Returns the QR-code image for the given device confirmation only if it was not yet approved / rejected", + "description": "This request will return the image contents as expected but our api documentation page (or any other usage of an <img> tag), created using swagger-ui, generates a second request to include the image in the page. This new (GET) request won't send the authentication parameters and as this path requires authentication the image will be shown as broken. Optionally, to solve the problem described above and to allow authenticate the user when using sessions, a `sessionToken` or `accessClientToken` query parameter could be specified.", + "tags": [ + "NFC" + ], + "parameters": [ + { + "$ref": "#/components/parameters/id" + }, + { + "name": "user", + "description": "The principal (id, login name, etc) of the user who will own the tag. Note that a valid numeric value is always considered as id. For example, when using another identification method that can be numeric only, prefix the value with a single quote (like in Excel spreadsheets), for example, `'1234567890`.", + "in": "query", + "required": true, + "schema": { + "type": "string" } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } - } + { + "name": "type", + "description": "Either the identifier or internal name of fhe NFC token type", + "in": "query", + "required": true, + "schema": { + "type": "string" } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + { + "name": "size", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/ImageSizeEnum" + } + } + ], + "responses": { + "200": { + "description": "The image content", + "content": { + "image/png": { + "schema": { + "type": "string", + "format": "binary" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } - } - } - }, - "put" : { - "operationId" : "updateOrder", - "summary" : "Updates an existing order.", - "description" : "Updates an existing order.", - "tags" : [ "Orders" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "204" : { - "description" : "The order was updated." }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } + } + } + } + }, + "/nfc/cancel": { + "post": { + "operationId": "cancelNfc", + "summary": "Cancels a NFC tag", + "description": "Cancels a NFC token. Must be authenticated as a manager (administrator / broker) of the token owner, and have the correct permission.", + "tags": [ + "NFC" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + { + "accessClient": [] + } + ], + "parameters": [], + "responses": { + "204": { + "description": "The NFC tag is canceled and nothing is returned" + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } }, - "requestBody" : { - "description" : "The order to be edited.", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/OrderEdit" + "requestBody": { + "description": "The parameters for canceling.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NfcTokenParameter" } } } } - }, - "delete" : { - "operationId" : "deleteOrder", - "summary" : "Removes an order.", - "description" : "Removes an order.", - "tags" : [ "Orders" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "204" : { - "description" : "The order was removed." + } + }, + "/push/subscribe": { + "get": { + "operationId": "subscribeForPushNotifications", + "summary": "Subscribes for receiving push notifications of specific types", + "description": "Returns an event stream of server-sent events", + "tags": [ + "Push" + ], + "parameters": [ + { + "name": "clientId", + "in": "query", + "required": true, + "description": "An id generated by the client. This id is valid for the authenticated used, indicating a single session. As event streams can timeout and be reconnected, subsequent subscriptions with the same user and client id are considered the same subscription, and missed events since the last timeout will be immediately delivered. Missed events are enqueued up to a few minutes after the connection timeout. After that window, any enqueued events are discarded.", + "schema": { + "type": "string" + } + }, + { + "name": "kinds", + "in": "query", + "required": true, + "description": "The event kinds for which the client desires to subscribe", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PushNotificationEventKind" + } + } + }, + { + "name": "ticketNumber", + "in": "query", + "required": false, + "description": "When subscribing to `ticket` events, this parameter can be used to filter which ticket to monitor.", + "schema": { + "type": "string" + } + }, + { + "name": "deviceConfirmationId", + "in": "query", + "required": false, + "description": "When subscribing to `deviceConfirmationFeedback` events, this parameter can be used to filter which device confirmation to monitor.", + "schema": { + "type": "string" + } + }, + { + "name": "identityProviderRequestId", + "in": "query", + "required": false, + "description": "When subscribing to `identityProviderCallback` events, this parameter can be used to filter which request to monitor.", + "schema": { + "type": "string" + } + }, + { + "name": "lastEventId", + "in": "header", + "required": false, + "description": "The last received event id, in case of reconnections. May also be passed as the standard header `Last-Event-ID`.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The event stream", + "content": { + "text/event-stream": { + "schema": { + "type": "string" + } + } + } }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" + "203": { + "description": "This status code isn't actually returned, but listed here to reference all possible data types which are sent in push events.", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/NewNotificationPush" + }, + { + "$ref": "#/components/schemas/NewMessagePush" + }, + { + "$ref": "#/components/schemas/Transaction" + }, + { + "$ref": "#/components/schemas/TransactionView" + }, + { + "$ref": "#/components/schemas/DeviceConfirmationView" + }, + { + "$ref": "#/components/schemas/DeviceConfirmationFeedbackPush" + }, + { + "$ref": "#/components/schemas/IdentityProviderCallbackResult" + } + ] } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -57942,82 +59036,142 @@ } } }, - "/orders/{order}/export/{format}" : { - "parameters" : [ { - "$ref" : "#/components/parameters/order" - }, { - "$ref" : "#/components/parameters/format" - } ], - "get" : { - "operationId" : "exportOrder", - "summary" : "Exports the order details to a file.", - "description" : "Exports the order details to a file. The available formats are available in `OrderView`", - "tags" : [ "Orders" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "200" : { - "description" : "The file content", - "content" : { - "*/*" : { - "schema" : { - "type" : "string", - "format" : "binary" + "/ui/data-for-ui": { + "get": { + "operationId": "dataForUi", + "summary": "Returns useful data required to properly display a user interface", + "description": "The returned data contains settings and also content like header, footer and theme.", + "tags": [ + "UI" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "kind", + "in": "query", + "required": false, + "description": "Specifies the kind of user interface to get data for. If null then no data related to the UI will be returned.", + "schema": { + "$ref": "#/components/schemas/UiKind" + } + }, + { + "$ref": "#/components/parameters/cyclosVersion" + }, + { + "$ref": "#/components/parameters/themeByComponents" + }, + { + "name": "headerIf", + "in": "query", + "required": false, + "deprecated": true, + "x-remove-version": 4.18, + "description": "This was intended for internal use only and is no longer used.\n\n\nControls the header cache. If is a boolean value (`true` or `false`) will forcibly return or skip the content. Otherwise, it should be a string in the form `id|version|dataTranslationId|dataTranslationVersion`. In this case, the translated content (if any) or the content itself will be returned only when changed. When blank will always return it.", + "schema": { + "type": "string" + } + }, + { + "name": "footerIf", + "in": "query", + "required": false, + "deprecated": true, + "x-remove-version": 4.18, + "description": "This was intended for internal use only and is no longer used.\n\n\nControls the footer cache. If is a boolean value (`true` or `false`) will forcibly return or skip the content. Otherwise, it should be a string in the form `id|version|dataTranslationId|dataTranslationVersion`. In this case, the translated content (if any) or the content itself will be returned only when changed. When blank will always return it.", + "schema": { + "type": "string" + } + }, + { + "name": "themeIf", + "in": "query", + "required": false, + "deprecated": true, + "x-remove-version": 4.18, + "description": "This was intended for internal use only and is no longer used.\n\n\nControls the theme cache. If is a boolean value (`true` or `false`) will forcibly return or skip the content. Otherwise, it should be a string in the form `id|version`. In this case, the content will be returned only when changed. When blank will always return it.", + "schema": { + "type": "string" + } + }, + { + "name": "deviceId", + "in": "query", + "required": false, + "description": "Trusted device identification. If given and the device is active then a pending device confirmation will be created that will be validated after the user logs-in. If the validation passes then no confirmation password will be used only for that session.", + "schema": { + "type": "string" + } + }, + { + "name": "pinPrincipal", + "in": "query", + "required": false, + "description": "Device PIN principal. If given then the information about whether it is active or not will be given in the returned `dataForLogin`.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Returns the data for display a user interface", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DataForUi" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -58025,91 +59179,85 @@ } } }, - "/orders/{order}/data-for-edit" : { - "get" : { - "operationId" : "getOrderDataForEdit", - "summary" : "Returns data for modifying an order as the seller.", - "description" : "Returns data for modifying an order as the seller.", - "tags" : [ "Orders" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/order" - } ], - "responses" : { - "200" : { - "description" : "The order data.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/OrderDataForEdit" - } - } - } + "/validate/email-change/{key}": { + "parameters": [ + { + "name": "key", + "required": true, + "in": "path", + "description": "The e-mail change validation key the user has received.", + "schema": { + "type": "string" + } + } + ], + "post": { + "operationId": "validateEmailChange", + "summary": "Validate a pending e-mail change.", + "description": "When e-mail validation on change is enabled on the configuration, when a user changes their e-mail the new e-mail will not be immediately used. In this case, an e-mail is sent to the new e-mail address, with a link to validate it. That link should include the validation key, which should be sent to the Cyclos backend to actually validate the new e-mail. Only after this the new e-mail address will be effectively used in Cyclos.", + "tags": [ + "Validation" + ], + "responses": { + "200": { + "description": "If the e-mail change was validated correctly." }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -58117,167 +59265,180 @@ } } }, - "/orders/{order}/seller/data-for-set-delivery" : { - "get" : { - "operationId" : "getDataForSetDeliveryMethod", - "summary" : "Returns configuration data to set delivery method data by seller.", - "description" : "Returns configuration data to set delivery method data by seller of an order given by id.", - "tags" : [ "Orders" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/order" - } ], - "responses" : { - "200" : { - "description" : "The configuration data for set he delivery method.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/OrderDataForSetDeliveryMethod" + "/validate/registration/{key}": { + "parameters": [ + { + "name": "key", + "required": true, + "in": "path", + "description": "The registration validation key the user has received.", + "schema": { + "type": "string" + } + } + ], + "post": { + "operationId": "validateUserRegistration", + "summary": "Validate a pending user registration.", + "description": "Validate a pending user registration for the given validation key. After validating the registration is completed. However, the group configuration defines if the user is initially active or not.", + "tags": [ + "Validation" + ], + "responses": { + "200": { + "description": "The result of the validation. The resulting status only can be `active` or `inactive`.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserRegistrationResult" } } } }, - "500" : { - "description" : "If a payment error has occurred", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PaymentError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } - } - } - } - }, - "/orders/{order}/seller/set-delivery" : { - "post" : { - "operationId" : "setDeliveryMethod", - "summary" : "Sets delivery method data by seller.", - "description" : "Sets the delivery method data by seller for the order given by id. This operation can be used only if the order is in status `pendingSeller` and has not already set delivery method data. After the delivery method has been set the order will be enter in status `pendingBuyer` to be accepted by buyer.", - "tags" : [ "Orders" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/order" - } ], - "responses" : { - "204" : { - "description" : "The delivery method was set by seller. Nothing is returned." }, - "500" : { - "description" : "If a payment error has occurred", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PaymentError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } - } - }, - "requestBody" : { - "description" : "The parameters for setting the delivery method.", - "required" : false, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SetDeliveryMethod" + }, + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } + } + }, + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } } } } } } }, - "/orders/{order}/buyer/data-for-accept" : { - "get" : { - "operationId" : "getOrderDataForAcceptByBuyer", - "summary" : "Returns configuration data for accept an order by buyer.", - "description" : "Returns configuration data for accept an order given by id as the buyer.", - "tags" : [ "Orders" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/order" - } ], - "responses" : { - "200" : { - "description" : "The configuration data for accept the order as the buyer.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/OrderDataForAcceptByBuyer" + "/{user}/registration/validate": { + "parameters": [ + { + "$ref": "#/components/parameters/userNoSelf" + } + ], + "post": { + "operationId": "manuallyValidateUserRegistration", + "summary": "Manually validates a pending user / operator registration.", + "description": "Marks the user registration as validated. Can only be performed by a manager (admin / broker) of the pending user. The actual resulting user status depends on the group configuration. The user status must be `pending`.", + "tags": [ + "Validation" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "responses": { + "200": { + "description": "The result of the e-mail validation. The resulting status only can be `active` or `inactive`.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserRegistrationResult" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -58285,266 +59446,242 @@ } } }, - "/orders/{order}/buyer/accept" : { - "post" : { - "operationId" : "acceptOrderByBuyer", - "summary" : "Accepts a pending order by buyer.", - "description" : "Accepts a pending order by buyer generating the corresponding payment. The order status must be `pendingBuyer` to be accepted by the authenticated user (i.e the buyer).\nThe `paymentType` and the `confirmationPassword` are required under the following circumstances:\n`paymentType`: Only required if the order was generated as a sale by the seller and not from the shopping cart check-out (Sales are not supported yet).\n`confirmationPassword`: Only required if at check-out a delivery method was not set or its charge type is `negotiatied`.\nThe possible statuses after an order acceptance are: - `paymentPending`: if the generated payment is awaiting authorization; - `completed`: if the payment was done.", - "tags" : [ "Orders" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/order" - }, { - "$ref" : "#/components/parameters/confirmationPassword" - } ], - "responses" : { - "204" : { - "description" : "The order was accepted by the buyer. Nothing is returned." + "/{user}/registration/resend": { + "parameters": [ + { + "$ref": "#/components/parameters/userNoSelf" + } + ], + "post": { + "operationId": "resendUserRegistrationEmail", + "summary": "Re-sends the e-mail to validate a pending user / operator registration.", + "description": "Sends the validation e-mail again. This operation has to be executed by the user manager (admin or broker). The user status must be `pending`.", + "tags": [ + "Validation" + ], + "security": [ + { + "basic": [] }, - "500" : { - "description" : "If a payment error has occurred", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PaymentError" + { + "session": [] + }, + { + "accessClient": [] + } + ], + "responses": { + "204": { + "description": "The e-mail is sent and nothing is returned" + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } - } - }, - "requestBody" : { - "description" : "The parameters for accepting the order.", - "required" : false, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AcceptOrderByBuyer" + }, + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } } } - } - } - } - }, - "/orders/{order}/seller/accept" : { - "post" : { - "operationId" : "acceptOrderBySeller", - "summary" : "Accepts a pending order by seller.", - "description" : "Accepts a pending order by seller generating the corresponding payment. The order status must be `pendingSeller` to be accepted by the authenticated user (i.e seller). The possible statuses after order acceptance are:\n- `paymentPending`: if the generated payment is awaiting for authorization; - `completed`: if the payment was done.", - "tags" : [ "Orders" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/order" - } ], - "responses" : { - "204" : { - "description" : "The order was accepted by seller. Nothing is returned." }, - "500" : { - "description" : "If a payment error has occurred", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PaymentError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } - } - }, - "requestBody" : { - "description" : "The parameters for accepting the order.", - "required" : false, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AcceptOrderBySeller" + }, + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } } } } } } }, - "/orders/{order}/reject" : { - "post" : { - "operationId" : "rejectOrder", - "summary" : "Rejects a pending order.", - "description" : "Rejects a pending order by buyer or seller. The order status must be `pendingBuyer` or `pendingSeller` to be rejected by the authenticated user (buyer/seller). The possible statuses after an order rejection are:\n- `rejectedBySeller`: if the authenticated user is the seller; - `rejectedByBuyer`: if the authenticated user is the buyer.", - "tags" : [ "Orders" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/order" - } ], - "responses" : { - "204" : { - "description" : "The order was rejected by the authenticated user. Nothing is returned." + "/{user}/email-change/validate": { + "parameters": [ + { + "$ref": "#/components/parameters/userNoSelf" + } + ], + "post": { + "operationId": "manuallyValidateEmailChange", + "summary": "Manually validates a pending e-mail change.", + "description": "If the user has a new e-mail address pending validation, this operation, which has to be executed by the user manager (admin or broker) marks the new e-mail address as validating, effectively changing the user's e-mail.", + "tags": [ + "Validation" + ], + "security": [ + { + "basic": [] }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } - } - } + { + "session": [] + }, + { + "accessClient": [] + } + ], + "responses": { + "204": { + "description": "The new e-mail address is effectly used and nothing is returned" }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - }, - "requestBody" : { - "description" : "The parameters for rejecting the order.", - "required" : false, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/RejectOrder" - } - } - } } } }, - "/{user}/delivery-methods/list-data" : { - "parameters" : [ { - "$ref" : "#/components/parameters/user" - } ], - "get" : { - "operationId" : "getUserDeliveryMethodsListData", - "summary" : "Returns data for webshop delivery methods listing of the given user.", - "description" : "Returns the user webshop delivery methods, plus additional data related to them.", - "tags" : [ "DeliveryMethods" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The data for listing webshop delivery methods", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UserDeliveryMethodsListData" - } - } - } + "/{user}/email-change/resend": { + "parameters": [ + { + "$ref": "#/components/parameters/userNoSelf" + } + ], + "post": { + "operationId": "resendEmailChangeEmail", + "summary": "Re-sends the e-mail to validate a pending e-mail change.", + "description": "Sends again the e-mail to the new user e-mail address. This operation has to be executed by the user manager (admin or broker).", + "tags": [ + "Validation" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "responses": { + "204": { + "description": "The new e-mail address is effectly used and nothing is returned" }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -58552,82 +59689,85 @@ } } }, - "/{user}/delivery-methods/data-for-new" : { - "parameters" : [ { - "$ref" : "#/components/parameters/user" - } ], - "get" : { - "operationId" : "getDeliveryMethodDataForNew", - "summary" : "Returns data for creating a new webshop delivery method for a given user.", - "description" : "Returns data for creating a new webshop delivery method for a given user.", - "tags" : [ "DeliveryMethods" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The data for creating a new webshop delivery method.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DeliveryMethodDataForNew" + "/localization/locales": { + "get": { + "operationId": "getLocales", + "summary": "Returns the list of available locales, this collection is already sent in DataForUI or MobileBaseData.", + "description": "Returns the list of available locales.", + "tags": [ + "Localization" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "responses": { + "200": { + "description": "The list of available locales.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserLocale" + } } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -58635,191 +59775,292 @@ } } }, - "/{user}/delivery-methods" : { - "parameters" : [ { - "$ref" : "#/components/parameters/user" - } ], - "post" : { - "operationId" : "createDeliveryMethod", - "summary" : "Creates a new webshop delivery method for a given user.", - "description" : "Creates a new webshop delivery method for a given user.", - "tags" : [ "DeliveryMethods" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "201" : { - "description" : "Returns the identifier of the new delivery method.", - "headers" : { - "Location" : { - "description" : "URL for viewing the delivery method details.", - "schema" : { - "type" : "string" - } - } - }, - "content" : { - "text/plain" : { - "schema" : { - "type" : "string" - } - } - } + "/localization/settings": { + "post": { + "operationId": "saveLocalizationSettings", + "summary": "Saves the localization settings for the authenticated user.", + "description": "Saves the localization settings for the authenticated user such as the preferred language.", + "parameters": [], + "tags": [ + "Localization" + ], + "security": [ + { + "basic": [] }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } - } - } + { + "session": [] + }, + { + "accessClient": [] + } + ], + "responses": { + "204": { + "description": "The settings were saved" }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } }, - "requestBody" : { - "description" : "The delivery method to be created.", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DeliveryMethodNew" + "requestBody": { + "description": "The localization settings.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LocalizationSettings" } } } } } }, - "/delivery-methods/{id}/data-for-edit" : { - "parameters" : [ { - "$ref" : "#/components/parameters/id" - } ], - "get" : { - "operationId" : "getDeliveryMethodDataForEdit", - "summary" : "Returns data for modifying a webshop delivery method.", - "description" : "Returns data for modifying a webshop delivery method.", - "tags" : [ "DeliveryMethods" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The webshop delivery method data.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DeliveryMethodDataForEdit" + "/alerts/user": { + "get": { + "operationId": "searchUserAlerts", + "summary": "Searches for user alerts.", + "description": "Searches for user alerts according to a give set of filters.", + "tags": [ + "Alerts" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "brokers", + "in": "query", + "required": false, + "description": "Either the ids or identification methods the alert user's brokers", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "datePeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum alert date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "groups", + "in": "query", + "required": false, + "description": "Either the ids or internal names of the alert user", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number (zero-based) of the search. The default value is zero.", + "schema": { + "type": "integer" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", + "schema": { + "type": "integer" + } + }, + { + "name": "skipTotalCount", + "in": "query", + "required": false, + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", + "schema": { + "type": "boolean" + } + }, + { + "name": "types", + "in": "query", + "required": false, + "description": "The types of user alerts to search", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserAlertTypeEnum" + } + } + }, + { + "name": "user", + "in": "query", + "required": false, + "description": "Either the id or identifier of the alert user", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The accounts with their statuses.", + "headers": { + "X-Total-Count": { + "schema": { + "type": "integer" + }, + "description": "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." + }, + "X-Page-Size": { + "schema": { + "type": "integer" + }, + "description": "The maximum number of results per page" + }, + "X-Current-Page": { + "schema": { + "type": "integer" + }, + "description": "The current page the results are in" + }, + "X-Has-Next-Page": { + "schema": { + "type": "boolean" + }, + "description": "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." + } + }, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserAlert" + } } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -58827,259 +60068,372 @@ } } }, - "/delivery-methods/{id}" : { - "parameters" : [ { - "$ref" : "#/components/parameters/id" - } ], - "get" : { - "operationId" : "viewDeliveryMethod", - "summary" : "Returns details of a webshop delivery method.", - "description" : "Returns details of a webshop delivery method.", - "tags" : [ "DeliveryMethods" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The webshop delivery method data.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DeliveryMethodView" + "/alerts/user/data-for-search": { + "get": { + "operationId": "getUserAlertDataForSearch", + "summary": "Returns configuration data for searching user alerts.", + "description": "Returns configuration data for searching user alerts.", + "tags": [ + "Alerts" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The data for searching user alerts", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserAlertDataForSearch" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - }, - "put" : { - "operationId" : "updateDeliveryMethod", - "summary" : "Updates an existing webshop delivery method.", - "description" : "Updates an existing webshop delivery method.", - "tags" : [ "DeliveryMethods" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "204" : { - "description" : "The webshop delivery method was updated." + } + }, + "/{user}/references/data-for-search": { + "parameters": [ + { + "$ref": "#/components/parameters/user" + } + ], + "get": { + "operationId": "getUserReferencesDataForSearch", + "summary": "Returns data for searching references of a specific user.", + "description": "Returns data for searching references of a specific user.", + "tags": [ + "References" + ], + "security": [ + { + "basic": [] }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" - } - } - } + { + "session": [] }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The configuration data for searching references", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserReferenceDataForSearch" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - }, - "requestBody" : { - "description" : "The webshop delivery method to be edited.", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DeliveryMethodEdit" - } - } - } } - }, - "delete" : { - "operationId" : "deleteDeliveryMethod", - "summary" : "Removes a webshop delivery method.", - "description" : "Removes a webshop delivery method.", - "tags" : [ "DeliveryMethods" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "204" : { - "description" : "The webshop delivery method was removed." - }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" - } - } - } + } + }, + "/{user}/references": { + "parameters": [ + { + "$ref": "#/components/parameters/user" + } + ], + "get": { + "operationId": "searchUserReferences", + "summary": "Searches for references of a specific user", + "description": "Returns references matching the search criteria, for a specific user.", + "tags": [ + "References" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "direction", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReferenceDirectionEnum" + } + }, + { + "name": "levels", + "in": "query", + "required": false, + "description": "The levels to filter", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReferenceLevelEnum" + } + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number (zero-based) of the search. The default value is zero.", + "schema": { + "type": "integer" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", + "schema": { + "type": "integer" + } + }, + { + "name": "period", + "in": "query", + "required": false, + "description": "The minimum / maximum reference date", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "relatedUser", + "in": "query", + "required": false, + "description": "The user that either gave or received the reference to the user specified in the path or the other user involved in the payment feedback. Should be either the id or some other allowed identification (login name, email, etc).", + "schema": { + "type": "string" + } + }, + { + "name": "skipTotalCount", + "in": "query", + "required": false, + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "The references matching the search filters.", + "headers": { + "X-Total-Count": { + "schema": { + "type": "integer" + }, + "description": "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." + }, + "X-Page-Size": { + "schema": { + "type": "integer" + }, + "description": "The maximum number of results per page" + }, + "X-Current-Page": { + "schema": { + "type": "integer" + }, + "description": "The current page the results are in" + }, + "X-Has-Next-Page": { + "schema": { + "type": "boolean" + }, + "description": "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." + } + }, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserReferenceResult" + } + } + } + } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -59087,529 +60441,618 @@ } } }, - "/{user}/webshop-settings" : { - "parameters" : [ { - "$ref" : "#/components/parameters/user" - } ], - "get" : { - "operationId" : "viewWebshopSettings", - "summary" : "Returns the webshop settings for a given user.", - "description" : "Returns the webshop settings for a given user.", - "tags" : [ "WebshopSettings" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The webshop settings.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/WebshopSettingsView" + "/{user}/references/statistics": { + "parameters": [ + { + "$ref": "#/components/parameters/user" + } + ], + "get": { + "operationId": "getUserReferenceStatistics", + "summary": "Returns statistics for a given user references.", + "description": "Returns statistics for a given user references.", + "tags": [ + "References" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "direction", + "in": "query", + "required": false, + "description": "Whether to return statistics on received or given references. When not specified, defaults to received.", + "schema": { + "$ref": "#/components/schemas/ReferenceDirectionEnum" + } + }, + { + "name": "periods", + "description": "The requested periods for statistics. The result will have the `periods` field corresponding to the input periods. When not specified, the default is to return 2 periods: all time and last 30 days. The maximum allowed number of periods is 5. Each period can either be:\n\n- Single date: in ISO 8601 format, from that date and up.\n Example: `2019-10-30`;\n\n- 2 dates, split by pipe: Both in ISO 8601 format, specifying\n a period range. Example: `2019-10-01|2019-12-31T23:59:59.999`.", + "in": "query", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "The reference statistics for the requested periods.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReferenceStatistics" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - }, - "put" : { - "operationId" : "updateWebshopSettings", - "summary" : "Updates a user's webshop settings.", - "description" : "Updates a user's webshop settings.", - "tags" : [ "WebshopSettings" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "204" : { - "description" : "The webshop settings were updated." + } + }, + "/{from}/reference/{to}/data-for-set": { + "parameters": [ + { + "name": "from", + "required": true, + "in": "path", + "x-dotInPath": true, + "schema": { + "type": "string" + }, + "description": "The user that will give the reference. Can be `self` for the currently authenticated user, or the id or some other allowed identifier (login name, e-mail, etc)." + }, + { + "name": "to", + "required": true, + "in": "path", + "x-dotInPath": true, + "schema": { + "type": "string" + }, + "description": "The user that will receive the reference. Can be the id or some other allowed identifier (login name, e-mail, etc)." + } + ], + "get": { + "operationId": "getReferenceDataForSet", + "summary": "Returns details for setting a reference.", + "description": "Returns details for setting a reference.", + "tags": [ + "References" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "Contains data for setting the reference, as well as the current value, if any.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReferenceDataForSet" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - }, - "requestBody" : { - "description" : "The new webshop settings", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/WebshopSettingsDetailed" - } - } - } } } }, - "/{user}/marketplace-interests/list-data" : { - "parameters" : [ { - "$ref" : "#/components/parameters/user" - } ], - "get" : { - "operationId" : "getUserAdInterestsListData", - "summary" : "Returns data for advertisement interests listing of the given user.", - "description" : "Returns data for advertisement interests listing of the given user.", - "tags" : [ "AdInterests" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The data for listing advertisement interests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UserAdInterestsListData" + "/{from}/reference/{to}": { + "parameters": [ + { + "name": "from", + "required": true, + "in": "path", + "x-dotInPath": true, + "schema": { + "type": "string" + }, + "description": "The user that will give the reference. Can be `self` for the currently authenticated user, or the id or some other allowed identifier (login name, e-mail, etc)." + }, + { + "name": "to", + "required": true, + "in": "path", + "x-dotInPath": true, + "schema": { + "type": "string" + }, + "description": "The user that will receive the reference. Can be the id or some other allowed identifier (login name, e-mail, etc)." + } + ], + "post": { + "operationId": "setReference", + "summary": "Creates or changes the reference between the given users.", + "description": "Creates or changes the reference between the given users.", + "tags": [ + "References" + ], + "responses": { + "201": { + "description": "Returns the identifier of the created / modified reference", + "headers": { + "Location": { + "description": "URL for viewing the reference details", + "schema": { + "type": "string" + } + } + }, + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } + }, + "requestBody": { + "description": "The reference details", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReferenceSet" + } + } + } } } }, - "/{user}/marketplace-interests/data-for-new" : { - "parameters" : [ { - "$ref" : "#/components/parameters/user" - } ], - "get" : { - "operationId" : "getAdInterestDataForNew", - "summary" : "Returns data for creating a new advertisement interest for a given user.", - "description" : "Returns data for creating a new advertisement interest for a given user.", - "tags" : [ "AdInterests" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The data for creating a new advertisement interest.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AdInterestDataForNew" + "/references/{id}": { + "parameters": [ + { + "$ref": "#/components/parameters/id" + } + ], + "get": { + "operationId": "viewReference", + "summary": "Returns details of a specific reference.", + "description": "Returns details of a specific reference.", + "tags": [ + "References" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The reference details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReferenceView" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - } - }, - "/{user}/marketplace-interests" : { - "parameters" : [ { - "$ref" : "#/components/parameters/user" - } ], - "post" : { - "operationId" : "createAdInterest", - "summary" : "Creates a new advertisement interest for a given user.", - "description" : "Creates a new advertisement interest for a given user.", - "tags" : [ "AdInterests" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "201" : { - "description" : "Returns the identifier of the new advertisement interest.", - "headers" : { - "Location" : { - "description" : "URL for viewing the advertisement interest details.", - "schema" : { - "type" : "string" - } - } - }, - "content" : { - "text/plain" : { - "schema" : { - "type" : "string" - } - } - } + }, + "put": { + "operationId": "updateReference", + "summary": "Updates an existing reference.", + "description": "Updates an existing reference.", + "tags": [ + "References" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "responses": { + "204": { + "description": "The reference is updated and nothing is returned." }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } }, - "requestBody" : { - "description" : "The advertisement interest to be created.", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AdInterestNew" + "requestBody": { + "description": "The reference details", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReferenceSet" } } } } - } - }, - "/marketplace-interests/{id}/data-for-edit" : { - "parameters" : [ { - "$ref" : "#/components/parameters/id" - } ], - "get" : { - "operationId" : "getAdInterestDataForEdit", - "summary" : "Returns data for modifying an advertisement interest.", - "description" : "Returns data for modifying an advertisement interest.", - "tags" : [ "AdInterests" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The advertisement interest data.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AdInterestDataForEdit" + }, + "delete": { + "operationId": "deleteReference", + "summary": "Removes a reference", + "description": "Removes a reference", + "tags": [ + "References" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "responses": { + "204": { + "description": "The reference was deleted" + }, + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -59617,259 +61060,552 @@ } } }, - "/marketplace-interests/{id}" : { - "parameters" : [ { - "$ref" : "#/components/parameters/id" - } ], - "get" : { - "operationId" : "viewAdInterest", - "summary" : "Returns details of an advertisement interest.", - "description" : "Returns details of an advertisement interest.", - "tags" : [ "AdInterests" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The advertisement interest data.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AdInterestView" + "/references/{id}/data-for-edit": { + "parameters": [ + { + "$ref": "#/components/parameters/id" + } + ], + "get": { + "operationId": "getReferenceDataForEdit", + "summary": "Returns data to edit an existing reference.", + "description": "Returns configuration data for editing a reference, plus the current `ReferenceSet` object that can be altered and sent back.", + "tags": [ + "References" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The data for editing a reference", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReferenceDataForSet" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - }, - "put" : { - "operationId" : "updateAdInterest", - "summary" : "Updates an existing advertisement interest.", - "description" : "Updates an existing advertisement interest.", - "tags" : [ "AdInterests" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "204" : { - "description" : "The advertisement interest was updated." + } + }, + "/marketplace/data-for-search": { + "get": { + "operationId": "getAdDataForSearch", + "summary": "Returns configuration data for searching advertisements.", + "description": "Returns data needed on for a general advertisements search.", + "tags": [ + "Marketplace" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" - } - } + { + "name": "kind", + "in": "query", + "required": false, + "description": "Indicates the kind of advertisement that should be searched. When nothing is passed (default) all kinds will be searched.", + "schema": { + "$ref": "#/components/schemas/AdKind" } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + { + "name": "brokered", + "description": "If the authenticated is a broker, passing the `true` value will indicate the advertisements to be searched are from managed users of that broker. The default is `false`.", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "The configuration data for advertisements search.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AdDataForSearch" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - }, - "requestBody" : { - "description" : "The advertisement interest to be edited.", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AdInterestEdit" - } - } - } } - }, - "delete" : { - "operationId" : "deleteAdInterest", - "summary" : "Removes an advertisement interest.", - "description" : "Removes an advertisement interest.", - "tags" : [ "AdInterests" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "204" : { - "description" : "The advertisement interest was removed." - }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" + } + }, + "/marketplace": { + "get": { + "operationId": "searchAds", + "summary": "Searches for advertisements.", + "description": "Returns a page of advertisements that match a given criteria.", + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "addressResult", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/AdAddressResultEnum" + } + }, + { + "name": "brokers", + "in": "query", + "required": false, + "description": "Either ids or an identifications, such as login name, e-mail, etc, for the brokers of the advertisement owner. Can only be used when searching with a broker himself or admin.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "category", + "in": "query", + "required": false, + "description": "Either id or internal name of a category", + "schema": { + "type": "string" + } + }, + { + "name": "currency", + "in": "query", + "required": false, + "description": "Either id or internal name of a currency for the price", + "schema": { + "type": "string" + } + }, + { + "name": "customFields", + "in": "query", + "required": false, + "description": "Advertisement custom field values used as filters. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by : (colon). For example, `customFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, customFields=field1:valueA|valueB. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `customFields=tradeType:offer|search,extraDate:2000-01-01|2001-12-31` would match results whose custom field with internal name `tradeType` is either `offer` or `search`, and whose `extraDate` is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `customFields=extraDate:|2001-12-31`. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `customFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `customFields=dynamic:'business`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "expirationPeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum expiration date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "favoriteFor", + "in": "query", + "required": false, + "description": "Either id or an identification, such as login name, e-mail, etc, for the advertisement owner. The allowed identification methods are those the authenticated user can use on keywords search.", + "schema": { + "type": "string" + } + }, + { + "name": "groups", + "in": "query", + "required": false, + "description": "Array of either id or internal names of user groups the advertisement owner must belong to", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "hasImages", + "in": "query", + "required": false, + "description": "When set to `true` only advertisements with images are returned", + "schema": { + "type": "boolean" + } + }, + { + "name": "keywords", + "in": "query", + "required": false, + "description": "Textual search keywords. Sometimes, like in user search, the fields matched depends on what is configured on the products.", + "schema": { + "type": "string" + } + }, + { + "name": "kind", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/AdKind" + } + }, + { + "name": "latitude", + "in": "query", + "required": false, + "description": "The reference latitude for distance searches", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "longitude", + "in": "query", + "required": false, + "description": "The reference longitude for distance searches", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "maxDistance", + "in": "query", + "required": false, + "description": "Maximum straight-line distance between the informed location and the resulting address. Is measured either in kilometers or miles, depending on the configuration. Only accepted if both `longitude` and `latitude` parameters are passed with the actual reference position.", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "orderBy", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/AdOrderByEnum" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number (zero-based) of the search. The default value is zero.", + "schema": { + "type": "integer" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", + "schema": { + "type": "integer" + } + }, + { + "name": "priceRange", + "in": "query", + "required": false, + "description": "The minumum / maximum price. Used only if a currency is specified. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "number" + } + } + }, + { + "name": "productNumber", + "in": "query", + "required": false, + "description": "Textual search for a product number for webshop only.", + "schema": { + "type": "string" + } + }, + { + "name": "profileFields", + "in": "query", + "required": false, + "description": "User profile fields, both basic (full name, login name, phone, e-mail, etc) and custom fields, that are used for search. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by `:` (colon). For example, `profileFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, `profileFields=field1:valueA|valueB`. The accepted fields depend on the products the authenticated user has. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `profileFields=rank:bronze|silver,birthDate:2000-01-01|2001-12-31` would match results whose custom field with internal name 'rank' is either bronze or silver, and whose 'birthDate' is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `profileFields=birthDate:|2001-12-31`.\nThe basic profile fields have one of the following identifiers:\n- `name` or `fullName`: Full name; - `username`, `loginName` or `login`: Login name; - `email`: E-mail; - `phone`: Phone; - `accountNumber`, `account`: Account number; - `image`: Image (accepts a boolean value, indicating that either it is required that users either have images or not).\n\nIf address is an allowed profile field for search, specific address fields may be searched. The allowed ones are normally returned as the `addressFieldsInSearch` field in the corresponding result from a data-for-search request. The specific address fields are:\n- `address`: Searches on any address field (not a specific field); - `address.address`: Searches on the fields that represent the street address, which are `addressLine1`, `addressLine2`, `street`, `buildingNumber` and `complement`. Note that normally only a subset of them should be enabled in the configuration (either line 1 / 2 or street + number + complement);\n- `address.zip`: Searches for matching zip (postal) code; - `address.poBox`: Searches for matching postal box; - `address.neighborhood`: Searches by neighborhood; - `address.city`: Searches by city; - `address.region`: Searches by region (or state); - `address.country`: Searches by ISO 3166-1 alpha-2 country code. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `profileFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `profileFields=dynamic:'business`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "publicationPeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum publication date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "returnEditable", + "in": "query", + "required": false, + "description": "Whether to return the editable property. Passing `true` will impact the performance a bit, as for each returned advertisement some statuses and permissions need to be checked.", + "schema": { + "type": "boolean" + } + }, + { + "name": "skipTotalCount", + "in": "query", + "required": false, + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", + "schema": { + "type": "boolean" + } + }, + { + "name": "statuses", + "in": "query", + "required": false, + "description": "", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AdStatusEnum" + } + } + }, + { + "name": "user", + "in": "query", + "required": false, + "description": "Either id or an identification, such as login name, e-mail, etc, for the advertisement owner. The allowed identification methods are those the authenticated user can use on keywords search.", + "schema": { + "type": "string" + } + } + ], + "tags": [ + "Marketplace" + ], + "responses": { + "200": { + "description": "The advertisements matching the criteria.", + "headers": { + "X-Total-Count": { + "schema": { + "type": "integer" + }, + "description": "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." + }, + "X-Page-Size": { + "schema": { + "type": "integer" + }, + "description": "The maximum number of results per page" + }, + "X-Current-Page": { + "schema": { + "type": "integer" + }, + "description": "The current page the results are in" + }, + "X-Has-Next-Page": { + "schema": { + "type": "boolean" + }, + "description": "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." + } + }, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AdResult" + } } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -59877,421 +61613,690 @@ } } }, - "/{user}/privacy-settings" : { - "get" : { - "operationId" : "getPrivacySettingsData", - "summary" : "Get the privacy settings data", - "description" : "Returns the privacy settings data of the given user", - "tags" : [ "PrivacySettings" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "$ref" : "#/components/parameters/user" - } ], - "responses" : { - "200" : { - "description" : "The privacy settings data", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PrivacySettingsData" + "/{user}/marketplace/data-for-search": { + "get": { + "operationId": "getUserAdsDataForSearch", + "summary": "Returns configuration data for searching advertisements of a user.", + "description": "Returns data needed on for a user's advertisements search.", + "tags": [ + "Marketplace" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/user" + }, + { + "name": "kind", + "in": "query", + "required": false, + "description": "Indicates the kind of advertisement that should be searched. When nothing is passed (default) all kinds will be searched.", + "schema": { + "$ref": "#/components/schemas/AdKind" + } + } + ], + "responses": { + "200": { + "description": "The configuration data for this user's advertisements.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserAdsDataForSearch" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - }, - "post" : { - "operationId" : "savePrivacySettings", - "summary" : "Saves the privacy settings for a given user.", - "description" : "Saves the privacy settings for a given user.", - "tags" : [ "PrivacySettings" ], - "parameters" : [ { - "$ref" : "#/components/parameters/user" - } ], - "responses" : { - "204" : { - "description" : "The privacy settings was saved" + } + }, + "/{user}/marketplace/data-for-new": { + "get": { + "operationId": "getAdDataForNew", + "summary": "Returns configuration data for creating a new advertisement for a user and kind.", + "description": "Returns data for creating a new advertisement for the given user. The `kind` should be informed. If not set, `simple` is assumed. Currently only `simple` advertisements can be created through this API.", + "parameters": [ + { + "$ref": "#/components/parameters/fields" }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } - } + { + "$ref": "#/components/parameters/user" + }, + { + "name": "basedOnId", + "in": "query", + "required": false, + "description": "Indicates the advertisement id to be based on by copying some data (e.g publication period) to the new advertisement.", + "schema": { + "type": "string" } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + { + "name": "kind", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/AdKind" + } + } + ], + "tags": [ + "Marketplace" + ], + "responses": { + "200": { + "description": "The data for creating a new advertisement.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AdDataForNew" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } - } - }, - "requestBody" : { - "description" : "The privacy settings data to be saved", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PrivacySettingsParams" + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } } } } } } }, - "/firebase/fcm-tokens" : { - "post" : { - "operationId" : "assignFcmToken", - "summary" : "Assign a new FCM registration token to the authenticated user", - "description" : "Assign a new FCM registration token to the authenticated user only if the token is not already assigned. Otherwise only the current date is stamped in the token to track the last use.", - "tags" : [ "Firebase" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "requestBody" : { - "description" : "The registration token", - "required" : true, - "content" : { - "text/plain" : { - "schema" : { - "type" : "string" + "/{user}/marketplace": { + "get": { + "operationId": "searchUserAds", + "summary": "Searches for advertisements of a specific user.", + "description": "Returns a page of advertisements that match a given criteria for a given user. Equivallent to calling `GET /marketplace?owner={user}`.", + "parameters": [ + { + "$ref": "#/components/parameters/user" + }, + { + "name": "addressResult", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/AdAddressResultEnum" + } + }, + { + "name": "category", + "in": "query", + "required": false, + "description": "Either id or internal name of a category", + "schema": { + "type": "string" + } + }, + { + "name": "currency", + "in": "query", + "required": false, + "description": "Either id or internal name of a currency for the price", + "schema": { + "type": "string" + } + }, + { + "name": "customFields", + "in": "query", + "required": false, + "description": "Advertisement custom field values used as filters. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by : (colon). For example, `customFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, customFields=field1:valueA|valueB. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `customFields=tradeType:offer|search,extraDate:2000-01-01|2001-12-31` would match results whose custom field with internal name `tradeType` is either `offer` or `search`, and whose `extraDate` is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `customFields=extraDate:|2001-12-31`. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `customFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `customFields=dynamic:'business`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "expirationPeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum expiration date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "favoriteFor", + "in": "query", + "required": false, + "description": "Either id or an identification, such as login name, e-mail, etc, for the advertisement owner. The allowed identification methods are those the authenticated user can use on keywords search.", + "schema": { + "type": "string" + } + }, + { + "name": "hasImages", + "in": "query", + "required": false, + "description": "When set to `true` only advertisements with images are returned", + "schema": { + "type": "boolean" + } + }, + { + "name": "keywords", + "in": "query", + "required": false, + "description": "Textual search keywords. Sometimes, like in user search, the fields matched depends on what is configured on the products.", + "schema": { + "type": "string" + } + }, + { + "name": "kind", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/AdKind" + } + }, + { + "name": "latitude", + "in": "query", + "required": false, + "description": "The reference latitude for distance searches", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "longitude", + "in": "query", + "required": false, + "description": "The reference longitude for distance searches", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "maxDistance", + "in": "query", + "required": false, + "description": "Maximum straight-line distance between the informed location and the resulting address. Is measured either in kilometers or miles, depending on the configuration. Only accepted if both `longitude` and `latitude` parameters are passed with the actual reference position.", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "orderBy", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/AdOrderByEnum" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number (zero-based) of the search. The default value is zero.", + "schema": { + "type": "integer" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", + "schema": { + "type": "integer" + } + }, + { + "name": "priceRange", + "in": "query", + "required": false, + "description": "The minumum / maximum price. Used only if a currency is specified. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "number" + } + } + }, + { + "name": "productNumber", + "in": "query", + "required": false, + "description": "Textual search for a product number for webshop only.", + "schema": { + "type": "string" + } + }, + { + "name": "profileFields", + "in": "query", + "required": false, + "description": "User profile fields, both basic (full name, login name, phone, e-mail, etc) and custom fields, that are used for search. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by `:` (colon). For example, `profileFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, `profileFields=field1:valueA|valueB`. The accepted fields depend on the products the authenticated user has. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `profileFields=rank:bronze|silver,birthDate:2000-01-01|2001-12-31` would match results whose custom field with internal name 'rank' is either bronze or silver, and whose 'birthDate' is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `profileFields=birthDate:|2001-12-31`.\nThe basic profile fields have one of the following identifiers:\n- `name` or `fullName`: Full name; - `username`, `loginName` or `login`: Login name; - `email`: E-mail; - `phone`: Phone; - `accountNumber`, `account`: Account number; - `image`: Image (accepts a boolean value, indicating that either it is required that users either have images or not).\n\nIf address is an allowed profile field for search, specific address fields may be searched. The allowed ones are normally returned as the `addressFieldsInSearch` field in the corresponding result from a data-for-search request. The specific address fields are:\n- `address`: Searches on any address field (not a specific field); - `address.address`: Searches on the fields that represent the street address, which are `addressLine1`, `addressLine2`, `street`, `buildingNumber` and `complement`. Note that normally only a subset of them should be enabled in the configuration (either line 1 / 2 or street + number + complement);\n- `address.zip`: Searches for matching zip (postal) code; - `address.poBox`: Searches for matching postal box; - `address.neighborhood`: Searches by neighborhood; - `address.city`: Searches by city; - `address.region`: Searches by region (or state); - `address.country`: Searches by ISO 3166-1 alpha-2 country code. A note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `profileFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `profileFields=dynamic:'business`.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string" + } + } + }, + { + "name": "publicationPeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum publication date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "skipTotalCount", + "in": "query", + "required": false, + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", + "schema": { + "type": "boolean" + } + }, + { + "name": "statuses", + "in": "query", + "required": false, + "description": "", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AdStatusEnum" + } + } + } + ], + "tags": [ + "Marketplace" + ], + "responses": { + "200": { + "description": "The advertisements matching the criteria.", + "headers": { + "X-Total-Count": { + "schema": { + "type": "integer" + }, + "description": "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." + }, + "X-Page-Size": { + "schema": { + "type": "integer" + }, + "description": "The maximum number of results per page" + }, + "X-Current-Page": { + "schema": { + "type": "integer" + }, + "description": "The current page the results are in" + }, + "X-Has-Next-Page": { + "schema": { + "type": "boolean" + }, + "description": "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." + } + }, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AdResult" + } + } } } - } - }, - "responses" : { - "204" : { - "description" : "The token was assigned, nothing is returned" }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } }, - "put" : { - "operationId" : "updateFcmTokens", - "summary" : "Updates an existing FCM token", - "description" : "Updates an existing FCM token. This operation allows guest users.", - "tags" : [ "Firebase" ], - "responses" : { - "204" : { - "description" : "The token was updated" - }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" + "post": { + "operationId": "createAd", + "summary": "Creates a new advertisement for the given user.", + "description": "Creates a new advertisement for the given user.", + "tags": [ + "Marketplace" + ], + "parameters": [ + { + "$ref": "#/components/parameters/user" + } + ], + "responses": { + "201": { + "description": "Returns the identifier of the new advertisement.", + "headers": { + "Location": { + "description": "URL for viewing the advertisement details.", + "schema": { + "type": "string" + } + } + }, + "content": { + "text/plain": { + "schema": { + "type": "string" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } }, - "requestBody" : { - "description" : "The old and new token values", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UpdateFcmTokenParams" + "requestBody": { + "description": "The advertisement to be created.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AdNew" } } } } - }, - "delete" : { - "operationId" : "deleteFcmToken", - "summary" : "Removes a FCM token from a set of users", - "description" : "Removes a FCM token from a set of users. This operation allows guest users.", - "tags" : [ "Firebase" ], - "requestBody" : { - "description" : "The token and the users to whom the token will be removed from.", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/RemoveFcmTokenParams" - } - } - } - }, - "responses" : { - "204" : { - "description" : "The token was deleted" + } + }, + "/marketplace/{ad}/data-for-edit": { + "get": { + "operationId": "getAdDataForEdit", + "summary": "Returns configuration data for editing an advertisement.", + "description": "Returns configuration data which can be used to edit an advertisement.", + "parameters": [ + { + "$ref": "#/components/parameters/fields" }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" + { + "$ref": "#/components/parameters/ad" + } + ], + "tags": [ + "Marketplace" + ], + "responses": { + "200": { + "description": "The data for editing an advertisement.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AdDataForEdit" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -60299,367 +62304,278 @@ } } }, - "/{user}/payment-feedbacks/data-for-search" : { - "parameters" : [ { - "$ref" : "#/components/parameters/user" - } ], - "get" : { - "operationId" : "getPaymentFeedbacksDataForSearch", - "summary" : "Returns data for searching payment feedbacks of a specific user.", - "description" : "Returns data for searching payment feedbacks in which the given user could be the payer or the receiver.", - "tags" : [ "PaymentFeedbacks" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The data for searching payment feedbacks", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PaymentFeedbackDataForSearch" + "/marketplace/{ad}": { + "get": { + "operationId": "viewAd", + "summary": "Returns details of an advertisement.", + "description": "Returns detailed information of an advertisement.", + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/ad" + } + ], + "tags": [ + "Marketplace" + ], + "responses": { + "200": { + "description": "The advertisement details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AdView" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" - } - } - } - } - } - } - }, - "/{user}/payment-feedbacks" : { - "parameters" : [ { - "$ref" : "#/components/parameters/user" - } ], - "get" : { - "operationId" : "searchPaymentFeedbacks", - "summary" : "Searches for payment feedbacks of a specific user.", - "description" : "Returns payment feedbacks matching the search criteria, for a specific user.", - "tags" : [ "PaymentFeedbacks" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "direction", - "in" : "query", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/ReferenceDirectionEnum" - } - }, { - "name" : "levels", - "in" : "query", - "required" : false, - "description" : "The levels to filter", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ReferenceLevelEnum" - } - } - }, { - "name" : "noReplied", - "in" : "query", - "required" : false, - "description" : "If true only those payment feedbacks without a reply comment would be returned", - "schema" : { - "type" : "boolean" - } - }, { - "name" : "page", - "in" : "query", - "required" : false, - "description" : "The page number (zero-based) of the search. The default value is zero.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "pageSize", - "in" : "query", - "required" : false, - "description" : "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "period", - "in" : "query", - "required" : false, - "description" : "The minimum / maximum reference date", - "schema" : { - "type" : "array", - "items" : { - "description" : "", - "type" : "string", - "format" : "date-time" - } - } - }, { - "name" : "relatedUser", - "in" : "query", - "required" : false, - "description" : "The user that either gave or received the reference to the user specified in the path or the other user involved in the payment feedback. Should be either the id or some other allowed identification (login name, email, etc).", - "schema" : { - "type" : "string" - } - }, { - "name" : "skipTotalCount", - "in" : "query", - "required" : false, - "description" : "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", - "schema" : { - "type" : "boolean" - } - } ], - "responses" : { - "200" : { - "description" : "The payment feedbacks matching the search filters.", - "headers" : { - "X-Total-Count" : { - "schema" : { - "type" : "integer" - }, - "description" : "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." - }, - "X-Page-Size" : { - "schema" : { - "type" : "integer" - }, - "description" : "The maximum number of results per page" - }, - "X-Current-Page" : { - "schema" : { - "type" : "integer" - }, - "description" : "The current page the results are in" - }, - "X-Has-Next-Page" : { - "schema" : { - "type" : "boolean" - }, - "description" : "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } } - }, - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PaymentFeedbackResult" - } + } + } + } + }, + "put": { + "operationId": "updateAd", + "summary": "Updates an existing advertisement.", + "description": "Updates an existing advertisement.", + "tags": [ + "Marketplace" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/ad" + } + ], + "responses": { + "204": { + "description": "The advertisement was updated" + }, + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" + } + } + } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } + }, + "requestBody": { + "description": "The advertisement to be edited.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AdEdit" + } + } + } } - } - }, - "/{user}/payment-feedbacks/statistics" : { - "parameters" : [ { - "$ref" : "#/components/parameters/user" - } ], - "get" : { - "operationId" : "getPaymentFeedbackStatistics", - "summary" : "Returns payment feedback statistics of a specific user.", - "description" : "Returns payment feedback statistics of a specific user.", - "tags" : [ "PaymentFeedbacks" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "direction", - "in" : "query", - "required" : false, - "description" : "Whether to return statistics on received or given feedbacks. When not specified, defaults to received.", - "schema" : { - "$ref" : "#/components/schemas/ReferenceDirectionEnum" + }, + "delete": { + "operationId": "deleteAd", + "summary": "Removes an advertisement.", + "description": "Removes an advertisement by id.", + "tags": [ + "Marketplace" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] } - }, { - "name" : "periods", - "description" : "The requested periods for statistics. The result will have the `periods` field corresponding to the input periods. When not specified, the default is to return 2 periods: all time and last 30 days. The maximum allowed number of periods is 5. Each period can either be:\n\n- Single date: in ISO 8601 format, from that date and up.\n Example: `2019-10-30`;\n\n- 2 dates, split by pipe: Both in ISO 8601 format, specifying\n a period range. Example: `2019-10-01|2019-12-31T23:59:59.999`.", - "in" : "query", - "required" : false, - "schema" : { - "type" : "array", - "items" : { - "type" : "string" - } + ], + "parameters": [ + { + "$ref": "#/components/parameters/ad" } - } ], - "responses" : { - "200" : { - "description" : "The feedback statistics for the requested periods.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ReferenceStatistics" + ], + "responses": { + "204": { + "description": "The advertisement was removed." + }, + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -60667,88 +62583,91 @@ } } }, - "/payment-feedbacks/{key}/data-for-give" : { - "parameters" : [ { - "name" : "key", - "in" : "path", - "required" : true, - "description" : "Either the id or transaction number", - "schema" : { - "type" : "string" + "/marketplace/{ad}/export/{format}": { + "parameters": [ + { + "$ref": "#/components/parameters/ad" + }, + { + "$ref": "#/components/parameters/format" } - } ], - "get" : { - "operationId" : "getPaymentFeedbacksDataForGive", - "summary" : "Returns data for create or update a payment feedback.", - "description" : "Returns data for create or update a payment feedback. The logged user must be the payer with permission to give payment feedbacks.", - "tags" : [ "PaymentFeedbacks" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The data for giving payment feedbacks.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PaymentFeedbackDataForGive" + ], + "get": { + "operationId": "exportAd", + "summary": "Exports the advertisement details to a file.", + "description": "Exports the advertisement details to a file. The available formats are available in `AdView`", + "tags": [ + "Marketplace" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "responses": { + "200": { + "description": "The file content", + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -60756,196 +62675,139 @@ } } }, - "/payment-feedbacks/{key}/give" : { - "parameters" : [ { - "name" : "key", - "in" : "path", - "required" : true, - "description" : "Either the id or transaction number", - "schema" : { - "type" : "string" - } - } ], - "post" : { - "operationId" : "givePaymentFeedback", - "summary" : "Creates or updates a payment feedback.", - "description" : "Creates or updates a payment feedback as the payer of the payment. After a feedback was given it can be changed until a given deadline.", - "tags" : [ "PaymentFeedbacks" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "204" : { - "description" : "The payment feedback was created/updated", - "headers" : { - "Location" : { - "description" : "URL for viewing the payment feedback details", - "schema" : { - "type" : "string" - } - } - } - }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } - } - } + "/marketplace/{ad}/hide": { + "post": { + "operationId": "hideAd", + "summary": "Hides an advertisement by id.", + "description": "Hides an advertisement thus making it visible only for the owner and its managers.", + "tags": [ + "Marketplace" + ], + "parameters": [ + { + "$ref": "#/components/parameters/ad" + } + ], + "responses": { + "204": { + "description": "The advertisement was hidden." }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - }, - "requestBody" : { - "description" : "The payment feedback details", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PaymentFeedbackGive" - } - } - } } } }, - "/payment-feedbacks/{key}/data-for-reply" : { - "parameters" : [ { - "name" : "key", - "in" : "path", - "required" : true, - "description" : "Either the id or transaction number", - "schema" : { - "type" : "string" - } - } ], - "get" : { - "operationId" : "getPaymentFeedbacksDataForReply", - "summary" : "Returns data for reply a given payment feedback.", - "description" : "Returns data for reply a given payment feedback. The logged user must be the payment's receiver (i.e payee) with permission to receive payment feedbacks.", - "tags" : [ "PaymentFeedbacks" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The data for reply a given payment feedbacks.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PaymentFeedbackDataForReply" - } - } - } + "/marketplace/{ad}/unhide": { + "post": { + "operationId": "unhideAd", + "summary": "Unhides an advertisement by id.", + "description": "Unhides an advertisement thus making it visible for other members.", + "tags": [ + "Marketplace" + ], + "parameters": [ + { + "$ref": "#/components/parameters/ad" + } + ], + "responses": { + "204": { + "description": "The advertisement was unhidden." }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -60953,251 +62815,150 @@ } } }, - "/payment-feedbacks/{key}/reply" : { - "parameters" : [ { - "name" : "key", - "in" : "path", - "required" : true, - "description" : "Either the id or transaction number", - "schema" : { - "type" : "string" - } - } ], - "post" : { - "operationId" : "replyPaymentFeedback", - "summary" : "Replies an already given payment feedback.", - "description" : "Replies an already given payment feedback as the receiver. After a reply was performed it can not be changed", - "tags" : [ "PaymentFeedbacks" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "204" : { - "description" : "The payment feedback was replied", - "headers" : { - "Location" : { - "description" : "URL for viewing the payment feedback details", - "schema" : { - "type" : "string" - } - } - } - }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } - } - } + "/marketplace/{ad}/set-as-draft": { + "post": { + "operationId": "setAdAsDraft", + "summary": "Change the advertisement status to `draft`.", + "description": "Change the advertisement status to `draft` thus making it only visible for the owner.", + "tags": [ + "Marketplace" + ], + "parameters": [ + { + "$ref": "#/components/parameters/ad" + } + ], + "responses": { + "204": { + "description": "The advertisement status was changed." }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } }, - "requestBody" : { - "description" : "The reply comments", - "required" : true, - "content" : { - "text/plain" : { - "schema" : { - "type" : "string" - } - } - } - } - } - }, - "/{user}/payments-awaiting-feedback" : { - "parameters" : [ { - "$ref" : "#/components/parameters/user" - } ], - "get" : { - "operationId" : "searchPaymentAwaitingFeedback", - "summary" : "Searches for payments performed by the user without feedback.", - "description" : "Searches for payments performed by the user without feedback.", - "tags" : [ "PaymentFeedbacks" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - }, { - "name" : "page", - "in" : "query", - "required" : false, - "description" : "The page number (zero-based) of the search. The default value is zero.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "pageSize", - "in" : "query", - "required" : false, - "description" : "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", - "schema" : { - "type" : "integer" - } - }, { - "name" : "relatedUser", - "in" : "query", - "required" : false, - "description" : "The user that received the payment feedback in reference to the user specified in the path. Should be either the id or some other allowed identification (login name, email, etc).", - "schema" : { - "type" : "string" - } - }, { - "name" : "skipTotalCount", - "in" : "query", - "required" : false, - "description" : "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", - "schema" : { - "type" : "boolean" - } - } ], - "responses" : { - "200" : { - "description" : "The transaction entries matching the criteria", - "headers" : { - "X-Total-Count" : { - "schema" : { - "type" : "integer" - }, - "description" : "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." - }, - "X-Page-Size" : { - "schema" : { - "type" : "integer" - }, - "description" : "The maximum number of results per page" - }, - "X-Current-Page" : { - "schema" : { - "type" : "integer" - }, - "description" : "The current page the results are in" - }, - "X-Has-Next-Page" : { - "schema" : { - "type" : "boolean" - }, - "description" : "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." - } - }, - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransactionResult" - } - } + "requestBody": { + "description": "The comments for the action. Only if the authenticated user is a manager of the advertisement's owner with permissions to manage pending ads.", + "required": false, + "content": { + "text/plain": { + "schema": { + "type": "string" } } + } + } + } + }, + "/marketplace/{ad}/request-authorization": { + "post": { + "operationId": "submitAdForAuthorization", + "summary": "Request for authorization for an advertisement.", + "description": "Request for authorization for an advertisement. Only if the system is configured to require authorizations and the authenticated user is the owner of the advertisement. The advertisement will remain in status `pending` until approved or rejected.", + "tags": [ + "Marketplace" + ], + "parameters": [ + { + "$ref": "#/components/parameters/ad" + } + ], + "responses": { + "204": { + "description": "The advertisement was submitted for authorization." }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -61205,266 +62966,243 @@ } } }, - "/{user}/payment-feedback-ignored-users" : { - "parameters" : [ { - "$ref" : "#/components/parameters/user" - } ], - "get" : { - "operationId" : "listPaymentFeedbackIgnoredUsers", - "summary" : "Lists the users marked as ignored for payment feedbacks.", - "description" : "Returns a list containing the users marked as ignored to give feedback for payments performed to them. Currently the only supported value for the user parameter is `self` (i.e the authenticated user must be the payer)", - "tags" : [ "PaymentFeedbacks" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The list of ignored users", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/User" - } - } - } - } + "/marketplace/{ad}/approve": { + "post": { + "operationId": "approveAd", + "summary": "Approves a pending advertisement.", + "description": "Change the advertisement status from `pending` to `active`, making it publcly visible.", + "tags": [ + "Marketplace" + ], + "parameters": [ + { + "$ref": "#/components/parameters/ad" + } + ], + "responses": { + "204": { + "description": "The advertisement status was changed." }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - }, - "post" : { - "operationId" : "addPaymentFeedbackIgnoredUser", - "summary" : "Adds a user as ignored for payment feedback.", - "description" : "Adds a user as ignored for payment feedback. Currently the only supported value for the user parameter is `self` (i.e the authenticated user must be the payer)", - "tags" : [ "PaymentFeedbacks" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "204" : { - "description" : "The user was added to be ignored." - }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" - } - } - } + } + }, + "/marketplace/{ad}/reject": { + "post": { + "operationId": "rejectAd", + "summary": "Rejects a pending advertisement.", + "description": "Change the advertisement status from `pending` to `draft`, making it visible only to its owner. A comment text is set in the request body.", + "tags": [ + "Marketplace" + ], + "parameters": [ + { + "$ref": "#/components/parameters/ad" + } + ], + "responses": { + "204": { + "description": "The advertisement status was changed." }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } }, - "requestBody" : { - "description" : "The identification value, such as id, username, e-mail, phone, etc. of the user to be ignored.", - "required" : true, - "content" : { - "text/plain" : { - "schema" : { - "type" : "string" + "requestBody": { + "description": "The comments for the action.", + "required": false, + "content": { + "text/plain": { + "schema": { + "type": "string" } } } } } }, - "/{user}/payment-feedback-ignored-users/{ignored}" : { - "parameters" : [ { - "$ref" : "#/components/parameters/user" - } ], - "delete" : { - "operationId" : "removePaymentFeedbackIgnoredUser", - "summary" : "Removes a user from the ignored users list.", - "description" : "Removes a user from the ignored users list. Currently the only supported value for the user parameter is `self` (i.e the authenticated user must be the payer)", - "tags" : [ "PaymentFeedbacks" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "name" : "ignored", - "in" : "path", - "required" : true, - "description" : "The identification value, such as id, username, e-mail, phone, etc. of the user to be removed from the list of ignored.", - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "204" : { - "description" : "The user was removed from the ignored list." + "/{user}/marketplace/list-favorites-data": { + "parameters": [ + { + "$ref": "#/components/parameters/user" + } + ], + "get": { + "operationId": "getUserFavoriteAdsListData", + "summary": "Returns data for advertisement favorites listing of the given user.", + "description": "Returns data for advertisement favorites listing of the given user.", + "tags": [ + "Marketplace" + ], + "security": [ + { + "basic": [] }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The data for listing advertisement favorites.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserFavoriteAdsListData" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -61472,88 +63210,69 @@ } } }, - "/payment-feedbacks/{key}/data-for-edit" : { - "parameters" : [ { - "name" : "key", - "in" : "path", - "required" : true, - "description" : "Either the id or transaction number", - "schema" : { - "type" : "string" - } - } ], - "get" : { - "operationId" : "getPaymentFeedbackDataForEdit", - "summary" : "Returns configuration data for editing a payment feedback as manager.", - "description" : "Returns configuration data for editing a payment feedback as admin/broker.", - "tags" : [ "PaymentFeedbacks" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "200" : { - "description" : "The data for editing a payment feedback.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PaymentFeedbackDataForEdit" - } - } - } + "/marketplace/{ad}/mark-as-favorite": { + "post": { + "operationId": "markAsFavorite", + "summary": "Marks an advertisement as favorite.", + "description": "Marks an advertisement as favorite.", + "tags": [ + "Marketplace" + ], + "parameters": [ + { + "$ref": "#/components/parameters/ad" + } + ], + "responses": { + "204": { + "description": "The advertisment is marked as favorite." }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -61561,353 +63280,354 @@ } } }, - "/payment-feedbacks/{key}" : { - "parameters" : [ { - "name" : "key", - "in" : "path", - "required" : true, - "description" : "Either the id or transaction number", - "schema" : { - "type" : "string" - } - } ], - "get" : { - "operationId" : "viewPaymentFeedback", - "summary" : "Returns details of a specific payment feedback.", - "description" : "Returns details of a specific payment feedback.", - "tags" : [ "PaymentFeedbacks" ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "200" : { - "description" : "The payment feedback details.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PaymentFeedbackView" - } - } - } + "/marketplace/{ad}/unmark-as-favorite": { + "post": { + "operationId": "unmarkAsFavorite", + "summary": "Makes the advertisement no more a favorite.", + "description": "Makes the advertisement no more a favorite.", + "tags": [ + "Marketplace" + ], + "parameters": [ + { + "$ref": "#/components/parameters/ad" + } + ], + "responses": { + "204": { + "description": "The advertisement is not a favorite anymore." }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - }, - "put" : { - "operationId" : "updatePaymentFeedback", - "summary" : "Updates an existing payment feedback as manager.", - "description" : "Updates an existing payment feedback as admin/broker with manage permission.", - "tags" : [ "PaymentFeedbacks" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "204" : { - "description" : "The payment feedback was updated", - "headers" : { - "Location" : { - "description" : "URL for viewing the payment feedback details", - "schema" : { - "type" : "string" + } + }, + "/marketplace/{ad}/questions": { + "post": { + "operationId": "createAdQuestion", + "summary": "Creates a new advertisement question.", + "description": "Creates a new question for an advertisement and associate it to the authenticated user.", + "tags": [ + "AdQuestions" + ], + "parameters": [ + { + "$ref": "#/components/parameters/ad" + } + ], + "responses": { + "201": { + "description": "Returns the identifier of the new question.", + "headers": { + "Location": { + "description": "URL for viewing the advertisement question details.", + "schema": { + "type": "string" } } - } - }, - "409" : { - "description" : "This operation expected an entity state, but it has resulted in a conflict", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConflictError" + }, + "content": { + "text/plain": { + "schema": { + "type": "string" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } }, - "requestBody" : { - "description" : "The payment feedback details", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PaymentFeedbackEdit" + "requestBody": { + "required": true, + "content": { + "text/plain": { + "schema": { + "type": "string" } } } } - }, - "delete" : { - "operationId" : "removePaymentFeedback", - "summary" : "Deletes an existing payment feedback as manager.", - "description" : "Deletes an existing payment feedback as admin/broker with manage permission.", - "tags" : [ "PaymentFeedbacks" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "204" : { - "description" : "The payment feedback was removed." + } + }, + "/questions/{id}": { + "get": { + "operationId": "getAdQuestion", + "summary": "Returns details of an advertisement question.", + "description": "Return detailed information of an advertisement question.", + "tags": [ + "AdQuestions" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + { + "$ref": "#/components/parameters/id" + } + ], + "responses": { + "200": { + "description": "Returns the advertisement question information.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AdQuestionView" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "422" : { - "description" : "Input error. Either a validation error or the maximum allowed items was exceeded", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - } - }, - "/invite/data-for-send" : { - "get" : { - "operationId" : "getDataForInvite", - "summary" : "Returns data for inviting external users to join the system", - "description" : "Returns data for inviting external users to join the system", - "tags" : [ "Invite" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "parameters" : [ { - "$ref" : "#/components/parameters/fields" - } ], - "responses" : { - "200" : { - "description" : "The data for sending invitations", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DataForSendInvitation" + }, + "delete": { + "operationId": "deleteAdQuestion", + "summary": "Removes an advertisement question.", + "description": "Removes an advertisement question created for the authenticated user.", + "tags": [ + "AdQuestions" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/id" + } + ], + "responses": { + "204": { + "description": "The advertisement question was removed." + }, + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" } } } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -61915,23580 +63635,37878 @@ } } }, - "/invite" : { - "post" : { - "operationId" : "sendInvitation", - "summary" : "Sends invitation e-mails for external users.", - "description" : "Sends invitation e-mails for external users.", - "parameters" : [ ], - "tags" : [ "Invite" ], - "security" : [ { - "basic" : [ ] - }, { - "session" : [ ] - }, { - "accessClient" : [ ] - } ], - "responses" : { - "204" : { - "description" : "The invitation e-mails were sent" + "/questions/{id}/answer": { + "post": { + "operationId": "answerAdQuestion", + "summary": "Answers an advertisement question as the authenticated user.", + "description": "Answers a question by id (created for an advertisement of its own).", + "tags": [ + "AdQuestions" + ], + "parameters": [ + { + "$ref": "#/components/parameters/id" + } + ], + "responses": { + "204": { + "description": "The question was answered." + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } + } }, - "401" : { - "description" : "Unauthorized access. Missing or invalid crendentials supplied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnauthorizedError" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" } } } }, - "403" : { - "description" : "Permission denied for such operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ForbiddenError" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404" : { - "description" : "An expected data was not found", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NotFoundError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" } } } }, - "405" : { - "description" : "Some required service is unavailable", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnavailableError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" } } } }, - "500" : { - "description" : "Unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } }, - "requestBody" : { - "description" : "The invitation details.", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SendInvitation" + "requestBody": { + "required": true, + "content": { + "text/plain": { + "schema": { + "type": "string" } } } } } - } - }, - "components" : { - "securitySchemes" : { - "basic" : { - "type" : "http", - "scheme" : "basic", - "description" : "User and password, which are sent on every request (stateless). The user identification, commonly referred as principal, can be, according to the settings in Cyclos:\n\n- Login name;\n- E-mail;\n- Mobile phone;\n- Account number;\n- Custom field (fields configured as principal type in Cyclos);\n- Pin (see below for more details).\n\nThere is a configuration in Cyclos, under System > Configurations > Channels (tab) > Channel that specifies which identification methods (principal types) are allowed for that channel. There is also a setting for the default. When a specific principal type is not given, if there is a 'Default user identification method', that one is used. If there's no default, all possible principal types are attempted.\n\nTo specify the principal type, set the HTTP header `Principal-Type`, containing the principal type internal name. If there is a default set in the channel configuration, but still you want all types to be attempted, pass `*` in the `Principal-Type` header.\n\nIt is also possible to access with a device PIN. To do so, first activate a device PIN, which will result in both a PIN principal value (identifier) and a cryptographic salt. Then, to authenticate as PIN, set the `Principal-Type` header to `#` and send the `Authorization` header with value: `Basic base64(principal:salt+PIN)`." - }, - "session" : { - "type" : "apiKey", - "name" : "Session-Token", - "in" : "header", - "description" : "A steteful access, using a session token as obtained from a call to `POST /auth/session`. That token is then passed in on every request. The POST request itself must be called using the `basic` authentication to set the user and password. The authenticated user can then be seen on Cyclos in the connected users functionality." - }, - "accessClient" : { - "type" : "apiKey", - "name" : "Access-Client-Token", - "in" : "header", - "description" : "Access via an access client token, which is obtained when the client is activated. This token is passed in as a header on every request (stateless)." - }, - "oidc" : { - "type" : "openIdConnect", - "openIdConnectUrl" : "http://root/.well-known/openid-configuration", - "description" : "OAuth2 / OpenID Connect authentication. Clients must be previously registered in Cyclos. Then they request an authorization using the standard OAuth2 / OpenID Connect authorization endpoint at `http://root/api/oidc/authorize`. When the OpenID Connect standard scope `openid` is requested, the flow will follow the OpenID Connect specification, allowing `id_token`s to be issued. Otherwise, plain OAuth2 authorization will be granted. The obtained access token should be passed in the `Authorization: Bearer ` request header to access the API." - } - }, - "parameters" : { - "page" : { - "name" : "page", - "required" : false, - "in" : "query", - "schema" : { - "type" : "integer" - }, - "description" : "The page number (zero-based) of the search. The default value is zero." - }, - "pageSize" : { - "name" : "pageSize", - "required" : false, - "in" : "query", - "schema" : { - "type" : "integer" - }, - "description" : "The maximum number of records that will be returned on the search. The default value is 40." - }, - "keywords" : { - "name" : "keywords", - "required" : false, - "in" : "query", - "schema" : { - "type" : "string" - }, - "description" : "Textual search keywords. Sometimes, like in user search, the fields matched depends on what is configured on the products." - }, - "fields" : { - "name" : "fields", - "required" : false, - "in" : "query", - "explode" : false, - "schema" : { - "type" : "array", - "items" : { - "type" : "string" - } - }, - "description" : "Select which fields to include on returned data. On the beginning of this page is an explanation on how this parameter works." - }, - "customFields" : { - "name" : "customFields", - "required" : false, - "in" : "query", - "schema" : { - "type" : "array", - "items" : { - "type" : "string" - } - }, - "description" : "Custom field values. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by : (colon). For example, `customFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, profileFields=field1:valueA|valueB. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `customFields=rank:bronze|silver,birthDate:2000-01-01|2001-12-31` would match results whose custom field with internal name `rank` is either bronze or silver, and whose `birthDate` is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `customFields=birthDate:|2001-12-31`." - }, - "user" : { - "name" : "user", - "required" : true, - "in" : "path", - "x-dotInPath" : true, - "schema" : { - "type" : "string" - }, - "description" : "Can be one of:\n\n- a user identification value, such as id, username, e-mail, phone, etc.\n Id is always allowed, others depend on Cyclos configuration. Note that\n a valid numeric value is always considered as id. For example, when\n using another identification method that can be numeric only, prefix\\\n the value with a single quote (like in Excel spreadsheets);\n\n- `self` for the currently authenticated user." - }, - "userInQuery" : { - "name" : "user", - "required" : false, - "in" : "query", - "schema" : { - "type" : "string" - }, - "description" : "Can be one of:\n\n- a user identification value, such as id, username, e-mail, phone, etc.\n Id is always allowed, others depend on Cyclos configuration. Note that\n a valid numeric value is always considered as id. For example, when\n using another identification method that can be numeric only, prefix\\\n the value with a single quote (like in Excel spreadsheets);\n\n- `self` for the currently authenticated user." - }, - "userNoSelf" : { - "name" : "user", - "required" : true, - "in" : "path", - "x-dotInPath" : true, - "schema" : { - "type" : "string" - }, - "description" : "A user identification value, such as id, username, e-mail, phone, etc. Id is always allowed, others depend on Cyclos configuration. Note that a valid numeric value is always considered as id. For example, when using another identification method that can be numeric only, prefix the value with a single quote (like in Excel spreadsheets), for example, `'1234567890`;" - }, - "owner" : { - "name" : "owner", - "required" : true, - "in" : "path", - "x-dotInPath" : true, - "schema" : { - "type" : "string" - }, - "description" : "Can be one of:\n\n- a user identification value, such as id, username, e-mail, phone, etc.\n Id is always allowed, others depend on Cyclos configuration. Note that\n a valid numeric value is always considered as id. For example, when\n using another identification method that can be numeric only, prefix\\\n the value with a single quote (like in Excel spreadsheets);\n\n- `self` for the currently authenticated user;\n- `system` for the system owner." - }, - "id" : { - "name" : "id", - "required" : true, - "in" : "path", - "schema" : { - "type" : "string" - }, - "description" : "The object identification" - }, - "format" : { - "name" : "format", - "required" : true, - "in" : "path", - "description" : "The format to export the data", - "schema" : { - "type" : "string" - } - }, - "order" : { - "name" : "order", - "required" : true, - "in" : "path", - "x-dotInPath" : true, - "schema" : { - "type" : "string" - }, - "description" : "Either the order id or number. If the number is solely comprised of numbers, it must be prefixed by a single quote." - }, - "ad" : { - "name" : "ad", - "required" : true, - "in" : "path", - "x-dotInPath" : true, - "schema" : { - "type" : "string" - }, - "description" : "Can be either the advertisement internal identifier or, in case of webshop advertisements, can be the product number (if the owner is the logged user) or a string in the form `productNumber@user`, with the user identifier as well. If the number is solely comprised of numbers, it must be prefixed by a single quote." - }, - "confirmationPassword" : { - "name" : "confirmationPassword", - "in" : "header", - "schema" : { - "type" : "string" - }, - "required" : false, - "description" : "The password used to confirm this action, if needed. The actual password type, if any, depends on the Cyclos configuration for the current channel." - }, - "accountType" : { - "name" : "accountType", - "description" : "The account type internal name or id", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, - "cyclosVersion" : { - "name" : "cyclosVersion", - "in" : "query", - "schema" : { - "type" : "string" - }, - "required" : false, - "description" : "The last known Cyclos version. Sometimes, data to be cached depends on the version of the Cyclos application, and this helps controlling such cases" - }, - "headerIf" : { - "name" : "headerIf", - "in" : "query", - "schema" : { - "type" : "string" - }, - "required" : false, - "description" : "Controls the header cache. If is a boolean value (`true` or `false`) will forcibly return or skip the content. Otherwise, it should be a string in the form `id|version|dataTranslationId|dataTranslationVersion`. In this case, the translated content (if any) or the content itself will be returned only when changed. When blank will always return it." - }, - "footerIf" : { - "name" : "footerIf", - "in" : "query", - "schema" : { - "type" : "string" - }, - "required" : false, - "description" : "Controls the footer cache. If is a boolean value (`true` or `false`) will forcibly return or skip the content. Otherwise, it should be a string in the form `id|version|dataTranslationId|dataTranslationVersion`. In this case, the translated content (if any) or the content itself will be returned only when changed. When blank will always return it." - }, - "themeIf" : { - "name" : "themeIf", - "in" : "query", - "schema" : { - "type" : "string" - }, - "required" : false, - "description" : "Controls the theme cache. If is a boolean value (`true` or `false`) will forcibly return or skip the content. Otherwise, it should be a string in the form `id|version`. In this case, the content will be returned only when changed. When blank will always return it." - }, - "themeByComponents" : { - "name" : "themeByComponents", - "in" : "query", - "schema" : { - "type" : "boolean" - }, - "required" : false, - "description" : "Flag used to indicate how the theme must be returned (if returned): true means the theme components (base / advanced definitions and custom style) will be filled. Otherwise the final CSS (i. e the theme content). Only valid if the kind of the user interface is NOT `mobile`. For that kind the theme es always returned by its components." - } - }, - "schemas" : { - "AccountKind" : { - "description" : "Indicates whether an account belongs to system or user.\nPossible values are:\n- `system`: System account, there is only one account per type in the system. Managed only by administrators\n- `user`: User account, there is one account of this type per user.", - "type" : "string", - "enum" : [ "system", "user" ] - }, - "AdAddressResultEnum" : { - "description" : "Determines which address is returned on the search, if any. By default no addresses are returned. This option is useful for displaying results as locations on a map. In all cases only located addresses (those that have the geographical coordinates set) are returned. When returning all addresses, data related with multiple addresses is returned multiple times.\nPossible values are:\n- `all`: All addresses are returned.\n- `nearest`: The nearest address from the reference location is returned. Only usable if a reference coordinate (`latitude` and `longitude`)\n- `none`: Addresses are not returned.", - "type" : "string", - "enum" : [ "all", "nearest", "none" ] - }, - "AdCategoriesDisplayEnum" : { - "description" : "The possible views for simple or webshop advertisements categories.\nPossible values are:\n- `images`: A list including the categories with its corresponding image.\n- `simple`: A simplified list of categories.", - "type" : "string", - "enum" : [ "images", "simple" ] - }, - "AdInitialSearchTypeEnum" : { - "description" : "Indicates how initial advertisement search is performed\nPossible values are:\n- `ads`: List advertisements first.\n- `categories`: List categories first.", - "type" : "string", - "enum" : [ "ads", "categories" ] - }, - "AdKind" : { - "description" : "The possible kinds of an advertisement.\nPossible values are:\n- `simple`: A simple advertisement that can be viewed, but not directly bought\n- `webshop`: An advertisement that is part of an webshop. Can be bought, there is stock management, etc.", - "type" : "string", - "enum" : [ "simple", "webshop" ] - }, - "AdOrderByEnum" : { - "description" : "Indicates how advertisements results are ordered.\nPossible values are:\n- `date`: Newest advertisements are returned first.\n- `distance`: Only useful when providing a location, will return nearer advertisements first.\n- `priceAsc`: Smaller prices are returned first. Advertisements without price are returned last.\n- `priceDesc`: Higher prices are returned first. Advertisements without price are returned last.\n- `random`: Without definite order\n- `relevance`: This is the default if keywords are used. Best matching advertisements come first.", - "type" : "string", - "enum" : [ "date", "distance", "priceAsc", "priceDesc", "random", "relevance" ] - }, - "AdStatusEnum" : { - "description" : "The possible status for an advertisement.\nPossible values are:\n- `active`: The advertisement is published and can be seen by other users.\n- `disabled`: The advertisement is disabled because the owner no longer has access to the currency of the advertisement. It cannot be seen by other users.\n- `draft`: In draft status, only the owner can see and edit the advertisement. This status is only possible if the system is configured to require authorizations.\n- `expired`: The advertisement publication period has already expired, and cannot be seen by other users.\n- `hidden`: The advertisement is manually hidden from other users\n- `pending`: The advertisement is pending for an authorization and cannot be seen by other users. This status is only possible if the system is configured to require authorizations.\n- `scheduled`: The advertisement has a future publication period, and cannot be seen by other users.", - "type" : "string", - "enum" : [ "active", "disabled", "draft", "expired", "hidden", "pending", "scheduled" ] - }, - "AddressFieldEnum" : { - "description" : "The address fields that can be configured to be enabled or required.\nPossible values are:\n- `addressLine1`: The first line of the descriptive address\n- `addressLine2`: The second line of the descriptive address\n- `buildingNumber`: The numeric identifier for a land parcel, house, building or other\n- `city`: The city name\n- `complement`: The complement (like apartment number)\n- `country`: The country, represented as 2-letter, uppercase, ISO 3166-1 code\n- `neighborhood`: The neighborhood name\n- `poBox`: The post-office box, is an uniquely addressable box\n- `region`: The region or state\n- `street`: The street name\n- `zip`: A zip code that identifies a specific geographic (postal) delivery area", - "type" : "string", - "enum" : [ "addressLine1", "addressLine2", "buildingNumber", "city", "complement", "country", "neighborhood", "poBox", "region", "street", "zip" ] - }, - "AddressQueryFieldEnum" : { - "description" : "Fields which can be used when filtering by user address, by using the `address.` name.\nPossible values are:\n- `address`: Filters by any field in the street address: `addressLine1`, `addressLine2`, `street`, `buildingNumber` or `complement`\n- `city`: Filters by city name\n- `country`: Filters by country, represented as 2-letter, uppercase, ISO 3166-1 code (exact match)\n- `neighborhood`: Filters by neighborhood name\n- `poBox`: Filters by post-office box (exact match)\n- `region`: Filters by region or state\n- `zip`: Filters by zip (postal) code (exact match)", - "type" : "string", - "enum" : [ "address", "city", "country", "neighborhood", "poBox", "region", "zip" ] - }, - "AdminMenuEnum" : { - "description" : "Which administration menu should a data be displayed.\nPossible values are:\n- `contentManagement`: Content management\n- `reports`: Reports\n- `systemBanking`: System accounts\n- `systemManagement`: System management\n- `userManagement`: User management", - "type" : "string", - "enum" : [ "contentManagement", "reports", "systemBanking", "systemManagement", "userManagement" ] - }, - "AuthorizationActionEnum" : { - "description" : "Possible actions that could be confirmed with a device for a payment authorization.\nPossible values are:\n- `authorize`: Authorize the payment authorization\n- `cancel`: Cancel the payment authorization\n- `deny`: Deny the payment authorization", - "type" : "string", - "enum" : [ "authorize", "cancel", "deny" ] - }, - "AvailabilityEnum" : { - "description" : "Determines the availability of a data.\nPossible values are:\n- `disabled`: The data is disabled\n- `optional`: The data is enabled and optional\n- `required`: The data is enabled and required", - "type" : "string", - "enum" : [ "disabled", "optional", "required" ] - }, - "BadRequestErrorCode" : { - "description" : "Error codes for 400 Bad request HTTP status.\nPossible values are:\n- `general`: Bad request format\n- `json`: Error in the JSON format", - "type" : "string", - "enum" : [ "general", "json" ] - }, - "BalanceLevelEnum" : { - "description" : "Contains the possible balance levels on the users with balances search.\nPossible values are:\n- `high`: High balance, above the medium balance range upper bound\n- `low`: Low balance, below the medium balance range lower bound\n- `medium`: Medium balance, between the lower and upper bounds of the medium balance range", - "type" : "string", - "enum" : [ "high", "low", "medium" ] - }, - "BasicProfileFieldEnum" : { - "description" : "The existing user basic profile fields.\nPossible values are:\n- `accountNumber`: Account number\n- `address`: Address\n- `email`: E-mail\n- `image`: Image\n- `name`: Full name\n- `phone`: Phone (either mobile or land-line)\n- `username`: Login name", - "type" : "string", - "enum" : [ "accountNumber", "address", "email", "image", "name", "phone", "username" ] - }, - "BrokeringActionEnum" : { - "description" : "An action over a user's brokers.\nPossible values are:\n- `add`: The broker was added\n- `remove`: The broker was removed\n- `setMain`: The broker was set as main", - "type" : "string", - "enum" : [ "add", "remove", "setMain" ] - }, - "BuyVoucherErrorCode" : { - "description" : "Possible errors when buying a voucher.\nPossible values are:\n- `maxAmountForPeriod`: The maximum allowed buy amount for a period (example, a month) has been exceeded\n- `maxOpenAmount`: The maximum open amount for this voucher type for the buyer user has been exceeded\n- `maxTotalOpenAmount`: The maximum total open amount for this voucher type, for all users, has been exceeded\n- `notAllowedForUser`: The user attempting to buy vouchers is not allowed to buy vouchers of this type\n- `payment`: There was an error when performing the payment\n- `unexpected`: An unexpected error has occurred. See the `exceptionType` and `exceptionMessage` fields for the internal information.", - "type" : "string", - "enum" : [ "maxAmountForPeriod", "maxOpenAmount", "maxTotalOpenAmount", "notAllowedForUser", "payment", "unexpected" ] - }, - "CaptchaProviderEnum" : { - "description" : "Possibles captcha provider.\nPossible values are:\n- `internal`: Internal CAPTCHA provider using images\n- `recaptchaV2`: reCAPTCHA v2", - "type" : "string", - "enum" : [ "internal", "recaptchaV2" ] - }, - "ClientActionEnum" : { - "description" : "Possible actions that could be confirmed with a device for an access client.\nPossible values are:\n- `block`: Block the access client\n- `getActivationCode`: Get the activation code\n- `unassign`: Unassign the access client\n- `unblock`: Unblock the access client", - "type" : "string", - "enum" : [ "block", "getActivationCode", "unassign", "unblock" ] - }, - "ClientStatusEnum" : { - "description" : "The status of an access client.\nPossible values are:\n- `active`: The access client is active, and can operate normally\n- `blocked`: The access client is blocked and cannot be used until it is unblocked\n- `removed`: The access client was removed, but had transactions, so couldn't be physically removed\n- `unassigned`: The access client is unassigned (disconnected) from an (remote) application", - "type" : "string", - "enum" : [ "active", "blocked", "removed", "unassigned" ] - }, - "CodeVerificationStatusEnum" : { - "description" : "The status of a mobile phone verification challenge.\nPossible values are:\n- `codeNotSent`: There isn't a current code to be verified (for example the was never sent or the code was reset by max attempts reached)\n- `expired`: The code has expired and can't be used anymore.\n- `failed`: The code was wrong (it doesn't match the expected value)\n- `maxAttemptsReached`: The max attempts with an invalid code was reached.\n- `success`: The code was correct and accepted.", - "type" : "string", - "enum" : [ "codeNotSent", "expired", "failed", "maxAttemptsReached", "success" ] - }, - "ConflictErrorCode" : { - "description" : "Error codes for 409 Conflict entity HTTP status.\nPossible values are:\n- `constraintViolatedOnRemove`: An attempt to remove some entity has failed, probably because that entity is in use, that is, is being referenced by some other entity.\n- `staleEntity`: Failure in the optimistic lock. It means some entity was fetched for editing by 2 clients. Then they both saved it. The first one is successful, but the second one will fail. If you get this error, make sure the `version` field is being sent with the correct value, as fetched from the server.", - "type" : "string", - "enum" : [ "constraintViolatedOnRemove", "staleEntity" ] - }, - "ContactOrderByEnum" : { - "description" : "Possible options for ordering the results of a contact list.\nPossible values are:\n- `alphabeticallyAsc`: Users are ordered by name (or whatever field is set to format users) in ascending order.\n- `alphabeticallyDesc`: Users are ordered by name (or whatever field is set to format users) in descending order.\n- `relevance`: This is the default if keywords are used. Best matching users come first.", - "type" : "string", - "enum" : [ "alphabeticallyAsc", "alphabeticallyDesc", "relevance" ] - }, - "CustomFieldControlEnum" : { - "description" : "The UI control (widget) type that should be used to render this field for edit. Most notably, the types that can have distinct controls are singleSelection, that could be rendered as a single selection widget or radio button group, and multi selection, which could be rendered as a multi selection widget or a checkbox group.\nPossible values are:\n- `checkbox`: A checkbox group\n- `entitySelection`: A widget to select a linked entity (for example, an auto-complete for users)\n- `multiSelection`: A multi-selection field\n- `radio`: A radio button group\n- `richEditor`: An HTML editor\n- `singleSelection`: A single-selection field\n- `text`: A single line text\n- `textarea`: A multi line text\n- `upload`: A widget to upload a file", - "type" : "string", - "enum" : [ "checkbox", "entitySelection", "multiSelection", "radio", "richEditor", "singleSelection", "text", "textarea", "upload" ] - }, - "CustomFieldKind" : { - "description" : "Determines the kind if a custom field.\nPossible values are:\n- `contact`: Contact fields.\n- `contactInfo`: Additional contact information fields.\n- `custom_operation`: Custom operation fields.\n- `custom_wizard`: Custom wizard fields.\n- `document`: Document fields.\n- `marketplace`: Advertisements fields.\n- `record`: Record fields.\n- `transaction`: Transaction fields.\n- `user`: User profile fields.\n- `voucher`: Voucher fields.", - "type" : "string", - "enum" : [ "contact", "contactInfo", "custom_operation", "custom_wizard", "document", "marketplace", "record", "transaction", "user", "voucher" ] - }, - "CustomFieldSizeEnum" : { - "description" : "The size of the widget that should be rendered.\nPossible values are:\n- `full`: The widget should occupy 100% of the available area\n- `large`: A large widget\n- `medium`: A medium widget\n- `small`: A small widget\n- `tiny`: A very small widget", - "type" : "string", - "enum" : [ "full", "large", "medium", "small", "tiny" ] - }, - "CustomFieldTypeEnum" : { - "description" : "The data type for the custom field.\nPossible values are:\n- `boolean`: A boolean value\n- `date`: A date value\n- `decimal`: A decimal value\n- `dynamicMultiSelection`: Multiple selection based on options generated by a custom script\n- `dynamicSelection`: Single selection based on options generated by a custom script\n- `file`: Multiple binary files\n- `image`: Multiple images\n- `integer`: An integer value\n- `linkedEntity`: Another entity. Uses the `linkedEntityType` to define which kind of entity is it\n- `multiSelection`: Multiple enumerated values\n- `richText`: A multi line string formatted as HTML\n- `singleSelection`: A single enumerated value\n- `string`: A single line string\n- `text`: A multi line string\n- `url`: An URL", - "type" : "string", - "enum" : [ "boolean", "date", "decimal", "dynamicMultiSelection", "dynamicSelection", "file", "image", "integer", "linkedEntity", "multiSelection", "richText", "singleSelection", "string", "text", "url" ] - }, - "DateFormatEnum" : { - "description" : "The format for dates.\nPossible values are:\n- `dmyDash`: DD-MM-YYYY\n- `dmyPeriod`: DD.MM.YYYY\n- `dmySlash`: DD/MM/YYYY\n- `mdyDash`: MM-DD-YYYY\n- `mdyPeriod`: MM.DD.YYYY\n- `mdySlash`: MM/DD/YYYY\n- `ymdDash`: YYYY-MM-DD\n- `ymdPeriod`: YYYY.MM.DD\n- `ymdSlash`: YYYY/MM/DD", - "type" : "string", - "enum" : [ "dmyDash", "dmyPeriod", "dmySlash", "mdyDash", "mdyPeriod", "mdySlash", "ymdDash", "ymdPeriod", "ymdSlash" ] - }, - "DeliveryMethodChargeTypeEnum" : { - "description" : "How the price is determined on this delivery method.\nPossible values are:\n- `fixed`: The delivery method price will be fixed.\n- `negotiated`: The delivery method price will be negotiated between the seller and the buyer.", - "type" : "string", - "enum" : [ "fixed", "negotiated" ] - }, - "DeliveryMethodTypeEnum" : { - "description" : "How the products are delivered.\nPossible values are:\n- `deliver`: The products are delivered to the buyer's address.\n- `pickup`: The products are delivered to the seller's pickup point", - "type" : "string", - "enum" : [ "deliver", "pickup" ] - }, - "DeviceActionEnum" : { - "description" : "Possible actions that could be confirmed with a device for another device.\nPossible values are:\n- `activate`: Activate a device as trusted\n- `remove`: Remove the trusted device", - "type" : "string", - "enum" : [ "activate", "remove" ] - }, - "DeviceActivationEnum" : { - "description" : "Contains useful information needed when a device is being activated as trusted.\nPossible values are:\n- `disabled`: The activation is not required but the user can not activate a device as trusted because it does not have any mediums to receive the activation code or the session is already trusted\n- `optional`: The activation is not required and the user can activate a device by code\n- `required`: The activation is required with an activation code\n- `requiredNoMediums`: The activation is required but the user can not activate a device as trusted because it does not have any mediums to receive the activation code\n- `requiredWithDevice`: The activation is required with an existing trusted device", - "type" : "string", - "enum" : [ "disabled", "optional", "required", "requiredNoMediums", "requiredWithDevice" ] - }, - "DeviceConfirmationStatusEnum" : { - "description" : "The possible status for a device confirmation.\nPossible values are:\n- `approved`: The confirmation was approved through a trusted device\n- `pending`: The confirmation is pending for approval through a trusted device\n- `rejected`: The confirmation was rejected through a trusted device", - "type" : "string", - "enum" : [ "approved", "pending", "rejected" ] - }, - "DeviceConfirmationTypeEnum" : { - "description" : "Contains all possible device confirmation types.\nPossible values are:\n- `acceptOrder`: A confirmation for accepting a pending order as buyer\n- `approveTicket`: A confirmation for approving a pending ticket as payer\n- `buyVouchers`: A confirmation for buying vouchers\n- `changeAccountLimits`: A confirmation for change the account limits of a user account\n- `chargeback`: A confirmation for transfer chargeback\n- `clientAction`: A confirmation for an action over an access client\n- `editProfile`: A confirmation for editing the profile of his own\n- `generatePassword`: A confirmation for generating a new password\n- `generateVouchers`: A confirmation for generating vouchers\n- `importPayments`: A confirmation for importin payments as admin\n- `importUserPayments`: A confirmation for batch payments as user\n- `manageAddress`: A confirmation for managing an user address of his own\n- `manageAuthorization`: A confirmation for managing a pending payment authorization\n- `manageContactInfo`: A confirmation for managing an additional contact information of his own\n- `manageDevice`: A confirmation for managing a trusted device\n- `manageExternalPayment`: A confirmation for managing an external payment\n- `manageFailedOccurrence`: A confirmation for managing a recurring payment failed occurrence\n- `manageInstallment`: A confirmation for managing a scheduled payment installment\n- `managePaymentRequest`: A confirmation for managing a payment request\n- `managePhone`: A confirmation for managing a phone of his own\n- `manageRecurringPayment`: A confirmation for managing a recurring payment\n- `manageScheduledPayment`: A confirmation for managing a scheduled payment\n- `manageVoucher`: A confirmation for managing a voucher\n- `performExternalPayment`: A confirmation for performing an external payment\n- `performPayment`: A confirmation for performing a payment\n- `personalizeNfc`: A confirmation for personalizing a NFC tag\n- `runOperation`: A confirmation for running a custom operation\n- `secondaryLogin`: A confirmation for the secondary login\n- `sendVoucher`: A confirmation for sending a voucher\n- `shoppingCartCheckout`: A confirmation for the cart checkout\n- `topUpVoucher`: A confirmation for a voucher top-up", - "type" : "string", - "enum" : [ "acceptOrder", "approveTicket", "buyVouchers", "changeAccountLimits", "chargeback", "clientAction", "editProfile", "generatePassword", "generateVouchers", "importPayments", "importUserPayments", "manageAddress", "manageAuthorization", "manageContactInfo", "manageDevice", "manageExternalPayment", "manageFailedOccurrence", "manageInstallment", "managePaymentRequest", "managePhone", "manageRecurringPayment", "manageScheduledPayment", "manageVoucher", "performExternalPayment", "performPayment", "personalizeNfc", "runOperation", "secondaryLogin", "sendVoucher", "shoppingCartCheckout", "topUpVoucher" ] - }, - "DistanceUnitEnum" : { - "description" : "Determines the unit used to measure distances.\nPossible values are:\n- `kilometer`: Kilometer(s)\n- `mile`: Mile(s)", - "type" : "string", - "enum" : [ "kilometer", "mile" ] - }, - "DocumentKind" : { - "description" : "The kind of a document.\nPossible values are:\n- `dynamic`: A shared dynamic document - the content is a HTML text obtained from a template and variables\n- `static`: A shared static document - the content is a downloaded file\n- `user`: An individual static document belonging to a specific user", - "type" : "string", - "enum" : [ "dynamic", "static", "user" ] - }, - "DocumentRangeEnum" : { - "description" : "The document range, either shared or individual.\nPossible values are:\n- `individual`: A document belonging to a specific user\n- `shared`: Shared documents. They have a category, and are the same documents for all users", - "type" : "string", - "enum" : [ "individual", "shared" ] - }, - "EmailUnsubscribeKind" : { - "description" : "The type of e-mail which is being unsubscribed\nPossible values are:\n- `mailing`: An e-mail for a mailing list\n- `message`: An e-mail which forwards an internal message\n- `notification`: An e-mail which was generated by a notification", - "type" : "string", - "enum" : [ "mailing", "message", "notification" ] - }, - "ErrorKind" : { - "description" : "Error types associated to the HTTP Status 500.\nPossible values are:\n- `buyVoucher`: An error has occurred when buying a voucher\n- `forgottenPassword`: An error has occurred when changing a forgotten password.\n- `general`: An unexpected error has occurred\n- `initializeNfc`: An error has occurred when initializing a NFC token\n- `nested`: An error which has another internal error at a given property / index\n- `nfcAuth`: An error has occurred when making an external NFC authentication\n- `payment`: An error has occurred when making a payment\n- `personalizeNfc`: An error has occurred when personalizing a NFC token\n- `pos`: An error has occurred when receiving a payment on a POS operation\n- `redeemVoucher`: An error has occurred when redeeming a voucher\n- `shoppingCart`: An error has occurred when interacting with a shopping cart.\n- `shoppingCartCheckout`: An error has occurred when checking out a shopping cart.\n- `topUpVoucher`: An error has occurred on a voucher top-up", - "type" : "string", - "enum" : [ "buyVoucher", "forgottenPassword", "general", "initializeNfc", "nested", "nfcAuth", "payment", "personalizeNfc", "pos", "redeemVoucher", "shoppingCart", "shoppingCartCheckout", "topUpVoucher" ] - }, - "ExternalPaymentActionEnum" : { - "description" : "Possible actions that could be confirmed with a device for an external payment.\nPossible values are:\n- `cancel`: Cancel the external payment", - "type" : "string", - "enum" : [ "cancel" ] - }, - "ExternalPaymentStatusEnum" : { - "description" : "The status of an external payment.\nPossible values are:\n- `canceled`: The external payment was canceled\n- `expired`: The external payment has expired without the external user being registered\n- `failed`: The external payment processing has failed\n- `pending`: The external payment is pending processing\n- `processed`: The external payment has been processed", - "type" : "string", - "enum" : [ "canceled", "expired", "failed", "pending", "processed" ] - }, - "FailedOccurrenceActionEnum" : { - "description" : "Possible actions that could be confirmed with a device for a recurring payment failed occurrence.\nPossible values are:\n- `process`: Process the recurring payment failed occurrence", - "type" : "string", - "enum" : [ "process" ] - }, - "ForbiddenErrorCode" : { - "description" : "Error codes for 403 Forbidden HTTP status.\nPossible values are:\n- `devicePinRemoved`: The device pin was removed by exceeding the allowed attempts.\n- `disabledPassword`: The password being used was disabled.\n- `expiredPassword`: The password being used has expired.\n- `illegalAction`: Attempt to perform an action that is not allowed on this context.\n- `inaccessibleChannel`: This channel cannot be accessed by the user.\n- `inaccessibleGroup`: An administrator logging in another user which is not of the managed groups. Should be handled generically, in case more group-specific login retrictions are added to Cyclos.\n- `inaccessibleNetwork`: A restricted global administrator is trying to login to a network they can't access.\n- `inaccessiblePrincipal`: The used identification method (principal type) cannot be used in this channel.\n- `indefinitelyBlocked`: The password was indefinitely blocked by exceeding the allowed attempts.\n- `invalidDeviceActivationCode`: The device activation code was no valid.\n- `invalidDeviceConfirmation`: The device confirmation being used is invalid (normally as a confirmation password).\n- `invalidPassword`: The password being used is invalid (normally the confirmation password).\n- `operatorWithPendingAgreements`: The operator cannot access because his owner member has pending agreements.\n- `otpInvalidated`: The OTP was invalidated.\n- `pendingAgreements`: There is at least one agreement which needs to be accepted in order to access the system.\n- `permissionDenied`: The operation was denied because a required permission was not granted.\n- `resetPassword`: The password being used was manually reset.\n- `temporarilyBlocked`: The password was temporarily blocked by exceeding the allowed attempts.", - "type" : "string", - "enum" : [ "devicePinRemoved", "disabledPassword", "expiredPassword", "illegalAction", "inaccessibleChannel", "inaccessibleGroup", "inaccessibleNetwork", "inaccessiblePrincipal", "indefinitelyBlocked", "invalidDeviceActivationCode", "invalidDeviceConfirmation", "invalidPassword", "operatorWithPendingAgreements", "otpInvalidated", "pendingAgreements", "permissionDenied", "resetPassword", "temporarilyBlocked" ] - }, - "ForgottenPasswordErrorCode" : { - "description" : "Application-specific error codes for a ForgottenPassword error.\nPossible values are:\n- `invalidSecurityAnswer`: if the answer for the security question was incorrect.\n- `unexpected`: An unexpected error has occurred.", - "type" : "string", - "enum" : [ "invalidSecurityAnswer", "unexpected" ] - }, - "FrontendContentLayoutEnum" : { - "description" : "How a content page should be displayed in the modern frontend.\nPossible values are:\n- `card`: The content is shown in a card with regular padding\n- `cardTight`: The content is shown in a card with no padding\n- `full`: The content uses the full available space", - "type" : "string", - "enum" : [ "card", "cardTight", "full" ] - }, - "FrontendEnum" : { - "description" : "Indicates a Cyclos frontend.\nPossible values are:\n- `classic`: The classic web frontend\n- `new`: The new frontend", - "type" : "string", - "enum" : [ "classic", "new" ] - }, - "FrontendLandingPageEnum" : { - "description" : "The possible pages to show on first access.\nPossible values are:\n- `home`: The home page\n- `login`: The login page", - "type" : "string", - "enum" : [ "home", "login" ] - }, - "FrontendMenuEnum" : { - "description" : "The menu in which some content should be displayed.\nPossible values are:\n- `banking`: Banking operations\n- `brokering`: Brokering\n- `content`: Content\n- `dashboard`: Logged user's dashboard\n- `home`: Guest home page\n- `login`: Login page\n- `marketplace`: Marketplace\n- `operators`: Operators\n- `personal`: Personal\n- `publicDirectory`: Public user directory\n- `publicMarketplace`: Public advertisement search\n- `registration`: Public user registration\n- `users`: User directory", - "type" : "string", - "enum" : [ "banking", "brokering", "content", "dashboard", "home", "login", "marketplace", "operators", "personal", "publicDirectory", "publicMarketplace", "registration", "users" ] - }, - "FrontendPageTypeEnum" : { - "description" : "Determines the type of content of a content page in the modern frontend.\nPossible values are:\n- `content`: The page displays the content inline.\n- `iframe`: The page displays an inline frame embedding an external URL\n- `operation`: The page runs a custom operation of scope `menu`\n- `url`: The page should open an external URL\n- `wizard`: The page runs a wizard of scope `menu`", - "type" : "string", - "enum" : [ "content", "iframe", "operation", "url", "wizard" ] - }, - "FrontendQuickAccessTypeEnum" : { - "description" : "An element shown in the quick access on the dashboard of the modern frontend.\nPossible values are:\n- `account`: Account history\n- `buyVoucher`: Buy voucher\n- `contacts`: View contacts\n- `editProfile`: Edit own profile\n- `passwords`: Manage own passwords\n- `payExternalUser`: Pay external user\n- `paySystem`: Pay to a system account\n- `payUser`: Pay to a user\n- `paymentRequests`: Payment requests\n- `pos`: Receive payment (POS)\n- `receiveQrPayment`: Receive QR-code payment\n- `redeemVoucher`: Redeem voucher\n- `requestPaymentFromSystem`: Request payment from system\n- `requestPaymentFromUser`: Request payment from user\n- `scheduledPayments`: Scheduled payments\n- `searchAds`: Search advertisements (marketplace)\n- `searchUsers`: Search users (user directory)\n- `sendVoucher`: Send voucher\n- `settings`: Settings\n- `switchTheme`: Switch between light and dark themes\n- `topUpVoucher`: Top-up voucher\n- `useClassicFrontend`: Use classic frontend\n- `voucherTransactions`: Search voucher transactions\n- `vouchers`: Search vouchers", - "type" : "string", - "enum" : [ "account", "buyVoucher", "contacts", "editProfile", "passwords", "payExternalUser", "paySystem", "payUser", "paymentRequests", "pos", "receiveQrPayment", "redeemVoucher", "requestPaymentFromSystem", "requestPaymentFromUser", "scheduledPayments", "searchAds", "searchUsers", "sendVoucher", "settings", "switchTheme", "topUpVoucher", "useClassicFrontend", "voucherTransactions", "vouchers" ] - }, - "FrontendScreenSizeEnum" : { - "description" : "Indicates a screen size for the modern frontend.\nPossible values are:\n- `desktop`: Desktop\n- `feature`: Feature phone\n- `mobile`: Smart phone\n- `tablet`: Tablet", - "type" : "string", - "enum" : [ "desktop", "feature", "mobile", "tablet" ] - }, - "GroupKind" : { - "description" : "The possible kinds of group or group set.\nPossible values are:\n- `adminGroup`: An administrator group\n- `brokerGroup`: A broker group\n- `groupSet`: A group set\n- `memberGroup`: A member (regular user) group", - "type" : "string", - "enum" : [ "adminGroup", "brokerGroup", "groupSet", "memberGroup" ] - }, - "IdentificationMethodEnum" : { - "description" : "The way an user is identified to either perform or receive a payment.\nPossible values are:\n- `autocomplete`: The client application should search for an user and pass in the id\n- `contacts`: The client application should access the contact list of the authenticated user and pass the id\n- `principalType`: The client application should pass in an identification (principal) of the user, such as login name, e-mail and so on", - "type" : "string", - "enum" : [ "autocomplete", "contacts", "principalType" ] - }, - "IdentityProviderCallbackStatusEnum" : { - "description" : "The status the result of a callback from an identity provider.\nPossible values are:\n- `denied`: The user has denied the request. Generally nothing should be done, as the popup will be automatically closed.\n- `error`: There was an error. The `errorMessage` property is likely to contain the error description, though it can be empty. If so, a generic error message should be displayed.\n- `linked`: The currently logged user was successfully linked to the provider.\n- `loginEmail`: Successful login. No user was previously linked to this provider account, but a user was matched by e-mail and automatically linked. The `sessionToken` is returned.\n- `loginLink`: Successful login with a user was previously linked to the provider.\n- `loginNoEmail`: Similar to `loginNoMatch`, except that the identity provider hasn't returned / disclosed the user's e-mail address.\n- `loginNoMatch`: No matching user, either linked or by e-mail. If on the next login the `requestId` value is passed in, a link will be automatically created, so the next time the login works directly. The `sessionToken` is returned.\n- `registrationData`: The profile data was read and the available data has been returned.\n- `registrationDone`: The user was directly registered and logged-in. The `sessionToken` is returned.\n- `wizard`: The wizard execution has transitioned to the next step, and the identity provider information was stored on the server.", - "type" : "string", - "enum" : [ "denied", "error", "linked", "loginEmail", "loginLink", "loginNoEmail", "loginNoMatch", "registrationData", "registrationDone", "wizard" ] - }, - "IdentityProviderNotLinkReasonEnum" : { - "description" : "Possible reasons why the link between user and identity provider could not be created.\nPossible values are:\n- `globalUserNetworkIdpIgnored`: A login from a global administrator together with an identity provider request for an identity provider defined in a network.\n- `unsupportedPrincipalType`: The user identification method used in the login is not supported for linking. E.g trusted devices are not supported, it's quite strange situation because it means the user choose to login with an identity provider, then the user doesn't match and at the moment of perform the login to Cyclos he/her choose to login with a trusted device. The login with trusted device and with an identity provider, both offer the same kind of ease for a quick login, probably the user will choose to login with a trusted device from the beginning.\n- `userDisabled`: The user has explicitly disabled the identity provider in their settings.", - "type" : "string", - "enum" : [ "globalUserNetworkIdpIgnored", "unsupportedPrincipalType", "userDisabled" ] - }, - "ImageKind" : { - "description" : "Determines the kind of an image.\nPossible values are:\n- `contactInfo`: An image of an additional contact information\n- `customFieldValue`: An image used as custom field value\n- `identityProvider`: An external identity provider\n- `marketplace`: Advertisement images are associated with an advertisement, be it simple or for web shop.\n- `marketplaceCategory`: An image of an advertisement (simple or webshop)\n- `oidcClient`: An OpenID Connect client\n- `profile`: User profile images are those associated with the user profile. The first profile image is used to depict the user on search results.\n- `systemCustom`: System custom images are additional images an administrator that can be used on rich text contents.\n- `temp`: A temporary image which can upload for later associating with an entity being registered (for example, user or advertisement).\n- `userCustom`: User custom images are additional images that can be used on rich text contents.\n- `voucherCategory`: An image of a voucher category\n- `voucherTemplate`: An image of a voucher template\n- `voucherType`: An image of a voucher type", - "type" : "string", - "enum" : [ "contactInfo", "customFieldValue", "identityProvider", "marketplace", "marketplaceCategory", "oidcClient", "profile", "systemCustom", "temp", "userCustom", "voucherCategory", "voucherTemplate", "voucherType" ] - }, - "ImageSizeEnum" : { - "description" : "The possible sizes of images. The actual pixel size depends on the configuration in Cyclos.\nPossible values are:\n- `large`: Full image size\n- `medium`: Medium thumbnail\n- `small`: Small thumbnail\n- `tiny`: Tiny thumbnail", - "type" : "string", - "enum" : [ "large", "medium", "small", "tiny" ] - }, - "InitializeNfcErrorCode" : { - "description" : "Application-specific error codes for an initialize NFC error.\nPossible values are:\n- `tokenInUse`: The token specified for initialization is already in use (exists and it is active)\n- `unexpected`: An unexpected error has occurred. See the `exceptionType` and `exceptionMessage` fields for the internal information.", - "type" : "string", - "enum" : [ "tokenInUse", "unexpected" ] - }, - "InputErrorCode" : { - "description" : "Error codes for 422 Unprocessable entity HTTP status. It means there was an error with the input sent to the operation.\nPossible values are:\n- `aggregated`: Represents an aggregation of other input errors\n- `dataConversion`: Some data conversion has failed. For example, when sending a date with an invalid format\n- `fileUploadSize`: An uploaded file size exceeds the maximum allowed\n- `maxItems`: There was an attempt to create an item, but the maximum number of allowed items was exceeded\n- `missingParameter`: Missing a required request parameter\n- `queryParse`: A full-text query keywords contained an invalid text\n- `validation`: One or more of the fields sent contains invalid values", - "type" : "string", - "enum" : [ "aggregated", "dataConversion", "fileUploadSize", "maxItems", "missingParameter", "queryParse", "validation" ] - }, - "InstallmentActionEnum" : { - "description" : "Possible actions that could be confirmed with a device for a scheduled payment installment.\nPossible values are:\n- `process`: Process the scheduled payment installment\n- `settle`: Settle the scheduled payment installment", - "type" : "string", - "enum" : [ "process", "settle" ] - }, - "InstallmentStatusEnum" : { - "description" : "The status of a installment.\nPossible values are:\n- `blocked`: The installment is blocked, and won't be automatically processed on its due date\n- `canceled`: The installment was canceled\n- `failed`: The installment processing failed, for example, because there was no funds in the source account\n- `processed`: The installment was processed, generating a transfer\n- `scheduled`: The installment is scheduled for a future date\n- `settled`: The installment was marked as settled by the receiver", - "type" : "string", - "enum" : [ "blocked", "canceled", "failed", "processed", "scheduled", "settled" ] - }, - "InvalidDeviceConfirmationEnum" : { - "description" : "The possible results for an invalid device confirmation.\nPossible values are:\n- `invalidConfirmation`: The confirmation being processed / checked was not found or not belongs to the authenticated user\n- `invalidDevice`: The trusted device used to approve / reject the confirmation was not found or is not associated to the authenticated user\n- `maxCheckAtemptsReached`: The maximum number of attempts to check for a processed (approved / rejected) device confirmation was reached. The logged user was blocked", - "type" : "string", - "enum" : [ "invalidConfirmation", "invalidDevice", "maxCheckAtemptsReached" ] - }, - "LinkedEntityTypeEnum" : { - "description" : "When the type is linkedEntity, indicates the entity type.\nPossible values are:\n- `advertisement`: An advertisement\n- `record`: A record (user or system)\n- `transaction`: A transaction (payment, scheduled payment, payment request, etc)\n- `transfer`: A transfer\n- `user`: An user", - "type" : "string", - "enum" : [ "advertisement", "record", "transaction", "transfer", "user" ] - }, - "LogoKind" : { - "description" : "The type of logo to request\nPossible values are:\n- `classic`: The logo used by the classic frontend\n- `classicShortcut`: The shortcut icon used by the classic frontend\n- `frontend`: The logo used by the new frontend\n- `maskable`: A maskable icon used when installing the new frontend on Android devices\n- `mobile`: The logo used by the mobile app\n- `pay`: The logo used by the ticket / easy invoice interface\n- `report`: The logo used on printed reports", - "type" : "string", - "enum" : [ "classic", "classicShortcut", "frontend", "maskable", "mobile", "pay", "report" ] - }, - "MapPreferenceEnum" : { - "description" : "How the map is initialized in the mobile.\nPossible values are:\n- `defaultMap`: Show the map using the zoom and gps location as set in the configuration\n- `filters`: Show the search filters first\n- `localMap`: Show the near map directly, using the users phone gps data. When the gps is disabled use the location from the configuration", - "type" : "string", - "enum" : [ "defaultMap", "filters", "localMap" ] - }, - "MaturityPolicyEnum" : { - "description" : "Indicates how a this payment type restricts payments based on the balance maturity.\nPossible values are:\n- `always`: The payment can always be performed, regardless its maturity\n- `history`: It the balance maturity ever reached zero in the past, that balance can be used on payment. If later on the maturity went above zero, that new balance cannot be used. Is normally used in conjunction with the maturity table, so the user can pick the balance from past maturity\n- `zero`: The payment can only be performed if the current maturity is zero", - "type" : "string", - "enum" : [ "always", "history", "zero" ] - }, - "MessageBoxEnum" : { - "description" : "Possible message boxes\nPossible values are:\n- `inbox`: The received messages\n- `sent`: The sent messages\n- `trash`: The trash messages", - "type" : "string", - "enum" : [ "inbox", "sent", "trash" ] - }, - "MessageDestinationEnum" : { - "description" : "The possible destinations to send messages to\nPossible values are:\n- `brokered`: A message sent to brokered users. Only for brokers.\n- `group`: A message sent to a group of users. Only for administrators.\n- `system`: A message sent to system. Only for members and brokers.\n- `user`: A message sent to a specific user.", - "type" : "string", - "enum" : [ "brokered", "group", "system", "user" ] - }, - "MessageKind" : { - "description" : "The kind of a message\nPossible values are:\n- `incoming`: A message received\n- `outgoing`: A message sent", - "type" : "string", - "enum" : [ "incoming", "outgoing" ] - }, - "MessageOwnerEnum" : { - "description" : "Define the possible owners of a message\nPossible values are:\n- `system`: The owner of the message is the system and there is not an associated user as the owner\n- `user`: The owner is the user who sent / received the message", - "type" : "string", - "enum" : [ "system", "user" ] - }, - "MessageSourceEnum" : { - "description" : "The possible sources to receive messages from\nPossible values are:\n- `system`: A message from system. Only for members and brokers.\n- `user`: A message from a specific user.", - "type" : "string", - "enum" : [ "system", "user" ] - }, - "MobileOperationEnum" : { - "description" : "The possible operations the mobile application can perform.\nPossible values are:\n- `acceptTicket`: Accepts a generated QR code for performing a payment\n- `activateNfcDevice`: Activate the phone as NFC device\n- `assignPos`: Assign an access client for POS mode\n- `boughtVouchers`: View bought vouchers\n- `buyVoucher`: Buy a voucher\n- `createTicket`: Generate a QR Code for receive payment\n- `deactivateNfcDevice`: Deactivate the phone as NFC device\n- `formatNfc`: Format NFC tags\n- `initializeNfc`: Initialize NFC tags\n- `makeSystemPayment`: Perform payments to system\n- `makeUserPayment`: Perform payments to other users\n- `manageContacts`: Manage own contacts\n- `manageOperators`: Manage own/user operators\n- `managePasswords`: Manage passwords\n- `mapDirectory`: View the user directory (map)\n- `paymentRequests`: Search and view payment requests\n- `personalizeNfc`: Personalize NFC tags\n- `personalizeNfcSelf`: Personalize NFC tags for the logged user or its operators\n- `purchases`: Search and view purchased webshops\n- `readNfc`: Read NFC tags\n- `receivePayment`: Receive payments from other users\n- `redeemVoucher`: Redeem vouchers\n- `registerUsersAsManager`: Register other users as user manager\n- `registerUsersAsMember`: Register other users as member or operator\n- `sendPaymentRequestToSystem`: Send payment requests to system\n- `sendPaymentRequestToUser`: Send payment requests to users\n- `unassignPos`: Unassign the current access client from POS mode\n- `usersSearch`: Search other users\n- `viewAccountInformation`: View own accounts\n- `viewAdvertisements`: Search and view advertisements and webshop\n- `viewRedeemed`: View redeemed vouchers\n- `viewUserProfile`: View the profile of other users", - "type" : "string", - "enum" : [ "acceptTicket", "activateNfcDevice", "assignPos", "boughtVouchers", "buyVoucher", "createTicket", "deactivateNfcDevice", "formatNfc", "initializeNfc", "makeSystemPayment", "makeUserPayment", "manageContacts", "manageOperators", "managePasswords", "mapDirectory", "paymentRequests", "personalizeNfc", "personalizeNfcSelf", "purchases", "readNfc", "receivePayment", "redeemVoucher", "registerUsersAsManager", "registerUsersAsMember", "sendPaymentRequestToSystem", "sendPaymentRequestToUser", "unassignPos", "usersSearch", "viewAccountInformation", "viewAdvertisements", "viewRedeemed", "viewUserProfile" ] - }, - "NfcAuthErrorCode" : { - "description" : "Application-specific error codes for an NFC authentication error.\nPossible values are:\n- `pos`: A POS exception has happened when trying to make an external authenticate. See the `posError` field for more details.\n- `unexpected`: An unexpected error has occurred. See the `exceptionType` and `exceptionMessage` fields for the internal information.", - "type" : "string", - "enum" : [ "pos", "unexpected" ] - }, - "NfcTagKeyEnum" : { - "description" : "Represent the different keys stored on NFC tags.\nPossible values are:\n- `appMaster`: The application master key. Not used for now (it could be used for application management).\n- `operational`: A key stored within the application that is used to guarantee the presence of the card in sensitive operations, such as receive payment (POS) or personalize the tag\n- `piccMaster`: The PICC master key, used to format the tag", - "type" : "string", - "enum" : [ "appMaster", "operational", "piccMaster" ] - }, - "NotificationEntityTypeEnum" : { - "description" : "The type of the entity referenced by the notification, if any.\nPossible values are:\n- `account`: The entity is an user account\n- `adQuestion`: The entity is an advertisement question\n- `errorLog`: The entity is an error log\n- `feedback`: The entity is a transaction feedback\n- `marketplace`: The entity is a `simple` or `webshop` advertisement\n- `network`: The entity is a network\n- `order`: The entity is an order\n- `passwordType`: The entity is a password type\n- `reference`: The entity is an user reference\n- `systemAlert`: The entity is a system alert\n- `token`: The entity is a token (user identification)\n- `transaction`: The entity is a transaction\n- `transfer`: The entity is a transfer\n- `user`: The entity is an user\n- `userAlert`: The entity is an user alert\n- `userImportedFile`: The entity is an user imported file\n- `voucher`: The entity is a voucher\n- `voucherTransaction`: The entity is a voucher transaction (redeem or top-up)\n- `voucherType`: The entity is a voucher type", - "type" : "string", - "enum" : [ "account", "adQuestion", "errorLog", "feedback", "marketplace", "network", "order", "passwordType", "reference", "systemAlert", "token", "transaction", "transfer", "user", "userAlert", "userImportedFile", "voucher", "voucherTransaction", "voucherType" ] - }, - "NotificationKind" : { - "description" : "Use NotificationTypeEnum instead.\n\n\nIndicates a kind of notification.\nPossible values are:\n- `accountAllNonSmsPerformedPayments`: A payment was performed\n- `accountAuthorizedPaymentCanceled`: The authorization process of a payment was canceled\n- `accountAuthorizedPaymentDenied`: A payment pending authorization was denied\n- `accountAuthorizedPaymentExpired`: The authorization process of a payment has expired\n- `accountAuthorizedPaymentSucceeded`: A payment pending authorization was processed\n- `accountBoughtVouchersAboutToExpire`: Deprecated: Voucher notifications are no longer only for bought. . One or more bought vouchers are about to expire\n- `accountBoughtVouchersExpirationDateChanged`: Deprecated: Voucher notifications are no longer only for bought.. The expiration date of a bought voucher was changed\n- `accountBoughtVouchersExpired`: Deprecated: Voucher notifications are no longer only for bought.. One or more bought vouchers have expired\n- `accountExternalPaymentExpired`: A performed external payment has expired\n- `accountExternalPaymentPerformedFailed`: A performed external payment has failed\n- `accountExternalPaymentReceivedFailed`: A received external payment has failed\n- `accountIncomingRecurringPaymentCanceled`: An incoming recurring payment was canceled\n- `accountIncomingRecurringPaymentFailed`: An incoming recurring payment processing has failed\n- `accountIncomingRecurringPaymentReceived`: A recurring payment was received\n- `accountIncomingScheduledPaymentCanceled`: An incoming scheduled payment processing has canceled\n- `accountIncomingScheduledPaymentFailed`: An incoming scheduled payment processing has failed\n- `accountIncomingScheduledPaymentReceived`: A scheduled payment was received\n- `accountLimitChange`: The account balance limit was changed by the administration\n- `accountOperatorAuthorizedPaymentApprovedStillPending`: A payment performed by an operator was approved, but still needs administration authorization\n- `accountOperatorAuthorizedPaymentCanceled`: A payment performed by an operator had the authorization process canceled\n- `accountOperatorAuthorizedPaymentDenied`: A payment performed by an operator was denied\n- `accountOperatorAuthorizedPaymentExpired`: A payment performed by an operator had the authorization process expired\n- `accountOperatorAuthorizedPaymentSucceeded`: A payment performed by an operator was processed\n- `accountOperatorPaymentAwaitingAuthorization`: A payment performed by an operator needs my authorization\n- `accountPaymentAwaitingAuthorization`: A payment is awaiting my authorization\n- `accountPaymentReceived`: A payment was received\n- `accountPaymentRequestCanceled`: A sent payment request was canceled\n- `accountPaymentRequestDenied`: A sent payment request was denied\n- `accountPaymentRequestExpirationDateChanged`: An incoming payment request had its expiration date changed\n- `accountPaymentRequestExpired`: A sent payment request has expired\n- `accountPaymentRequestProcessed`: A sent payment request was processed\n- `accountPaymentRequestReceived`: A payment was requested\n- `accountRecurringPaymentFailed`: The processing of a recurring payment has failed\n- `accountRecurringPaymentOccurrenceProcessed`: A recurring payment processing was processed\n- `accountScheduledPaymentFailed`: The processing of a scheduled payment has failed\n- `accountScheduledPaymentInstallmentProcessed`: A scheduled payment was processed\n- `accountScheduledPaymentRequestFailed`: A scheduled payment request has failed and was reopened\n- `accountSentPaymentRequestExpirationDateChanged`: A sent payment request had its expiration date changed\n- `accountSmsPerformedPayment`: A payment was performed by SMS\n- `accountTicketWebhookFailed`: The webhook processing for a ticket has failed\n- `accountVoucherAboutToExpire`: A voucher is about to expire\n- `accountVoucherAssigned`: A voucher was assigned\n- `accountVoucherExpirationDateChanged`: The expiration date of a voucher was changed\n- `accountVoucherExpired`: A voucher has expired\n- `accountVoucherPinBlocked`: The voucher PIN was blocked by exceeding invalid attempts\n- `accountVoucherRedeem`: A voucher was redeemed\n- `accountVoucherTopUp`: A voucher was topped-up\n- `adminAdPendingAuthorization`: A new advertisement was created, and it is pending administrator authorization\n- `adminApplicationError`: A new application error was generated\n- `adminExternalPaymentExpired`: An external payment has expired without the destination user being registered\n- `adminExternalPaymentPerformedFailed`: An external payment has failed processing\n- `adminGeneratedVouchersAboutToExpire`: One or more generated vouchers are about to expire\n- `adminGeneratedVouchersExpired`: One or more generated vouchers have expired\n- `adminNetworkCreated`: A new network has been created\n- `adminPaymentAwaitingAuthorization`: A payment is awaiting the administrator authorization\n- `adminPaymentPerformed`: A payment was performed\n- `adminSystemAlert`: A new system alert was generated\n- `adminUserAlert`: A new user alert was generated\n- `adminUserImportRegistration`: An import of users has finished processing\n- `adminUserRegistration`: A new user has been registered\n- `adminVoucherBuyingAboutToExpire`: Buying in a voucher type is about to expire\n- `brokeringAdPendingAuthorization`: A new advertisement from an assigned member needs authorization\n- `brokeringMemberAssigned`: A new member was unassigned from me as broker\n- `brokeringMemberUnassigned`: A new member was assigned to me as broker\n- `buyerAdInterestNotification`: A new advertisement was published, matching one of my advertisement interests\n- `buyerAdQuestionAnswered`: An advertisement question I've asked was answered\n- `buyerOrderCanceled`: A web-shop order was canceled\n- `buyerOrderPaymentCanceled`: The payment for a web-shop purchase had the authorization process canceled\n- `buyerOrderPaymentDenied`: The payment for a web-shop purchase was denied authorization\n- `buyerOrderPaymentExpired`: The payment for a web-shop purchase was expired without being authorized\n- `buyerOrderPending`: A web-shop order is pending my approval\n- `buyerOrderPendingAuthorization`: A web-shop order is pending authorization\n- `buyerOrderPendingDeliveryData`: A web-shop order needs me to fill its delivery information\n- `buyerOrderProcessedBySeller`: A web-shop order was processed by the seller\n- `buyerOrderRejectedBySeller`: A web-shop order was rejected by the seller\n- `buyerSalePending`: A web-shop order is pending seller's approval\n- `buyerSaleRejectedBySeller`: A web-shop sale order was rejected by the seller\n- `feedbackChanged`: A feedback for a sale was changed\n- `feedbackCreated`: A feedback for a sale was created\n- `feedbackExpirationReminder`: Reminder to supply feedback for a purchase\n- `feedbackOptional`: I can optionally supply feedback for a purchase\n- `feedbackReplyCreated`: A feedback for a purchase was replied\n- `feedbackRequired`: I have to supply feedback for a purchase\n- `personalBrokerAssigned`: A broker was assigned to the user\n- `personalBrokerUnassigned`: A broker was unassigned from the user\n- `personalMaxSmsPerMonthReached`: The user has reached the maximum number of monthly SMS messages\n- `personalNewToken`: A new token (card) was assigned\n- `personalNewTokenPendingActivation`: a new token (card) is pending activation\n- `personalPasswordStatusChanged`: The status of a password has changed\n- `personalTokenStatusChanged`: The status of a token has changed\n- `personalUserStatusChanged`: The user status has changed\n- `referenceChanged`: A personal reference was changed\n- `referenceCreated`: A new personal reference was created\n- `sellerAdAuthorized`: An advertisement was authorized by the administration\n- `sellerAdExpired`: An advertisement publication period has expired\n- `sellerAdLowStock`: A web-shop advertisement's stock quantity is low\n- `sellerAdOutOfStock`: A given web-shop advertisement is out of stock\n- `sellerAdQuestionCreated`: A question to an advertisement was created\n- `sellerAdRejected`: An advertisement was rejected by the administration\n- `sellerOrderCanceled`: A web-shop order was canceled\n- `sellerOrderCreated`: A web-shop order was created\n- `sellerOrderPaymentCanceled`: The payment for a web-shop order had the authorization process canceled\n- `sellerOrderPaymentDenied`: The payment for a web-shop order was denied authorization\n- `sellerOrderPaymentExpired`: The payment for a web-shop order was expired without being authorized\n- `sellerOrderPendingAuthorization`: A web-shop order is pending authorization\n- `sellerOrderPendingDeliveryData`: A web-shop order is pending delivery information\n- `sellerOrderProcessedByBuyer`: A web-shop order was fulfilled by the buyer\n- `sellerOrderRejectedByBuyer`: A web-shop order was rejected by the buyer\n- `sellerSaleProcessedByBuyer`: A web-shop sale order was fulfilled by the buyer", - "deprecated" : true, - "x-remove-version" : 4.17, - "type" : "string", - "x-deprecated-enum" : [ "accountBoughtVouchersAboutToExpire|4.17|Voucher notifications are no longer only for bought.", "accountBoughtVouchersExpirationDateChanged|4.17|Voucher notifications are no longer only for bought.", "accountBoughtVouchersExpired|4.17|Voucher notifications are no longer only for bought." ], - "enum" : [ "accountAllNonSmsPerformedPayments", "accountAuthorizedPaymentCanceled", "accountAuthorizedPaymentDenied", "accountAuthorizedPaymentExpired", "accountAuthorizedPaymentSucceeded", "accountBoughtVouchersAboutToExpire", "accountBoughtVouchersExpirationDateChanged", "accountBoughtVouchersExpired", "accountExternalPaymentExpired", "accountExternalPaymentPerformedFailed", "accountExternalPaymentReceivedFailed", "accountIncomingRecurringPaymentCanceled", "accountIncomingRecurringPaymentFailed", "accountIncomingRecurringPaymentReceived", "accountIncomingScheduledPaymentCanceled", "accountIncomingScheduledPaymentFailed", "accountIncomingScheduledPaymentReceived", "accountLimitChange", "accountOperatorAuthorizedPaymentApprovedStillPending", "accountOperatorAuthorizedPaymentCanceled", "accountOperatorAuthorizedPaymentDenied", "accountOperatorAuthorizedPaymentExpired", "accountOperatorAuthorizedPaymentSucceeded", "accountOperatorPaymentAwaitingAuthorization", "accountPaymentAwaitingAuthorization", "accountPaymentReceived", "accountPaymentRequestCanceled", "accountPaymentRequestDenied", "accountPaymentRequestExpirationDateChanged", "accountPaymentRequestExpired", "accountPaymentRequestProcessed", "accountPaymentRequestReceived", "accountRecurringPaymentFailed", "accountRecurringPaymentOccurrenceProcessed", "accountScheduledPaymentFailed", "accountScheduledPaymentInstallmentProcessed", "accountScheduledPaymentRequestFailed", "accountSentPaymentRequestExpirationDateChanged", "accountSmsPerformedPayment", "accountTicketWebhookFailed", "accountVoucherAboutToExpire", "accountVoucherAssigned", "accountVoucherExpirationDateChanged", "accountVoucherExpired", "accountVoucherPinBlocked", "accountVoucherRedeem", "accountVoucherTopUp", "adminAdPendingAuthorization", "adminApplicationError", "adminExternalPaymentExpired", "adminExternalPaymentPerformedFailed", "adminGeneratedVouchersAboutToExpire", "adminGeneratedVouchersExpired", "adminNetworkCreated", "adminPaymentAwaitingAuthorization", "adminPaymentPerformed", "adminSystemAlert", "adminUserAlert", "adminUserImportRegistration", "adminUserRegistration", "adminVoucherBuyingAboutToExpire", "brokeringAdPendingAuthorization", "brokeringMemberAssigned", "brokeringMemberUnassigned", "buyerAdInterestNotification", "buyerAdQuestionAnswered", "buyerOrderCanceled", "buyerOrderPaymentCanceled", "buyerOrderPaymentDenied", "buyerOrderPaymentExpired", "buyerOrderPending", "buyerOrderPendingAuthorization", "buyerOrderPendingDeliveryData", "buyerOrderProcessedBySeller", "buyerOrderRejectedBySeller", "buyerSalePending", "buyerSaleRejectedBySeller", "feedbackChanged", "feedbackCreated", "feedbackExpirationReminder", "feedbackOptional", "feedbackReplyCreated", "feedbackRequired", "personalBrokerAssigned", "personalBrokerUnassigned", "personalMaxSmsPerMonthReached", "personalNewToken", "personalNewTokenPendingActivation", "personalPasswordStatusChanged", "personalTokenStatusChanged", "personalUserStatusChanged", "referenceChanged", "referenceCreated", "sellerAdAuthorized", "sellerAdExpired", "sellerAdLowStock", "sellerAdOutOfStock", "sellerAdQuestionCreated", "sellerAdRejected", "sellerOrderCanceled", "sellerOrderCreated", "sellerOrderPaymentCanceled", "sellerOrderPaymentDenied", "sellerOrderPaymentExpired", "sellerOrderPendingAuthorization", "sellerOrderPendingDeliveryData", "sellerOrderProcessedByBuyer", "sellerOrderRejectedByBuyer", "sellerSaleProcessedByBuyer" ] - }, - "NotificationLevelEnum" : { - "description" : "Defines the severity level of a notification shown to users.\nPossible values are:\n- `error`: An error message, when some operation went wrong\n- `information`: A general informative message\n- `warning`: A warning message, when special caution is required", - "type" : "string", - "enum" : [ "error", "information", "warning" ] - }, - "NotificationTypeEnum" : { - "description" : "The different notification types generated for for users / administrators.\nPossible values are:\n- `adAuthorized`: A notification generated if a notification created when an advertisement is authorized.\n- `adExpired`: A notification generated if a notification created when an advertisement expires.\n- `adInterestNotification`: A notification generated if a notification created by a new advertisement (Simple or Webshop).\n- `adPendingAuthorization`: A notification generated if an ad is pending by broker authorization.\n- `adPendingByAdminAuthorization`: An admin notification generated if an advertisement is pending for authorization.\n- `adQuestionAnswered`: A notification generated if a question answered to some AD (Simple or Webshop).\n- `adQuestionCreated`: A notification generated if a question created to some AD (Simple or Webshop).\n- `adRejected`: A notification generated if a notification created when an advertisement authorization is rejected.\n- `allNonSmsPerformedPayments`: A notification generated if a user performed a new payment through a channel that is not the SMS channel.\n- `applicationError`: An admin notification generated if an application error has occurred.\n- `articleOutOfStock`: A notification generated if a webshop product is out of stock.\n- `authorizedPaymentCanceled`: A notification generated if the authorization of a payment was canceled. This notification is to be sent to the payer.\n- `authorizedPaymentDenied`: A notification generated if the authorization of a payment was denied. This notification is to be sent to the payer.\n- `authorizedPaymentExpired`: A notification generated if the authorization of a payment has expired. This notification is to be sent to the payer.\n- `authorizedPaymentSucceeded`: A notification generated if the authorization of a payment succeeded (the payment went successfully through its final authorization and is now processed). This notification is to be sent to the payer.\n- `boughtVouchersAboutToExpire`: Deprecated: Voucher notifications are no longer only for bought.. A notification generated if a one or more bought vouchers are about to expire.\n- `boughtVouchersExpirationDateChanged`: Deprecated: Voucher notifications are no longer only for bought.. A notification generated if a bought voucher has new expiration date.\n- `boughtVouchersExpired`: Deprecated: Voucher notifications are no longer only for bought.. A notification generated if one or more bought vouchers have expired.\n- `brokerAssigned`: A notification generated if a broker has been assigned to a user.\n- `brokerUnassigned`: A notification generated if a broker has been unassigned from a user.\n- `externalPaymentExpired`: A notification generated if the external payment has reached the expiration date.\n- `externalPaymentPerformedFailed`: A notification generated if the performed external payment has failed processing.\n- `externalPaymentReceivedFailed`: A notification generated if the received external payment has failed processing.\n- `externalUserPaymentExpired`: An admin notification generated if an external payment has expired.\n- `externalUserPaymentPerformedFailed`: An admin notification generated if an external payment failed processing.\n- `feedbackChanged`: A notification generated if a transaction feedback was modified.\n- `feedbackCreated`: A notification generated if a transaction feedback was created.\n- `feedbackExpirationReminder`: A notification generated if a transaction feedback is about to expire.\n- `feedbackOptional`: A notification generated if a performed payment can have an optional feedback.\n- `feedbackReplyCreated`: A notification generated if a transaction feedback was replied.\n- `feedbackRequired`: A notification generated if a performed payment needs to be given a feedback.\n- `generatedVouchersAboutToExpire`: An admin notification generated if a voucher will expire in a few days.\n- `generatedVouchersExpired`: An admin notification generated if a voucher has expired.\n- `incomingRecurringPaymentCanceled`: A notification generated if a recurring payment to a user has been canceled (only if the recurring payment is shown to receiver).\n- `incomingRecurringPaymentFailed`: A notification generated if a recurring payment to a user has failed (only if the recurring payment is shown to receiver).\n- `incomingRecurringPaymentReceived`: A notification generated if a recurring payment to a user was received (only if the recurring payment is shown to receiver).\n- `incomingScheduledPaymentCanceled`: A notification generated if a scheduled payment to a user has been canceled (only if the scheduled payment is shown to receiver).\n- `incomingScheduledPaymentFailed`: A notification generated if a scheduled payment to a user has failed (only if the scheduled payment is shown to receiver).\n- `incomingScheduledPaymentReceived`: A notification generated if a scheduled payment to a user was received (only if the scheduled payment is shown to receiver).\n- `limitChange`: A notification generated if a limit (lower/upper) has changed on an account.\n- `lowStockQuantity`: A notification generated if a product with stock quantity under limit.\n- `maxSmsPerMonthReached`: A notification generated if the maximum number of SMS messages per month has been reached.\n- `memberAssigned`: A notification generated if an user has been assigned to a broker.\n- `memberUnassigned`: A notification generated if an user has been unassigned from a broker.\n- `networkCreated`: An admin notification generated if a network is created.\n- `newToken`: A notification generated if a token / card has been created.\n- `newTokenPendingActivation`: A notification generated if a token / card has been created, but needs to be activated before being used.\n- `operatorAuthorizedPaymentApprovedStillPending`: A notification generated if a payment performed by an operator with authorization type `operator` was approved, but there is at least one authorization level.\n- `operatorAuthorizedPaymentCanceled`: A notification generated if a payment performed by an operator with authorization type `operator` was canceled.\n- `operatorAuthorizedPaymentDenied`: A notification generated if a payment performed by an operator with authorization type `operator` was denied.\n- `operatorAuthorizedPaymentExpired`: A notification generated if a payment performed by an operator with authorization type `operator` has expired.\n- `operatorAuthorizedPaymentSucceeded`: A notification generated if a payment performed by an operator with authorization type `operator` was approved and there was no further authorization.\n- `operatorPaymentAwaitingAuthorization`: A notification generated if a payment performed by an operator with authorization type `operator` is pending by authorization.\n- `orderCanceledBuyer`: A notification generated if a pending order has been canceled.\n- `orderCanceledSeller`: A notification generated if a pending order has been canceled.\n- `orderCreated`: A notification generated if a new web shop order created from a shopping cart checkout.\n- `orderPaymentCanceledBuyer`: A notification generated if an order payment was canceled by authorizer.\n- `orderPaymentCanceledSeller`: A notification generated if an order payment was canceled by authorizer.\n- `orderPaymentDeniedBuyer`: A notification generated if an order payment was denied by authorizer.\n- `orderPaymentDeniedSeller`: A notification generated if an order payment was denied by authorizer.\n- `orderPaymentExpiredBuyer`: A notification generated if an order payment has automatically expired.\n- `orderPaymentExpiredSeller`: A notification generated if an order payment has automatically expired.\n- `orderPendingAuthorizationBuyer`: A notification generated if an order accepted by buyer/seller but the payment is pending for authorization.\n- `orderPendingAuthorizationSeller`: A notification generated if an order accepted by buyer/seller but the payment is pending for authorization.\n- `orderPendingBuyer`: A notification generated if an order pending buyer approval.\n- `orderPendingDeliveryDataBuyer`: A notification generated if an order buyer needs to fill in the delivery data.\n- `orderPendingDeliveryDataSeller`: A notification generated if an order seller needs to fill in the delivery data.\n- `orderRealizedBuyer`: A notification generated if an order accepted by buyer (sent to seller).\n- `orderRealizedSeller`: A notification generated if an order accepted by seller (sent to buyer).\n- `orderRejectedByBuyer`: A notification generated if an order rejected by buyer.\n- `orderRejectedBySeller`: A notification generated if an order rejected by seller.\n- `passwordStatusChanged`: A notification generated if a password status has changed.\n- `paymentAwaitingAdminAuthorization`: An admin notification generated if a payment is awaiting for authorization.\n- `paymentAwaitingAuthorization`: A notification generated if a user must authorize a pending payment.\n- `paymentPerformed`: An admin notification generated if a payment is performed.\n- `paymentReceived`: A notification generated if a user received a new payment.\n- `paymentRequestCanceled`: A notification generated if a payment request was canceled.\n- `paymentRequestDenied`: A notification generated if a payment request was denied.\n- `paymentRequestExpirationDateChanged`: A notification generated if the payment request's expiration date has changed.\n- `paymentRequestExpired`: A notification generated if a payment request has expired.\n- `paymentRequestProcessed`: A notification generated if a payment request was processed.\n- `paymentRequestReceived`: A notification generated if a payment request was received.\n- `recurringPaymentFailed`: A notification generated if a recurring payment from a user has failed (probably because of lack of funds).\n- `recurringPaymentOccurrenceProcessed`: A notification generated if an occurrence of an outgoing recurring payment was processed.\n- `referenceChanged`: A notification generated if a reference was modified.\n- `referenceCreated`: A notification generated if a reference has been set.\n- `salePendingBuyer`: A notification generated if a sale pending buyer approval.\n- `saleRealizedBuyer`: A notification generated if a sale accepted by buyer (sent to seller).\n- `saleRejectedSeller`: A notification generated if a sale rejected by seller.\n- `scheduledPaymentFailed`: A notification generated if a scheduled payment from a user has failed (probably because of lack of funds).\n- `scheduledPaymentInstallmentProcessed`: A notification generated if a scheduled payment to a user has been processed.\n- `scheduledPaymentRequestFailed`: A notification generated if a payment request which was scheduled has failed processing (probably because of lack of funds), and is being reopened.\n- `sentPaymentRequestExpirationDateChanged`: A notification generated if the payment request's expiration date has changed. This notification is to be sent to the sender.\n- `smsPerformedPayment`: A notification generated if a user performed a new payment through SMS.\n- `systemAlert`: An admin notification generated if a system alert as occurred.\n- `ticketWebhookFailed`: A notification generated if the invocation of a webhook after (a successful) ticket approval has failed.\n- `tokenStatusChanged`: A notification generated if a token / card status has changed.\n- `userAlert`: An admin notification generated if a member alert as occurred.\n- `userImport`: An admin notification generated if a user import has been done.\n- `userRegistration`: An admin notification generated if a new user has been registered.\n- `userStatusChanged`: A notification generated if a user status has changed.\n- `voucherAboutToExpire`: A notification generated if a one or more bought vouchers are about to expire.\n- `voucherAssigned`: A notification generated when a voucher was assigned to the user.\n- `voucherBuyingAboutToExpire`: An admin notification generated if a voucher type allowing buy is about to expire.\n- `voucherExpirationDateChanged`: A notification generated if a bought voucher has new expiration date.\n- `voucherExpired`: A notification generated if one or more bought vouchers have expired.\n- `voucherPinBlocked`: A voucher PIN was blocked by exceeding invalid attempts.\n- `voucherRedeem`: A voucher was redeemed\n- `voucherTopUp`: A voucher was topped-up", - "type" : "string", - "x-deprecated-enum" : [ "boughtVouchersAboutToExpire|4.17|Voucher notifications are no longer only for bought.", "boughtVouchersExpirationDateChanged|4.17|Voucher notifications are no longer only for bought.", "boughtVouchersExpired|4.17|Voucher notifications are no longer only for bought." ], - "enum" : [ "adAuthorized", "adExpired", "adInterestNotification", "adPendingAuthorization", "adPendingByAdminAuthorization", "adQuestionAnswered", "adQuestionCreated", "adRejected", "allNonSmsPerformedPayments", "applicationError", "articleOutOfStock", "authorizedPaymentCanceled", "authorizedPaymentDenied", "authorizedPaymentExpired", "authorizedPaymentSucceeded", "boughtVouchersAboutToExpire", "boughtVouchersExpirationDateChanged", "boughtVouchersExpired", "brokerAssigned", "brokerUnassigned", "externalPaymentExpired", "externalPaymentPerformedFailed", "externalPaymentReceivedFailed", "externalUserPaymentExpired", "externalUserPaymentPerformedFailed", "feedbackChanged", "feedbackCreated", "feedbackExpirationReminder", "feedbackOptional", "feedbackReplyCreated", "feedbackRequired", "generatedVouchersAboutToExpire", "generatedVouchersExpired", "incomingRecurringPaymentCanceled", "incomingRecurringPaymentFailed", "incomingRecurringPaymentReceived", "incomingScheduledPaymentCanceled", "incomingScheduledPaymentFailed", "incomingScheduledPaymentReceived", "limitChange", "lowStockQuantity", "maxSmsPerMonthReached", "memberAssigned", "memberUnassigned", "networkCreated", "newToken", "newTokenPendingActivation", "operatorAuthorizedPaymentApprovedStillPending", "operatorAuthorizedPaymentCanceled", "operatorAuthorizedPaymentDenied", "operatorAuthorizedPaymentExpired", "operatorAuthorizedPaymentSucceeded", "operatorPaymentAwaitingAuthorization", "orderCanceledBuyer", "orderCanceledSeller", "orderCreated", "orderPaymentCanceledBuyer", "orderPaymentCanceledSeller", "orderPaymentDeniedBuyer", "orderPaymentDeniedSeller", "orderPaymentExpiredBuyer", "orderPaymentExpiredSeller", "orderPendingAuthorizationBuyer", "orderPendingAuthorizationSeller", "orderPendingBuyer", "orderPendingDeliveryDataBuyer", "orderPendingDeliveryDataSeller", "orderRealizedBuyer", "orderRealizedSeller", "orderRejectedByBuyer", "orderRejectedBySeller", "passwordStatusChanged", "paymentAwaitingAdminAuthorization", "paymentAwaitingAuthorization", "paymentPerformed", "paymentReceived", "paymentRequestCanceled", "paymentRequestDenied", "paymentRequestExpirationDateChanged", "paymentRequestExpired", "paymentRequestProcessed", "paymentRequestReceived", "recurringPaymentFailed", "recurringPaymentOccurrenceProcessed", "referenceChanged", "referenceCreated", "salePendingBuyer", "saleRealizedBuyer", "saleRejectedSeller", "scheduledPaymentFailed", "scheduledPaymentInstallmentProcessed", "scheduledPaymentRequestFailed", "sentPaymentRequestExpirationDateChanged", "smsPerformedPayment", "systemAlert", "ticketWebhookFailed", "tokenStatusChanged", "userAlert", "userImport", "userRegistration", "userStatusChanged", "voucherAboutToExpire", "voucherAssigned", "voucherBuyingAboutToExpire", "voucherExpirationDateChanged", "voucherExpired", "voucherPinBlocked", "voucherRedeem", "voucherTopUp" ] - }, - "NumberFormatEnum" : { - "description" : "The format for numbers.\nPossible values are:\n- `commaAsDecimal`: 9.999,99\n- `periodAsDecimal`: 9,999.99", - "type" : "string", - "enum" : [ "commaAsDecimal", "periodAsDecimal" ] - }, - "OperationResultTypeEnum" : { - "description" : "The kind of data a custom operation execution is expected to return.\nPossible values are:\n- `externalRedirect`: The main execution returns an URL for another service. Then a second execution is expected when this other service redirects the client back to Cyclos\n- `fileDownload`: Returns a file, which can be downloaded\n- `notification`: Returns a text to be displayed as a simple notification\n- `plainText`: Returns a plain text to be displayed in a page, and optionally printed\n- `resultPage`: Returns a page or list of results, which should be displayed in a table like any other search / list\n- `richText`: Returns an HTML formatted text to be displayed in a page, and optionally printed\n- `url`: The result should be an URL to which the client should be redirected to", - "type" : "string", - "enum" : [ "externalRedirect", "fileDownload", "notification", "plainText", "resultPage", "richText", "url" ] - }, - "OperationRowActionEnum" : { - "description" : "The action that should be performed when the user clicks a row in the results table.\nPossible values are:\n- `location`: Navigate to a standard Cyclos location\n- `operation`: Run an internal custom operation, which is set on the custom operation itself\n- `url`: Navigate to an arbitrary URL, which is set in the custom operation itself", - "type" : "string", - "enum" : [ "location", "operation", "url" ] - }, - "OperationScopeEnum" : { - "description" : "The scope determines where does a custom operation can be executed.\nPossible values are:\n- `advertisement`: A custom operation which is executed over an advertisement\n- `bulkAction`: A custom operation executed over a set of users (one at a time)\n- `contact`: A custom operation which is executed over a contact in a user's contact list\n- `contactInfo`: A custom operation which is executed over an additional contact information, which is part of the user profile\n- `internal`: A custom operation which is executed by another custom operation\n- `menu`: A custom operation which is visible in a custom menu item\n- `record`: A custom operation which is executed over a record\n- `system`: A general, system custom operation\n- `transfer`: A custom operation which is executed over a transfer\n- `user`: A custom operation over a single user", - "type" : "string", - "enum" : [ "advertisement", "bulkAction", "contact", "contactInfo", "internal", "menu", "record", "system", "transfer", "user" ] - }, - "OperationShowFormEnum" : { - "description" : "Determines in which conditions the parameters form is shown.\nPossible values are:\n- `always`: Show form even if parameters are not missing\n- `missingAny`: Show form if any parameter (optional or required) is missing\n- `missingRequired`: Show form only if required parameters are missing", - "type" : "string", - "enum" : [ "always", "missingAny", "missingRequired" ] - }, - "OperatorGroupAccountAccessEnum" : { - "description" : "How an owner account can be accessed by operators.\nPossible values are:\n- `full`: The account is fully visible\n- `incoming`: All incoming and own payments are visible\n- `none`: The account is not visible\n- `outgoing`: All outgoing and own payments are visible\n- `own`: Only payments performed / received by the operators are visible", - "type" : "string", - "enum" : [ "full", "incoming", "none", "outgoing", "own" ] - }, - "OrderStatusEnum" : { - "description" : "The possible statuses for an order.\nPossible values are:\n- `completed`: The order was accepted by the seller and/or buyer and the related payment was done.\n- `disposed`: The order was marked as disposed because the seller and/or buyer were removed or they do not have any account in the order's currency.\n- `draft`: The order has been created by the seller, but has not yet been sent to the buyer for approval\n- `paymentCanceled`: The related payment was not done because was canceled after finish the authorization process.\n- `paymentDenied`: The related payment was not done because was denied.\n- `paymentExpired`: The related payment was not done because the pending authorization has expired.\n- `paymentPending`: The order was accepted by the seller and/or buyer and the related payment is waiting for authorization.\n- `pendingBuyer`: The order is pending by the buyer's action.\n- `pendingSeller`: The order is pending by the seller's action.\n- `rejectedByBuyer`: The order was rejected by the buyer.\n- `rejectedBySeller`: The order was rejected by the seller.\n- `shoppingCart`: The order is just a shopping cart, possibly temporary, as hasn't been checked out yet", - "type" : "string", - "enum" : [ "completed", "disposed", "draft", "paymentCanceled", "paymentDenied", "paymentExpired", "paymentPending", "pendingBuyer", "pendingSeller", "rejectedByBuyer", "rejectedBySeller", "shoppingCart" ] - }, - "OutboundSmsStatusEnum" : { - "description" : "Statuses for an outbound SMS message sent to an user.\nPossible values are:\n- `gatewayUreachable`: Network problem, or gateway server down\n- `invalid`: The parameters for sending an SMS message were invalid\n- `maxMessagesReached`: The maximum SMS messages for the user (or guest) have been reached\n- `rejected`: The gateway has rejected the SMS message\n- `success`: The SMS message was successfully sent\n- `timeout`: Timeout while connecting or waiting for a gateway server reply\n- `unexpected`: An unexpected error has occurred", - "type" : "string", - "enum" : [ "gatewayUreachable", "invalid", "maxMessagesReached", "rejected", "success", "timeout", "unexpected" ] - }, - "PasswordActionEnum" : { - "description" : "An action over a user's password.\nPossible values are:\n- `activate`: A generated password was activated\n- `allow_activation`: Allow user to generate the password\n- `change`: Manually change a manual password, or generate a new generated password\n- `disable`: Disables a password, making it unusable until being enabled again\n- `enable`: Enables a disabled password\n- `reset`: Resets a generated password, making it go back to the pending state\n- `resetAndSend`: Resets a manual password to a generated value and send it to the user\n- `unblock`: Unblocks a blocked password", - "type" : "string", - "enum" : [ "activate", "allow_activation", "change", "disable", "enable", "reset", "resetAndSend", "unblock" ] - }, - "PasswordInputMethodEnum" : { - "description" : "Determines how passwords should be visually entered by users.\nPossible values are:\n- `textBox`: A simple string should be requested\n- `virtualKeyboard`: A series of buttons should be presented to allow enter the password.", - "type" : "string", - "enum" : [ "textBox", "virtualKeyboard" ] - }, - "PasswordModeEnum" : { - "description" : "Indicates how a password is handled.\nPossible values are:\n- `generated`: Passwords are always generated\n- `manual`: Passwords are manually typed by users\n- `otp`: One Time Passwords. are always generated and can be used only once\n- `script`: Passwords are not stored in Cyclos, but handed-over for a script to verify them. Is normally used to implement single-sign-on with other apps.", - "type" : "string", - "enum" : [ "generated", "manual", "otp", "script" ] - }, - "PasswordStatusEnum" : { - "description" : "The password status.\nPossible values are:\n- `active`: The password is active and valid\n- `disabled`: The password has been manually disabled\n- `expired`: The password is expired\n- `indefinitelyBlocked`: The password is blocked by exceeding the maximum attempts until it is manually unblocked\n- `neverCreated`: The password has never been created for the user\n- `pending`: The password was manually allowed (by admins) for the user to generate it, but it was not yet generated (never used for manual passwords)\n- `reset`: The password has been reset (can be used for login but must then be changed)\n- `temporarilyBlocked`: The password is temporarily blocked by exceeding the maximum attempts", - "type" : "string", - "enum" : [ "active", "disabled", "expired", "indefinitelyBlocked", "neverCreated", "pending", "reset", "temporarilyBlocked" ] - }, - "PaymentCreationTypeEnum" : { - "description" : "Indicates how a payment was created\nPossible values are:\n- `direct`: The payment was directly performed\n- `easyInvoice`: The payment was created via easy invoicing\n- `external`: The payment was generated by an external payment\n- `import`: The payment was imported via the Banking menu. Not to be confused with the transfers import from the System menu, which generates transactions with `kind` = `import` instead.\n- `order`: The payment was created by completing a webshop order (or cart checkout)\n- `pos`: The payment was received via a POS operation\n- `request`: The payment was created by accepting a payment request\n- `ticket`: The payment was created by accepting a ticket (or receiving a QR-code payment)\n- `voucherBuying`: The payment was performed to buy vouchers\n- `voucherRedeeming`: The payment was performed to redeem a voucher\n- `voucherRefunding`: The payment was performed to refund a bought voucher\n- `voucherTopUp`: The payment was performed to top-up a voucher", - "type" : "string", - "enum" : [ "direct", "easyInvoice", "external", "import", "order", "pos", "request", "ticket", "voucherBuying", "voucherRedeeming", "voucherRefunding", "voucherTopUp" ] - }, - "PaymentErrorCode" : { - "description" : "Application-specific error codes for a payment error.\nPossible values are:\n- `dailyAmountExceeded`: The maximum amount allowed per day was exceeded.\n- `dailyPaymentsExceeded`: The maximum count of payments allowed per day was exceeded.\n- `destinationUpperLimitReached`: The upper balance limit of the destination account was exceeded.\n- `insufficientBalance`: The account selected for the payment does not have enough balance\n- `monthlyAmountExceeded`: The maximum amount allowed per month was exceeded.\n- `monthlyPaymentsExceeded`: The maximum count of payments allowed per month was exceeded.\n- `paymentAmountExceeded`: The maximum amount allowed in the payment type was exceeded.\n- `pos`: A POS exception has happened when performing this payment. See the `posError` field for more details.\n- `timeBetweenPaymentsNotMet`: The minimum time between payments was not met.\n- `unexpected`: An unexpected error has occurred. See the `exceptionType` and `exceptionMessage` fields for the internal information.\n- `weeklyAmountExceeded`: The maximum amount allowed per week was exceeded.\n- `weeklyPaymentsExceeded`: The maximum count of payments allowed per week was exceeded.\n- `yearlyAmountExceeded`: The maximum amount allowed per year was exceeded.", - "type" : "string", - "enum" : [ "dailyAmountExceeded", "dailyPaymentsExceeded", "destinationUpperLimitReached", "insufficientBalance", "monthlyAmountExceeded", "monthlyPaymentsExceeded", "paymentAmountExceeded", "pos", "timeBetweenPaymentsNotMet", "unexpected", "weeklyAmountExceeded", "weeklyPaymentsExceeded", "yearlyAmountExceeded" ] - }, - "PaymentRequestActionEnum" : { - "description" : "Possible actions that could be confirmed with a device for a payment request.\nPossible values are:\n- `accept`: Accept the payment request as the payer\n- `cancel`: Cancel the payment request as the payer\n- `changeExpiration`: Change the expiration date of the payment request as the payer\n- `deny`: Deny the payment request as the payer\n- `reschedule`: Reschedule the payment request as the payer", - "type" : "string", - "enum" : [ "accept", "cancel", "changeExpiration", "deny", "reschedule" ] - }, - "PaymentRequestSchedulingEnum" : { - "description" : "Determines how the generated payment of a payment request is scheduled. When not specified, the generated payment is processed directly.\nPossible values are:\n- `direct`: The generated payment won't be scheduled, but paid directly\n- `recurring`: The generated payment will be recurring\n- `scheduled`: The generated payment will be scheduled, once accepting, triggering a given number of installments", - "type" : "string", - "enum" : [ "direct", "recurring", "scheduled" ] - }, - "PaymentRequestStatusEnum" : { - "description" : "The status of a payment request.\nPossible values are:\n- `canceled`: The payment request was canceled\n- `denied`: The payment request was denied by the receiver\n- `expired`: The payment request has expired - the received did not respond until the expiration date\n- `open`: The payment request is open and can be accepted\n- `processed`: The payment request was processed, and either a direct or scheduled payment was created from it\n- `scheduled`: The payment request has been accepted, and scheduled for processing on a future date", - "type" : "string", - "enum" : [ "canceled", "denied", "expired", "open", "processed", "scheduled" ] - }, - "PaymentSchedulingEnum" : { - "description" : "Determines how a payment is scheduled. When not specified, direct payments are performed.\nPossible values are:\n- `direct`: The payment won't be scheduled, but paid directly\n- `recurring`: The payment will be recurring, repeated either by a limited number of occurrences or until cancel\n- `scheduled`: The payment will be scheduled, either to a single future date or multiple installments", - "type" : "string", - "enum" : [ "direct", "recurring", "scheduled" ] - }, - "PersonalizeNfcErrorCode" : { - "description" : "Application-specific error codes for a personalize NFC error.\nPossible values are:\n- `tokenInUse`: The token specified for personalization is already in use (exists and it is active)\n- `unexpected`: An unexpected error has occurred. See the `exceptionType` and `exceptionMessage` fields for the internal information.", - "type" : "string", - "enum" : [ "tokenInUse", "unexpected" ] - }, - "PhoneKind" : { - "description" : "Type of phone.\nPossible values are:\n- `landLine`: A landline phone\n- `mobile`: A mobile phone", - "type" : "string", - "enum" : [ "landLine", "mobile" ] - }, - "PhysicalTokenTypeEnum" : { - "description" : "The possible physical type for tokens. Determines how applications interact with hardware in order to read the token value.\nPossible values are:\n- `barcode`: A 1d barcode printed on a card\n- `nfcTag`: A NFC tag, normally a DESFire NFC card\n- `other`: Other\n- `qrCode`: A QR-code\n- `swipe`: A swipe card", - "type" : "string", - "enum" : [ "barcode", "nfcTag", "other", "qrCode", "swipe" ] - }, - "PosErrorCode" : { - "description" : "Application-specific error codes for a POS operation error.\nPossible values are:\n- `payerInaccessiblePrincipal`: The specified payer cannot use the given identification method (principal type) in the POS channel.\n- `payerNotInChannel`: The specified payer user does not participate on the POS channel.\n- `payerNotOperative`: The specified payer has some restriction that renders he/she inoperative for POS operations. An example of such case is when the user has pending agreements.\n- `unexpected`: An unexpected error has occurred. See the `exceptionType` and `exceptionMessage` fields for the internal information.", - "type" : "string", - "enum" : [ "payerInaccessiblePrincipal", "payerNotInChannel", "payerNotOperative", "unexpected" ] - }, - "PrincipalTypeKind" : { - "description" : "The kind of a principal type (user identification method).\nPossible values are:\n- `accessClient`: An access client token (remote application) identifies the user\n- `accountNumber`: An account number identifies the user\n- `customField`: A unique custom field identifies the user\n- `email`: The email identifies the user\n- `mobilePhone`: A mobile phone number identifies the user\n- `token`: A token identifies the user\n- `trustedDevice`: A trusted device identifies the user\n- `username`: The username identifies the user", - "type" : "string", - "enum" : [ "accessClient", "accountNumber", "customField", "email", "mobilePhone", "token", "trustedDevice", "username" ] - }, - "ProductAssignmentActionEnum" : { - "description" : "A possible action regarding product assignment / unassignment.\nPossible values are:\n- `assign`: The product was assigned\n- `unassign`: The product was unassigned", - "type" : "string", - "enum" : [ "assign", "unassign" ] - }, - "ProductKind" : { - "description" : "Kind of product.\nPossible values are:\n- `administrator`: An administrator product\n- `broker`: A broker\n- `member`: A member product", - "type" : "string", - "enum" : [ "administrator", "broker", "member" ] - }, - "PushNotificationEventKind" : { - "description" : "Kind of events that can be triggered on push notifications.\nPossible values are:\n- `deviceConfirmation`: A device confirmation was approved / rejected\n- `deviceConfirmationFeedback`: The result of an operation approved by a device confirmation\n- `identityProviderCallback`: An identity provider has returned profile data for the user\n- `loggedOut`: The current session has been invalidated\n- `newMessage`: New message on the user's inbox\n- `newNotification`: New received notification\n- `paymentAuthorization`: A payment authorization status has changed\n- `permissionsChanged`: The current session had its permissions changed by modifying the user products\n- `ticket`: A ticket status has changed", - "type" : "string", - "enum" : [ "deviceConfirmation", "deviceConfirmationFeedback", "identityProviderCallback", "loggedOut", "newMessage", "newNotification", "paymentAuthorization", "permissionsChanged", "ticket" ] - }, - "ReceiptPartAlignEnum" : { - "description" : "The text alignment\nPossible values are:\n- `center`: The text is center-aligned\n- `left`: The text is left-aligned\n- `right`: The text is right-aligned", - "type" : "string", - "enum" : [ "center", "left", "right" ] - }, - "ReceiptPartSizeEnum" : { - "description" : "Either horizontal or vertical size of the font\nPossible values are:\n- `double`: Double size\n- `normal`: Normal size", - "type" : "string", - "enum" : [ "double", "normal" ] - }, - "ReceiptPartStyleEnum" : { - "description" : "The font style\nPossible values are:\n- `bold`: Bold font\n- `normal`: Normal font\n- `underline`: Underline font", - "type" : "string", - "enum" : [ "bold", "normal", "underline" ] - }, - "RecordKind" : { - "description" : "The possible kinds of a record, which can either belong to system or to an user.\nPossible values are:\n- `system`: The record belongs to the system, and is unrelated to an user\n- `user`: The record belongs to a specific user", - "type" : "string", - "enum" : [ "system", "user" ] - }, - "RecordLayoutEnum" : { - "description" : "The layout this record should be presented.\nPossible values are:\n- `list`: Should show a regular search filters / list\n- `single`: There should be a single record, with the form directly\n- `tiled`: Should show the record list with a form to quickly add a new", - "type" : "string", - "enum" : [ "list", "single", "tiled" ] - }, - "RecurringPaymentActionEnum" : { - "description" : "Possible actions that could be confirmed with a device for a recurring payment.\nPossible values are:\n- `block`: Block the recurring payment\n- `cancel`: Cancel the recurring payment\n- `modify`: Modifies the recurring payment like occurrences and scheduling\n- `unblock`: Unblock the recurring payment", - "type" : "string", - "enum" : [ "block", "cancel", "modify", "unblock" ] - }, - "RecurringPaymentStatusEnum" : { - "description" : "The status of a recurring payment.\nPossible values are:\n- `blocked`: The recurring payment is blocked and won't be processed on due dates\n- `canceled`: The recurring payment was manually canceled\n- `closed`: The recurring payment is closed, as the last scheduled occurrence was processed\n- `open`: The recurring payment is open, as there are more future occurrences", - "type" : "string", - "enum" : [ "blocked", "canceled", "closed", "open" ] - }, - "RedeemVoucherErrorCode" : { - "description" : "Possible errors when redeeming a voucher.\nPossible values are:\n- `insufficientBalance`: This voucher doesn't have enough balance for the attempted redeem\n- `notAllowedForUser`: This user cannot redeem this voucher\n- `notAllowedForVoucher`: This voucher cannot be redeemed\n- `notAllowedToday`: This voucher cannot be redeemed today\n- `notAllowedYet`: The redeem period for this voucher has not arrived yet\n- `payment`: There was an error when performing the payment\n- `unexpected`: An unexpected error has occurred. See the `exceptionType` and `exceptionMessage` fields for the internal information.\n- `userBlocked`: The user has been blocked by exceeding redeem tries", - "type" : "string", - "enum" : [ "insufficientBalance", "notAllowedForUser", "notAllowedForVoucher", "notAllowedToday", "notAllowedYet", "payment", "unexpected", "userBlocked" ] - }, - "ReferenceDirectionEnum" : { - "description" : "The reference/payment feedback direction in relation to a given user/payment.\nPossible values are:\n- `given`: The reference/payment feedback was given by the given user\n- `received`: The reference/payment feedback was received by the given user", - "type" : "string", - "enum" : [ "given", "received" ] - }, - "ReferenceLevelEnum" : { - "description" : "The reference level represents the satisfaction level.\nPossible values are:\n- `bad`: Unsatisfied\n- `good`: Satisfied\n- `neutral`: Neutral\n- `veryBad`: Very unsatisfied\n- `veryGood`: Very satisfied", - "type" : "string", - "enum" : [ "bad", "good", "neutral", "veryBad", "veryGood" ] - }, - "ResultTypeEnum" : { - "description" : "Result type for customizable results.\nPossible values are:\n- `list`: Results are a regular table, without thumbnail\n- `list_thumb`: Results are a list with thumbnail\n- `map`: Results are a map with address locations\n- `tiled`: Results are tiled boxes", - "type" : "string", - "enum" : [ "list", "list_thumb", "map", "tiled" ] - }, - "RoleEnum" : { - "description" : "The main role the user has.\nPossible values are:\n- `administrator`: A user who can manage the system and other users.\n- `broker`: A user who can manage other users.\n- `member`: A regular user who can manage operators.\n- `operator`: A \"sub-user\" created by a member to manage his data.", - "type" : "string", - "enum" : [ "administrator", "broker", "member", "operator" ] - }, - "RunOperationResultColumnTypeEnum" : { - "description" : "The data type for a custom operation column.\nPossible values are:\n- `boolean`: Each cell value is a boolean\n- `currencyAmount`: Each cell value is an object with 2 properties: amount (number represented as string) and currency (of type `Currency`)\n- `date`: Each cell value is a date represented as string\n- `number`: Each cell value is a number, but may be represented as string\n- `string`: Each cell value is a string", - "type" : "string", - "enum" : [ "boolean", "currencyAmount", "date", "number", "string" ] - }, - "ScheduledPaymentActionEnum" : { - "description" : "Possible actions that could be confirmed with a device for a scheduled payment.\nPossible values are:\n- `block`: Block the scheduled payment\n- `cancel`: Cancel the scheduled payment\n- `settle`: Settle the scheduled payment\n- `unblock`: Unblock the scheduled payment", - "type" : "string", - "enum" : [ "block", "cancel", "settle", "unblock" ] - }, - "ScheduledPaymentStatusEnum" : { - "description" : "The status of a scheduled payment.\nPossible values are:\n- `blocked`: The scheduled payment is blocked - won't have any installment processed until being unblocked again\n- `canceled`: The scheduled payment, as well as all open installments were canceled\n- `closed`: The scheduled payment is closed\n- `open`: The scheduled payment has open installments", - "type" : "string", - "enum" : [ "blocked", "canceled", "closed", "open" ] - }, - "SendMediumEnum" : { - "description" : "Mediums used to send information to the user (e.g: a confirmation code).\nPossible values are:\n- `email`: The user will receive an email with the information\n- `sms`: The user will receive a sms with the information (only if there is at least one phone enabled for sms)", - "type" : "string", - "enum" : [ "email", "sms" ] - }, - "SessionSourceEnum" : { - "description" : "Indicates how a session was created. Can be modified in runtime.\nPossible values are:\n- `device`: The session was created from a trusted device without a password input.\n- `login`: A regular user / password login was performed to create the session.", - "type" : "string", - "enum" : [ "device", "login" ] - }, - "ShoppingCartCheckoutErrorCode" : { - "description" : "Possible errors when checking out a shopping cart.\nPossible values are:\n- `insufficientBalance`: The origin account of the selected payment type used to make the amount reservation does not have enough balance.\n- `products`: There was an error related to the products contained in he shopping cart.\n- `unexpected`: An unexpected error has occurred. See the `exceptionType` and `exceptionMessage` fields for the internal information.", - "type" : "string", - "enum" : [ "insufficientBalance", "products", "unexpected" ] - }, - "ShoppingCartErrorCode" : { - "description" : "Possible errors when interacting with a shopping cart.\nPossible values are:\n- `canNotBuyFromSeller`: The authenticated user is not visible by the webshop's seller\n- `notEnoughStock`: There is not enough stock of the webshop ad to fulfill the requested quantity\n- `unexpected`: An unexpected error has occurred. See the `exceptionType` and `exceptionMessage` fields for the internal information.", - "type" : "string", - "enum" : [ "canNotBuyFromSeller", "notEnoughStock", "unexpected" ] - }, - "ShoppingCartItemAvailabilityEnum" : { - "description" : "The possible status of a webshop advertisement in relation to its availability.\nPossible values are:\n- `available`: The webshop advertisement is available and can be purchased\n- `outOfStock`: The webshop advertisement is now out of stock\n- `unavailable`: The webshop advertisement has been made unavailable and cannot be purchased anymore", - "type" : "string", - "enum" : [ "available", "outOfStock", "unavailable" ] - }, - "ShoppingCartItemQuantityAdjustmentEnum" : { - "description" : "The possible adjustments to a quantity-limited product added to shopping cart.\nPossible values are:\n- `max`: The quantity was reduced to honor the maximum allowed quantity\n- `min`: The quantity was raised to honor the minimum allowed quantity\n- `stock`: The quantity was reduced to the maximum available stock quantity", - "type" : "string", - "enum" : [ "max", "min", "stock" ] - }, - "SystemAlertTypeEnum" : { - "description" : "The type of system alert.\nPossible values are:\n- `accountBalanceFixed`: Accounts with inconsistent account balances were found and fixed\n- `accountFeeChargedNoFailures`: An account fee charge has finished without any failures\n- `accountFeeChargedWithFailures`: An account fee charge has finished with at least one failure\n- `applicationRestarted`: The application has been restarted, or started for the first time\n- `custom`: Custom alerts thrown by scripts\n- `customTranslationsInvalidated`: Custom translations were invalidated because the source (english) text has changed\n- `emailSendingFailed`: An E-mail couldn't be sent\n- `inconsistentBalanceBelowLimit`: A (limited) system account was found to have an inconsistent balance below the allowed limit\n- `inconsistentDbSchema`: Differences between the current database schema where found according to the expected schema\n- `maxBlockedUsersReached`: The max number of users blocked from the same IP has been reached\n- `maxGlobalSmsReached`: The groups under a certain configuration have run out of SMS messages\n- `maxIncorrectLoginAttempts`: Someone tried for a given number of tries to login with an invalid username\n- `smsSendingFailed`: An SMS couldn't be sent", - "type" : "string", - "enum" : [ "accountBalanceFixed", "accountFeeChargedNoFailures", "accountFeeChargedWithFailures", "applicationRestarted", "custom", "customTranslationsInvalidated", "emailSendingFailed", "inconsistentBalanceBelowLimit", "inconsistentDbSchema", "maxBlockedUsersReached", "maxGlobalSmsReached", "maxIncorrectLoginAttempts", "smsSendingFailed" ] - }, - "TempImageTargetEnum" : { - "description" : "The possible targets for a temporary image.\nPossible values are:\n- `advertisement`: The image will be used for an advertisement of a specific user\n- `contactInfo`: The image will be used for an additional contact information of a specific user\n- `customValue`: The image will be used for a value of a specific custom field\n- `userProfile`: The image will be used as a profile image for an existing user\n- `userRegistration`: The image will be used as a profile image for a newly registered user", - "type" : "string", - "enum" : [ "advertisement", "contactInfo", "customValue", "userProfile", "userRegistration" ] - }, - "ThemeImageKind" : { - "description" : "The type of theme image to request\nPossible values are:\n- `background`: A background image\n- `custom`: A custom theme image\n- `mapMarker`: A map marker\n- `mobile`: An image used by the mobile application", - "type" : "string", - "enum" : [ "background", "custom", "mapMarker", "mobile" ] - }, - "TicketStatusEnum" : { - "description" : "The status of a ticket.\nPossible values are:\n- `approved`: The ticket was approved by the payer and is waiting to be processed by the receiver to generate the payment\n- `canceled`: The ticket was canceled by the receiver before being approved\n- `expired`: The ticket has expired without being approved by a payer or canceled by the receiver until the expiration date\n- `open`: The ticket was created, but not approved yet\n- `processed`: The ticket was approved and processed and the payment was generated", - "type" : "string", - "enum" : [ "approved", "canceled", "expired", "open", "processed" ] - }, - "TimeFieldEnum" : { - "description" : "Determines a time field, such as seconds, hours or months.\nPossible values are:\n- `days`: Day(s)\n- `hours`: Hour(s)\n- `millis`: Millisecond(s)\n- `minutes`: Minute(s)\n- `months`: Month(s)\n- `seconds`: Second(s)\n- `weeks`: Week(s)\n- `years`: Year(s)", - "type" : "string", - "enum" : [ "days", "hours", "millis", "minutes", "months", "seconds", "weeks", "years" ] - }, - "TimeFormatEnum" : { - "description" : "The format for times.\nPossible values are:\n- `h12`: 12-hour with AM/PM indicator\n- `h24`: 24-hour", - "type" : "string", - "enum" : [ "h12", "h24" ] - }, - "TokenStatusEnum" : { - "description" : "The possible statuses for a token.\nPossible values are:\n- `activationExpired`: The token has exceeded the activation deadline.\n- `active`: The token is active and can be used.\n- `blocked`: The token is blocked from being used.\n- `canceled`: The token is canceled and cannot be used.\n- `expired`: The token has exceeded the expiration date.\n- `pending`: The token has been assigned to an user, but it's still pending for activation.\n- `unassigned`: The token is not assigned to an user.", - "type" : "string", - "enum" : [ "activationExpired", "active", "blocked", "canceled", "expired", "pending", "unassigned" ] - }, - "TokenTypeEnum" : { - "description" : "The kind of a token principal type.\nPossible values are:\n- `barcode`: A barcode with the token\n- `nfcDevice`: A device (e.g. cell phone) with support for NFC\n- `nfcTag`: A NFC tag/card\n- `other`: Any other type containing a token\n- `qrcode`: A QR code containing a token\n- `swipe`: A swipe/magnetic card containing the token", - "type" : "string", - "enum" : [ "barcode", "nfcDevice", "nfcTag", "other", "qrcode", "swipe" ] - }, - "TopUpVoucherErrorCode" : { - "description" : "Possible errors when topping-up a voucher.\nPossible values are:\n- `activationExpired`: The maximum activation time for the voucher has expired.\n- `alreadyActivated`: The voucher allows a single top-up and has already been activated.\n- `maxBalanceReached`: The voucher cannot be topped-up because the maximum allowed balance would be exceeded.\n- `notAllowedForVoucher`: This voucher cannot be topped-up.\n- `payment`: There was an error when performing the payment.\n- `unexpected`: An unexpected error has occurred. See the `exceptionType` and `exceptionMessage` fields for the internal information.", - "type" : "string", - "enum" : [ "activationExpired", "alreadyActivated", "maxBalanceReached", "notAllowedForVoucher", "payment", "unexpected" ] - }, - "TransOrderByEnum" : { - "description" : "Contains the possible 'order by' values when searching for transfers / transactions.\nPossible values are:\n- `amountAsc`: The result is ordered by amount descendant\n- `amountDesc`: The result is ordered by amount descendant\n- `dateAsc`: The result is ordered by date ascendant\n- `dateDesc`: The result is ordered by date descendant", - "type" : "string", - "enum" : [ "amountAsc", "amountDesc", "dateAsc", "dateDesc" ] - }, - "TransactionAuthorizationActionEnum" : { - "description" : "An action performed when a transaction was pending authorization.\nPossible values are:\n- `authorized`: The transaction was authorized\n- `canceled`: The authorization process was canceled by the payer/admin\n- `denied`: The transaction was denied (rejected)\n- `expired`: The authorization process has expired by system", - "type" : "string", - "enum" : [ "authorized", "canceled", "denied", "expired" ] - }, - "TransactionAuthorizationStatusEnum" : { - "description" : "The status regarding authorization a transaction is in. If configured, transactions can require one or more levels of authorization in order to be processed. If a transaction has the this status null, it means it never went through the authorization process.\nPossible values are:\n- `authorized`: The transaction was fully authorized and is processed\n- `canceled`: The authorization submission was canceled by the submitter\n- `denied`: The authorization was denied\n- `expired`: The pending authorization has expired\n- `pending`: The transaction is pending authorization", - "type" : "string", - "enum" : [ "authorized", "canceled", "denied", "expired", "pending" ] - }, - "TransactionAuthorizationTypeEnum" : { - "description" : "Defines which kind of authorization a transaction is through. Only returned if the `kind` is either `payment`, `scheduledPayment` or `recurringPayment` and the transaction is pending for authorization.\nPossible values are:\n- `level`: A transaction is going through some authorization level\n- `operator`: An operator performed a payment that needs to be authorized by his member or other operators", - "type" : "string", - "enum" : [ "level", "operator" ] - }, - "TransactionKind" : { - "description" : "The kind of a transaction.\nPossible values are:\n- `chargeback`: Chargeback of a given transfer\n- `externalPayment`: A payment to an external user\n- `import`: An imported transaction\n- `order`: Deprecated: A separated enum was created . Transaction generated by confirming an order\n- `payment`: A direct payment\n- `paymentRequest`: A request for another user to accept a payment\n- `recurringPayment`: A payment which is processed again periodically\n- `scheduledPayment`: A scheduled payment which is either a payment scheduled for a future date or has multiple installments\n- `ticket`: A payment whose the payer is unknown", - "type" : "string", - "x-deprecated-enum" : [ "order|4.17|A separated enum was created" ], - "enum" : [ "chargeback", "externalPayment", "import", "order", "payment", "paymentRequest", "recurringPayment", "scheduledPayment", "ticket" ] - }, - "TransactionSubjectsEnum" : { - "description" : "Reference to none, one of (from or to) or both subjects of a transaction (or transfer).\nPossible values are:\n- `both`: Reference to both from and to subjects of the transaction\n- `from`: Reference to the transaction from\n- `none`: Reference to none of the transaction subjects\n- `to`: Reference to the transaction to", - "type" : "string", - "enum" : [ "both", "from", "none", "to" ] - }, - "TransferDirectionEnum" : { - "description" : "Indicates whether from an account POV a transfer is a credit or debit.\nPossible values are:\n- `credit`: The transfer impacts the balance positively\n- `debit`: The transfer impacts the balance negatively", - "type" : "string", - "enum" : [ "credit", "debit" ] - }, - "TransferKind" : { - "description" : "Indicates the reason the transfer was created.\nPossible values are:\n- `accountFee`: A transfer generated by an account fee charge\n- `chargeback`: A transfer which is a chargeback of another transfer\n- `import`: An imported transfer\n- `initialCredit`: A transfer which is the initial credit for a newly created account\n- `installment`: A transfer generated when processing a scheduled / recurring payment installment / occurrence\n- `payment`: A transfer generated by a direct payment or accepting a webshop order\n- `transferFee`: A transfer generated by a transfer fee charge", - "type" : "string", - "enum" : [ "accountFee", "chargeback", "import", "initialCredit", "installment", "payment", "transferFee" ] - }, - "UiKind" : { - "description" : "Indicates the type of user interface.\nPossible values are:\n- `custom`: A custom front-end application. Has no headers, footers or theme\n- `main`: The main web user interface\n- `mobile`: The mobile application user interface\n- `pay`: The Ticket / Easy invoice confirmation application user interface", - "type" : "string", - "enum" : [ "custom", "main", "mobile", "pay" ] - }, - "UnauthorizedErrorCode" : { - "description" : "Error codes for 401 Unauthorized HTTP status.\nPossible values are:\n- `blockedAccessClient`: The access client used for access is blocked\n- `invalidAccessClient`: The access client used for access is invalid\n- `invalidAccessToken`: The OAuth2 / OpenID Connect access token used for access is invalid\n- `invalidChannelUsage`: Attempt to login on a stateless-only channel, or use stateless in a stateful-only channel, or invoke as guest in a channel configuration which is only for users\n- `invalidNetwork`: Attempt to access a network that has been disabled, or a restricted global administrator is trying to login to a inaccessible network\n- `loggedOut`: The session token used for access is invalid\n- `login`: Either user identification (principal) or password are invalid. May have additional information, such as the user / password status\n- `missingAuthorization`: Attempt to access an operation as guest, but the operation requires authentication\n- `remoteAddressBlocked`: The IP address being used for access has been blocked by exceeding tries with invalid users\n- `unauthorizedAddress`: The user cannot access the system using an IP address that is not white-listed\n- `unauthorizedUrl`: The user's configuration demands access using a specific URL, and this access is being done using another one", - "type" : "string", - "enum" : [ "blockedAccessClient", "invalidAccessClient", "invalidAccessToken", "invalidChannelUsage", "invalidNetwork", "loggedOut", "login", "missingAuthorization", "remoteAddressBlocked", "unauthorizedAddress", "unauthorizedUrl" ] - }, - "UnavailableErrorCode" : { - "description" : "Error codes for 503 Service Unavailable entity HTTP status. It means that some required service couldn't be contacted\nPossible values are:\n- `emailSending`: An error has occurred trying to send the a required email\n- `smsSending`: An error has occurred trying to send a required SMS message", - "type" : "string", - "enum" : [ "emailSending", "smsSending" ] - }, - "UserAddressResultEnum" : { - "description" : "Determines which address is returned on the search, if any. By default no addresses are returned. This option is useful for displaying results as locations on a map. In all cases only located addresses (those that have the geographical coordinates set) are returned. When returning all addresses, data related with multiple addresses is returned multiple times.\nPossible values are:\n- `all`: All addresses are returned.\n- `nearest`: The nearest address from the reference location is returned. Only usable if a reference coordinate (`latitude` and `longitude`)\n- `none`: Addresses are not returned.\n- `primary`: The primary (default) user address is returned", - "type" : "string", - "enum" : [ "all", "nearest", "none", "primary" ] - }, - "UserAlertTypeEnum" : { - "description" : "The type of user alert.\nPossible values are:\n- `custom`: Custom alerts thrown by scripts\n- `givenVeryBadRefs`: A user has exceeded the maximum number of given very bad references\n- `inconsistentBalanceBelowLimit`: An inconsistent account balance was found and fixed, but the balance is below the credit limit\n- `insufficientBalanceForInitialCredit`: A user account's initial credit couldn't be granted because the source account lacked funds\n- `maxDeviceActivationAttemptsReached`: A user has reached the maximum number of attempts to activate a device by code\n- `maxDeviceConfirmationCheckAttemptsReached`: A user has reached the maximum number of attempts to check for a processed device confirmation\n- `maxTokenActivationAttemptsReached`: A user has reached the maximum number of attempts to activate a token\n- `maxUserLocalizationAttemptsReached`: A user has reached the maximum number of attempts to find other users\n- `maxVoucherRedeemAttemptsReached`: A user has reached the maximum number of attempts to redeem a voucher\n- `moveUserAutomaticallyFailed`: A user couldn't be moved automatically to another group\n- `passwordDisabledByTries`: A user password has been disabled by exceeding the wrong attempts\n- `passwordTemporarilyBlocked`: A user password has been temporarily blocked by exceeding the wrong attempts\n- `receivedVeryBadRefs`: A user has exceeded the maximum number of received very bad references\n- `scheduledPaymentFailed`: An scheduled payment has failed", - "type" : "string", - "enum" : [ "custom", "givenVeryBadRefs", "inconsistentBalanceBelowLimit", "insufficientBalanceForInitialCredit", "maxDeviceActivationAttemptsReached", "maxDeviceConfirmationCheckAttemptsReached", "maxTokenActivationAttemptsReached", "maxUserLocalizationAttemptsReached", "maxVoucherRedeemAttemptsReached", "moveUserAutomaticallyFailed", "passwordDisabledByTries", "passwordTemporarilyBlocked", "receivedVeryBadRefs", "scheduledPaymentFailed" ] - }, - "UserIdentityProviderStatusEnum" : { - "description" : "The status of a link between a user and an identity provider.\nPossible values are:\n- `disabled`: The identity provider is disabled for the user, which means that the login with external provider will not work even if the user has the same e-mail address in the provider and in Cyclos.\n- `linked`: The identity provider is linked to the user\n- `notLinked`: The identity provider is not currently linked with the user", - "type" : "string", - "enum" : [ "disabled", "linked", "notLinked" ] - }, - "UserImageKind" : { - "description" : "Determines the kind of an user image.\nPossible values are:\n- `custom`: User custom images are additional images that can be used on rich text contents.\n- `profile`: User profile images are those associated with the user profile. The first profile image is used to depict the user on search results.", - "type" : "string", - "enum" : [ "custom", "profile" ] - }, - "UserMenuEnum" : { - "description" : "Which user menu should a data be displayed.\nPossible values are:\n- `banking`: Banking / accounts\n- `community`: Interaction with other users\n- `marketplace`: Marketplace / advertisements\n- `personal`: Personal data", - "type" : "string", - "enum" : [ "banking", "community", "marketplace", "personal" ] - }, - "UserOrderByEnum" : { - "description" : "Possible options for ordering the results of an user search.\nPossible values are:\n- `alphabeticallyAsc`: Users are ordered by name (or whatever field is set to format users) in ascending order.\n- `alphabeticallyDesc`: Users are ordered by name (or whatever field is set to format users) in descending order.\n- `creationDate`: Newly registered users are returned first.\n- `distance`: Only useful when providing a location, will return nearer advertisements first.\n- `random`: Users will be randomly returned\n- `relevance`: This is the default if keywords are used. Best matching users come first.", - "type" : "string", - "enum" : [ "alphabeticallyAsc", "alphabeticallyDesc", "creationDate", "distance", "random", "relevance" ] - }, - "UserProfileSectionEnum" : { - "description" : "Which user profile section should a data be displayed.\nPossible values are:\n- `banking`: Banking / accounts\n- `information`: Data / information\n- `management`: Management of user data\n- `marketplace`: Marketplace / advertisements", - "type" : "string", - "enum" : [ "banking", "information", "management", "marketplace" ] - }, - "UserRegistrationStatusEnum" : { - "description" : "The status of the user after the registration.\nPossible values are:\n- `active`: The user is initially active\n- `emailValidation`: The user has received an e-mail, with a link to verify the e-mail address. Once verified, the registration will be complete\n- `inactive`: The user is initially inactive, and an administrator needs to manually activate the user", - "type" : "string", - "enum" : [ "active", "emailValidation", "inactive" ] - }, - "UserRelationshipEnum" : { - "description" : "How the authenticated user is related to a given user.\nPossible values are:\n- `administrator`: The authenticated user is an administrator that manages the given user\n- `broker`: The authenticated user is a broker of the given user\n- `brokered`: The authenticated user is a member managed by the given broker\n- `none`: There is no special relation between the authenticated user and the given user\n- `owner`: The given user is an operator of the authenticated user\n- `sameOwner`: Both the given user and the authenticated user are operators of the same owner\n- `self`: The given user is the authenticated user", - "type" : "string", - "enum" : [ "administrator", "broker", "brokered", "none", "owner", "sameOwner", "self" ] - }, - "UserStatusEnum" : { - "description" : "The possible statuses for an user.\nPossible values are:\n- `active`: The user is active and can use the system normally.\n- `blocked`: The user has been blocked from accessing the system. Other users still see him/her.\n- `disabled`: The user has been disabled - he/she cannot access the system and is invisible by other users.\n- `pending`: The user registration is pending a confirmation. Probably the user has received an e-mail with a link that must be followed to complete the activation. The user is invisible by other users.\n- `purged`: The user was permanently removed and had all his private data removed. Only transactions are kept for historical reasons.\n- `removed`: The user was permanently removed. It's profile is kept for historical purposes.", - "type" : "string", - "enum" : [ "active", "blocked", "disabled", "pending", "purged", "removed" ] - }, - "UsersWithBalanceOrderByEnum" : { - "description" : "Contains the possible 'order by' values when searching for users with balances.\nPossible values are:\n- `alphabeticallyAsc`: Users are ordered by name (or whatever field is set to format users) in ascending order.\n- `alphabeticallyDesc`: Users are ordered by name (or whatever field is set to format users) in descending order.\n- `balanceAsc`: User are ordered by balance, lower balances first.\n- `balanceDesc`: User are ordered by balance, higher balances first.", - "type" : "string", - "enum" : [ "alphabeticallyAsc", "alphabeticallyDesc", "balanceAsc", "balanceDesc" ] - }, - "VoucherActionEnum" : { - "description" : "Possible actions that could be confirmed with a device for a voucher.\nPossible values are:\n- `cancel`: Cancel the voucher\n- `changeExpiration`: Change the expiration date of a voucher\n- `changeNotificationSettings`: Change the voucher notification settings, including the e-mail the voucher was sent to\n- `changePin`: Change the voucher pin", - "type" : "string", - "enum" : [ "cancel", "changeExpiration", "changeNotificationSettings", "changePin" ] - }, - "VoucherCancelActionEnum" : { - "description" : "Indicates what happens if a voucher is canceled, if it can be canceled.\nPossible values are:\n- `cancelAndRefund`: A single bought voucher is canceled and the amount is refunded\n- `cancelGenerated`: Cancels a single generated voucher\n- `cancelPendingPack`: Cancels more than one bought vouchers whose buy payment is pending authorization\n- `cancelPendingSingle`: Cancels a single bought vouchers whose buy payment is pending authorization", - "type" : "string", - "enum" : [ "cancelAndRefund", "cancelGenerated", "cancelPendingPack", "cancelPendingSingle" ] - }, - "VoucherCreationTypeEnum" : { - "description" : "Indicates how a voucher was created.\nPossible values are:\n- `bought`: The voucher was bought by an user\n- `generated`: The voucher was generated by an administrator\n- `sent`: The voucher was bought by an user and sent to an external user", - "type" : "string", - "enum" : [ "bought", "generated", "sent" ] - }, - "VoucherGenerationAmountEnum" : { - "description" : "Indicates when the amount is set for generated vouchers\nPossible values are:\n- `activation`: Only if the generation status is inactive. The amount is set when the voucher is activated via a top-up. Only a single top-up is allowed.\n- `dynamic`: The voucher amount is dynamic, indicating it can be topped-up multiple times.\n- `generation`: The voucher amount is set when the voucher is generated.", - "type" : "string", - "enum" : [ "activation", "dynamic", "generation" ] - }, - "VoucherGenerationStatusEnum" : { - "description" : "Indicates the initial status on voucher generation\nPossible values are:\n- `active`: Vouchers are initially active, that means their amount is defined at generation time and they are backed by an amount reservation in the system account, unless it is configured to be an unlimited account. That's why it is advised to use a limited system account for vouchers.\n- `blocked`: Vouchers are initially blocked, with no backing units. Once the voucher is unblocked by a user, the corresponding reservation in the system account is done, and the voucher can then be redeemed.\n- `inactive`: Vouchers are initially inactive, with no backing units. The voucher needs to be topped-up in order to be used.", - "type" : "string", - "enum" : [ "active", "blocked", "inactive" ] - }, - "VoucherGiftEnum" : { - "description" : "Indicates if bought vouchers can be / are gift\nPossible values are:\n- `always`: Bought vouchers are always gift\n- `choose`: The user chooses whether vouchers are gift when buying\n- `never`: Bought vouchers are never gift", - "type" : "string", - "enum" : [ "always", "choose", "never" ] - }, - "VoucherOrderByEnum" : { - "description" : "The voucher search result order.\nPossible values are:\n- `creationDateAsc`: Order by creation date, ascending\n- `creationDateDesc`: Order by creation date, descending (default)\n- `expirationDateAsc`: Order by expiration date, ascending\n- `expirationDateDesc`: Order by expiration date, descending\n- `redeemDateAsc`: Deprecated: This value is no longer used in the vouchers search, only in the transactions search.. Order by redeem date, descending\n- `redeemDateDesc`: Deprecated: This value is no longer used in the vouchers search, only in the transactions search.. Order by redeem date, ascending", - "type" : "string", - "x-deprecated-enum" : [ "redeemDateAsc|4.17|This value is no longer used in the vouchers search, only in the transactions search.", "redeemDateDesc|4.17|This value is no longer used in the vouchers search, only in the transactions search." ], - "enum" : [ "creationDateAsc", "creationDateDesc", "expirationDateAsc", "expirationDateDesc", "redeemDateAsc", "redeemDateDesc" ] - }, - "VoucherPinOnActivationEnum" : { - "description" : "Indicates how the voucher PIN is handled when an inactive voucher is activated\nPossible values are:\n- `input`: The PIN is entered in a pinpad / keyboard at the moment the voucher is activated.\n- `none`: The PIN is not handled - it should be delivered to users using other means\n- `send`: The PIN is sent either via e-mail or SMS message (if outbound SMS is enabled). When the voucher is being activated, either e-mail address or mobile phone number are required.", - "type" : "string", - "enum" : [ "input", "none", "send" ] - }, - "VoucherPinStatusForRedeemEnum" : { - "description" : "The voucher PIN status for redeeming.\nPossible values are:\n- `blocked`: The voucher PIN has been temporarily blocked by exceeding attempts.\n- `notUsed`: The voucher PIN is not used for redeems.\n- `required`: The voucher PIN is required for redeems.\n- `subsequent`: The voucher PIN is used only on subsequent redeems, not on the first one. As the current voucher never had a redeem, is not used.", - "type" : "string", - "enum" : [ "blocked", "notUsed", "required", "subsequent" ] - }, - "VoucherRelationEnum" : { - "description" : "The ways a voucher is related to an user.\nPossible values are:\n- `bought`: A voucher the user has bought\n- `redeemed`: A voucher the user has redeemed", - "type" : "string", - "enum" : [ "bought", "redeemed" ] - }, - "VoucherStatusEnum" : { - "description" : "The voucher status.\nPossible values are:\n- `activationExpired`: The voucher was not activated before the deadline.\n- `blocked`: The voucher was generated in blocked status.\n- `canceled`: The voucher was canceled, and cannot be further used.\n- `expired`: The voucher has expired without being redeemed.\n- `inactive`: The voucher was generated in an inactive status and needs to be activated (via top-up) before being redeemed.\n- `open`: The voucher has been generated active or bought, and is open.\n- `pending`: The voucher has been bought, and the corresponding payment is pending for authorization.\n- `redeemed`: The voucher had a fixed amount and was fully redeemed.", - "type" : "string", - "enum" : [ "activationExpired", "blocked", "canceled", "expired", "inactive", "open", "pending", "redeemed" ] - }, - "VoucherTransactionKind" : { - "description" : "A kind of voucher transaction\nPossible values are:\n- `chargeback`: A voucher transaction was charged back\n- `redeem`: A voucher was redeemed, that means there was a payment from system to a user\n- `topUp`: A voucher was topped-up, that means there was a payment from a user to system", - "type" : "string", - "enum" : [ "chargeback", "redeem", "topUp" ] - }, - "WeekDayEnum" : { - "description" : "The days of the week.\nPossible values are:\n- `fri`: Friday\n- `mon`: Monday\n- `sat`: Saturday\n- `sun`: Sunday\n- `thu`: Thursday\n- `tue`: Tuesday\n- `wed`: Wednesday", - "type" : "string", - "enum" : [ "fri", "mon", "sat", "sun", "thu", "tue", "wed" ] - }, - "WizardActionEnum" : { - "description" : "Indicates which kind of action clients should take on the current step.\nPossible values are:\n- `alreadyExecuted`: The step was previously executed and cannot be executed again (probably an external redirect). Clients should show the user a message and the transition actions.\n- `externalRedirect`: The client should prepare the external redirect (`POST /wizard-executions/{key}/redirect`), which will return a URL. Then the user should be redirected to that URL.\n- `finish`: The client should finish the wizard (`POST /wizard-executions/{key}`)\n- `step`: The client should transition to a new step (`POST /wizard-executions/{key}[?transition={t}]`)", - "type" : "string", - "enum" : [ "alreadyExecuted", "externalRedirect", "finish", "step" ] - }, - "WizardKind" : { - "description" : "Indicates the type of a custom wizard.\nPossible values are:\n- `menu`: The wizard is executed on a menu item, even by guests\n- `registration`: The wizard is used to register a user\n- `system`: The wizard is executed by admins\n- `user`: The wizard is executed over a user", - "type" : "string", - "enum" : [ "menu", "registration", "system", "user" ] - }, - "WizardResultTypeEnum" : { - "description" : "Indicates how clients should handle the wizard result.\nPossible values are:\n- `plainText`: The `result` field is returned, and its content is plain text\n- `registration`: The `registrationResult` field is returned, just like a normal user registration would return\n- `richText`: The `result` field is returned, and its content is HTML", - "type" : "string", - "enum" : [ "plainText", "registration", "richText" ] - }, - "WizardStepKind" : { - "description" : "Indicates the type of a custom wizard step.\nPossible values are:\n- `formFields`: Shows custom wizard fields. In a registration wizard, shows any combination of profile fields, password, captcha, agreements, etc\n- `group`: In a registration wizard, shows the selection of the group the user will join\n- `identityProvider`: In a registration wizard, shows the available identity providers for a faster user registration", - "type" : "string", - "enum" : [ "formFields", "group", "identityProvider" ] - }, - "AcceptOrReschedulePaymentRequest" : { - "description" : "Parameters for accepting or rescheduling payment requests.", - "type" : "object", - "properties" : { - "comments" : { - "description" : "A comment the payer can set.", - "type" : "string" - }, - "processDate" : { - "description" : "The date the payment request must be processed.", - "type" : "string", - "format" : "date-time" - } - } - }, - "AcceptOrderByBuyer" : { - "description" : "Parameters used to accept an order by the buyer.", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseOrderAction" - }, { - "type" : "object", - "properties" : { - "paymentType" : { - "description" : "Either the internal name or id of the selected payment type (if any).", - "type" : "string" - } - } - } ] - }, - "AcceptOrderBySeller" : { - "description" : "Parameters used to accept an order by the seller.", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseOrderAction" - }, { - "type" : "object" - } ] - }, - "AcceptedAgreement" : { - "description" : "Holds information about an accepted agreement", - "type" : "object", - "properties" : { - "date" : { - "type" : "string", - "format" : "date-time", - "description" : "The date the agreement was accepted" - }, - "acceptedVersion" : { - "type" : "integer", - "description" : "The version of the agreement that was accepted" - } - } - }, - "Account" : { - "description" : "Contains basic data for an account", - "allOf" : [ { - "$ref" : "#/components/schemas/Entity" - }, { - "type" : "object", - "properties" : { - "number" : { - "description" : "The account number", - "type" : "string" - }, - "type" : { - "description" : "Reference to the account type", - "allOf" : [ { - "$ref" : "#/components/schemas/EntityReference" - } ] - } - } - } ] - }, - "AccountActivityStatus" : { - "description" : "Contains transactions activity information like received, paid and total", - "allOf" : [ { - "$ref" : "#/components/schemas/AccountStatus" - }, { - "type" : "object", - "properties" : { - "transactionsInPeriod" : { - "description" : "Indicates the transactions activity in the last 30 days", - "type" : "integer" - }, - "transactionsAllTime" : { - "description" : "Indicates the transactions activity all time", - "type" : "integer" - }, - "receivedInPeriod" : { - "description" : "Indicates the total received in last the last 30 days", - "type" : "string", - "format" : "number" - }, - "receivedAllTime" : { - "description" : "Indicates the total received all time", - "type" : "string", - "format" : "number" - }, - "paidInPeriod" : { - "description" : "Indicates the total paid in last the last 30 days", - "type" : "string", - "format" : "number" - }, - "paidAllTime" : { - "description" : "Indicates the total paid all time", - "type" : "string", - "format" : "number" - } - } - } ] - }, - "AccountBalanceEntry" : { - "description" : "Contains the balance on a given date", - "type" : "object", - "properties" : { - "date" : { - "description" : "The balance date", - "type" : "string", - "format" : "date-time" - }, - "amount" : { - "description" : "The balance", - "type" : "string", - "format" : "number" - } - } - }, - "AccountBalanceHistoryResult" : { - "description" : "The result for an account balance history request", - "allOf" : [ { - "$ref" : "#/components/schemas/Entity" - }, { - "type" : "object", - "properties" : { - "account" : { - "$ref" : "#/components/schemas/AccountWithHistoryStatus" - }, - "interval" : { - "description" : "The actually used interval between data points. Specially useful when no interval is passed as parameter, and one is assumed.", - "allOf" : [ { - "$ref" : "#/components/schemas/TimeInterval" - } ] - }, - "balances" : { - "description" : "Each data point", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/AccountBalanceEntry" + }, + "/{user}/unanswered-questions": { + "get": { + "operationId": "searchUnansweredAdQuestions", + "summary": "Searches for unanswered questions for a specific user", + "description": "Searches for unanswered questions for a specific user (currently `self` only is supported), if a type is not given then `simple` will be used. Only if the user has the ad / webshop questions enabled and the authenticated user can manage ads / webshops of the given user.", + "tags": [ + "AdQuestions" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/user" + }, + { + "name": "kind", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/AdKind" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number (zero-based) of the search. The default value is zero.", + "schema": { + "type": "integer" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", + "schema": { + "type": "integer" + } + }, + { + "name": "skipTotalCount", + "in": "query", + "required": false, + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "Returns the unanswered questions.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AdQuestionResult" + } + } } } - } - } ] - }, - "AccountBalanceLimitsData" : { - "description" : "Data regarding the lower and upper limits of a user account.", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseAccountBalanceLimits" - }, { - "type" : "object", - "properties" : { - "account" : { - "$ref" : "#/components/schemas/AccountWithCurrency" - }, - "user" : { - "$ref" : "#/components/schemas/User" - }, - "editable" : { - "description" : "Can the authenticated user manage the limits of this account?", - "type" : "boolean" - }, - "defaultCreditLimit" : { - "description" : "The default credit limit from the user products.", - "type" : "string", - "format" : "number" - }, - "defaultUpperCreditLimit" : { - "description" : "The default upper credit limit from the user products.", - "type" : "string", - "format" : "number" - }, - "history" : { - "description" : "The history of balance limit changes.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/AccountBalanceLimitsLog" - } - }, - "confirmationPasswordInput" : { - "description" : "If a confirmation password is used, contains the definitions on how to request that password from the user. This confirmation password is required when performing sensible actions. Sometimes this is dynamic, for example, the confirmation might be configured to be used only once per session, or operations like payments may have a limit per day to be without confirmation (pinless).", - "allOf" : [ { - "$ref" : "#/components/schemas/PasswordInput" - } ] - } - } - } ] - }, - "AccountBalanceLimitsLog" : { - "description" : "Log of a balance limits change", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseAccountBalanceLimits" - }, { - "type" : "object", - "properties" : { - "by" : { - "$ref" : "#/components/schemas/User" - }, - "date" : { - "description" : "The date the limit change was performed", - "type" : "string", - "format" : "date-time" - }, - "comment" : { - "description" : "Comments supplied by the manager that performed the limit change.", - "type" : "string" - } - } - } ] - }, - "AccountBalanceLimitsQueryFilters" : { - "description" : "Parameters for searching account balance limits", - "allOf" : [ { - "$ref" : "#/components/schemas/QueryFilters" - }, { - "type" : "object", - "properties" : { - "currency" : { - "description" : "Either id or internal name of the currency", - "type" : "string" - }, - "accountType" : { - "description" : "Either id or internal name of the account type", - "type" : "string" - }, - "groups" : { - "description" : "Either the ids or internal names of user group", - "type" : "array", - "items" : { - "type" : "string" - } - }, - "brokers" : { - "description" : "Either the ids or identification methods of users' broker", - "type" : "array", - "items" : { - "type" : "string" + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } } - }, - "user" : { - "description" : "Either the id or identifier of the account owner", - "type" : "string" - }, - "by" : { - "description" : "Either the id or identifier of the user that performed the change", - "type" : "string" - }, - "customLimit" : { - "description" : "When set, returns only accounts that have a custom (if true) or have default (false) lower limit.", - "type" : "boolean" - }, - "customLimitRange" : { - "description" : "The minimum / maximum customized limit. Is only used when `customLimit` is set to true. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "type" : "array", - "items" : { - "type" : "string", - "format" : "number" + } + }, + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } } - }, - "customUpperLimit" : { - "description" : "When set, returns only accounts that have a custom (if true) or have default (false) upper limit.", - "type" : "boolean" - }, - "customUpperLimitRange" : { - "description" : "The minimum / maximum customized upper limit. Is only used when `customUpperLimit` is set to true. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "type" : "array", - "items" : { - "type" : "string", - "format" : "number" - } - } - } - } ] - }, - "AccountBalanceLimitsResult" : { - "description" : "Result for the list of user account balance limits", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseAccountBalanceLimits" - }, { - "type" : "object", - "properties" : { - "account" : { - "$ref" : "#/components/schemas/AccountWithCurrency" - } - } - } ] - }, - "AccountHistoryQueryFilters" : { - "description" : "Parameters for searching an account's history", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseTransferQueryFilters" - }, { - "type" : "object", - "properties" : { - "customFields" : { - "type" : "array", - "items" : { - "type" : "string" - }, - "description" : "Transaction custom field values used as filters. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by : (colon). For example, `customFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, customFields=field1:valueA|valueB. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `customFields=rank:bronze|silver,documentDate:2000-01-01|2001-12-31` would match results whose custom field with internal name `rank` is either `bronze` or `silver`, and whose `documentDate` is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `customFields=documentDate:|2001-12-31`.\nA note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `customFields=dynamic:a|b|c`. However, it is also possible to perform a partial-match search using the dynamic value label. In this case a single value, prefixed or enclosed by single quotes should be used. For example: `customFields=dynamic:'business` or `customFields=dynamic:'business'`." - }, - "direction" : { - "$ref" : "#/components/schemas/TransferDirectionEnum" - }, - "description" : { - "description" : "The description to search for.", - "type" : "string" - } - } - } ] - }, - "AccountHistoryResult" : { - "description" : "Represents a balance transfer between accounts, as viewed from the point-of-view account of a a specific account. This means that credits will have a positive amount, while debits will be negative.", - "allOf" : [ { - "$ref" : "#/components/schemas/TransResult" - }, { - "type" : "object", - "properties" : { - "relatedAccount" : { - "description" : "The account that either received / sent the balance", - "allOf" : [ { - "$ref" : "#/components/schemas/AccountWithOwner" - } ] - }, - "relatedName" : { - "description" : "Contains an optional custom from / to name, which can be set when the transaction is performed.", - "type" : "string" - }, - "customValues" : { - "type" : "object", - "description" : "Holds the custom field values, keyed by field internal name or id. The format of the value depends on the custom field type. In order to lookup the custom fields, use the `GET /{owner}/accounts/{accountType}/data-for-history` operation, and lookup each field by either internal name (if configured) or id. Example: `{..., \"customValues\": {\"linkedAccount\": \"123456789\"}}`", - "additionalProperties" : { - "type" : "string" + } + }, + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } } - }, - "transaction" : { - "description" : "If this balance transfer was originated from a transaction (like a payment or scheduled payment), contains the a simple reference to this transaction.\nWARNING: The only fields that will be filled-in are `id`, `transactionNumber` and `kind`.", - "allOf" : [ { - "$ref" : "#/components/schemas/Transaction" - } ] - }, - "statuses" : { - "description" : "contains the current status internal name or id, keyed by the flow internal name or id", - "type" : "object", - "additionalProperties" : { - "type" : "string" - } - } - } - } ] - }, - "AccountHistoryStatus" : { - "description" : "Contains instant status information, as inherited from `AccountStatus`, plus status that depend on an account history query parameters", - "allOf" : [ { - "$ref" : "#/components/schemas/AccountStatus" - }, { - "type" : "object", - "properties" : { - "beginDate" : { - "description" : "The reference begin date", - "type" : "string", - "format" : "date-time" - }, - "balanceAtBegin" : { - "description" : "The raw balance at the beginning of the informed period", - "type" : "string", - "format" : "number" - }, - "endDate" : { - "description" : "The reference end date", - "type" : "string", - "format" : "date-time" - }, - "balanceAtEnd" : { - "description" : "The raw balance at the end of the informed period", - "type" : "string", - "format" : "number" - }, - "incoming" : { - "description" : "The summary of incoming transfers", - "allOf" : [ { - "$ref" : "#/components/schemas/AmountSummary" - } ] - }, - "outgoing" : { - "description" : "The summary of outgoing transfers", - "allOf" : [ { - "$ref" : "#/components/schemas/AmountSummary" - } ] - }, - "netInflow" : { - "description" : "The raw difference between incoming and outgoing transfers in the informed period", - "type" : "string", - "format" : "number" - } - } - } ] - }, - "AccountNotificationSettings" : { - "description" : "Settings regarding notifications for a given account", - "type" : "object", - "properties" : { - "paymentAmount" : { - "description" : "The minimum / maximum amount for payment notifications to be sent", - "allOf" : [ { - "$ref" : "#/components/schemas/DecimalRange" - } ] - } - } - }, - "AccountNotificationSettingsView" : { - "description" : "Settings regarding notifications for a given account", - "allOf" : [ { - "$ref" : "#/components/schemas/AccountNotificationSettings" - }, { - "type" : "object", - "properties" : { - "accountType" : { - "$ref" : "#/components/schemas/AccountType" - } - } - } ] - }, - "AccountPaymentLimitsData" : { - "description" : "Data regarding the payment, daily, weekly, monthly and yearly amount limits of a user account.", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseAccountPaymentLimits" - }, { - "type" : "object", - "properties" : { - "account" : { - "$ref" : "#/components/schemas/AccountWithCurrency" - }, - "user" : { - "$ref" : "#/components/schemas/User" - }, - "editable" : { - "description" : "Can the authenticated user manage the payment limits of this account?", - "type" : "boolean" - }, - "productAmountLimit" : { - "description" : "The payment amount limit from the user products.", - "type" : "string", - "format" : "number" - }, - "productAmountPerDayLimit" : { - "description" : "The payment amount per day limit from the user products.", - "type" : "string", - "format" : "number" - }, - "productAmountPerWeekLimit" : { - "description" : "The payment amount per week limit from the user products.", - "type" : "string", - "format" : "number" - }, - "productAmountPerMonthLimit" : { - "description" : "The payment amount per month limit from the user products.", - "type" : "string", - "format" : "number" - }, - "productAmountPerYearLimit" : { - "description" : "The payment amount per year limit from the user products.", - "type" : "string", - "format" : "number" - }, - "history" : { - "description" : "The history of payment limits changes.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/AccountPaymentLimitsLog" + } + }, + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } } - }, - "confirmationPasswordInput" : { - "description" : "If a confirmation password is used, contains the definitions on how to request that password from the user. This confirmation password is required when performing sensible actions. Sometimes this is dynamic, for example, the confirmation might be configured to be used only once per session, or operations like payments may have a limit per day to be without confirmation (pinless).", - "allOf" : [ { - "$ref" : "#/components/schemas/PasswordInput" - } ] - } - } - } ] - }, - "AccountPaymentLimitsLog" : { - "description" : "Log of a payment limits change", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseAccountPaymentLimits" - }, { - "type" : "object", - "properties" : { - "by" : { - "$ref" : "#/components/schemas/User" - }, - "date" : { - "description" : "The date the limit change was performed", - "type" : "string", - "format" : "date-time" - }, - "comment" : { - "description" : "Comments supplied by the manager that performed the limit change.", - "type" : "string" - } - } - } ] - }, - "AccountPaymentLimitsQueryFilters" : { - "description" : "Parameters for searching account payment limits", - "allOf" : [ { - "$ref" : "#/components/schemas/QueryFilters" - }, { - "type" : "object", - "properties" : { - "currency" : { - "description" : "Either id or internal name of the currency", - "type" : "string" - }, - "accountType" : { - "description" : "Either id or internal name of the account type", - "type" : "string" - }, - "groups" : { - "description" : "Either the ids or internal names of user group", - "type" : "array", - "items" : { - "type" : "string" + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } } - }, - "brokers" : { - "description" : "Either the ids or identification methods of users' broker", - "type" : "array", - "items" : { - "type" : "string" + } + } + } + } + }, + "/shopping-carts": { + "get": { + "operationId": "getShoppingCarts", + "summary": "Returns the shopping carts list.", + "description": "Returns the shopping carts for the authenticated user. Each cart contains all webshop ads offered by the same seller and in the same currency.", + "tags": [ + "ShoppingCarts" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The shopping carts list.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShoppingCartResult" + } + } } - }, - "user" : { - "description" : "Either the id or identifier of the account owner", - "type" : "string" - }, - "by" : { - "description" : "Either the id or identifier of the user that performed the change", - "type" : "string" - }, - "customAmountLimit" : { - "description" : "When set, returns only accounts that have a custom (if true) or have default (false) payment amount limit.", - "type" : "boolean" - }, - "customAmountLimitRange" : { - "description" : "The minimum / maximum customized payment amount limit. Is only used when `customAmountLimit` is set to true. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "type" : "array", - "items" : { - "type" : "string", - "format" : "number" + } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } } - }, - "customAmountPerDayLimit" : { - "description" : "When set, returns only accounts that have a custom (if true) or have default (false) payment amount per day limit.", - "type" : "boolean" - }, - "customAmountPerDayLimitRange" : { - "description" : "The minimum / maximum customized payment amount per day limit. Is only used when `customAmountPerDayLimit` is set to true. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "type" : "array", - "items" : { - "type" : "string", - "format" : "number" + } + }, + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } } - }, - "customAmountPerWeekLimit" : { - "description" : "When set, returns only accounts that have a custom (if true) or have default (false) payment amount per week limit.", - "type" : "boolean" - }, - "customAmountPerWeekLimitRange" : { - "description" : "The minimum / maximum customized payment amount per week limit. Is only used when `customAmountPerWeekLimit` is set to true. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "type" : "array", - "items" : { - "type" : "string", - "format" : "number" + } + }, + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } } - }, - "customAmountPerMonthLimit" : { - "description" : "When set, returns only accounts that have a custom (if true) or have default (false) payment amount per month limit.", - "type" : "boolean" - }, - "customAmountPerMonthLimitRange" : { - "description" : "The minimum / maximum customized payment amount per month limit. Is only used when `customAmountPerMonthLimit` is set to true. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "type" : "array", - "items" : { - "type" : "string", - "format" : "number" + } + }, + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } } - }, - "customAmountPerYearLimit" : { - "description" : "When set, returns only accounts that have a custom (if true) or have default (false) payment amount per year limit.", - "type" : "boolean" - }, - "customAmountPerYearLimitRange" : { - "description" : "The minimum / maximum customized payment amount per year limit. Is only used when `customAmountPerYearLimit` is set to true. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "type" : "array", - "items" : { - "type" : "string", - "format" : "number" + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } } } } - } ] - }, - "AccountPaymentLimitsResult" : { - "description" : "Result for the list of user account payment limits", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseAccountPaymentLimits" - }, { - "type" : "object", - "properties" : { - "account" : { - "$ref" : "#/components/schemas/AccountWithCurrency" - } + } + } + }, + "/shopping-carts/{id}": { + "get": { + "operationId": "getShoppingCartDetails", + "summary": "Returns details of a shopping cart.", + "description": "Returns the details of a shopping cart by id with all webshop ads offered by the same seller and in the same currency.", + "tags": [ + "ShoppingCarts" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] } - } ] - }, - "AccountPermissions" : { - "description" : "Permissions over an account", - "type" : "object", - "properties" : { - "account" : { - "$ref" : "#/components/schemas/AccountWithCurrency" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" }, - "visible" : { - "description" : "Whether the account also is visible for the logged user or, if false means it is only accessible. A non visible account still is operative, i.e the user could make/receive payments from/to it (i.e is accessible) but can not make a transfers history search for it.", - "type" : "boolean" + { + "$ref": "#/components/parameters/id" + } + ], + "responses": { + "200": { + "description": "The shopping cart details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ShoppingCartView" + } + } + } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } + } }, - "viewStatus" : { - "description" : "Indicates whether the logged user can see the account status for this account. Some restricted operators can view the account history, but not the account status (balance and so on).", - "type" : "boolean" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } + } }, - "systemPayments" : { - "description" : "Payment types allowed to be performed to system accounts.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/RelatedTransferType" - } - }, - "userPayments" : { - "description" : "Payment types allowed to be performed to other users", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/RelatedTransferType" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } } }, - "selfPayments" : { - "description" : "Payment types allowed to be performed to other self accounts. Only returned for user accounts.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/RelatedTransferType" - } - }, - "posPayments" : { - "description" : "Payment types allowed to be used on POS (receive payments from other users). Only returned for user accounts.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/RelatedTransferType" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } } - } - } - }, - "AccountStatus" : { - "description" : "Status information for an account", - "type" : "object", - "properties" : { - "balance" : { - "description" : "The raw account balance", - "type" : "string", - "format" : "number" }, - "creditLimit" : { - "description" : "The maximum negative balance an account may get", - "type" : "string", - "format" : "number" - }, - "upperCreditLimit" : { - "description" : "The maximum positive balance an account may get", - "type" : "string", - "format" : "number" - }, - "reservedAmount" : { - "description" : "The reserved amount is part of the raw balance, but cannot be used for payments because of some other events, like payments pending authorization, confirmed webshop orders, scheduled payments (when configured to reserve the total amount) and so on.", - "type" : "string", - "format" : "number" - }, - "availableBalance" : { - "description" : "The available balance to be used, taking into account the raw balance, credit limit and reserved amount", - "type" : "string", - "format" : "number" - }, - "negativeSince" : { - "description" : "If the account is negative, contains the date since it became so", - "type" : "string", - "format" : "date-time" - }, - "aRate" : { - "description" : "The balance aging counter", - "type" : "string", - "format" : "number" - }, - "dRate" : { - "description" : "The balance maturity", - "type" : "string", - "format" : "number" - }, - "rateBalanceCorrection" : { - "type" : "string", - "format" : "number" - }, - "virtualRatedBalance" : { - "type" : "string", - "format" : "number" - } - } - }, - "AccountType" : { - "description" : "A reference for the account type, together with its currency", - "allOf" : [ { - "$ref" : "#/components/schemas/InternalNamedEntity" - }, { - "type" : "object", - "properties" : { - "currency" : { - "$ref" : "#/components/schemas/Currency" - } - } - } ] - }, - "AccountTypeWithDefaultMediumBalanceRange" : { - "description" : "A reference for the account type, together with its currency and its default medium balance range", - "allOf" : [ { - "$ref" : "#/components/schemas/AccountType" - }, { - "type" : "object", - "properties" : { - "defaultMediumBalanceRange" : { - "description" : "The minimum and maximum default medium balance range specified in the account type. If it is present, both values are not null.", - "allOf" : [ { - "$ref" : "#/components/schemas/IntegerRange" - } ] - } - } - } ] - }, - "AccountWithCurrency" : { - "description" : "Contains account data, plus currency reference", - "allOf" : [ { - "$ref" : "#/components/schemas/Account" - }, { - "type" : "object", - "properties" : { - "currency" : { - "$ref" : "#/components/schemas/Currency" - } - } - } ] - }, - "AccountWithHistoryStatus" : { - "description" : "Account data plus account history status information", - "allOf" : [ { - "$ref" : "#/components/schemas/AccountWithOwnerAndCurrency" - }, { - "type" : "object", - "properties" : { - "status" : { - "$ref" : "#/components/schemas/AccountHistoryStatus" - } - } - } ] - }, - "AccountWithOwner" : { - "description" : "Contains account data, plus account owner reference", - "allOf" : [ { - "$ref" : "#/components/schemas/Account" - }, { - "type" : "object", - "properties" : { - "user" : { - "description" : "Only returned if `kind` is `user`. Is a reference to the owner user.", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "kind" : { - "$ref" : "#/components/schemas/AccountKind" - } - } - } ] - }, - "AccountWithOwnerAndCurrency" : { - "description" : "Contains account data, plus owner and currency reference", - "allOf" : [ { - "$ref" : "#/components/schemas/AccountWithOwner" - }, { - "type" : "object", - "properties" : { - "currency" : { - "$ref" : "#/components/schemas/Currency" - } - } - } ] - }, - "AccountWithStatus" : { - "description" : "Account data plus status information", - "allOf" : [ { - "$ref" : "#/components/schemas/AccountWithCurrency" - }, { - "type" : "object", - "properties" : { - "status" : { - "$ref" : "#/components/schemas/AccountActivityStatus" - } - } - } ] - }, - "ActivateClientResult" : { - "description" : "Data about an access client activation", - "type" : "object", - "properties" : { - "token" : { - "description" : "The generated access client token. It should be passed using the `Access-Client-Token` header. If a prefix was informed on activation, it will not be returned, here, but should be sent prepending the returned token", - "type" : "string" - }, - "accessClient" : { - "description" : "A reference to the activated access client", - "allOf" : [ { - "$ref" : "#/components/schemas/EntityReference" - } ] - }, - "accessClientType" : { - "description" : "A reference to the access client type", - "allOf" : [ { - "$ref" : "#/components/schemas/EntityReference" - } ] - } - } - }, - "ActivateGiftVoucher" : { - "description" : "Parameters for activating a gift voucher with PIN", - "type" : "object", - "properties" : { - "pin" : { - "$ref" : "#/components/schemas/SimpleChangeVoucherPin" - }, - "notification" : { - "$ref" : "#/components/schemas/ChangeVoucherNotificationSettings" - } - } - }, - "Ad" : { - "description" : "Basic information common for advertisements and webshops", - "allOf" : [ { - "$ref" : "#/components/schemas/NamedEntity" - }, { - "type" : "object", - "properties" : { - "image" : { - "description" : "The primary advertisement image", - "allOf" : [ { - "$ref" : "#/components/schemas/Image" - } ] - }, - "kind" : { - "$ref" : "#/components/schemas/AdKind" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } } } - } ] + } }, - "AdBasicData" : { - "description" : "Contains data shared by both AdDataForNew and AdDataForEdit", - "type" : "object", - "properties" : { - "customFields" : { - "description" : "The possible editable advertisement custom fields", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/CustomFieldDetailed" + "delete": { + "operationId": "removeShoppingCart", + "summary": "Removes a shopping cart.", + "description": "Removes the given shopping cart by id and returns the total number of the webshop ads in the remaining all carts.", + "tags": [ + "ShoppingCarts" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/id" + } + ], + "responses": { + "200": { + "description": "The shopping cart was removed. Returns the total number of the webshop ads in all the remaining shopping carts.", + "content": { + "application/json": { + "schema": { + "type": "integer" + } + } + } + }, + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" + } + } } }, - "requiresAuthorization" : { - "description" : "Indicates whether advertisements require an authorization from the administration in order to be published for other users to see", - "type" : "boolean" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } + } }, - "canCreateNew" : { - "description" : "Indicates whether the user can create a new advertisement (if not reached max setting)", - "type" : "boolean" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } + } }, - "maxCategoriesPerAd" : { - "description" : "Indicates if user can select single or multiples categories per advertisement", - "type" : "integer" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } }, - "maxImages" : { - "description" : "Indicates the maximum amount of images the user can upload for an advertisement", - "type" : "integer" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } + } }, - "categories" : { - "description" : "The advertisement categories each with its children, forming a tree", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/AdCategoryWithChildren" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } } + } + } + } + }, + "/shopping-carts/{id}/adjust": { + "post": { + "operationId": "adjustAndGetShoppingCartDetails", + "summary": "Adjusts a shopping cart items, returning its details.", + "description": "Works like `GET /shopping-carts/{id}`, but first adjusts the status of all items. For each item checks both the availability and the quantity, setting to corresponding `availability` or `quantityAdjustment` property if anything was modified.", + "tags": [ + "ShoppingCarts" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" }, - "addresses" : { - "description" : "The public addresses of the advertisement owner, so specific ones can be linked to the advertisement.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Address" + { + "$ref": "#/components/parameters/id" + } + ], + "responses": { + "200": { + "description": "The shopping cart details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ShoppingCartView" + } + } } }, - "currencies" : { - "description" : "The currencies the authenticated user may use to specify the advertisement price", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Currency" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } } }, - "kind" : { - "description" : "The advertisement kind this data is related to.", - "allOf" : [ { - "$ref" : "#/components/schemas/AdKind" - } ] + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } + } }, - "user" : { - "description" : "The user which owns the advertisement", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } }, - "webshopSettings" : { - "$ref" : "#/components/schemas/WebshopSettings" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } + } }, - "deliveryMethods" : { - "description" : "The available delivery methods. Only for webshops.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/DeliveryMethod" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } } } } - }, - "AdCategoryWithChildren" : { - "description" : "An advertisement category, together with its children", - "allOf" : [ { - "$ref" : "#/components/schemas/InternalNamedEntity" - }, { - "type" : "object", - "properties" : { - "image" : { - "$ref" : "#/components/schemas/Image" - }, - "svgIcon" : { - "description" : "The name of the SVG icon. The content of the icon can be obtained with `GET /images/svg/{name}.svg`", - "type" : "string" - }, - "svgIconColor" : { - "description" : "The color to display the icon", - "type" : "string" - }, - "children" : { - "description" : "The child categories", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/AdCategoryWithChildren" - } - } - } - } ] - }, - "AdCategoryWithParent" : { - "description" : "An advertisement category, together with its parent", - "allOf" : [ { - "$ref" : "#/components/schemas/InternalNamedEntity" - }, { - "type" : "object", - "properties" : { - "parent" : { - "$ref" : "#/components/schemas/AdCategoryWithParent" - } - } - } ] - }, - "AdDataForEdit" : { - "description" : "Contains data for editing a new advertisement", - "allOf" : [ { - "$ref" : "#/components/schemas/AdBasicData" - }, { - "type" : "object", - "properties" : { - "status" : { - "$ref" : "#/components/schemas/AdStatusEnum" - }, - "canEdit" : { - "type" : "boolean", - "description" : "Indicates whether the current ad can be edited by the currently authenticated used." - }, - "canRemove" : { - "type" : "boolean", - "description" : "Indicates whether the current ad can be removed by the currently authenticated used." - }, - "creationDate" : { - "description" : "The creation date the advertisement was created", - "type" : "string", - "format" : "date-time" - }, - "advertisement" : { - "description" : "The advertisement that is being edited", - "allOf" : [ { - "$ref" : "#/components/schemas/AdEdit" - } ] - }, - "binaryValues" : { - "description" : "Holds the current values for file / image custom fields as lists of `StoredFile`s / `Image`s.", - "allOf" : [ { - "$ref" : "#/components/schemas/CustomFieldBinaryValues" - } ] - } - } - } ] - }, - "AdDataForNew" : { - "description" : "Contains data for creating a new advertisement", - "allOf" : [ { - "$ref" : "#/components/schemas/AdBasicData" - }, { - "type" : "object", - "properties" : { - "advertisement" : { - "description" : "The advertisement that is being created", - "allOf" : [ { - "$ref" : "#/components/schemas/AdNew" - } ] - } - } - } ] - }, - "AdDataForSearch" : { - "description" : "Data for a general search of advertisements", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseAdDataForSearch" - }, { - "type" : "object", - "properties" : { - "groups" : { - "description" : "The groups the authenticated user can use to filter users. Admins can always filter by groups, while users depend on a permission, which can be to only view group sets, only groups or none.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Group" + } + }, + "/shopping-carts/items/{ad}": { + "post": { + "operationId": "addItemToShoppingCart", + "summary": "Adds the given webshop ad to the corresponding shopping cart.", + "description": "Adds the given webshop ad to the corresponding shopping cart according to the seller and currency and returns the total number of webshop ads in all carts. Optionally a quantity can be specified. The different shopping carts are created dynamically according to the seller and currency.\nE.g if the user adds the following webshop ads (i.e items):\n- 1 from Seller1 in Dolars;\n- 2 from Seller1 in Euros;\n- 1 from Seller2 un Dolars.\n\nThen the following three carts will be created for the authenticated user:\n\n- 1 cart containing 1 item offered by Seller1 in Dolars;\n- 1 cart containing 2 items offered by Seller1 in Euros;\n- 1 cart containing 1 item offered by Seller2 in Dolars.\n\nFinally, the total number of wbshop ads returned will be 4. For those quantity-limited products the given quantity could have been adjusted to meet the restrictions. You can view the adjustment applied to each item when retrieving the details of a shopping cart. if you want to remove the adjustment just send a new request to modify the quantity (using `PUT /shopping-carts/items/{ad}`) and specify the current quantity (i.e the already adjusted and returned in the details of the shopping cart) as the parameter.", + "tags": [ + "ShoppingCarts" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/ad" + }, + { + "name": "quantity", + "in": "query", + "required": false, + "description": "The quantity being added. It could be a decimal number only if the corresponding webshop ad allows it.", + "schema": { + "type": "number", + "format": "double" + } + } + ], + "responses": { + "200": { + "description": "Returns the total number of webshop ads present in all the shopping carts.", + "content": { + "application/json": { + "schema": { + "type": "integer" + } } - }, - "hidePrice" : { - "description" : "Indicates whether show or not the advertisements price to guests", - "type" : "boolean" - }, - "hideOwner" : { - "description" : "Indicates whether show or not the advertisements owner to guests", - "type" : "boolean" - }, - "query" : { - "description" : "Default query filters to search advertisements", - "allOf" : [ { - "$ref" : "#/components/schemas/AdQueryFilters" - } ] - }, - "resultType" : { - "description" : "Indicates the type for customizable results like tiles, list, etc", - "allOf" : [ { - "$ref" : "#/components/schemas/ResultTypeEnum" - } ] - }, - "adInitialSearchType" : { - "description" : "Indicates which initial search is performed, either by displaying ads or displaying categories", - "allOf" : [ { - "$ref" : "#/components/schemas/AdInitialSearchTypeEnum" - } ] - } - } - } ] - }, - "AdDetailed" : { - "x-abstract" : true, - "description" : "Contains data which is common for `AdResult` and `AdView`", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseAdDetailed" - }, { - "type" : "object", - "properties" : { - "description" : { - "description" : "The advertisement description content, formatted as HTML", - "type" : "string" - }, - "user" : { - "description" : "The user which owns this ad", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "publicationPeriod" : { - "$ref" : "#/components/schemas/DatePeriod" - }, - "stockQuantity" : { - "description" : "The stock disponibility. Only if `unlimitedStock` is false and the 'Stock type' was not marked as 'Not available' (through the web interface).", - "type" : "string", - "format" : "number" - }, - "unlimitedStock" : { - "description" : "If true then it means there is always disponibility of the webshop ad.", - "type" : "boolean" - }, - "maxAllowedInCart" : { - "description" : "The maximum quantity that can be specified in the shopping cart.", - "type" : "string", - "format" : "number" - }, - "minAllowedInCart" : { - "description" : "The minimum quantity that can be specified in the shopping cart.", - "type" : "string", - "format" : "number" - }, - "promotionalPrice" : { - "description" : "The promotional price, to be applied on the promotional period is active", - "type" : "string", - "format" : "number" - } - } - } ] - }, - "AdEdit" : { - "description" : "Parameters for editing an existing advertisement", - "allOf" : [ { - "$ref" : "#/components/schemas/AdManage" - }, { - "type" : "object", - "properties" : { - "version" : { - "type" : "integer", - "description" : "The version stamp for the current object, used for optimistic locking. When saving, the same version as previously received needs to be passed back. If no one else has saved the object, the version will match and the object will be updated. However, if someone other has saved the object, the version will no longer match, and an error will be raised. This is used to prevent multiple users (or processes) from updating the same object and unwilingly overridding the property values, leading to data loss." - } - } - } ] - }, - "AdInterest" : { - "description" : "Reference to an advertisement interest", - "allOf" : [ { - "$ref" : "#/components/schemas/NamedEntity" - } ] - }, - "AdInterestBasicData" : { - "description" : "Contains data shared by both AdInterestDataForNew and AdInterestDataForEdit", - "type" : "object", - "properties" : { - "user" : { - "description" : "Reference to the owner of the advertisement interest", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "categories" : { - "description" : "Contains the list of possible categories for the advertisement interest", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/AdCategoryWithChildren" - } - }, - "currencies" : { - "description" : "Contains the list of possible currencies for the advertisement interest", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Currency" - } - } - } - }, - "AdInterestDataForEdit" : { - "description" : "Contains data for editing an exinsting advertisement interest", - "allOf" : [ { - "$ref" : "#/components/schemas/AdInterestBasicData" - }, { - "type" : "object", - "properties" : { - "canEdit" : { - "description" : "Can the authenticated user edit this advertisement interest?", - "type" : "boolean" - }, - "canRemove" : { - "description" : "Can the authenticated user remove this advertisement interest?", - "type" : "boolean" - }, - "adInterest" : { - "description" : "The advertisement interest populated with the current fields. This value can be modified and sent back on `PUT /marketplace-interest/{id}`.", - "allOf" : [ { - "$ref" : "#/components/schemas/AdInterestEdit" - } ] - } - } - } ] - }, - "AdInterestDataForNew" : { - "description" : "Contains data for creating a new advertisement interest", - "allOf" : [ { - "$ref" : "#/components/schemas/AdInterestBasicData" - }, { - "type" : "object", - "properties" : { - "adInterest" : { - "description" : "The advertisement interest populated with the default fields. This value can be modified and sent back on `POST /{user}/marketplace-interest`.", - "allOf" : [ { - "$ref" : "#/components/schemas/AdInterestNew" - } ] - } - } - } ] - }, - "AdInterestEdit" : { - "description" : "Fields for modifying an advertisement interest.", - "allOf" : [ { - "$ref" : "#/components/schemas/AdInterestManage" - }, { - "type" : "object", - "properties" : { - "version" : { - "type" : "integer", - "description" : "The version stamp for the current object, used for optimistic locking. When saving, the same version as previously received needs to be passed back. If no one else has saved the object, the version will match and the object will be updated. However, if someone other has saved the object, the version will no longer match, and an error will be raised. This is used to prevent multiple users (or processes) from updating the same object and unwilingly overridding the property values, leading to data loss." - } - } - } ] - }, - "AdInterestManage" : { - "description" : "Common fields for either creating or editing an advertisement interest", - "type" : "object", - "x-abstract" : true, - "properties" : { - "name" : { - "description" : "The name identifying this advertisement interest.", - "type" : "string" - }, - "kind" : { - "description" : "The kind of advertisements.", - "allOf" : [ { - "$ref" : "#/components/schemas/AdKind" - } ] - }, - "category" : { - "description" : "Either internal name or id of the advertisements category.", - "type" : "string" - }, - "keywords" : { - "type" : "array", - "items" : { - "type" : "string" - }, - "description" : "A set of keywords to match advertisements." - }, - "currency" : { - "description" : "Either internal name or id of the currency for price range.", - "type" : "string" - }, - "minPrice" : { - "description" : "Minimum price for advertisements.", - "type" : "string", - "format" : "number" - }, - "maxPrice" : { - "description" : "Maximum price for advertisements.", - "type" : "string", - "format" : "number" - }, - "user" : { - "description" : "Either internal id or other accepted identification (username, e-mail, etc) for the user to watch advertisements", - "type" : "string" - } - } - }, - "AdInterestNew" : { - "description" : "Fields for a new advertisement interest.", - "allOf" : [ { - "$ref" : "#/components/schemas/AdInterestManage" - } ] - }, - "AdInterestView" : { - "description" : "Details of an advertisement interest", - "allOf" : [ { - "$ref" : "#/components/schemas/AdInterest" - }, { - "type" : "object", - "properties" : { - "kind" : { - "description" : "The kind of advertisements.", - "allOf" : [ { - "$ref" : "#/components/schemas/AdKind" - } ] - }, - "category" : { - "description" : "The advertisements category.", - "allOf" : [ { - "$ref" : "#/components/schemas/AdCategoryWithParent" - } ] - }, - "keywords" : { - "type" : "array", - "items" : { - "type" : "string" - }, - "description" : "Set of keywords to match advertisements." - }, - "currency" : { - "description" : "Currency for the price range.", - "allOf" : [ { - "$ref" : "#/components/schemas/Currency" - } ] - }, - "minPrice" : { - "description" : "Minimum price for advertisements.", - "type" : "string", - "format" : "number" - }, - "maxPrice" : { - "description" : "Maximum price for advertisements.", - "type" : "string", - "format" : "number" - }, - "adUser" : { - "description" : "Owner of advertisements", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "user" : { - "description" : "Owner of this advertisement interest", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "canEdit" : { - "description" : "Can the authenticated user edit this advertisement interest?", - "type" : "boolean" - }, - "canRemove" : { - "description" : "Can the authenticated user remove this advertisement interest?", - "type" : "boolean" } - } - } ] - }, - "AdManage" : { - "description" : "Common fields for either creating or editing a simple or webshop advertisement", - "type" : "object", - "x-abstract" : true, - "properties" : { - "name" : { - "description" : "The advertisement title", - "type" : "string" - }, - "description" : { - "description" : "The advertisement description content, formatted as HTML", - "type" : "string" - }, - "publicationPeriod" : { - "$ref" : "#/components/schemas/DatePeriod" - }, - "categories" : { - "description" : "Either internal name or id of categories this advertisement belongs to. In most cases an advertisement will have a single category, but this depends on the Cyclos configuration.", - "type" : "array", - "items" : { - "type" : "string" - } - }, - "currency" : { - "description" : "Either internal name or id of the advertisement's price currency", - "type" : "string" - }, - "price" : { - "description" : "The regular price", - "type" : "string", - "format" : "number" - }, - "promotionalPrice" : { - "description" : "The promotional price, if any", - "type" : "string", - "format" : "number" - }, - "promotionalPeriod" : { - "description" : "The promotional period, the one when `promotionalPrice` is valid", - "allOf" : [ { - "$ref" : "#/components/schemas/DatePeriod" - } ] - }, - "customValues" : { - "type" : "object", - "description" : "Holds the custom field values, keyed by field internal name or id. The format of the value depends on the custom field type. Example: `{..., \"customValues\": {\"gender\": \"male\", \"birthDate\": \"1980-10-27\"}}`", - "additionalProperties" : { - "type" : "string" - } - }, - "addresses" : { - "description" : "Ids of the public addresses (belonging to the advertisement owner) this advertisement is available at.", - "type" : "array", - "items" : { - "type" : "string" - } - }, - "unlimitedStock" : { - "description" : "Whether the stock is unlimited or not. If true then it means there is always disponibility of the webshop and the `stockQuantity` and `minStockQuantityToNotify` are meaningless.", - "type" : "boolean" - }, - "stockQuantity" : { - "description" : "The quantity in stock (if `unlimitedStock` is false). Only for webshop.", - "type" : "string", - "format" : "number" - }, - "minStockQuantityToNotify" : { - "description" : "Reached this minimum limit a notification will be sent to the user indicating there is low stock for this webshop. Only for webshop.", - "type" : "string", - "format" : "number" - }, - "minAllowedInCart" : { - "description" : "Minimum quantity allowed in a shopping cart. Only for webshop.", - "type" : "string", - "format" : "number" - }, - "maxAllowedInCart" : { - "description" : "Maximum quantity allowed in a shopping cart. Only for webshop.", - "type" : "string", - "format" : "number" - }, - "allowDecimalQuantity" : { - "description" : "Whether a decimal quantity of this webshop can be added to the shopping cart or not.", - "type" : "boolean" - }, - "productNumber" : { - "description" : "The unique number assigned to this webshop. Required if it's not marked as generated in the user webshop settings. Only for webshop.", - "type" : "string" - }, - "deliveryMethods" : { - "description" : "Ids of delivery method (belonging to the advertisement owner) this advertisement has allowed.", - "type" : "array", - "items" : { - "type" : "string" - } - } - } - }, - "AdNew" : { - "description" : "Parameters for creating a new advertisement", - "allOf" : [ { - "$ref" : "#/components/schemas/AdManage" - }, { - "type" : "object", - "properties" : { - "submitForAuthorization" : { - "description" : "Only useful when authorization is required (`AdDataForNew`/`AdDataForEdit`.`requiresAuthorization` flag is `true`). Indicates whether the advertisement will be initially submitted for authorization (status = `pending`) or kept in the `draft` status.", - "type" : "boolean" - }, - "hidden" : { - "description" : "Only useful when authorization is not required (`AdDataForNew`/`AdDataForEdit`.`requiresAuthorization` flag is `false`). Indicates whether the initial status for the advertisement should be `hidden` (when `true`) or `active` (when `false`).", - "type" : "boolean" - }, - "images" : { - "type" : "array", - "items" : { - "type" : "string" - }, - "description" : "The ids of previously uploaded user temporary images to be initially used as advertisement images" - }, - "kind" : { - "description" : "The advertisement kind to be created. Currently only `simple` advertisements can be managed through this API. The default is `simple`.", - "allOf" : [ { - "$ref" : "#/components/schemas/AdKind" - } ] - } - } - } ] - }, - "AdQueryFilters" : { - "description" : "Definitions for a general advertisements search", - "allOf" : [ { - "$ref" : "#/components/schemas/BasicAdQueryFilters" - }, { - "type" : "object", - "properties" : { - "user" : { - "type" : "string", - "description" : "Either id or an identification, such as login name, e-mail, etc, for the advertisement owner. The allowed identification methods are those the authenticated user can use on keywords search." - }, - "brokers" : { - "type" : "array", - "items" : { - "type" : "string" - }, - "description" : "Either ids or an identifications, such as login name, e-mail, etc, for the brokers of the advertisement owner. Can only be used when searching with a broker himself or admin." - }, - "groups" : { - "type" : "array", - "items" : { - "type" : "string" - }, - "description" : "Array of either id or internal names of user groups the advertisement owner must belong to" - }, - "returnEditable" : { - "type" : "boolean", - "description" : "Whether to return the editable property. Passing `true` will impact the performance a bit, as for each returned advertisement some statuses and permissions need to be checked." - } - } - } ] - }, - "AdQuestion" : { - "description" : "A question asked for an advertisement.", - "allOf" : [ { - "$ref" : "#/components/schemas/Entity" - }, { - "type" : "object", - "properties" : { - "question" : { - "description" : "The question text.", - "type" : "string" - }, - "questionDate" : { - "description" : "The question date and time.", - "type" : "string", - "format" : "date-time" - }, - "answer" : { - "description" : "The answer for the question (if any).", - "type" : "string" - }, - "answerDate" : { - "description" : "The answer date and time (if any).", - "type" : "string", - "format" : "date-time" - }, - "user" : { - "description" : "The user which asked the question", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - } - } - } ] - }, - "AdQuestionQueryFilters" : { - "description" : "Definitions for unanswered questions search", - "allOf" : [ { - "$ref" : "#/components/schemas/QueryFilters" - }, { - "type" : "object", - "properties" : { - "kind" : { - "description" : "When kind is not specified it will assume simple or webshop based on user permissions", - "allOf" : [ { - "$ref" : "#/components/schemas/AdKind" - } ] - } - } - } ] - }, - "AdQuestionResult" : { - "description" : "Data returned from question search", - "allOf" : [ { - "$ref" : "#/components/schemas/AdQuestion" - }, { - "type" : "object", - "properties" : { - "advertisement" : { - "description" : "The advertisement of the question.", - "allOf" : [ { - "$ref" : "#/components/schemas/AdWithUser" - } ] - } - } - } ] - }, - "AdQuestionView" : { - "description" : "A question asked for an advertisement.", - "allOf" : [ { - "$ref" : "#/components/schemas/AdQuestionResult" - }, { - "type" : "object" - } ] - }, - "AdResult" : { - "description" : "Contains data returned when searching for advertisements", - "allOf" : [ { - "$ref" : "#/components/schemas/AdDetailed" - }, { - "type" : "object", - "properties" : { - "address" : { - "description" : "Address to be placed on map. Is only returned when the search result type is `map`.", - "allOf" : [ { - "$ref" : "#/components/schemas/Address" - } ] - }, - "distance" : { - "description" : "Only returned when there is a base location to calculate the distance from. The unit (kilometers or miles) depends on configuration.", - "type" : "number", - "format" : "double" - }, - "categories" : { - "description" : "Either internal name or id of categories this advertisement belongs to. In most cases an advertisement will have a single category, but this depends on the Cyclos configuration.", - "type" : "array", - "items" : { - "type" : "string" - } - }, - "currency" : { - "description" : "Either internal name or id of the advertisement's price currency", - "type" : "string" - }, - "editable" : { - "description" : "Indicates if the advertisement can be edited according to the logged user's permissions and advertisement status.", - "type" : "boolean" - }, - "canAddToCart" : { - "description" : "Indicates if the advertisement can be added to the cart.", - "type" : "boolean" - } - } - } ] - }, - "AdView" : { - "description" : "Detailed information when viewing an advertisement", - "allOf" : [ { - "$ref" : "#/components/schemas/AdDetailed" - }, { - "type" : "object", - "properties" : { - "categories" : { - "description" : "Either internal name or id of categories this advertisement belongs to. In most cases an advertisement will have a single category, but this depends on the Cyclos configuration.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/AdCategoryWithParent" - } - }, - "customValues" : { - "description" : "The list of custom field values this advertisement has", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/CustomFieldValue" - } - }, - "currency" : { - "$ref" : "#/components/schemas/Currency" - }, - "promotionalPeriod" : { - "description" : "The promotional period, the one when `promotionalPrice` is valid", - "allOf" : [ { - "$ref" : "#/components/schemas/DatePeriod" - } ] - }, - "promotionalPeriodActive" : { - "description" : "Indicates whether the promotional period is active at the moment this data is returned", - "type" : "boolean" - }, - "canEdit" : { - "description" : "Indicates if the authenticated user can edit this advertisement", - "type" : "boolean" - }, - "canRemove" : { - "description" : "Indicates if the authenticated user can remove this advertisement. The owner of the ad with manage permissions can remove the advertisement regardless the ad status.", - "type" : "boolean" - }, - "canBuy" : { - "description" : "Indicates if the authenticated user can buy this webshop ad.", - "type" : "boolean" - }, - "canAsk" : { - "description" : "Indicates if the authenticated user can ask questions about this advertisement.", - "type" : "boolean" - }, - "canHide" : { - "description" : "Indicates if the authenticated user can hide this advertisement.", - "type" : "boolean" - }, - "canUnhide" : { - "description" : "Indicates if the authenticated user can unhide this advertisement.", - "type" : "boolean" - }, - "canSetAsDraft" : { - "description" : "Indicates if the authenticated user can set as draft an already authorized (published) advertisement.", - "type" : "boolean" - }, - "canRequestAuthorization" : { - "description" : "Indicates if the authenticated user can request for authorization for this advertisement.", - "type" : "boolean" - }, - "canApprove" : { - "description" : "Indicates if the authenticated user can authorize this advertisement (user managers only).", - "type" : "boolean" - }, - "canReject" : { - "description" : "Indicates if the authenticated user can reject this advertisement (user managers only).", - "type" : "boolean" - }, - "questionsEnabled" : { - "description" : "Indicates if the questions are anabled for the given advertisement.", - "type" : "boolean" - }, - "lastAuthorizationComments" : { - "description" : "The last comments set by a manager when rejecting or set as draft this advertisement. Only send if the advertisement requires authorization and the authenticated user can view the comments.", - "type" : "string" - }, - "additionalImages" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Image" - }, - "description" : "Holds the images other than the primary image, which is returned in the `image` field" - }, - "userAddresses" : { - "description" : "The addresses (belonging to the advertisement's owner) where this advertisement is available.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Address" - } - }, - "adAddresses" : { - "description" : "The custom addresses where this advertisement is available.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Address" - } - }, - "questions" : { - "description" : "The list of questions this advertisement has.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/AdQuestion" - } - }, - "allowDecimal" : { - "description" : "if true then this webshop ad can be ordered specifying the quantity as a decimal number.", - "type" : "boolean" - }, - "deliveryMethods" : { - "description" : "The available delivery methods for this webshop ad.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/DeliveryMethod" - } - }, - "operations" : { - "description" : "List of runnable custom operations.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Operation" - } - }, - "hidePrice" : { - "description" : "Indicates whether show or not this advertisement price to guests", - "type" : "boolean" - }, - "hideOwner" : { - "description" : "Indicates whether show or not this advertisement owner to guests", - "type" : "boolean" - }, - "exportFormats" : { - "description" : "The formats which the advertisement can be exported", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ExportFormat" - } - } - } - } ] - }, - "AdWithUser" : { - "description" : "An advertisement with information about its owner", - "allOf" : [ { - "$ref" : "#/components/schemas/Ad" - }, { - "type" : "object", - "properties" : { - "user" : { - "description" : "The user who owns this advertisement", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - } - } - } ] - }, - "Address" : { - "description" : "An address reference. The actually used fields depend on the user configuration", - "x-implements" : "IAddress", - "allOf" : [ { - "$ref" : "#/components/schemas/NamedEntity" - }, { - "type" : "object", - "properties" : { - "addressLine1" : { - "type" : "string", - "description" : "The first line of the descriptive address" - }, - "addressLine2" : { - "type" : "string", - "description" : "The second line of the descriptive address" - }, - "street" : { - "type" : "string", - "description" : "The street name" - }, - "buildingNumber" : { - "type" : "string", - "description" : "The numeric identifier for a land parcel, house, building or other" - }, - "complement" : { - "type" : "string", - "description" : "The complement (like apartment number)" - }, - "zip" : { - "type" : "string", - "description" : "A zip code that identifies a specific geographic (postal) delivery area" - }, - "poBox" : { - "type" : "string", - "description" : "The post-office box, is an uniquely addressable box" - }, - "neighborhood" : { - "type" : "string", - "description" : "The neighborhood name" - }, - "city" : { - "type" : "string", - "description" : "The city name" - }, - "region" : { - "type" : "string", - "description" : "The region or state" - }, - "country" : { - "type" : "string", - "description" : "The country, represented as 2-letter, uppercase, ISO 3166-1 code" - }, - "location" : { - "description" : "The geolocation of the current address", - "allOf" : [ { - "$ref" : "#/components/schemas/GeographicalCoordinate" - } ] - }, - "contactInfo" : { - "$ref" : "#/components/schemas/AddressContactInfo" - } - } - } ] - }, - "AddressBasicData" : { - "description" : "Contains data shared by both AddressDataForNew and AddressDataForEdit", - "allOf" : [ { - "$ref" : "#/components/schemas/AddressConfiguration" - }, { - "type" : "object", - "properties" : { - "enablePrivacy" : { - "description" : "Indicates whether privacy can be used for this address", - "type" : "boolean" - }, - "managePrivacy" : { - "type" : "boolean", - "description" : "Can the authenticated user manage the privacy of this address?" - }, - "contactInfoEnabled" : { - "type" : "boolean", - "description" : "Can the address have additional contact information fields?" - }, - "contactInfoFields" : { - "description" : "The additional contact information custom fields. Only returned if `contactInfoEnabled` is true.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/CustomFieldDetailed" - } - }, - "phoneConfiguration" : { - "description" : "Configuration for settings contact phone numbers. Only returned if `contactInfoEnabled` is true.", - "allOf" : [ { - "$ref" : "#/components/schemas/PhoneConfiguration" - } ] - }, - "user" : { - "description" : "The user which owns the address.", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "confirmationPasswordInput" : { - "description" : "If a confirmation password is used, contains the definitions on how to request that password from the user. This confirmation password is required when performing sensible actions. Sometimes this is dynamic, for example, the confirmation might be configured to be used only once per session, or operations like payments may have a limit per day to be without confirmation (pinless).", - "allOf" : [ { - "$ref" : "#/components/schemas/PasswordInput" - } ] - } - } - } ] - }, - "AddressConfiguration" : { - "description" : "Contains configuration information related to addresses", - "type" : "object", - "properties" : { - "useMap" : { - "description" : "Indicates whether maps are enabled in Cyclos", - "type" : "boolean" - }, - "enabledFields" : { - "description" : "Contains the address fields that are enabled in Cyclos", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/AddressFieldEnum" - } - }, - "requiredFields" : { - "description" : "Contains the address fields that are required in Cyclos", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/AddressFieldEnum" - } - } - } - }, - "AddressConfigurationForUserProfile" : { - "description" : "Contains extended address configuration used on user registration", - "allOf" : [ { - "$ref" : "#/components/schemas/AddressConfiguration" - }, { - "type" : "object", - "properties" : { - "address" : { - "description" : "Contains the default values for a new address", - "allOf" : [ { - "$ref" : "#/components/schemas/AddressNew" - } ] - }, - "edit" : { - "type" : "boolean", - "description" : "Can edit addresses?" - }, - "managePrivacy" : { - "type" : "boolean", - "description" : "Can manage the privacy of addresses?" - }, - "maxAddresses" : { - "type" : "integer", - "description" : "The maximum number of addresses the user can own" - }, - "availability" : { - "$ref" : "#/components/schemas/AvailabilityEnum" - }, - "contactInfoEnabled" : { - "type" : "boolean", - "description" : "Is contact information, such as email, phones and custom values, enabled for addresses of this user?" - }, - "contactInfoFields" : { - "description" : "The contact information custom fields for the address. Only sent if `contactInfoEnabled` is true and there are available custom fields.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/CustomFieldDetailed" + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } } - }, - "phoneConfiguration" : { - "description" : "The phone configuration to set contact phones for the address. Only sent if `contactInfoEnabled` is true.", - "allOf" : [ { - "$ref" : "#/components/schemas/PhoneConfiguration" - } ] - } - } - } ] - }, - "AddressContactInfo" : { - "description" : "Contact information for an address", - "x-implements" : "IContactInfo, INormalizedPhones", - "type" : "object", - "properties" : { - "email" : { - "type" : "string", - "description" : "The e-mail for this additional contact information" - }, - "mobilePhone" : { - "type" : "string", - "description" : "The formatted mobile phone for this additional contact information" - }, - "landLinePhone" : { - "type" : "string", - "description" : "The formatted landline phone for this additional contact information" - }, - "landLineExtension" : { - "type" : "string", - "description" : "The landline phone extension for this additional contact information" - }, - "normalizedMobilePhone" : { - "type" : "string", - "description" : "The mobile phone, normalized to the E.164 format" - }, - "normalizedLandLinePhone" : { - "type" : "string", - "description" : "The land-line phone, normalized to the E.164 format" - }, - "customValues" : { - "description" : "The list of custom field values on this additional contact information", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/CustomFieldValue" - } - } - } - }, - "AddressContactInfoManage" : { - "description" : "Common fields for either creating or editing an additional contact information", - "type" : "object", - "x-implements" : "IContactInfo", - "properties" : { - "email" : { - "type" : "string", - "description" : "The e-mail for this additional contact information" - }, - "mobilePhone" : { - "type" : "string", - "description" : "The formatted mobile phone for this additional contact information" - }, - "landLinePhone" : { - "type" : "string", - "description" : "The formatted landline phone for this additional contact information" - }, - "landLineExtension" : { - "type" : "string", - "description" : "The landline phone extension for this additional contact information" - }, - "customValues" : { - "type" : "object", - "description" : "Holds the custom field values, keyed by field internal name or id. The format of the value depends on the custom field type. Example: `{..., \"customValues\": {\"gender\": \"male\", \"birthDate\": \"1980-10-27\"}}`", - "additionalProperties" : { - "type" : "string" - } - } - } - }, - "AddressDataForEdit" : { - "description" : "Contains data for editing an existing address", - "allOf" : [ { - "$ref" : "#/components/schemas/AddressBasicData" - }, { - "type" : "object", - "properties" : { - "address" : { - "description" : "The address that is being edited. This value can be modified and sent back on `PUT /addresses/{id}`.", - "allOf" : [ { - "$ref" : "#/components/schemas/AddressEdit" - } ] - }, - "canEdit" : { - "type" : "boolean", - "description" : "Can the authenticated user edit this address?" - }, - "canRemove" : { - "type" : "boolean", - "description" : "Can the authenticated user remove this address?" - } - } - } ] - }, - "AddressDataForNew" : { - "description" : "Contains data for creating a new address", - "allOf" : [ { - "$ref" : "#/components/schemas/AddressBasicData" - }, { - "type" : "object", - "properties" : { - "address" : { - "description" : "The address populated with the default fields. This value can be modified and sent back on `POST /{user}/addresses`.", - "allOf" : [ { - "$ref" : "#/components/schemas/AddressNew" - } ] - } - } - } ] - }, - "AddressEdit" : { - "description" : "Fields for editing an address. The actually used and required fields depend on the user configuration.", - "allOf" : [ { - "$ref" : "#/components/schemas/AddressManage" - }, { - "type" : "object", - "properties" : { - "version" : { - "type" : "integer", - "description" : "The version stamp for the current object, used for optimistic locking. When saving, the same version as previously received needs to be passed back. If no one else has saved the object, the version will match and the object will be updated. However, if someone other has saved the object, the version will no longer match, and an error will be raised. This is used to prevent multiple users (or processes) from updating the same object and unwilingly overridding the property values, leading to data loss." - } - } - } ] - }, - "AddressEditWithId" : { - "description" : "Parameters for editing an existing address", - "allOf" : [ { - "$ref" : "#/components/schemas/AddressEdit" - }, { - "type" : "object", - "properties" : { - "id" : { - "type" : "string", - "description" : "The internal entity identifier" - } - } - } ] - }, - "AddressManage" : { - "description" : "Common fields for either creating or editing an address", - "type" : "object", - "x-implements" : "IAddress", - "x-abstract" : true, - "properties" : { - "name" : { - "type" : "string", - "description" : "The address name" - }, - "addressLine1" : { - "type" : "string", - "description" : "The first line of the descriptive address" - }, - "addressLine2" : { - "type" : "string", - "description" : "The second line of the descriptive address" - }, - "street" : { - "type" : "string", - "description" : "The street name" - }, - "buildingNumber" : { - "type" : "string", - "description" : "The numeric identifier for a land parcel, house, building or other" - }, - "complement" : { - "type" : "string", - "description" : "The complement (like apartment number)" - }, - "zip" : { - "type" : "string", - "description" : "A zip code that identifies a specific geographic (postal) delivery area" - }, - "poBox" : { - "type" : "string", - "description" : "The post-office box, is an uniquely addressable box" - }, - "neighborhood" : { - "type" : "string", - "description" : "The neighborhood name" - }, - "city" : { - "type" : "string", - "description" : "The city name" - }, - "region" : { - "type" : "string", - "description" : "The region or state" - }, - "country" : { - "type" : "string", - "description" : "The country, represented as 2-letter, uppercase, ISO 3166-1 code" - }, - "location" : { - "description" : "The geolocation of the current address", - "allOf" : [ { - "$ref" : "#/components/schemas/GeographicalCoordinate" - } ] - }, - "defaultAddress" : { - "type" : "boolean", - "description" : "Indicates whether this is the default address for the user" - }, - "hidden" : { - "type" : "boolean", - "description" : "Whether this address should be hidden for other users" - }, - "contactInfo" : { - "$ref" : "#/components/schemas/AddressContactInfoManage" - } - } - }, - "AddressNew" : { - "description" : "Fields for a new address. The actually used and required fields depend on the user configuration.", - "allOf" : [ { - "$ref" : "#/components/schemas/AddressManage" - } ] - }, - "AddressResult" : { - "description" : "Information of an address as returned on list", - "allOf" : [ { - "$ref" : "#/components/schemas/Address" - }, { - "type" : "object", - "properties" : { - "defaultAddress" : { - "type" : "boolean", - "description" : "Indicates whether this is the default address for the user" - }, - "hidden" : { - "description" : "Indicates whether this address is hidden for other users. It always returns false if the authenticated user doesn't manage the owner of this address.", - "type" : "boolean" - }, - "contactInfo" : { - "description" : "If enabled, contains additional contact information for the address", - "allOf" : [ { - "$ref" : "#/components/schemas/AddressContactInfo" - } ] - } - } - } ] - }, - "AddressView" : { - "description" : "Detailed information when viewing an address", - "allOf" : [ { - "$ref" : "#/components/schemas/AddressResult" - }, { - "type" : "object", - "properties" : { - "user" : { - "description" : "The user which owns this address", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "canEdit" : { - "description" : "Can the authenticated user edit / remove this address?", - "type" : "boolean" - }, - "enablePrivacy" : { - "description" : "Indicates whether address privacy can be used for this user", - "type" : "boolean" } - } - } ] - }, - "Agreement" : { - "description" : "An agreement the user must accept in order to use the system", - "allOf" : [ { - "$ref" : "#/components/schemas/InternalNamedEntity" - }, { - "type" : "object", - "properties" : { - "required" : { - "type" : "boolean", - "description" : "Indicates whether accepting this agreement is required for using the system." + }, + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } } - } - } ] - }, - "AgreementContent" : { - "description" : "Contains the full content of an agreement", - "type" : "object", - "properties" : { - "agreement" : { - "$ref" : "#/components/schemas/Agreement" }, - "content" : { - "type" : "string", - "description" : "The HTML formatted content of the agreement" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } }, - "contentVersion" : { - "type" : "integer", - "description" : "The version of the text for this agreement. When the text changes, the version is incremented." + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } + } }, - "lastVersion" : { - "type" : "integer", - "description" : "The current (last) version of the text for this agreement." - } - } - }, - "AgreementLog" : { - "description" : "Contains an entry for an agreement that was either accepted or rejected", - "allOf" : [ { - "$ref" : "#/components/schemas/Entity" - }, { - "type" : "object", - "properties" : { - "agreement" : { - "$ref" : "#/components/schemas/Agreement" - }, - "date" : { - "type" : "string", - "format" : "date-time", - "description" : "The date the agreement was accepted" - }, - "acceptedVersion" : { - "type" : "integer", - "description" : "The version of the agreement that was accepted" - }, - "accepted" : { - "type" : "boolean", - "description" : "For required agreements this will always be `true`. For optional agreements, a log is generated both when the agreement was accepted or changed to no longer accepted." - }, - "remoteAddress" : { - "type" : "string", - "description" : "The IP address of the request that accepted the agreement. Not returned for the user himself, only for managers." - } - } - } ] - }, - "AgreementsPermissions" : { - "description" : "Permissions regarding the user agreements", - "type" : "object", - "properties" : { - "view" : { - "description" : "Can the authenticated user view the agreement log?", - "type" : "boolean" - } - } - }, - "Alert" : { - "description" : "Common alert data", - "allOf" : [ { - "$ref" : "#/components/schemas/Entity" - }, { - "type" : "object", - "properties" : { - "date" : { - "description" : "The alert date", - "type" : "string", - "format" : "date-time" - }, - "text" : { - "description" : "The alert text", - "type" : "string" + "500": { + "description": "If an error has occurred adding the webshop ad to the cart.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ShoppingCartError" + } + } } } - } ] - }, - "AlertsPermissions" : { - "description" : "Permissions related to user alerts", - "type" : "object", - "properties" : { - "view" : { - "description" : "Whether the logged user can view user alerts or not", - "type" : "boolean" - } } }, - "AmountSummary" : { - "description" : "Contains summarized statistics over amounts", - "type" : "object", - "properties" : { - "count" : { - "description" : "The number of entries", - "type" : "integer" + "delete": { + "operationId": "removeItemFromShoppingCart", + "summary": "Removes the given webshop ad from the corresponding shopping cart.", + "description": "Removes the given webshop ad from the corresponding shopping cart according to the seller and currency and returns the total number of the remaining webshop ads in all carts.", + "tags": [ + "ShoppingCarts" + ], + "security": [ + { + "basic": [] }, - "sum" : { - "description" : "The amount sum", - "type" : "string", - "format" : "number" + { + "session": [] }, - "average" : { - "description" : "The amount average", - "type" : "string", - "format" : "number" + { + "accessClient": [] } - } - }, - "AssignVoucher" : { - "description" : "Parameters for assigning a voucher to a user", - "type" : "object", - "properties" : { - "user" : { - "description" : "An identification (id, login name, e-mail, ... depending on the configuration) of the user to which the voucher will be assigned to.", - "type" : "string" + ], + "parameters": [ + { + "$ref": "#/components/parameters/ad" } - } - }, - "Auth" : { - "description" : "Contains information for the currently authenticated user", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseAuth" - }, { - "type" : "object", - "properties" : { - "pinInput" : { - "description" : "Returned when a PIN can be defined. Contains the information for defining it.", - "allOf" : [ { - "$ref" : "#/components/schemas/PinInput" - } ] - }, - "configuration" : { - "description" : "The current configuration version", - "allOf" : [ { - "$ref" : "#/components/schemas/VersionedEntity" - } ] - } - } - } ] - }, - "BadRequestError" : { - "description" : "Error returned when the request format / body is not in the expected format", - "type" : "object", - "properties" : { - "message" : { - "description" : "A (technical) message explaining the problem", - "type" : "string" - }, - "line" : { - "description" : "The request body line that shows the problem", - "type" : "integer" - }, - "column" : { - "description" : "The request body column that shows the problem", - "type" : "integer" - }, - "code" : { - "$ref" : "#/components/schemas/BadRequestErrorCode" - } - } - }, - "BankingPermissions" : { - "description" : "Permissions for banking", - "type" : "object", - "properties" : { - "accounts" : { - "description" : "Permissions over each owned account", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/AccountPermissions" - } - }, - "accountVisibilitySettings" : { - "description" : "Can the authenticated member set his own account visibility?", - "type" : "boolean" - }, - "payments" : { - "description" : "Payments permissions", - "allOf" : [ { - "$ref" : "#/components/schemas/PaymentsPermissions" - } ] - }, - "authorizations" : { - "description" : "Transaction authorization permissions", - "allOf" : [ { - "$ref" : "#/components/schemas/TransactionAuthorizationsPermissions" - } ] - }, - "scheduledPayments" : { - "description" : "Scheduled payments permissions", - "allOf" : [ { - "$ref" : "#/components/schemas/ScheduledPaymentsPermissions" - } ] - }, - "externalPayments" : { - "description" : "External payments permissions", - "allOf" : [ { - "$ref" : "#/components/schemas/ExternalPaymentsPermissions" - } ] - }, - "paymentRequests" : { - "description" : "Payment requests permissions", - "allOf" : [ { - "$ref" : "#/components/schemas/PaymentRequestsPermissions" - } ] - }, - "tickets" : { - "description" : "Tickets permissions", - "allOf" : [ { - "$ref" : "#/components/schemas/TicketsPermissions" - } ] - }, - "searchUsersWithBalances" : { - "description" : "Can the authenticated admin / broker search managed users together with their account balances?", - "type" : "boolean" - }, - "searchGeneralTransfers" : { - "description" : "Can the authenticated admin / broker perform a general transfers search (all visible transfers, regardless of the user / account)?", - "type" : "boolean" - }, - "searchGeneralAuthorizedPayments" : { - "description" : "Can the authenticated admin / broker perform a general transaction search for authorizations?", - "type" : "boolean" - }, - "searchGeneralScheduledPayments" : { - "description" : "Can the authenticated admin / broker perform a general scheduled payments / installments search?", - "type" : "boolean" - }, - "searchGeneralExternalPayments" : { - "description" : "Can the authenticated admin / broker perform a general external payments search?", - "type" : "boolean" - }, - "searchGeneralPaymentRequests" : { - "description" : "Can the authenticated admin / broker perform a general payment requests search?", - "type" : "boolean" - }, - "searchGeneralBalanceLimits" : { - "description" : "Can the authenticated admin / broker perform a general account balance limit search, for all visible accounts?", - "type" : "boolean" - }, - "searchGeneralPaymentLimits" : { - "description" : "Can the authenticated admin / broker perform a general account payment limit search, for all visible accounts?", - "type" : "boolean" - } - } - }, - "BaseAccountBalanceLimits" : { - "x-abstract" : true, - "description" : "Basic data regarding the lower and upper limits of a user account.", - "type" : "object", - "properties" : { - "creditLimit" : { - "description" : "The lower (negative) credit limit.", - "type" : "string", - "format" : "number" - }, - "customCreditLimit" : { - "description" : "Indicates whether the credit limit is customized for this account or if it is the default value.", - "type" : "boolean" - }, - "upperCreditLimit" : { - "description" : "The upper (positive) credit limit. When this value is `null` the account has no upper limit (is unlimited).", - "type" : "string", - "format" : "number" - }, - "customUpperCreditLimit" : { - "description" : "Indicates whether the upper credit limit is customized for this account or if it is the default value.", - "type" : "boolean" - } - } - }, - "BaseAccountPaymentLimits" : { - "x-abstract" : true, - "description" : "Basic data regarding the payment, daily, weekly, monthly and yearly amount limits of a user account.", - "type" : "object", - "properties" : { - "amountLimit" : { - "description" : "The payment amount limit. When this value is `null` the account has no payment amount limit (is unlimited).", - "type" : "string", - "format" : "number" - }, - "customAmountLimit" : { - "description" : "Indicates whether the `amountLimit` is customized for this account or if it is from the product.", - "type" : "boolean" - }, - "amountPerDayLimit" : { - "description" : "The payment amount per day limit. When this value is `null` the account has no payment amount per day limit (is unlimited).", - "type" : "string", - "format" : "number" - }, - "customAmountPerDayLimit" : { - "description" : "Indicates whether the `amountPerDayLimit` is customized for this account or if it is from the product.", - "type" : "boolean" + ], + "responses": { + "200": { + "description": "The webshop ad was removed from the shopping cart. Returns the total number of the remaining webshop ads in all the shopping carts.", + "content": { + "application/json": { + "schema": { + "type": "integer" + } + } + } + }, + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" + } + } + } }, - "amountPerWeekLimit" : { - "description" : "The payment amount per week limit. When this value is `null` the account has no payment amount per week limit (is unlimited).", - "type" : "string", - "format" : "number" - }, - "customAmountPerWeekLimit" : { - "description" : "Indicates whether the `amountPerWeekLimit` is customized for this account or if it is from the product.", - "type" : "boolean" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } + } }, - "amountPerMonthLimit" : { - "description" : "The payment amount per month limit. When this value is `null` the account has no payment amount per month limit (is unlimited).", - "type" : "string", - "format" : "number" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } + } }, - "customAmountPerMonthLimit" : { - "description" : "Indicates whether the `amountPerMonthLimit` is customized for this account or if it is from the product.", - "type" : "boolean" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } }, - "amountPerYearLimit" : { - "description" : "The payment amount per year limit. When this value is `null` the account has no payment amount per year limit (is unlimited).", - "type" : "string", - "format" : "number" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } + } }, - "customAmountPerYearLimit" : { - "description" : "Indicates whether the `amountPerYearLimit` is customized for this account or if it is from the product.", - "type" : "boolean" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } } } }, - "BaseActivationCodeRequest" : { - "x-abstract" : true, - "description" : "Base parameters for sending / resending a device activation code.", - "type" : "object", - "properties" : { - "mobilePhoneId" : { - "type" : "string", - "description" : "The identifier of the mobile phone where the code must be sent. Only required if medium is `sms`." + "put": { + "operationId": "modifyItemQuantityOnShoppingCart", + "summary": "Modifies the corresponding cart with the new quantity for the given webshop ad.", + "description": "Modifies the corresponding shopping cart with the new quantity for the given webshop ad only if it was already added to the cart of the authenticted user and returns the total number of webshop ads in all carts. For those quantity-limited products the given quantity could have been adjusted to met the restrictions. You can view the adjustment applied to each item when retrieving the details of a shopping cart. if you want to remove the adjustment just send a new request to modify the quantity and specify the current quantity (i.e the already adjusted and returned in the details of the shopping cart) as the parameter.", + "tags": [ + "ShoppingCarts" + ], + "security": [ + { + "basic": [] }, - "medium" : { - "description" : "The medium the user wants to receive the activation code.", - "allOf" : [ { - "$ref" : "#/components/schemas/SendMediumEnum" - } ] + { + "session": [] + }, + { + "accessClient": [] } - } - }, - "BaseAdDataForSearch" : { - "description" : "Common definitions for searching advertisements", - "x-abstract" : true, - "type" : "object", - "properties" : { - "categories" : { - "description" : "The advertisement categories each with its children, forming a tree", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/AdCategoryWithChildren" - } + ], + "parameters": [ + { + "$ref": "#/components/parameters/ad" }, - "customFields" : { - "description" : "The list of custom fields that are either to be used as search filter (if its internal name is present on either `fieldsInBasicSearch` or `fieldsInAdvancedSearch`) and / or in the result list (if its internal name is present on `fieldsInList`).", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/CustomFieldDetailed" + { + "name": "quantity", + "in": "query", + "required": true, + "description": "The new quantity for the given webshop ad. It could be a decimal number only if the corresponding webshop ad allows it. If zero then the webshop ad is removed from the cart.", + "schema": { + "type": "number", + "format": "double" } - }, - "fieldsInBasicSearch" : { - "description" : "The internal names of the custom fields that should be used as search filters in the basic section (separated fields, not keywords)", - "type" : "array", - "items" : { - "type" : "string" + } + ], + "responses": { + "200": { + "description": "The quantity for the given webshop was updated. Returns the total number of webshop ads present in all the shopping carts.", + "content": { + "application/json": { + "schema": { + "type": "integer" + } + } } }, - "fieldsInAdvancedSearch" : { - "description" : "The internal names of the custom fields that should be used as search filters in the advanced section (separated fields, not keywords)", - "type" : "array", - "items" : { - "type" : "string" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } } }, - "fieldsInList" : { - "description" : "The internal names of the custom fields that will be returned together with each advertisement, and should be shown in the result list. This feature is planned, but not yet available.", - "type" : "array", - "items" : { - "type" : "string" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } } }, - "basicProfileFields" : { - "description" : "The list of basic user profile fields that can be used as search filters. Only returned if searching user advertisements.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/BasicProfileFieldInput" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } } }, - "customProfileFields" : { - "description" : "The list of custom user profile fields that can be used as search filters. Only returned if searching user advertisements.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/CustomFieldDetailed" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } } }, - "currencies" : { - "description" : "The currencies the authenticated user may use to filter by price", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Currency" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" + } + } } }, - "searchByDistanceData" : { - "$ref" : "#/components/schemas/SearchByDistanceData" + "500": { + "description": "If an error has occurred modifying the quantity.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ShoppingCartError" + } + } + } + } + } + } + }, + "/shopping-carts/{id}/data-for-checkout": { + "get": { + "operationId": "getShoppingCartDataForCheckout", + "summary": "Returns configuration data for check-out a shopping cart.", + "description": "Returns configuration data for check-out the given shopping cart by id.", + "tags": [ + "ShoppingCarts" + ], + "security": [ + { + "basic": [] }, - "categoriesDisplay" : { - "description" : "The category view configured for the logged user.", - "allOf" : [ { - "$ref" : "#/components/schemas/AdCategoriesDisplayEnum" - } ] + { + "session": [] }, - "visibleKinds" : { - "description" : "The advertisement kinds that can be searched by the authenticated user", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/AdKind" - } + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" }, - "addressFieldsInSearch" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/AddressQueryFieldEnum" - } + { + "$ref": "#/components/parameters/id" } - } - }, - "BaseAdDetailed" : { - "description" : "Contains shared information of an ad.", - "allOf" : [ { - "$ref" : "#/components/schemas/Ad" - }, { - "type" : "object", - "properties" : { - "status" : { - "$ref" : "#/components/schemas/AdStatusEnum" - }, - "price" : { - "description" : "The regular price.", - "type" : "string", - "format" : "number" - }, - "productNumber" : { - "description" : "The product number according to the webshop settings.", - "type" : "string" - } - } - } ] - }, - "BaseAuth" : { - "description" : "Contains relevant information for the authenticated user and his granted permissions.", - "type" : "object", - "x-abstract" : true, - "properties" : { - "user" : { - "description" : "The authenticated user, if any.", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "language" : { - "description" : "The current language version", - "allOf" : [ { - "$ref" : "#/components/schemas/VersionedEntity" - } ] - }, - "global" : { - "description" : "Indicates whether this user belongs to global mode. Only returned if there is an authenticated user.", - "type" : "boolean" - }, - "systemAdministrator" : { - "description" : "Indicates whether this user is a system administrator, that is, either belongs to the global system administrators group or to the network system administrators group. Only returned if `role` is `administrator`.", - "type" : "boolean" - }, - "aliasOperator" : { - "description" : "Indicates whether this user is an operator which is an alias of his owner member, that is, has all member permissions, and is not restricted to an operator group. Only returned if `role` is `operator`.", - "type" : "boolean" - }, - "permissions" : { - "description" : "The granted permissions for the authenticated user or guest", - "allOf" : [ { - "$ref" : "#/components/schemas/Permissions" - } ] - }, - "sessionToken" : { - "description" : "A token that must be passed in on the Session-Token header on subsequent requests instead of the login name and password. Only returned if using a session authentication.", - "type" : "string" - }, - "trustedSession" : { - "description" : "Whether the current session is a trusted one or not. If trusted then no confirmation password (if any) will be required for subsequent requests in the same session. Only returned if using a session authentication.", - "type" : "boolean" - }, - "accessClient" : { - "description" : "Only returned when authenticated as access client, contains information about it", - "allOf" : [ { - "$ref" : "#/components/schemas/EntityReference" - } ] - }, - "principalType" : { - "description" : "Returns a reference to the principal type used for authentication. May be some of the built-in types (login name, e-mail, mobile phone or account number), a profile field, a token type or an access client type", - "allOf" : [ { - "$ref" : "#/components/schemas/EntityReference" - } ] - }, - "principal" : { - "description" : "The principal (user identification) used on authentication. Can be the value of the login name, e-mail, account number, custom field or token used on authentication or at the moment of login. Is not returned when the authentication was performed via access client.", - "type" : "string" - }, - "passwordType" : { - "description" : "Returns a reference to the password type used on this channel.", - "allOf" : [ { - "$ref" : "#/components/schemas/PasswordType" - } ] - }, - "secondaryPasswordType" : { - "description" : "Returns a reference to the login confirmation password type used on this channel, if any.", - "allOf" : [ { - "$ref" : "#/components/schemas/PasswordType" - } ] - }, - "expiredPassword" : { - "description" : "Returns whether the current access password is expired. If so, the user will have to change the password, or all other actions will be denied.", - "type" : "boolean" - }, - "pendingAgreements" : { - "description" : "Returns whether the current user has some agreements pending accept. If so, a call to `GET /agreements/pending` should be performed to get the content of the pending agreements, and then a `POST /agreements/pending{id_or_internal_name}` to accept each agreement.", - "type" : "boolean" - }, - "everAcceptedAgreements" : { - "description" : "Returns whether the current user has ever accepted any agreement. This is always false for operators, as operators themselves don't accept agreements. However, their owner members do.", - "type" : "boolean" - }, - "expiredSecondaryPassword" : { - "description" : "Returns whether the current secondary access password is expired. If so, the user will have to change the password, or all other actions will be denied.", - "type" : "boolean" - }, - "pendingSecondaryPassword" : { - "description" : "Returns whether the current session requires a secondary password. If so, the user will have to validate it using its secondary access password, otherwise, all other actions will be denied.", - "type" : "boolean" - }, - "unauthorizedAddress" : { - "description" : "Returns whether the current guest session is not authorized from the client IP address. This is returned for guests, rather than enforced, because it could be too early to enforce it. For example, even the language to display an error message is returned from a server call. If we would deny it, clients could not even know which message to show.", - "type" : "boolean" - }, - "allowPin" : { - "description" : "Returns whether the configuration for the current channel has device PIN enabled.", - "type" : "boolean" - }, - "role" : { - "description" : "The main user role. Only returned if there is an authenticated user.", - "allOf" : [ { - "$ref" : "#/components/schemas/RoleEnum" - } ] - } - } - }, - "BaseCustomFieldValue" : { - "x-abstract" : true, - "description" : "Holds detailed information about a custom field value. The actual value should be read from a property depending on the field type:\n\n\n- If the type is either `string`,\n `text`,\n `richText` or\n `url`, the property is on `stringValue`;\n\n\n- If the type is `integer`, the property is\n `integerValue`; - If the type is `decimal`,\n the property is `decimalValue`;\n\n\n- If the type is `date`, the property is\n `dateValue`; - If the type\nis `boolean`, the property is `booleanValue`;\n\n- If the type is either `singleSelection` or\n `multiSelection`, the property is\n `possibleValues`;\n\n\n- If the type is `dynamicSelection`, the\n property is `dynamicValue`;\n\n\n- If the type is `dynamicMultiSelection`, the\n property is `dynamicValues`;\n\n\n- If the type is `file`, the property is\n `fileValues`;\n\n\n- If the type is `image`, the property is\n `imageValues`;\n\n\n- Finally, if the type is `linkedEntity`, it\n depends on the value of the field's `linkedEntityType`:\n\n\n - If the entity type is `user`, the property\n is `userValue`;\n\n\n - If the entity type is `record`, the\n property is `recordValue`;\n\n\n - If the entity type is `transaction`, the\n property is `transactionValue`;\n\n\n - If the entity type is `transfer`, the\n property is `transferValue`;\n\n\n - If the entity type is `advertisement`, the\n property is `adValue`.", - "allOf" : [ { - "$ref" : "#/components/schemas/Entity" - }, { - "type" : "object", - "properties" : { - "stringValue" : { - "description" : "The field value if the field type is either `string`, `text`, `richText` or `url`.", - "type" : "string" - }, - "dateValue" : { - "description" : "The field value if the field type is `date`.", - "type" : "string", - "format" : "date-time" - }, - "booleanValue" : { - "description" : "The field value if the field type is `boolean`.", - "type" : "boolean" - }, - "integerValue" : { - "description" : "The field value if the field type is `integer`.", - "type" : "integer" - }, - "decimalValue" : { - "description" : "The field value if the field type is `decimal`.", - "type" : "string", - "format" : "number" - }, - "enumeratedValues" : { - "description" : "The field value if the field type is either `singleSelection` or `multiSelection`. For single selection will either be an empty array or an array with a single element.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/CustomFieldPossibleValue" - } - }, - "dynamicValue" : { - "deprecated" : true, - "x-remove-version" : 4.17, - "description" : "Get the first element in `dynamicValues` for type `dynamicSelection`.\n\n\nThe field value if the field type is `dynamicSelection`.", - "allOf" : [ { - "$ref" : "#/components/schemas/CustomFieldDynamicValue" - } ] - }, - "dynamicValues" : { - "description" : "The field value if the field type is either `dynamicSelection` or `dynamicMultiSelection`. For single selection, will either be an empty array or an array with a single element.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/CustomFieldDynamicValue" - } - }, - "fileValues" : { - "description" : "The field value if the field type is `file`", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/StoredFile" + ], + "responses": { + "200": { + "description": "The configuration data for check-out.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ShoppingCartDataForCheckout" + } } - }, - "imageValues" : { - "description" : "The field value if the field type is `image`", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Image" + } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } } - }, - "adValue" : { - "description" : "The field value if the field type is `linkedEntity` and the linked entity type is `advertisement`. If the currently set record is not accessible by the logged user, only the `name` field is sent, which contains the advertisement title.", - "allOf" : [ { - "$ref" : "#/components/schemas/Ad" - } ] - }, - "transactionValue" : { - "description" : "The field value if the field type is `linkedEntity` and the linked entity type is `transaction`. If the currently set transaction is not accessible by the logged user, only the `display` field is sent.", - "allOf" : [ { - "$ref" : "#/components/schemas/Transaction" - } ] - }, - "transferValue" : { - "description" : "The field value if the field type is `linkedEntity` and the linked entity type is `transfer`. If the currently set transfer is not accessible by the logged user, only the `display` field is sent.", - "allOf" : [ { - "$ref" : "#/components/schemas/Transfer" - } ] - }, - "recordValue" : { - "description" : "The field value if the field type is `linkedEntity` and the linked entity type is `record`. If the currently set record is not accessible by the logged user, only the `display` field is sent.", - "allOf" : [ { - "$ref" : "#/components/schemas/Record" - } ] - }, - "userValue" : { - "description" : "The field value if the field type is `linkedEntity` and the linked entity type is `user`. If the currently set user is not accessible by the logged user, only `display` field is sent.", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - } - } - } ] - }, - "BaseInstallmentDataForSearch" : { - "x-abstract" : true, - "description" : "Contains common data used to search installments for a given owner", - "type" : "object", - "properties" : { - "exportFormats" : { - "description" : "The formats which the search results can be exported.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ExportFormat" - } - }, - "groups" : { - "description" : "Groups that can be used to filter entries, so that only transfers from or to users of those groups are returned on search. Is only returned if the authenticated user is an administrator.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Group" - } - }, - "accountTypes" : { - "description" : "Visible account types from the given owner", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/AccountType" - } - }, - "canViewAuthorized" : { - "description" : "Can the authenticated user view authorized transactions of this owner?", - "type" : "boolean" - }, - "visibleKinds" : { - "description" : "Contains the transaction kinds the authenticated user can view over this owner. Only kinds that allow installments are returned.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransactionKind" - } - } - } - }, - "BaseInstallmentQueryFilters" : { - "x-abstract" : true, - "description" : "Base query filters for installments", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseTransactionOrInstallmentQueryFilters" - }, { - "type" : "object", - "properties" : { - "statuses" : { - "description" : "Possible statuses for installments.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/InstallmentStatusEnum" - } - } - } - } ] - }, - "BaseInstallmentResult" : { - "description" : "Base fields for an installment result", - "allOf" : [ { - "$ref" : "#/components/schemas/Entity" - }, { - "type" : "object", - "properties" : { - "status" : { - "description" : "The installment status.", - "allOf" : [ { - "$ref" : "#/components/schemas/InstallmentStatusEnum" - } ] - }, - "number" : { - "description" : "The installment number", - "type" : "integer" - }, - "totalInstallments" : { - "description" : "The total number of installments in the transaction. Only not returned if the installment belongs to a recurring payment with an unbound number of occurrences (until cancel).", - "type" : "integer" - }, - "dueDate" : { - "description" : "The installment due date", - "type" : "string", - "format" : "date-time" - }, - "amount" : { - "description" : "The installment amount.", - "type" : "string", - "format" : "number" - }, - "transferTransactionNumber" : { - "description" : "When processed, is the transaction number of the generated transfer.", - "type" : "string" - }, - "transferDate" : { - "description" : "When processed, is the date of the generated transfer.", - "type" : "string", - "format" : "date-time" - }, - "transferId" : { - "description" : "When processed, is the id of the generated transfer.", - "type" : "string" - } - } - } ] - }, - "BaseNfcError" : { - "description" : "Base Error when work with a NFC card", - "x-abstract" : true, - "allOf" : [ { - "$ref" : "#/components/schemas/Error" - }, { - "type" : "object", - "properties" : { - "token" : { - "$ref" : "#/components/schemas/TokenDetailed" - } - } - } ] - }, - "BaseNotificationSettings" : { - "description" : "Contains common data among `NotificationSettingsView` and `NotificationSettingsDataForEdit`.", - "type" : "object", - "properties" : { - "user" : { - "$ref" : "#/components/schemas/User" - }, - "role" : { - "$ref" : "#/components/schemas/RoleEnum" - }, - "canEdit" : { - "description" : "Indicates whether the logged user can edit the notitification settings of this user.", - "type" : "boolean" - }, - "emailAllowed" : { - "description" : "Indicates whether e-mail notifications are allowed", - "type" : "boolean" - }, - "smsAllowed" : { - "description" : "Indicates whether SMS notifications are allowed", - "type" : "boolean" - }, - "maxSmsPerMonth" : { - "description" : "The maximum number of allowed SMS messages per month", - "type" : "integer" - }, - "smsCountThisMonth" : { - "description" : "The number of SMS messages already sent this month", - "type" : "integer" - }, - "forwardMessagesAllowed" : { - "description" : "Indicates whether it can be configured to forward received internal messages to the user's e-mail. Only applicable for users (members / brokers), not administrators.", - "type" : "boolean" - }, - "emailMailingsAllowed" : { - "description" : "Indicates whether email mailings are allowed to be configured by users. Only applicable for users (members / brokers), not administrators.", - "type" : "boolean" - }, - "smsMailingsAllowed" : { - "description" : "Indicates whether sms mailings are allowed to be configured by users. Only applicable for users (members / brokers), not administrators.", - "type" : "boolean" - } - } - }, - "BaseOrder" : { - "description" : "Contains basic data shared by other related models.", - "allOf" : [ { - "$ref" : "#/components/schemas/Entity" - } ] - }, - "BaseOrderAction" : { - "description" : "Commont data for order actions.", - "type" : "object", - "properties" : { - "remarks" : { - "description" : "Optional comments by the authenticated user.", - "type" : "string" - } - } - }, - "BaseOrderItem" : { - "description" : "An item containing a quantity.", - "allOf" : [ { - "$ref" : "#/components/schemas/Entity" - }, { - "type" : "object", - "properties" : { - "price" : { - "description" : "The regular price.", - "type" : "string", - "format" : "number" - }, - "quantity" : { - "description" : "It represents how much of the product was ordered. It could be a decimal number only if it's allowed by the product (i.e the webshop ad).", - "type" : "string", - "format" : "number" - }, - "product" : { - "$ref" : "#/components/schemas/WebshopAd" - } - } - } ] - }, - "BaseRecordDataForSearch" : { - "description" : "Common definitions for searching records", - "x-abstract" : true, - "allOf" : [ { - "$ref" : "#/components/schemas/RecordBasePermissions" - }, { - "type" : "object", - "properties" : { - "customFields" : { - "description" : "The list of record fields that are either to be used as search filter (if its internal name is present on `fieldsInSearch`) and / or in the result list (if its internal name is present on `fieldsInList`)", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/CustomFieldDetailed" + } + }, + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } } - }, - "fieldsInSearch" : { - "description" : "The internal names of the record fields that should be used as search filters (separated fields, not keywords)", - "type" : "array", - "items" : { - "type" : "string" + } + }, + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } } - }, - "fieldsInList" : { - "description" : "The internal names of the record fields that will be returned together with each record, and should be shown in the result list", - "type" : "array", - "items" : { - "type" : "string" + } + }, + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } } - }, - "hideDateOnList" : { - "description" : "Whether the date column should be hidden on result list.", - "type" : "boolean" - }, - "exportFormats" : { - "description" : "The formats which the data can be exported", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ExportFormat" + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } } } } - } ] - }, - "BaseReferenceDataForSearch" : { - "description" : "Configuration data for searching references", - "type" : "object", - "x-abstract" : true, - "properties" : { - "manage" : { - "description" : "Can the authenticated user manage returned references/payment feedbacks? Only for managers (admins, brokers)", - "type" : "boolean" + } + } + }, + "/shopping-carts/{id}/checkout": { + "post": { + "operationId": "checkoutShoppingCart", + "summary": "Checks out a shopping cart.", + "description": "Checks out the given shopping cart associated to the authenticated user. After the check-out the purchase order will be awaiting for the seller's acceptance (i. e with status `pendingSeller`).", + "tags": [ + "ShoppingCarts" + ], + "security": [ + { + "basic": [] }, - "user" : { - "$ref" : "#/components/schemas/User" + { + "session": [] }, - "directions" : { - "description" : "The possible directions for searching references", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ReferenceDirectionEnum" - } + { + "accessClient": [] } - } - }, - "BaseReferenceQueryFilters" : { - "description" : "Common query filters for references and payment feedbacks", - "allOf" : [ { - "$ref" : "#/components/schemas/QueryFilters" - }, { - "type" : "object", - "properties" : { - "period" : { - "description" : "The minimum / maximum reference date", - "type" : "array", - "items" : { - "type" : "string", - "format" : "date-time" + ], + "parameters": [ + { + "$ref": "#/components/parameters/id" + }, + { + "$ref": "#/components/parameters/confirmationPassword" + } + ], + "responses": { + "200": { + "description": "The shopping cart was cheked out. Returns the total number of the webshop ads in all the remaining shopping carts. The id of the purchase order is not returned because is the same as the id of the given shopping cart but a header with the url to view the details does.", + "headers": { + "Location": { + "description": "URL for viewing the order details.", + "schema": { + "type": "string" + } } }, - "levels" : { - "description" : "The levels to filter", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ReferenceLevelEnum" + "content": { + "application/json": { + "schema": { + "type": "integer" + } } - }, - "direction" : { - "$ref" : "#/components/schemas/ReferenceDirectionEnum" - }, - "relatedUser" : { - "description" : "The user that either gave or received the reference to the user specified in the path or the other user involved in the payment feedback. Should be either the id or some other allowed identification (login name, email, etc).", - "type" : "string" } - } - } ] - }, - "BaseSendMessage" : { - "description" : "Contains basic data for a message send / reply", - "type" : "object", - "properties" : { - "subject" : { - "description" : "The subject for the reply", - "type" : "string" }, - "body" : { - "description" : "The body for the reply", - "type" : "string" - } - } - }, - "BaseShoppingCart" : { - "description" : "Contains basic data shared by other shopping cart related models.", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseOrder" - }, { - "type" : "object", - "properties" : { - "currency" : { - "$ref" : "#/components/schemas/Currency" - }, - "seller" : { - "$ref" : "#/components/schemas/User" - }, - "insufficientBalance" : { - "type" : "boolean", - "description" : "Flag in `true` if there isn't any account in that currency with enough available balance to be able to fulfill the order from the shopping cart." + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } } - } - } ] - }, - "BaseTransDataForSearch" : { - "description" : "Contains basic information used to search for transfers / transactions", - "x-abstract" : true, - "type" : "object", - "properties" : { - "transferFilters" : { - "description" : "References for transfer filters, which can be used to filter entries by transfer type", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransferFilter" + }, + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } } }, - "channels" : { - "description" : "References for channels which can be used to filter entries by transfers generated on a specific channel. Is only returned if the authenticated user is an administrator.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/EntityReference" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } } }, - "groups" : { - "description" : "Groups that can be used to filter entries, so that only transfers from or to users of those groups are returned on search. Is only returned if the authenticated user is an administrator.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Group" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } } }, - "preselectedPeriods" : { - "description" : "Contains the pre-selected period filter ranges according to the Cyclos configuration", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PreselectedPeriod" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" + } + } } }, - "exportFormats" : { - "description" : "The formats which the search results can be exported.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ExportFormat" + "500": { + "description": "If an error has occurred in the check-out process.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ShoppingCartCheckoutError" + } + } } } - } - }, - "BaseTransQueryFilters" : { - "description" : "Base definitions for searching either transactions or transfers", - "x-abstract" : true, - "allOf" : [ { - "$ref" : "#/components/schemas/QueryFilters" - }, { - "type" : "object", - "properties" : { - "datePeriod" : { - "description" : "The minimum / maximum transfer date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "type" : "array", - "items" : { - "type" : "string", - "format" : "date-time" - } - }, - "transferFilters" : { - "description" : "Reference to the transfer filters, which filters transfers by type. May be either the internal id or qualified transfer filter internal name, in the format `accountType.transferFilter`.", - "type" : "array", - "items" : { - "type" : "string" - } - }, - "transferTypes" : { - "description" : "Reference to the transfer types for filter. May be either the internal id or qualified transfer type internal name, in the format `accountType.transferType`.", - "type" : "array", - "items" : { - "type" : "string" - } - }, - "transactionNumber" : { - "description" : "The transaction number of the matching transfer", - "type" : "string" - }, - "user" : { - "description" : "Reference a user that should have either received / performed the transfer.", - "type" : "string" - }, - "groups" : { - "description" : "Reference to the user group used to perform / receive the transfer. Only taken into account if authenticated as administrator.", - "type" : "array", - "items" : { - "type" : "string" - } - }, - "by" : { - "description" : "Reference to the user that was authenticated when the transfer was performed. Is only taken into account if authenticated as administrator.", - "type" : "string" - }, - "brokers" : { - "description" : "Reference to the broker of users involved in transfers. Is only taken into account if authenticated as administrator.", - "type" : "array", - "items" : { - "type" : "string" + }, + "requestBody": { + "description": "The data for check-out.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ShoppingCartCheckout" } - }, - "channels" : { - "description" : "Reference to the channel used to perform / receive the transfer. Only taken into account if authenticated as administrator.", - "type" : "array", - "items" : { - "type" : "string" + } + } + } + } + }, + "/{user}/orders": { + "get": { + "operationId": "searchUserOrders", + "summary": "Searches for orders of a specific user.", + "description": "Returns a page of orders that match a given criteria for a given user. The authenticated user must be the seller, buyer or a manager user with permission to view purchases or sales. A list of statuses is accepted but at this moment only one status can be specified.", + "tags": [ + "Orders" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/user" + }, + { + "name": "creationPeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum order creation date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "number", + "in": "query", + "required": false, + "description": "The generated order number according to the webshop settings.", + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number (zero-based) of the search. The default value is zero.", + "schema": { + "type": "integer" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", + "schema": { + "type": "integer" + } + }, + { + "name": "productNumber", + "in": "query", + "required": false, + "description": "The product number (with the mask if there is one) of an advertisement contained in the orders.", + "schema": { + "type": "string" + } + }, + { + "name": "relatedUser", + "in": "query", + "required": false, + "description": "Either id or an identification, such as login name, e-mail, etc, for the seller or buyer according whether we are searching for purchases or sales. The allowed identification methods are those the authenticated user can use on keywords search.", + "schema": { + "type": "string" + } + }, + { + "name": "sales", + "in": "query", + "required": false, + "description": "Are we searching for sales or purchases? If not specified it's assumed purchases (i.e `false`)", + "schema": { + "type": "boolean" + } + }, + { + "name": "skipTotalCount", + "in": "query", + "required": false, + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", + "schema": { + "type": "boolean" + } + }, + { + "name": "statuses", + "in": "query", + "required": false, + "description": "", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OrderStatusEnum" + } + } + } + ], + "responses": { + "200": { + "description": "The orders matching the criteria.", + "headers": { + "X-Total-Count": { + "schema": { + "type": "integer" + }, + "description": "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." + }, + "X-Page-Size": { + "schema": { + "type": "integer" + }, + "description": "The maximum number of results per page" + }, + "X-Current-Page": { + "schema": { + "type": "integer" + }, + "description": "The current page the results are in" + }, + "X-Has-Next-Page": { + "schema": { + "type": "boolean" + }, + "description": "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." } }, - "excludedIds" : { - "description" : "List of transfers ids to be excluded from the result.", - "type" : "array", - "items" : { - "type" : "string" + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserOrderResult" + } + } } - }, - "accessClients" : { - "description" : "References to access clients (id or token) used to perform / receive the transfer.", - "type" : "array", - "items" : { - "type" : "string" + } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } } - }, - "includeGeneratedByAccessClient" : { - "description" : "Flag indicating whether to include or not the generated transfer. Only valid if there is at least one access client specified. For example if a `ticket` or `paymentRequest` was processed then a new transfer will be generated.", - "type" : "boolean" - }, - "fromCurrentAccessClient" : { - "description" : "Flag indicating whether to include only transfers by the current access client.", - "type" : "boolean" - }, - "amountRange" : { - "description" : "The minimum / maximum amount. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "type" : "array", - "items" : { - "type" : "string", - "format" : "number" + } + }, + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } } - }, - "orderBy" : { - "$ref" : "#/components/schemas/TransOrderByEnum" } - } - } ] - }, - "BaseTransactionDataForSearch" : { - "description" : "Contains data used to search transactions, either as an owner point of view or as overview.", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseTransDataForSearch" - }, { - "type" : "object", - "properties" : { - "accountTypes" : { - "description" : "Visible account types from the given owner", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/AccountType" + }, + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } } - }, - "authorizationRoles" : { - "description" : "Visible authorization roles which can be used for filter. Only returned for admins.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/EntityReference" + } + }, + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } } - }, - "canViewAuthorized" : { - "description" : "Can the authenticated user view authorized transactions of this owner?", - "type" : "boolean" - }, - "visibleKinds" : { - "description" : "Contains the transaction kinds the authenticated user can view over this owner.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransactionKind" + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } } } } - } ] + } }, - "BaseTransactionOrInstallmentQueryFilters" : { - "description" : "Base query filters for either transactions or installments", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseTransQueryFilters" - }, { - "type" : "object", - "properties" : { - "kinds" : { - "description" : "The kinds of transactions to include", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransactionKind" - } - }, - "creationTypes" : { - "description" : "Include only payments created as one of these. This filter only applies to the following kinds: `payment`, `scheduledPayment` and `recurringPayment`. It doesn't affect other kinds of returned transactions. If you only want payments to be returned, set these in the `kinds` filter.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PaymentCreationTypeEnum" - } - }, - "authorized" : { - "description" : "When set, will only return transactions that went through the authorization process (if true) or that never went through it (when false). In either case, only kinds that can go through authorization are returned (`payment`, `order`, `recurringPayment` or `scheduledPayment`).", - "type" : "boolean" - }, - "authorizationStatuses" : { - "description" : "Authorization statuses used as search criteria. When set, only kinds that can go through authorization are returned (`payment`, `order`, `recurringPayment` or `scheduledPayment`).", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransactionAuthorizationStatusEnum" - } - }, - "authorizationPerformedBy" : { - "description" : "Id or other identifier (login name, email, etc) of the user that performed an authorization action (authorize, deny or cancel).", - "type" : "string" - } - } - } ] - }, - "BaseTransactionQueryFilters" : { - "description" : "Base query filters for transactions", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseTransactionOrInstallmentQueryFilters" - }, { - "type" : "object", - "properties" : { - "authorizationRoles" : { - "description" : "Either internal names or ids of authorization roles. To match, transactions must be pending authorization in a level which can be authorized by any of the given roles.", - "type" : "array", - "items" : { - "type" : "string" + "post": { + "operationId": "createOrder", + "summary": "Creates a new order as the seller for a specific buyer", + "description": "Creates a new order as the seller (i.e the user given in the path must resolve to the authenticated user) for a specific buyer (given in the request body). By default the status of the order will be `draft`. If the order contains all the required information and the seller wants to send it to the buyer then he can do it changing the `draft` boolean field to `false` before submit.", + "tags": [ + "Orders" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/user" + } + ], + "responses": { + "201": { + "description": "Returns the identifier of the new order", + "headers": { + "Location": { + "description": "URL for viewing the order details", + "schema": { + "type": "string" + } } }, - "ticketStatuses" : { - "description" : "Statuses used as search criteria applied only to transactions of kind `ticket`.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TicketStatusEnum" + "content": { + "text/plain": { + "schema": { + "type": "string" + } } - }, - "ticketExpiration" : { - "description" : "The minimum / maximum date for ticket expiration. Only affects tickets. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "type" : "array", - "items" : { - "type" : "string", - "format" : "date-time" + } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } } - }, - "recurringPaymentStatuses" : { - "description" : "Statuses used as search criteria applied only to transactions of kind `recurringPayment`. If this filter is not empty then pending recurring payments will be excluded from the result. Pending recurring payments does not have a status.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/RecurringPaymentStatusEnum" + } + }, + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } } - }, - "scheduledPaymentStatuses" : { - "description" : "Statuses used as search criteria applied only to transactions of kind `scheduledPayment`. If this filter is not empty then pending scheduled payments will be excluded from the result. Pending scheduled payments does not have a status.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ScheduledPaymentStatusEnum" + } + }, + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } } - }, - "paymentRequestStatuses" : { - "description" : "Statuses used as search criteria applied only to transactions of kind `paymentRequest`.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PaymentRequestStatusEnum" + } + }, + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } } - }, - "paymentRequestExpiration" : { - "description" : "The minimum / maximum date for payment request expiration. Only affects payment requests. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "type" : "array", - "items" : { - "type" : "string", - "format" : "date-time" + } + }, + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" + } } - }, - "externalPaymentStatuses" : { - "description" : "Statuses used as search criteria applied only to transactions of kind `externalPayment`.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ExternalPaymentStatusEnum" + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } } - }, - "externalPaymentExpiration" : { - "description" : "The minimum / maximum date for external payment expiration. Only affects external payments. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "type" : "array", - "items" : { - "type" : "string", - "format" : "date-time" - } - } - } - } ] - }, - "BaseTransactionResult" : { - "description" : "Base fields for transaction result", - "allOf" : [ { - "$ref" : "#/components/schemas/TransResult" - }, { - "type" : "object", - "properties" : { - "kind" : { - "description" : "The transaction kind. For example, if the front end has distinct views for a regular payment, scheduled payment and so on, this information is useful to determine the actual view.", - "allOf" : [ { - "$ref" : "#/components/schemas/TransactionKind" - } ] - }, - "creationType" : { - "description" : "Indicates how this payment was created. Only returned if `kind` is either `payment`, `scheduledPayment` or `recurringPayment`.", - "allOf" : [ { - "$ref" : "#/components/schemas/PaymentCreationTypeEnum" - } ] - }, - "authorizationStatus" : { - "description" : "Indicates the authorization status for this payment. Only returned if `kind` is either `payment`, `scheduledPayment` or `recurringPayment`.", - "allOf" : [ { - "$ref" : "#/components/schemas/TransactionAuthorizationStatusEnum" - } ] - }, - "currency" : { - "description" : "Either internal name or id of the transaction currency.", - "type" : "string" - }, - "expirationDate" : { - "description" : "Only returned if the `kind` is either `paymentRequest`, `externalPayment` or `ticket`. The deadline for the payment to be processed. In case of `externalPayment` if no user is registered with either e-mail or mobile phone matching, it is canceled. The same is done in case of `ticket` if it is not accepted by any user.", - "type" : "string", - "format" : "date-time" - }, - "scheduledPaymentStatus" : { - "description" : "The scheduled payment status. Only returned if `kind` is `scheduledPayment`.", - "allOf" : [ { - "$ref" : "#/components/schemas/ScheduledPaymentStatusEnum" - } ] - }, - "installmentCount" : { - "description" : "The total number of installments. Only returned if `kind` is `scheduledPayment`.", - "type" : "integer" - }, - "processedInstallments" : { - "description" : "The number of processed installments. Only returned if `kind` is `scheduledPayment`.", - "type" : "integer" - }, - "firstInstallment" : { - "description" : "A reference to the first installment of this scheduled payment. Only returned if `kind` is `scheduledPayment`.", - "allOf" : [ { - "$ref" : "#/components/schemas/Installment" - } ] - }, - "firstOpenInstallment" : { - "description" : "A reference to the first installment which is still open. Only returned if `kind` is `scheduledPayment`.", - "allOf" : [ { - "$ref" : "#/components/schemas/Installment" - } ] - }, - "recurringPaymentStatus" : { - "description" : "The recurring payment status. Only returned if `kind` is `recurringPayment`.", - "allOf" : [ { - "$ref" : "#/components/schemas/RecurringPaymentStatusEnum" - } ] - }, - "occurrencesCount" : { - "description" : "The total number of occurrences to process. When null will be processed until manually canceled. Only returned if `kind` is `recurringPayment`.", - "type" : "integer" - }, - "nextOccurrenceDate" : { - "description" : "When the next recurring payment occurrence will be processed. Only returned if `kind` is `recurringPayment`.", - "type" : "string", - "format" : "date-time" - }, - "lastOccurrenceNumber" : { - "description" : "The number of the last processed occurrence", - "type" : "integer" - }, - "externalPaymentStatus" : { - "description" : "The external payment status. Only returned if `kind` is `externalPayment`.", - "allOf" : [ { - "$ref" : "#/components/schemas/ExternalPaymentStatusEnum" - } ] - }, - "toPrincipalType" : { - "description" : "The principal type an external payment was sent to. Only returned if `kind` is `externalPayment`.", - "allOf" : [ { - "$ref" : "#/components/schemas/PrincipalType" - } ] - }, - "toPrincipalValue" : { - "description" : "The principal to which an external payment was sent to. Only returned if `kind` is `externalPayment`.", - "type" : "string" - }, - "paymentRequestStatus" : { - "description" : "The payment request status. Only returned if `kind` is `paymentRequest`.", - "allOf" : [ { - "$ref" : "#/components/schemas/PaymentRequestStatusEnum" - } ] - }, - "ticketStatus" : { - "description" : "The ticket status. Only returned if `kind` is `ticket`.", - "allOf" : [ { - "$ref" : "#/components/schemas/TicketStatusEnum" - } ] - } - } - } ] - }, - "BaseTransferDataForSearch" : { - "description" : "Contains basic information used to search for transfers", - "x-abstract" : true, - "allOf" : [ { - "$ref" : "#/components/schemas/BaseTransDataForSearch" - }, { - "type" : "object", - "properties" : { - "transferStatusFlows" : { - "description" : "References to the allowed transfer status flows for this account", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransferStatusFlow" - } - } - } - } ] - }, - "BaseTransferQueryFilters" : { - "description" : "Base definitions for searching transfers", - "x-abstract" : true, - "allOf" : [ { - "$ref" : "#/components/schemas/BaseTransQueryFilters" - }, { - "type" : "object", - "properties" : { - "chargedBack" : { - "description" : "When set to either `true` will only return transfers that were charged-back. When set to `false`, will only return transfers that were not charged-back. When left blank will not filter by this creterion.", - "type" : "boolean" - }, - "statuses" : { - "type" : "array", - "items" : { - "type" : "string" - }, - "description" : "Transfer statuses used as search criteria. Each array element should be either the identifier or the status qualified internal name, composed by flow internal name, a dot, and the status internal name. For example, `loan.open` would be a valid internal name." - }, - "kinds" : { - "description" : "The kind of transfers to return", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransferKind" + } + } + }, + "requestBody": { + "description": "The order to be created with status `draft`", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrderNew" } } } - } ] - }, - "BaseUserDataForSearch" : { - "description" : "Contains basic data used to search users in distinct contexts", - "x-abstract" : true, - "type" : "object", - "properties" : { - "allowKeywords" : { - "description" : "Indicates whether using keywords is allowed", - "type" : "boolean" + } + } + }, + "/{user}/orders/data-for-new": { + "get": { + "operationId": "getOrderDataForNew", + "summary": "Returns data for creating orders as the seller for a specific buyer.", + "description": "The authenticated user must be the seller (i.e the user given in the path must resolve to the authenticated user) with webshop enable permission.", + "tags": [ + "Orders" + ], + "security": [ + { + "basic": [] }, - "canViewImages" : { - "description" : "Indicates whether user images are visible in this search", - "type" : "boolean" + { + "session": [] }, - "fieldsInSearch" : { - "deprecated" : true, - "x-remove-version" : 4.17, - "description" : "Use `fieldsInBasicSearch` and `fieldsInAdvancedSearch` instead.\n\n\nThe internal names of either basic or custom profile fields which can be used as search filters (separated fields, not keywords).", - "type" : "array", - "items" : { - "type" : "string" - } + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" }, - "basicFields" : { - "description" : "The list of basic profile fields that can be used either as search filters (if the internal names are present in the `fieldsInSearch` property) or on the result list (if the internal names are present in the `fieldsInList` property).", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/BasicProfileFieldInput" - } + { + "$ref": "#/components/parameters/user" }, - "customFields" : { - "description" : "The list of custom profile fields that can be used either as search filters (if the internal names are present in the `fieldsInSearch` property) or on the result list (if the internal names are present in the `fieldsInList` property)", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/CustomFieldDetailed" + { + "name": "buyer", + "in": "query", + "required": true, + "description": "The user for whom the order will be created. It could be a user identification value, such as id, username, e-mail, phone, etc. Id is always allowed, others depend on Cyclos configuration. Note that a valid numeric value is always considered as id. For example, when using another identification method that can be numeric only, prefix\\ the value with a single quote (like in Excel spreadsheets);", + "schema": { + "type": "string" } }, - "products" : { - "description" : "The list of products which admins can use to filter users.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/EntityReference" + { + "name": "currency", + "in": "query", + "required": false, + "description": "Either id or internal name of the currency for the new order. If not given a list with the available currencies for the given buyer will be returned. At the moment of create the order a currency is required.", + "schema": { + "type": "string" } - }, - "agreements" : { - "description" : "The list of agreements that can be used to filter users that have either accepted or not accepted specific agreements. Only returned for admins / brokers that can see the user agreement log.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Agreement" + } + ], + "responses": { + "200": { + "description": "The order data for create sales.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrderDataForNew" + } + } } }, - "groups" : { - "description" : "The groups the authenticated user can use to filter users. Admins can always filter by groups, while users depend on a permission, which can be to only view group sets, only groups or none.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Group" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } } }, - "searchByDistanceData" : { - "$ref" : "#/components/schemas/SearchByDistanceData" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } + } }, - "addressFieldsInSearch" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/AddressQueryFieldEnum" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } } }, - "exportFormats" : { - "description" : "The formats which the search results can be exported.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ExportFormat" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } } }, - "fieldsInBasicSearch" : { - "description" : "The internal names of the profile fields that should be used as search filters in the basic section (separated fields, not keywords)", - "type" : "array", - "items" : { - "type" : "string" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" + } + } } }, - "fieldsInAdvancedSearch" : { - "description" : "The internal names of the profile fields that should be used as search filters in the advanced section (separated fields, not keywords)", - "type" : "array", - "items" : { - "type" : "string" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } } } } - }, - "BaseVoucherBuyingPreview" : { - "description" : "Common fields for a voucher buying or sending preview", - "type" : "object", - "properties" : { - "user" : { - "description" : "The user over which the operation is being previewed.", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "type" : { - "description" : "The voucher type.", - "allOf" : [ { - "$ref" : "#/components/schemas/VoucherTypeDetailed" - } ] + } + }, + "/{user}/orders/data-for-search": { + "get": { + "operationId": "getOrderDataForSearch", + "summary": "Returns data for searching orders (purchases / sales) of a specific user.", + "description": "The authenticated user must be the seller, buyer or a manager user with permission to view purchases or sales.", + "tags": [ + "Orders" + ], + "security": [ + { + "basic": [] }, - "paymentPreview" : { - "description" : "Preview of the payment to be generated if the voucher is bought / sent.", - "allOf" : [ { - "$ref" : "#/components/schemas/PaymentPreview" - } ] + { + "session": [] }, - "confirmationPasswordInput" : { - "description" : "If a confirmation password is used, contains the definitions on how to request that password from the user. This confirmation password is required when performing sensible actions. Sometimes this is dynamic, for example, the confirmation might be configured to be used only once per session, or operations like payments may have a limit per day to be without confirmation (pinless).", - "allOf" : [ { - "$ref" : "#/components/schemas/PasswordInput" - } ] + { + "accessClient": [] } - } - }, - "BaseVouchersDataForSearch" : { - "description" : "Base parameters used for searching vouchers", - "type" : "object", - "properties" : { - "mask" : { - "description" : "The input mask for voucher tokens. Optional.", - "type" : "string" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" }, - "types" : { - "description" : "The voucher types that can be used for searching", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/VoucherType" + { + "$ref": "#/components/parameters/user" + }, + { + "name": "sales", + "in": "query", + "required": false, + "description": "Whether we are getting data for searching purchases or sales. If not specified it's assumed purchases (i.e false)", + "schema": { + "type": "boolean" } } - } - }, - "BaseVouchersQueryFilters" : { - "description" : "Common definitions for searching vouchers", - "allOf" : [ { - "$ref" : "#/components/schemas/QueryFilters" - }, { - "type" : "object", - "properties" : { - "amountRange" : { - "description" : "The minimum / maximum voucher amount", - "type" : "array", - "items" : { - "type" : "string", - "format" : "number" - } - }, - "creationPeriod" : { - "description" : "The minimum / maximum voucher creation date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "type" : "array", - "items" : { - "type" : "string", - "format" : "date-time" + ], + "responses": { + "200": { + "description": "The order data fo search.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrderDataForSearch" + } } - }, - "expirationPeriod" : { - "description" : "The minimum / maximum voucher expiration date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "type" : "array", - "items" : { - "type" : "string", - "format" : "date-time" + } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } } - }, - "token" : { - "description" : "The voucher token (with or without mask)", - "type" : "string" - }, - "types" : { - "description" : "The ids or internal names of voucher types", - "type" : "array", - "items" : { - "type" : "string" + } + }, + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } } - }, - "statuses" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/VoucherStatusEnum" + } + }, + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } } - }, - "creationType" : { - "$ref" : "#/components/schemas/VoucherCreationTypeEnum" - }, - "orderBy" : { - "$ref" : "#/components/schemas/VoucherOrderByEnum" - } - } - } ] - }, - "BasicAdQueryFilters" : { - "description" : "Basic definitions for a advertisements search", - "x-abstract" : true, - "allOf" : [ { - "$ref" : "#/components/schemas/FullTextWithDistanceQueryFilters" - }, { - "type" : "object", - "properties" : { - "customFields" : { - "type" : "array", - "items" : { - "type" : "string" - }, - "description" : "Advertisement custom field values used as filters. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by : (colon). For example, `customFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, customFields=field1:valueA|valueB. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `customFields=tradeType:offer|search,extraDate:2000-01-01|2001-12-31` would match results whose custom field with internal name `tradeType` is either `offer` or `search`, and whose `extraDate` is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `customFields=extraDate:|2001-12-31`.\nA note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `customFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `customFields=dynamic:'business`." - }, - "category" : { - "type" : "string", - "description" : "Either id or internal name of a category" - }, - "currency" : { - "type" : "string", - "description" : "Either id or internal name of a currency for the price" - }, - "priceRange" : { - "description" : "The minumum / maximum price. Used only if a currency is specified. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "type" : "array", - "items" : { - "type" : "string", - "format" : "number" + } + }, + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } } - }, - "productNumber" : { - "type" : "string", - "description" : "Textual search for a product number for webshop only." - }, - "hasImages" : { - "type" : "boolean", - "description" : "When set to `true` only advertisements with images are returned" - }, - "publicationPeriod" : { - "description" : "The minimum / maximum publication date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "type" : "array", - "items" : { - "type" : "string", - "format" : "date-time" + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } } - }, - "expirationPeriod" : { - "description" : "The minimum / maximum expiration date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "type" : "array", - "items" : { - "type" : "string", - "format" : "date-time" + } + } + } + } + }, + "/orders/{order}": { + "parameters": [ + { + "$ref": "#/components/parameters/order" + } + ], + "get": { + "operationId": "viewOrder", + "summary": "Returns details of an order.", + "description": "Returns detailed information of an order.", + "tags": [ + "Orders" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The order details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrderView" + } } - }, - "kind" : { - "$ref" : "#/components/schemas/AdKind" - }, - "statuses" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/AdStatusEnum" + } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } } - }, - "orderBy" : { - "$ref" : "#/components/schemas/AdOrderByEnum" - }, - "addressResult" : { - "$ref" : "#/components/schemas/AdAddressResultEnum" } - } - } ] - }, - "BasicFullProfileEditResult" : { - "description" : "Result of saving the full profile at once", - "type" : "object", - "properties" : { - "createdLandLinePhones" : { - "description" : "Identifiers of created land-line phones", - "type" : "array", - "items" : { - "type" : "string" + }, + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } } }, - "createdMobilePhones" : { - "description" : "Identifiers of created mobile phones", - "type" : "array", - "items" : { - "type" : "string" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } } - } - } - }, - "BasicOperatorQueryFilters" : { - "description" : "Basic definitions for operators search filters", - "x-abstract" : true, - "allOf" : [ { - "$ref" : "#/components/schemas/QueryFilters" - }, { - "type" : "object", - "properties" : { - "creationPeriod" : { - "description" : "The minimum / maximum user creation date. Only taken into account if searching as administrator or managing broker. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "type" : "array", - "items" : { - "type" : "string", - "format" : "date-time" + }, + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } } - }, - "statuses" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/UserStatusEnum" + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } } } } - } ] + } }, - "BasicProfileFieldInput" : { - "description" : "Definitions to input a basic profile field", - "type" : "object", - "properties" : { - "mask" : { - "description" : "If this field has a mask used for input, contains this mask. Currently only the account number can (optionally) have one.", - "type" : "string" + "put": { + "operationId": "updateOrder", + "summary": "Updates an existing order.", + "description": "Updates an existing order.", + "tags": [ + "Orders" + ], + "security": [ + { + "basic": [] }, - "example" : { - "description" : "If this field has an example value, holds that example", - "type" : "string" + { + "session": [] }, - "field" : { - "description" : "The basic field this refers to", - "allOf" : [ { - "$ref" : "#/components/schemas/BasicProfileFieldEnum" - } ] + { + "accessClient": [] } - } - }, - "BasicUserDataForNew" : { - "description" : "Contains basic data to register either a user or operator", - "allOf" : [ { - "$ref" : "#/components/schemas/UserBasicData" - }, { - "type" : "object", - "properties" : { - "allowSetSendActivationEmail" : { - "description" : "Whether the current user is allowed to skip the activateion e-mail", - "type" : "boolean" - }, - "generatedUsername" : { - "description" : "Indicates whether the login name is generated", - "type" : "boolean" - }, - "phoneConfiguration" : { - "$ref" : "#/components/schemas/PhoneConfigurationForUserProfile" - }, - "passwordTypes" : { - "description" : "The password types that should be registered together with the user", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PasswordTypeRegistration" - } - } - } - } ] - }, - "BasicUserManage" : { - "description" : "Contains the common fields for either creating or modifying a user / operator", - "type" : "object", - "x-implements" : "IUser", - "x-abstract" : true, - "properties" : { - "name" : { - "type" : "string", - "description" : "The user's full name" - }, - "username" : { - "type" : "string", - "description" : "The user's login name" - }, - "email" : { - "type" : "string", - "description" : "The user's e-mail" - }, - "customValues" : { - "type" : "object", - "description" : "Holds the custom field values, keyed by field internal name or id. The format of the value depends on the custom field type. In order to lookup the custom fields, use either the `GET /users/data-for-new` (when creating) or `GET /users/{user}/data-for-edit` (when modifying) a user, and lookup each field by either internal name. Example: `{..., \"customValues\": {\"gender\": \"male\", \"birthDate\": \"1980-10-27\"}}`", - "additionalProperties" : { - "type" : "string" - } - } - } - }, - "BasicUserQueryFilters" : { - "description" : "Base definitions for user search filters", - "x-abstract" : true, - "allOf" : [ { - "$ref" : "#/components/schemas/FullTextWithDistanceQueryFilters" - }, { - "type" : "object", - "properties" : { - "ignoreProfileFieldsInList" : { - "type" : "boolean", - "description" : "When set to `true`, instead of returning users with corresponding profile fields set on list, will return them with `display`." - }, - "usersToExclude" : { - "type" : "array", - "items" : { - "type" : "string" - }, - "description" : "Indicated the users to be excluded from the result" - }, - "usersToInclude" : { - "type" : "array", - "items" : { - "type" : "string" - }, - "description" : "Indicated the users to be included in the result. Any other user not present in this list will be excluded from the result." - }, - "includeGlobal" : { - "type" : "boolean", - "description" : "Indicates whether global administrators should be returned when searching users in a network. Only usable by global administrators." - }, - "invitedBy" : { - "type" : "string", - "description" : "The user that has invited the returned users. Only used when searching as a manager (admin / broker)." - }, - "activationPeriod" : { - "description" : "The minimum / maximum user activation date. Only taken into account if searching as administrator or managing broker. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "type" : "array", - "items" : { - "type" : "string", - "format" : "date-time" - } - }, - "creationPeriod" : { - "description" : "The minimum / maximum user creation date. Only taken into account if searching as administrator or managing broker. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "type" : "array", - "items" : { - "type" : "string", - "format" : "date-time" + ], + "responses": { + "204": { + "description": "The order was updated." + }, + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" + } } - }, - "lastLoginPeriod" : { - "description" : "The minimum / maximum user last login date. Only taken into account if searching as administrator or managing broker. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "type" : "array", - "items" : { - "type" : "string", - "format" : "date-time" + } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } } - }, - "groups" : { - "type" : "array", - "items" : { - "type" : "string" - }, - "description" : "Either id or internal names of groups / group sets" - }, - "products" : { - "type" : "array", - "items" : { - "type" : "string" - }, - "description" : "Either id or internal names of products the users should have assigned. Ignored if the authenticated user isn't an administrator." - }, - "productsIndividuallyAssigned" : { - "type" : "boolean", - "description" : "When set to `true`, the list specifid in `products` will only match users with those products assigned individually, not via group or group set. When set to `false` (default), the products will match any level (individual, group or group set)." - }, - "brokers" : { - "type" : "array", - "items" : { - "type" : "string" - }, - "description" : "Either id or a principal (login name, e-mail, etc) for brokers" - }, - "mainBrokerOnly" : { - "type" : "boolean", - "description" : "When set to `true`, will match only users that have the brokers as set in the `brokers` parameter as main broker." - }, - "hasBroker" : { - "type" : "boolean", - "description" : "When set to `true`, will match only users that have at least one broker. When set to `false`, will will match only users without brokers. Ignored if the logged user isn't an admin." - }, - "acceptedAgreements" : { - "type" : "array", - "items" : { - "type" : "string" - }, - "description" : "Either id or internal names of agreements the user must have accepted. Ignored if the logged user isn't an admin or broker with permission to view the user agreement log." - }, - "notAcceptedAgreements" : { - "type" : "array", - "items" : { - "type" : "string" - }, - "description" : "Either id or internal names of agreements the user must not have accepted. Ignored if the logged user isn't an admin or broker with permission to view the user agreement log." - }, - "includeGroup" : { - "type" : "boolean", - "description" : "When set to `true` and the logged user has permission to view user groups, will return the `group` property on users." - }, - "includeGroupSet" : { - "type" : "boolean", - "description" : "When set to `true` and the logged user has permission to view user group sets, will return the `groupSet` property on users." - }, - "addressResult" : { - "$ref" : "#/components/schemas/UserAddressResultEnum" - }, - "statuses" : { - "description" : "The possible status of the user. If no status is given, `active` and `blocked` users are returned.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/UserStatusEnum" + } + }, + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } } } - } - } ] - }, - "BrokerDataForAdd" : { - "description" : "Data for adding a new broker to a user.", - "type" : "object", - "properties" : { - "user" : { - "description" : "The user", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] }, - "brokers" : { - "description" : "The current user's brokers", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/User" - } - }, - "brokerGroups" : { - "description" : "The broker groups that can be used when searching for the new broker", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Group" - } - } - } - }, - "BrokerView" : { - "description" : "Contains data about a brokerage relationship", - "type" : "object", - "properties" : { - "mainBroker" : { - "type" : "boolean", - "description" : "Indicates whether this broker is the main or not." - }, - "since" : { - "type" : "string", - "format" : "date-time", - "description" : "Indicates when the brokerage relationship began." - }, - "broker" : { - "description" : "The broker user.", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - } - } - }, - "Brokering" : { - "description" : "A brokering relationship with a specific broker", - "type" : "object", - "properties" : { - "broker" : { - "description" : "The broker user", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "main" : { - "description" : "Indicates if this is the user's main broker", - "type" : "boolean" - }, - "since" : { - "description" : "The date the brokering relation started", - "type" : "string", - "format" : "date-time" - } - } - }, - "BrokeringLog" : { - "type" : "object", - "properties" : { - "broker" : { - "description" : "The broker", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "by" : { - "description" : "The user that performed the action", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "action" : { - "$ref" : "#/components/schemas/BrokeringActionEnum" - }, - "date" : { - "description" : "The action date", - "type" : "string", - "format" : "date-time" - } - } - }, - "BrokeringView" : { - "description" : "Details of a brokering relationship", - "allOf" : [ { - "$ref" : "#/components/schemas/Brokering" - }, { - "type" : "object", - "properties" : { - "user" : { - "description" : "The user", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - } - } - } ] - }, - "BuyVoucher" : { - "description" : "Parameters for buying vouchers", - "allOf" : [ { - "$ref" : "#/components/schemas/CreateVoucher" - }, { - "type" : "object", - "properties" : { - "gift" : { - "description" : "Indicates whether the bought voucher(s) is(are) gift. Only used the the voucher type is configured to allow choosing whether bought vouchers are gift. Otherwise, the type defines it. The main difference between gift or not is that for gift vouchers the buyer cannot see where the voucher was used, which must be done for privacy's sake.", - "type" : "boolean" - }, - "paymentCustomValues" : { - "type" : "object", - "description" : "Holds the payment custom field values, keyed by field internal name or id. The format of the value depends on the custom field type.", - "additionalProperties" : { - "type" : "string" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } } - }, - "customValues" : { - "deprecated" : true, - "x-remove-version" : 4.17, - "type" : "object", - "description" : "Use `paymentCustomValues` instead.\n\n\nHolds the payment custom field values, keyed by field internal name or id. The format of the value depends on the custom field type.", - "additionalProperties" : { - "type" : "string" - } - } - } - } ] - }, - "BuyVoucherError" : { - "description" : "Error when buying a voucher", - "allOf" : [ { - "$ref" : "#/components/schemas/Error" - }, { - "type" : "object", - "properties" : { - "currency" : { - "description" : "Currency reference. Only if `code` is `maxAmountForPeriod` or `maxTotalOpenAmount`", - "allOf" : [ { - "$ref" : "#/components/schemas/Currency" - } ] - }, - "amountLeftForBuying" : { - "description" : "Indicates the maximum amount the user can buy this time without exceeding the maximum. Only if `code` is `maxAmountForPeriod`.", - "type" : "string", - "format" : "number" - }, - "dateAllowedAgain" : { - "description" : "Indicates the date this user will be able to buy vouchers again for this type. Only if `code` is `maxAmountForPeriod`.", - "type" : "string", - "format" : "date-time" - }, - "currentOpenAmount" : { - "description" : "Indicates the current total amount that is open. Only if `code` is `maxOpenAmount` or `maxTotalOpenAmount`.", - "type" : "string", - "format" : "number" - }, - "maxOpenAmount" : { - "description" : "Indicates the maximum total open amount. Only if `code` is `maxOpenAmount` or `maxTotalOpenAmount`.", - "type" : "string", - "format" : "number" - }, - "paymentError" : { - "description" : "The `PaymentError` generated when the voucher payment was being created. Only if `code` is `payment`.", - "allOf" : [ { - "$ref" : "#/components/schemas/PaymentError" - } ] - }, - "code" : { - "$ref" : "#/components/schemas/BuyVoucherErrorCode" } - } - } ] - }, - "CaptchaInput" : { - "description" : "Contains all information for a CAPTCHA entry. Cyclos currently supports both internally generated CAPTCHA images and reCAPTCHA v2.", - "type" : "object", - "properties" : { - "provider" : { - "description" : "The CAPTCHA provider. Each client must implement each of the desired target integrations. For internal CAPTCHAs, see the documentation of the operations under `Captcha`. For others, please, consult the corresponding documentation.", - "allOf" : [ { - "$ref" : "#/components/schemas/CaptchaProviderEnum" - } ] }, - "textLength" : { - "description" : "Indicates the expected text length for captcha responses. Only returned when `provider` is `internal`.", - "type" : "integer" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } + } + }, + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" + } + } + } }, - "recaptchaKey" : { - "description" : "The reCAPTCHA site key that should be used by clients to generate the CAPTCHA challenges. Only returned when `provider` is `recaptchaV2`.", - "type" : "string" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "requestBody": { + "description": "The order to be edited.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrderEdit" + } + } } } }, - "CaptchaResponse" : { - "description" : "Data sent to the server containing the response of a user to a captcha challenge", - "type" : "object", - "properties" : { - "challenge" : { - "type" : "string", - "description" : "The captcha challenge identifier" + "delete": { + "operationId": "deleteOrder", + "summary": "Removes an order.", + "description": "Removes an order.", + "tags": [ + "Orders" + ], + "security": [ + { + "basic": [] }, - "response" : { - "type" : "string", - "description" : "The captcha response, as informed by the user" + { + "session": [] + }, + { + "accessClient": [] } - } - }, - "ChangeForgottenPassword" : { - "description" : "The parameters for confirming a forgotten password reset", - "type" : "object", - "properties" : { - "user" : { - "description" : "The user identification for password change", - "type" : "string" + ], + "responses": { + "204": { + "description": "The order was removed." }, - "code" : { - "description" : "The verification code which was sent to the user", - "type" : "string" + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" + } + } + } }, - "securityAnswer" : { - "description" : "When a security question is asked, this is the answer, and is required.", - "type" : "string" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } + } }, - "newPassword" : { - "description" : "The new password value. Required when the password is manual.", - "type" : "string" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } + } }, - "checkConfirmation" : { - "type" : "boolean", - "description" : "Depending on the client, if a confirm password field is shown to users, it might be useful to check the confirmation password value on the server. This way, if there are other validation exceptions, they are all shown together. In this case, this field should be set to `true` and the `confirmationValue` should be passed in with the user input. However, in cases where clients just want to register a user with a password non interactively (like in a bulk registration), passing the password value twice is not desirable. In such cases, this field can be left empty (or set to `false`), and the `newPasswordConfirmation` will be ignored." + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } }, - "newPasswordConfirmation" : { - "type" : "string", - "description" : "The new password confirmation value. Is ignored unless `checkConfirmation` is set to `true`." + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } + } }, - "sendMedium" : { - "description" : "Only used for generated passwords. Is the send medium to which to send the password. Normally is the same as the one to which the verification code was sent.", - "allOf" : [ { - "$ref" : "#/components/schemas/SendMediumEnum" - } ] + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } } } - }, - "ChangeGroupMembershipParams" : { - "description" : "Parameters for changing a user / operator group", - "type" : "object", - "properties" : { - "group" : { - "description" : "The new group id or internal name", - "type" : "string" + } + }, + "/orders/{order}/export/{format}": { + "parameters": [ + { + "$ref": "#/components/parameters/order" + }, + { + "$ref": "#/components/parameters/format" + } + ], + "get": { + "operationId": "exportOrder", + "summary": "Exports the order details to a file.", + "description": "Exports the order details to a file. The available formats are available in `OrderView`", + "tags": [ + "Orders" + ], + "security": [ + { + "basic": [] }, - "comment" : { - "description" : "Comments for this group change", - "type" : "string" + { + "session": [] + }, + { + "accessClient": [] } - } - }, - "ChangePassword" : { - "description" : "Contains fields used as parameters when changing a user's password", - "type" : "object", - "properties" : { - "oldPassword" : { - "description" : "The current password value. Required when the user is changing his own password. Not used when admins / brokers are changing the password of a user they manage.", - "type" : "string" + ], + "responses": { + "200": { + "description": "The file content", + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } }, - "newPassword" : { - "description" : "The new password value. Required.", - "type" : "string" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } + } }, - "checkConfirmation" : { - "type" : "boolean", - "description" : "Depending on the client, if a confirm password field is shown to users, it might be useful to check the confirmation password value on the server. This way, if there are other validation exceptions, they are all shown together. In this case, this field should be set to `true` and the `confirmationValue` should be passed in with the user input. However, in cases where clients just want to register a user with a password non interactively (like in a bulk registration), passing the password value twice is not desirable. In such cases, this field can be left empty (or set to `false`), and the `newPasswordConfirmation` will be ignored." + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } + } }, - "newPasswordConfirmation" : { - "type" : "string", - "description" : "The new password confirmation value. Is ignored unless `checkConfirmation` is set to `true`." + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } }, - "forceChange" : { - "description" : "Indicates whether the new password needs to be changed on the next login. Only used when admins / brokers are changing the password of a user they manage.", - "type" : "boolean" - } - } - }, - "ChangePaymentRequestExpirationDate" : { - "description" : "Parameters for changing the payment request expiration date.", - "type" : "object", - "properties" : { - "comments" : { - "description" : "A comment the payee can set.", - "type" : "string" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } + } }, - "newExpirationDate" : { - "description" : "The new payment request expiration date.", - "type" : "string", - "format" : "date-time" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } } } - }, - "ChangeUserStatusParams" : { - "description" : "Parameters for changing a user status", - "type" : "object", - "properties" : { - "status" : { - "$ref" : "#/components/schemas/UserStatusEnum" + } + }, + "/orders/{order}/data-for-edit": { + "get": { + "operationId": "getOrderDataForEdit", + "summary": "Returns data for modifying an order as the seller.", + "description": "Returns data for modifying an order as the seller.", + "tags": [ + "Orders" + ], + "security": [ + { + "basic": [] }, - "comment" : { - "description" : "Comments for this status change", - "type" : "string" - } - } - }, - "ChangeVoucherExpirationDate" : { - "description" : "Parameters for changing the voucher expiration date.", - "type" : "object", - "properties" : { - "comments" : { - "description" : "A comment that can be set.", - "type" : "string" + { + "session": [] }, - "newExpirationDate" : { - "description" : "The new voucher expiration date.", - "type" : "string", - "format" : "date-time" + { + "accessClient": [] } - } - }, - "ChangeVoucherNotificationSettings" : { - "description" : "Parameters for changing voucher notification settings", - "type" : "object", - "properties" : { - "email" : { - "description" : "The new email.", - "type" : "string" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" }, - "mobilePhone" : { - "description" : "The new mobile phone number.", - "type" : "string" - }, - "enableNotifications" : { - "description" : "Whether the notifications are enabled or not.", - "type" : "boolean" + { + "$ref": "#/components/parameters/order" } - } - }, - "ChangeVoucherPin" : { - "description" : "Parameters for changing the voucher pin", - "allOf" : [ { - "$ref" : "#/components/schemas/SimpleChangeVoucherPin" - }, { - "type" : "object", - "properties" : { - "oldPin" : { - "description" : "The old pin. Will be required / used if the `VoucherView.requireOldPinForChange` flag is true.", - "type" : "string" + ], + "responses": { + "200": { + "description": "The order data.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrderDataForEdit" + } + } } - } - } ] - }, - "ClientView" : { - "description" : "Details on an access client", - "allOf" : [ { - "$ref" : "#/components/schemas/NamedEntity" - }, { - "type" : "object", - "properties" : { - "activationDate" : { - "description" : "The date the client was activated", - "type" : "string", - "format" : "date-time" - }, - "confirmationPasswordInput" : { - "description" : "If a confirmation password is used, contains the definitions on how to request that password from the user. This confirmation password is required when performing sensible actions. Sometimes this is dynamic, for example, the confirmation might be configured to be used only once per session, or operations like payments may have a limit per day to be without confirmation (pinless).", - "allOf" : [ { - "$ref" : "#/components/schemas/PasswordInput" - } ] - }, - "canGetActivationCode" : { - "description" : "Can the authenticated user get the activation code, to later activate (assign) this client?", - "type" : "boolean" - }, - "canUnassign" : { - "description" : "Can the authenticated user unassign this client?", - "type" : "boolean" - }, - "canBlock" : { - "description" : "Can the authenticated user block this client?", - "type" : "boolean" - }, - "canUnblock" : { - "description" : "Can the authenticated user unblock this client?", - "type" : "boolean" - }, - "status" : { - "$ref" : "#/components/schemas/ClientStatusEnum" - }, - "user" : { - "description" : "The user which owns this access client", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - } - } - } ] - }, - "ConflictError" : { - "description" : "Error returned when there was a conflict with some expected status vs the actual database status", - "type" : "object", - "properties" : { - "code" : { - "$ref" : "#/components/schemas/ConflictErrorCode" - } - } - }, - "Contact" : { - "description" : "A contact is a relation between 2 users: the contact owner and the contact user. It can also contain custom fields.", - "allOf" : [ { - "$ref" : "#/components/schemas/Entity" - }, { - "type" : "object", - "properties" : { - "contact" : { - "description" : "The contact user (not the contact owner)", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - } - } - } ] - }, - "ContactBasicData" : { - "description" : "Contains data shared by both ContactDataForNew and ContactDataForEdit", - "type" : "object", - "properties" : { - "customFields" : { - "description" : "The contact custom fields. For contact creation it will contains only the editable fields. Otherwise the visible ones.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/CustomFieldDetailed" - } - }, - "contactUser" : { - "description" : "The contact user details", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "user" : { - "description" : "The user which owns the contact", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - } - } - }, - "ContactDataForEdit" : { - "description" : "Contains data for editing an existing contact", - "allOf" : [ { - "$ref" : "#/components/schemas/ContactBasicData" - }, { - "type" : "object", - "properties" : { - "editableFields" : { - "description" : "The internal names of custom fields that can be edited", - "type" : "array", - "items" : { - "type" : "string" + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } } - }, - "contact" : { - "description" : "The contact that is being edited. This value can be modified and sent back to `PUT /contact/{id}`", - "allOf" : [ { - "$ref" : "#/components/schemas/ContactEdit" - } ] - }, - "binaryValues" : { - "description" : "Holds the current values for file / image custom fields as lists of `StoredFile`s / `Image`s.", - "allOf" : [ { - "$ref" : "#/components/schemas/CustomFieldBinaryValues" - } ] - } - } - } ] - }, - "ContactDataForNew" : { - "description" : "Contains data for creating a new contact", - "allOf" : [ { - "$ref" : "#/components/schemas/ContactBasicData" - }, { - "type" : "object", - "properties" : { - "contact" : { - "description" : "The contact populated with the default fields. This value can be modified and sent back to `POST /{owner}/contacts/{contactUser}`.", - "allOf" : [ { - "$ref" : "#/components/schemas/ContactNew" - } ] - } - } - } ] - }, - "ContactEdit" : { - "description" : "Parameters for editing an existing contact", - "allOf" : [ { - "$ref" : "#/components/schemas/ContactManage" - }, { - "type" : "object", - "properties" : { - "version" : { - "type" : "integer", - "description" : "The version stamp for the current object, used for optimistic locking. When saving, the same version as previously received needs to be passed back. If no one else has saved the object, the version will match and the object will be updated. However, if someone other has saved the object, the version will no longer match, and an error will be raised. This is used to prevent multiple users (or processes) from updating the same object and unwilingly overridding the property values, leading to data loss." - } - } - } ] - }, - "ContactInfo" : { - "description" : "An additional contact information reference", - "x-implements" : "IContactInfo, INormalizedPhones", - "allOf" : [ { - "$ref" : "#/components/schemas/NamedEntity" - }, { - "type" : "object", - "properties" : { - "email" : { - "type" : "string", - "description" : "The e-mail for this additional contact information" - }, - "mobilePhone" : { - "type" : "string", - "description" : "The formatted mobile phone for this additional contact information" - }, - "landLinePhone" : { - "type" : "string", - "description" : "The formatted landline phone for this additional contact information" - }, - "landLineExtension" : { - "type" : "string", - "description" : "The landline phone extension for this additional contact information" - }, - "normalizedMobilePhone" : { - "type" : "string", - "description" : "The mobile phone, normalized to the E.164 format" - }, - "normalizedLandLinePhone" : { - "type" : "string", - "description" : "The land-line phone, normalized to the E.164 format" - }, - "address" : { - "$ref" : "#/components/schemas/Address" - }, - "image" : { - "$ref" : "#/components/schemas/Image" - } - } - } ] - }, - "ContactInfoBasicData" : { - "description" : "Contains data shared by both ContactInfoDataForNew and ContactInfoDataForEdit", - "type" : "object", - "properties" : { - "customFields" : { - "description" : "The additional contact information custom fields", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/CustomFieldDetailed" - } - }, - "addresses" : { - "description" : "The available user addresses, which can be referenced by id", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Address" - } - }, - "phoneConfiguration" : { - "$ref" : "#/components/schemas/PhoneConfiguration" - }, - "user" : { - "description" : "The user which owns the contact info", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "confirmationPasswordInput" : { - "description" : "If a confirmation password is used, contains the definitions on how to request that password from the user. This confirmation password is required when performing sensible actions. Sometimes this is dynamic, for example, the confirmation might be configured to be used only once per session, or operations like payments may have a limit per day to be without confirmation (pinless).", - "allOf" : [ { - "$ref" : "#/components/schemas/PasswordInput" - } ] - } - } - }, - "ContactInfoBinaryValuesForUserProfile" : { - "description" : "Holds the current additional contact image and binary field values", - "allOf" : [ { - "$ref" : "#/components/schemas/CustomFieldBinaryValues" - }, { - "type" : "object", - "properties" : { - "image" : { - "$ref" : "#/components/schemas/Image" - } - } - } ] - }, - "ContactInfoConfigurationForUserProfile" : { - "description" : "User additional contacts data sent when editing the full profile", - "type" : "object", - "properties" : { - "contactInfo" : { - "description" : "Contains the default values for a new additional contact", - "allOf" : [ { - "$ref" : "#/components/schemas/ContactInfoNew" - } ] - }, - "customFields" : { - "description" : "The custom fields for additional contact informations", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/CustomFieldDetailed" - } - }, - "edit" : { - "type" : "boolean", - "description" : "Can the authenticated user edit additional contacts?" - }, - "managePrivacy" : { - "type" : "boolean", - "description" : "Can the authenticated user manage the privacy of additional contacts?" - }, - "maxContactInfos" : { - "type" : "integer", - "description" : "The maximum number of additional contacts the user can own" - }, - "availability" : { - "$ref" : "#/components/schemas/AvailabilityEnum" - } - } - }, - "ContactInfoDataForEdit" : { - "description" : "Contains data for editing an existing additional contact information", - "allOf" : [ { - "$ref" : "#/components/schemas/ContactInfoBasicData" - }, { - "type" : "object", - "properties" : { - "contactInfo" : { - "description" : "The additional contact information that is being edited. This value can be modified and sent back on `PUT /contactInfos/{id}`.", - "allOf" : [ { - "$ref" : "#/components/schemas/ContactInfoEdit" - } ] - }, - "canEdit" : { - "type" : "boolean", - "description" : "Indicates whether the current contact info can be edited by the currently authenticated used." - }, - "canRemove" : { - "type" : "boolean", - "description" : "Indicates whether the current contact info can be removed by the currently authenticated used." - }, - "image" : { - "$ref" : "#/components/schemas/Image" - }, - "binaryValues" : { - "description" : "Holds the current values for file / image custom fields as lists of `StoredFile`s / `Image`s.", - "allOf" : [ { - "$ref" : "#/components/schemas/CustomFieldBinaryValues" - } ] - } - } - } ] - }, - "ContactInfoDataForNew" : { - "description" : "Contains data for creating a new additional contact information", - "allOf" : [ { - "$ref" : "#/components/schemas/ContactInfoBasicData" - }, { - "type" : "object", - "properties" : { - "contactInfo" : { - "description" : "The additional contact information populated with the default fields. This value can be modified and sent back on `POST /{user}/contactInfos`.", - "allOf" : [ { - "$ref" : "#/components/schemas/ContactInfoNew" - } ] - } - } - } ] - }, - "ContactInfoDetailed" : { - "description" : "Contains extra details of an additional contact information", - "allOf" : [ { - "$ref" : "#/components/schemas/ContactInfo" - }, { - "type" : "object", - "properties" : { - "customValues" : { - "description" : "The list of custom field values on this additional contact information", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/CustomFieldValue" + } + }, + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } } - }, - "operations" : { - "description" : "The list of custom operations the logged user can run over this additional contact information", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Operation" - } - } - } - } ] - }, - "ContactInfoEdit" : { - "description" : "Fields for editing an additional contact information", - "allOf" : [ { - "$ref" : "#/components/schemas/ContactInfoManage" - }, { - "type" : "object", - "properties" : { - "version" : { - "type" : "integer", - "description" : "The version stamp for the current object, used for optimistic locking. When saving, the same version as previously received needs to be passed back. If no one else has saved the object, the version will match and the object will be updated. However, if someone other has saved the object, the version will no longer match, and an error will be raised. This is used to prevent multiple users (or processes) from updating the same object and unwilingly overridding the property values, leading to data loss." - } - } - } ] - }, - "ContactInfoEditWithId" : { - "description" : "Parameters for editing an existing additional contact", - "allOf" : [ { - "$ref" : "#/components/schemas/ContactInfoEdit" - }, { - "type" : "object", - "properties" : { - "id" : { - "type" : "string", - "description" : "The internal entity identifier" - } - } - } ] - }, - "ContactInfoManage" : { - "description" : "Common fields for either creating or editing an additional contact information", - "type" : "object", - "x-implements" : "IContactInfo", - "x-abstract" : true, - "properties" : { - "name" : { - "type" : "string", - "description" : "The address name" - }, - "email" : { - "type" : "string", - "description" : "The e-mail for this additional contact information" - }, - "mobilePhone" : { - "type" : "string", - "description" : "The formatted mobile phone for this additional contact information" - }, - "landLinePhone" : { - "type" : "string", - "description" : "The formatted landline phone for this additional contact information" - }, - "landLineExtension" : { - "type" : "string", - "description" : "The landline phone extension for this additional contact information" - }, - "image" : { - "type" : "string", - "description" : "The identifier of either an uploaded temporary image, or an existing additional contact image." - }, - "address" : { - "type" : "string", - "description" : "The identifier for the user address to be used as address of this additional contact information" - }, - "hidden" : { - "type" : "boolean", - "description" : "Whether this additional contact information should be hidden for other users" - }, - "customValues" : { - "type" : "object", - "description" : "Holds the custom field values, keyed by field internal name or id. The format of the value depends on the custom field type. Example: `{..., \"customValues\": {\"gender\": \"male\", \"birthDate\": \"1980-10-27\"}}`", - "additionalProperties" : { - "type" : "string" - } - } - } - }, - "ContactInfoNew" : { - "description" : "Fields for a new additional contact information", - "allOf" : [ { - "$ref" : "#/components/schemas/ContactInfoManage" - } ] - }, - "ContactInfoResult" : { - "description" : "An additional contact information as a result item", - "allOf" : [ { - "$ref" : "#/components/schemas/ContactInfo" - }, { - "type" : "object", - "properties" : { - "hidden" : { - "type" : "boolean", - "description" : "Indicates whether this additional contact information is hidden for other users." - }, - "customValues" : { - "type" : "object", - "description" : "Holds the values for custom fields, keyed by field internal name or id. The format of the value depends on the custom field type. Example: `{..., \"customValues\": {\"gender\": \"male\", \"birthDate\": \"1980-10-27\"}}`", - "additionalProperties" : { - "type" : "string" - } - } - } - } ] - }, - "ContactInfoView" : { - "description" : "Contains details of an additional contact information", - "allOf" : [ { - "$ref" : "#/components/schemas/ContactInfoDetailed" - }, { - "type" : "object", - "properties" : { - "user" : { - "description" : "The user which owns this additional contact information", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "canEdit" : { - "type" : "boolean", - "description" : "Indicates whether the logged user can remove / edit this additional contact information" - }, - "hidden" : { - "type" : "boolean", - "description" : "Indicates whether this additional contact information should be hidden for other users" } - } - } ] - }, - "ContactListDataForSearch" : { - "description" : "Data for searching an user's contact list", - "type" : "object", - "properties" : { - "user" : { - "$ref" : "#/components/schemas/User" }, - "allowKeywords" : { - "description" : "Indicates whether using keywords is allowed", - "type" : "boolean" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } }, - "customFields" : { - "description" : "The list of contact custom fields that are either to be used as search filter (if its internal name is present on `fieldsInSearch`) and / or in the result list (if its internal name is present on `fieldsInList`)", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/CustomFieldDetailed" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } } }, - "fieldsInSearch" : { - "description" : "The internal names of the contact custom fields that should be used as search filters (separated fields, not keywords)", - "type" : "array", - "items" : { - "type" : "string" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" + } + } } }, - "fieldsInList" : { - "description" : "The internal names of the contact custom fields that will be returned together with each record, and should be shown in the result list", - "type" : "array", - "items" : { - "type" : "string" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } } + } + } + } + }, + "/orders/{order}/seller/data-for-set-delivery": { + "get": { + "operationId": "getDataForSetDeliveryMethod", + "summary": "Returns configuration data to set delivery method data by seller.", + "description": "Returns configuration data to set delivery method data by seller of an order given by id.", + "tags": [ + "Orders" + ], + "security": [ + { + "basic": [] }, - "query" : { - "description" : "Default query filters for searching records", - "allOf" : [ { - "$ref" : "#/components/schemas/ContactListQueryFilters" - } ] + { + "session": [] }, - "hasVisibleFields" : { - "description" : "This flag can be used to know whether selecting a contact in the contact list should show direclty the user profile or a contact details page to show additional custom fields.", - "type" : "boolean" + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" }, - "hasEditableFields" : { - "description" : "This flag can be used to know whether the contact should be added directly to the user's contact list or a page should be shown for the user to fill in the contact custom fields.", - "type" : "boolean" + { + "$ref": "#/components/parameters/order" + } + ], + "responses": { + "200": { + "description": "The configuration data for set he delivery method.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrderDataForSetDeliveryMethod" + } + } + } }, - "addressFieldsInSearch" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/AddressQueryFieldEnum" + "500": { + "description": "If a payment error has occurred", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentError" + } + } } } } - }, - "ContactListQueryFilters" : { - "description" : "Search filters for an user's contact list", - "allOf" : [ { - "$ref" : "#/components/schemas/QueryFilters" - }, { - "type" : "object", - "properties" : { - "keywords" : { - "type" : "string", - "description" : "Textual search keywords. Sometimes, like in user search, the fields matched depends on what is configured on the products." - }, - "customFields" : { - "type" : "array", - "items" : { - "type" : "string" - }, - "description" : "Concat custom field values used as filters. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by : (colon). For example, `customFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, customFields=field1:valueA|valueB. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `customFields=tradeType:offer|search,extraDate:2000-01-01|2001-12-31` would match results whose custom field with internal name `tradeType` is either `offer` or `search`, and whose `extraDate` is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `customValues=extraDate:|2001-12-31`." - }, - "orderBy" : { - "$ref" : "#/components/schemas/ContactOrderByEnum" - }, - "usersToExclude" : { - "type" : "array", - "items" : { - "type" : "string" - }, - "description" : "Indicated the users to be excluded from the result" - } - } - } ] - }, - "ContactManage" : { - "description" : "Common fields for either creating or editing a contact", - "type" : "object", - "x-abstract" : true, - "properties" : { - "customValues" : { - "type" : "object", - "description" : "Holds the custom field values, keyed by field internal name or id. The format of the value depends on the custom field type. Example: `{..., \"customValues\": {\"gender\": \"male\", \"birthDate\": \"1980-10-27\"}}`", - "additionalProperties" : { - "type" : "string" - } - } - } - }, - "ContactNew" : { - "description" : "Parameters for creating a new contact", - "allOf" : [ { - "$ref" : "#/components/schemas/ContactManage" - }, { - "type" : "object", - "properties" : { - "contact" : { - "description" : "The user which is the contact of a given owner. Can be either the id or another identifier, such as login name or e-mail, depending on the Cyclos configuration.", - "type" : "string" - } - } - } ] - }, - "ContactResult" : { - "description" : "Contains data returned when searching for an user's contact list", - "allOf" : [ { - "$ref" : "#/components/schemas/Contact" - }, { - "type" : "object", - "properties" : { - "customValues" : { - "type" : "object", - "description" : "Holds the values for contact custom fields which are set to be returned on list, keyed by field internal name", - "additionalProperties" : { - "type" : "string" - } - } - } - } ] - }, - "ContactView" : { - "description" : "Detailed information when viewing a contact", - "allOf" : [ { - "$ref" : "#/components/schemas/Contact" - }, { - "type" : "object", - "properties" : { - "user" : { - "description" : "The user which owns this contact", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "customValues" : { - "description" : "The list of custom field values this contact has", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/CustomFieldValue" + } + }, + "/orders/{order}/seller/set-delivery": { + "post": { + "operationId": "setDeliveryMethod", + "summary": "Sets delivery method data by seller.", + "description": "Sets the delivery method data by seller for the order given by id. This operation can be used only if the order is in status `pendingSeller` and has not already set delivery method data. After the delivery method has been set the order will be enter in status `pendingBuyer` to be accepted by buyer.", + "tags": [ + "Orders" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/order" + } + ], + "responses": { + "204": { + "description": "The delivery method was set by seller. Nothing is returned." + }, + "500": { + "description": "If a payment error has occurred", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentError" + } } - }, - "canEdit" : { - "description" : "Can the authenticated user edit this contact?", - "type" : "boolean" - }, - "operations" : { - "description" : "List of runnable custom operations.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Operation" + } + } + }, + "requestBody": { + "description": "The parameters for setting the delivery method.", + "required": false, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetDeliveryMethod" } } } - } ] - }, - "ContactsPermissions" : { - "description" : "Permissions over contacts", - "type" : "object", - "properties" : { - "enable" : { - "description" : "Permission to own a contact list.", - "type" : "boolean" + } + } + }, + "/orders/{order}/buyer/data-for-accept": { + "get": { + "operationId": "getOrderDataForAcceptByBuyer", + "summary": "Returns configuration data for accept an order by buyer.", + "description": "Returns configuration data for accept an order given by id as the buyer.", + "tags": [ + "Orders" + ], + "security": [ + { + "basic": [] }, - "hasVisibleFields" : { - "description" : "Permission to view contacts custom fields.", - "type" : "boolean" + { + "session": [] }, - "hasEditableFields" : { - "description" : "Permission to manage contacts custom fields.", - "type" : "boolean" + { + "accessClient": [] } - } - }, - "ContactsQueryFilters" : { - "description" : "Search filters for users that are contacts, not contacts themselves", - "allOf" : [ { - "$ref" : "#/components/schemas/FullTextQueryFilters" - }, { - "type" : "object", - "properties" : { - "ignoreProfileFieldsInList" : { - "type" : "boolean", - "description" : "When set to `true`, instead of returning users with corresponding profile fields set on list, will return them with `display`." - }, - "includeGroup" : { - "type" : "boolean", - "description" : "When set to `true` and the logged user has permission to view user groups, will return the `group` property on users." - }, - "includeGroupSet" : { - "type" : "boolean", - "description" : "When set to `true` and the logged user has permission to view user group sets, will return the `groupSet` property on users." - } - } - } ] - }, - "Country" : { - "description" : "Represents a country, with a code and display name", - "type" : "object", - "properties" : { - "code" : { - "description" : "The 2-letter, `ISO 3166-1 alpha-2` code", - "type" : "string" - }, - "name" : { - "description" : "The display name (in the user's language)", - "type" : "string" - } - } - }, - "CreateDeviceConfirmation" : { - "description" : "Contains data for create a pending device confirmation.", - "type" : "object", - "properties" : { - "from" : { - "type" : "string", - "description" : "The payment account owner. Can be one of:\n\n- a user identification value, such as id, username, e-mail, phone, etc.\n Id is always allowed, others depend on Cyclos configuration. Note that\n a valid numeric value is always considered as id. For example, when\n using another identification method that can be numeric only, prefix\n the value with a single quote (like in Excel spreadsheets);\n\n- `self` for the currently authenticated user;\n- `system` for the owner of system accounts.\n\nRequired only if type is `performPayment` or `performExternalPayment`." - }, - "to" : { - "type" : "string", - "description" : "Same as `from` but for the receiver. Required only if type is `performPayment`." - }, - "toPrincipal" : { - "type" : "string", - "description" : "The receiver of the external payment (email or mobile number). Required only if type is `performExternalPayment`." - }, - "paymentType" : { - "type" : "string", - "description" : "The payment type id or qualified internal name (in the form `fromAccountType.paymentType`). Required only if type is `performPayment`, `performExternalPayment`, `shoppingCartCheckout` or `importUserPayments`." - }, - "amount" : { - "type" : "string", - "format" : "number", - "description" : "The amount involved in the confirmation, its meaning depends on the type. Required only if type is `performPayment`, `performExternalPayment`, `shoppingCartCheckout`, `generateVouchers` or `buyVouchers`." - }, - "transaction" : { - "type" : "string", - "description" : "Either the id or number of the transaction (or ticket number if type is `approveTicket`). Required only if type is `manageAuthorization`, `manageExternalPayment`, `manageScheduledPayment`, `manageRecurringPayment`, `managePaymentRequest` or `approveTicket`." - }, - "transfer" : { - "type" : "string", - "description" : "Either the id or number of the transfer. Required only if type is `chargeback`." - }, - "account" : { - "type" : "string", - "description" : "Either the id or number of the user account. Required only if type is `changeAccountLimits`." - }, - "installment" : { - "type" : "string", - "description" : "The id of a scheduled payment installment. Required only if type is `manageInstallment`." - }, - "failedOccurrence" : { - "type" : "string", - "description" : "The id of a recurring payment failed occurrence. Required only if type is `manageFailedOccurrence`." - }, - "client" : { - "type" : "string", - "description" : "The access client id or token. Required only if type is `clientAction`." - }, - "name" : { - "type" : "string", - "description" : "The entity's name for which this confirmation is created for. Required only if type is either `manageAddress`, `managePhone` or `manageContactInfo`." - }, - "type" : { - "$ref" : "#/components/schemas/DeviceConfirmationTypeEnum" - }, - "externalPaymentAction" : { - "description" : "The action being applied to the external payment. Required only if type is `manageExternalPayment`.", - "allOf" : [ { - "$ref" : "#/components/schemas/ExternalPaymentActionEnum" - } ] - }, - "scheduledPaymentAction" : { - "description" : "The action being applied to the scheduled payment. Required only if type is `manageScheduledPayment`.", - "allOf" : [ { - "$ref" : "#/components/schemas/ScheduledPaymentActionEnum" - } ] - }, - "recurringPaymentAction" : { - "description" : "The action being applied to the recurring payment. Required only if type is `manageRecurringPayment`.", - "allOf" : [ { - "$ref" : "#/components/schemas/RecurringPaymentActionEnum" - } ] - }, - "installmentAction" : { - "description" : "The action being applied to the scheduled payment installment. Required only if type is `manageInstallment`.", - "allOf" : [ { - "$ref" : "#/components/schemas/InstallmentActionEnum" - } ] - }, - "failedOccurrenceAction" : { - "description" : "The action being applied to the recurring payment failed occurrence. Required only if type is `manageFailedOccurrence`.", - "allOf" : [ { - "$ref" : "#/components/schemas/FailedOccurrenceActionEnum" - } ] - }, - "authorizationAction" : { - "description" : "The action being applied to the payment authorization. Required only if type is `manageAuthorization`.", - "allOf" : [ { - "$ref" : "#/components/schemas/AuthorizationActionEnum" - } ] - }, - "paymentRequestAction" : { - "description" : "The action being applied to the payment request. Required only if type is `managePaymentRequest`.", - "allOf" : [ { - "$ref" : "#/components/schemas/PaymentRequestActionEnum" - } ] - }, - "clientAction" : { - "description" : "The action being applied to the access client. Required only if type is `clientAction`.", - "allOf" : [ { - "$ref" : "#/components/schemas/ClientActionEnum" - } ] - }, - "operation" : { - "type" : "string", - "description" : "Either the id or internal name of the custom operation being executed. Required only if type is `runOperation`." - }, - "passwordType" : { - "type" : "string", - "description" : "Either the id or internal name of the password type being e generatated. Required only if type is `generatePassword`." - }, - "seller" : { - "type" : "string", - "description" : "The order seller. Can be one a user identification value, such as id, username, e-mail, phone, etc. Id is always allowed, others depend on Cyclos configuration. Note that a valid numeric value is always considered as id. For example, when using another identification method that can be numeric only, prefix the value with a single quote (like in Excel spreadsheets); Required only if type is `shoppingCartCheckout`." - }, - "order" : { - "type" : "string", - "description" : "Either the id or number of an webshop order. Required only if type is `acceptOrder`." - }, - "voucher" : { - "type" : "string", - "description" : "The voucher id or token. Required only if type is `manageVoucher`." - }, - "voucherAction" : { - "description" : "The action being applied to the voucher. Required only if type is `manageVoucher`.", - "allOf" : [ { - "$ref" : "#/components/schemas/VoucherActionEnum" - } ] - }, - "voucherType" : { - "type" : "string", - "description" : "Either the id or internal name of a voucher type. Required only if type is `generateVouchers`, `buyVouchers` or `sendVoucher`." - }, - "numberOfVouchers" : { - "type" : "integer", - "description" : "The number of vouchers to be generated. Required only if type is `generateVouchers` or `buyVouchers`." - }, - "email" : { - "type" : "string", - "description" : "The e-mail to which the voucher will be sent. Required only if type is `sendVoucher`." - }, - "deviceId" : { - "type" : "string", - "description" : "The id of a device. Required only if type is `manageDevice`." - }, - "deviceAction" : { - "description" : "The action being applied to the device. Required only if type is `manageDevice`.", - "allOf" : [ { - "$ref" : "#/components/schemas/DeviceActionEnum" - } ] - } - } - }, - "CreateDevicePin" : { - "description" : "Contains data for create a new PIN or modify an existing one for the authenticated user.", - "type" : "object", - "properties" : { - "name" : { - "description" : "The device pin's name. This name will be shown when listing the pins of a user to identify the device for which this pin was defined. It's ignored if already authenticated with a PIN or if a valid `deviceId` was given.", - "type" : "string" - }, - "pin" : { - "description" : "The PIN value", - "type" : "string" - }, - "pinConfirmation" : { - "description" : "The PIN confirmation value. Is ignored unless `checkConfirmation` is set to `true`.", - "type" : "string" - }, - "checkConfirmation" : { - "description" : "Depending on the client, if a confirm pin field is shown to users, it might be useful to check the confirmation pin value on the server. This way, if there are other validation exceptions, they are all shown together. In this case, this flag should be set to `true` and the `pinConfirmation` should be passed in with the user input. Otherwise, if a confirm field is not shown then this flag can be left empty (or set to `false`), and the `pinConfirmation` will be ignored.", - "type" : "boolean" - }, - "currentPin" : { - "description" : "The current PIN value. The action must be confirmed with at least the current pin or the current login password but not both.", - "type" : "string" - }, - "currentPassword" : { - "description" : "The current login password. The action must be confirmed with at least the current login password or the current pin but not both.", - "type" : "string" - }, - "pinLocator" : { - "description" : "The principal or id of the device PIN. Only required if the pin is not being created. In case the login was performed using a pin or the session is already associated to a pin this locator will be ignored and the associated pin will be modified.", - "type" : "string" - }, - "pinCreationToken" : { - "description" : "In case of pin creation the action must be confirmed with at least the current login password or this token. This token was obtained from `GET /auth/session` after a succesfull login (only returned if the login was not performed using a pin). In case the login was performed using a pin or the session is already associated to a pin this token will be ignored and the `currentPin` or `currentPassword` must be given to validate the action.", - "type" : "string" - }, - "deviceId" : { - "description" : "Trusted device identification. If given then the `name` will be ignored and the pin's name will be copied from the device's name. This is necessary to get in sync when a pin is defined for an already trusted device.", - "type" : "string" - } - } - }, - "CreateDevicePinResult" : { - "description" : "Contains data about the created PIN.", - "type" : "object", - "properties" : { - "pin" : { - "$ref" : "#/components/schemas/DevicePinView" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" }, - "principal" : { - "description" : "The (randomly generated) unique principal that must be stored in the device and must be sent when the user choose to login with PIN.", - "type" : "string" - }, - "salt" : { - "description" : "The (randomly generated) unique salt that must be stored in the device and must be prepended to the entered PIN value before send when the user choose to login with PIN.", - "type" : "string" + { + "$ref": "#/components/parameters/order" } - } - }, - "CreateVoucher" : { - "description" : "Parameters for create vouchers", - "type" : "object", - "properties" : { - "count" : { - "description" : "The number of vouchers to create. Defaults to 1.", - "type" : "integer" + ], + "responses": { + "200": { + "description": "The configuration data for accept the order as the buyer.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrderDataForAcceptByBuyer" + } + } + } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } + } }, - "amount" : { - "description" : "The amount per voucher. Required, except when is a generation of vouchers using a voucher type that specifies the generated vouchers amount to always be dynamic, that is, depends on top-ups.", - "type" : "string", - "format" : "number" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } + } + }, + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } }, - "type" : { - "description" : "Required voucher type `id` or `internalName`.", - "type" : "string" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } + } }, - "voucherCustomValues" : { - "type" : "object", - "description" : "Holds the custom field values, keyed by field internal name or id. The format of the value depends on the custom field type. Example: `{..., \"customValues\": {\"gender\": \"male\", \"birthDate\": \"1980-10-27\"}}`", - "additionalProperties" : { - "type" : "string" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } } } } - }, - "Currency" : { - "description" : "Reference to a currency", - "allOf" : [ { - "$ref" : "#/components/schemas/InternalNamedEntity" - }, { - "type" : "object", - "properties" : { - "symbol" : { - "description" : "The currency symbol", - "type" : "string" - }, - "prefix" : { - "description" : "The currency prefix when formatting numbers", - "type" : "string" - }, - "suffix" : { - "description" : "The currency suffix when formatting numbers", - "type" : "string" - }, - "transactionNumberPattern" : { - "description" : "If transaction number is enabled for this currency, contains the pattern which is expected, in case of rendering a field for users to type in a transaction number", - "type" : "string" - }, - "decimalDigits" : { - "description" : "The number of decimal digits used by this currency", - "type" : "integer" - } - } - } ] - }, - "CurrencyAmountSummary" : { - "description" : "Contains summarized statistics over amounts of a currency", - "allOf" : [ { - "$ref" : "#/components/schemas/AmountSummary" - }, { - "type" : "object", - "properties" : { - "currency" : { - "$ref" : "#/components/schemas/Currency" - } - } - } ] - }, - "CustomField" : { - "description" : "Contains reference to a custom field", - "allOf" : [ { - "$ref" : "#/components/schemas/InternalNamedEntity" - }, { - "type" : "object", - "properties" : { - "decimalDigits" : { - "type" : "integer", - "description" : "The number of decimal digits. Only available if `type` is `decimal`." - }, - "type" : { - "$ref" : "#/components/schemas/CustomFieldTypeEnum" - }, - "linkedEntityType" : { - "$ref" : "#/components/schemas/LinkedEntityTypeEnum" - }, - "control" : { - "$ref" : "#/components/schemas/CustomFieldControlEnum" - }, - "kind" : { - "$ref" : "#/components/schemas/CustomFieldKind" - } + } + }, + "/orders/{order}/buyer/accept": { + "post": { + "operationId": "acceptOrderByBuyer", + "summary": "Accepts a pending order by buyer.", + "description": "Accepts a pending order by buyer generating the corresponding payment. The order status must be `pendingBuyer` to be accepted by the authenticated user (i.e the buyer).\nThe `paymentType` and the `confirmationPassword` are required under the following circumstances:\n`paymentType`: Only required if the order was generated as a sale by the seller and not from the shopping cart check-out (Sales are not supported yet).\n`confirmationPassword`: Only required if at check-out a delivery method was not set or its charge type is `negotiatied`.\nThe possible statuses after an order acceptance are: - `paymentPending`: if the generated payment is awaiting authorization; - `completed`: if the payment was done.", + "tags": [ + "Orders" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] } - } ] - }, - "CustomFieldBinaryValues" : { - "description" : "Holds the values for uploaded files / images which are used as custom field values", - "type" : "object", - "properties" : { - "fileValues" : { - "description" : "The values for custom fields of type `file`", - "type" : "object", - "additionalProperties" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/StoredFile" + ], + "parameters": [ + { + "$ref": "#/components/parameters/order" + }, + { + "$ref": "#/components/parameters/confirmationPassword" + } + ], + "responses": { + "204": { + "description": "The order was accepted by the buyer. Nothing is returned." + }, + "500": { + "description": "If a payment error has occurred", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentError" + } } } - }, - "imageValues" : { - "description" : "The values for custom fields of type `image`", - "type" : "object", - "additionalProperties" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Image" + } + }, + "requestBody": { + "description": "The parameters for accepting the order.", + "required": false, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptOrderByBuyer" } } } } - }, - "CustomFieldDetailed" : { - "description" : "Contains all information needed to render a widget for a custom field value", - "allOf" : [ { - "$ref" : "#/components/schemas/CustomField" - }, { - "type" : "object", - "properties" : { - "informationText" : { - "description" : "Additional text that can be shown to the user as a hint of this field", - "type" : "string" - }, - "pattern" : { - "description" : "The (optional) mask to be applied to string values", - "type" : "string" - }, - "required" : { - "description" : "Indicates whether this field is required", - "type" : "boolean" - }, - "size" : { - "description" : "The suggested size for the rendered widget", - "allOf" : [ { - "$ref" : "#/components/schemas/CustomFieldSizeEnum" - } ] - }, - "allSelectedLabel" : { - "description" : "The label to be shown when all values are selected for a multi selection field.", - "type" : "string" - }, - "defaultValue" : { - "description" : "The value that should be suggested as default. For multi selection will be a comma-separated string with possible values ids or internal names.", - "type" : "string" - }, - "possibleValueCategories" : { - "description" : "Only applicable when the custom field is enumerated (single or multi select). Contains the possible value categories.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/EntityReference" - } - }, - "hasValuesList" : { - "description" : "Returns whether this custom field has a list of possible values, according to its type.", - "type" : "boolean" - }, - "possibleValues" : { - "description" : "Only applicable when the custom field is enumerated (single or multi selection). Contains the possible values for selection. Each value may or may not have a category. When they have, it will be a string pointing to the internal name (if available) or id of the possible value category, which can be looked up in the categories property.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/CustomFieldPossibleValue" + } + }, + "/orders/{order}/seller/accept": { + "post": { + "operationId": "acceptOrderBySeller", + "summary": "Accepts a pending order by seller.", + "description": "Accepts a pending order by seller generating the corresponding payment. The order status must be `pendingSeller` to be accepted by the authenticated user (i.e seller). The possible statuses after order acceptance are:\n- `paymentPending`: if the generated payment is awaiting for authorization; - `completed`: if the payment was done.", + "tags": [ + "Orders" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/order" + } + ], + "responses": { + "204": { + "description": "The order was accepted by seller. Nothing is returned." + }, + "500": { + "description": "If a payment error has occurred", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentError" + } } - }, - "dynamicValues" : { - "description" : "Only applicable when the custom field is dynamic selection. Contains the script-generated possible values.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/CustomFieldDynamicValue" + } + } + }, + "requestBody": { + "description": "The parameters for accepting the order.", + "required": false, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptOrderBySeller" } - }, - "stringValues" : { - "description" : "Only applicable when the custom field type is `string` and `hasValuesList` is `true`. Contains the possible string values.", - "type" : "array", - "items" : { - "type" : "string" - } - }, - "dateValues" : { - "description" : "Only applicable when the custom field type is `date` and `hasValuesList` is `true`. Contains the possible date values.", - "type" : "array", - "items" : { - "type" : "string", - "format" : "date-time" - } - }, - "integerValues" : { - "description" : "Only applicable when the custom field type is `integer` and `hasValuesList` is `true`. Contains the possible integer values.", - "type" : "array", - "items" : { - "type" : "integer" - } - }, - "decimalValues" : { - "description" : "Only applicable when the custom field type is `decimal` and `hasValuesList` is `true`. Contains the possible decimal values.", - "type" : "array", - "items" : { - "type" : "string", - "format" : "number" + } + } + } + } + }, + "/orders/{order}/reject": { + "post": { + "operationId": "rejectOrder", + "summary": "Rejects a pending order.", + "description": "Rejects a pending order by buyer or seller. The order status must be `pendingBuyer` or `pendingSeller` to be rejected by the authenticated user (buyer/seller). The possible statuses after an order rejection are:\n- `rejectedBySeller`: if the authenticated user is the seller; - `rejectedByBuyer`: if the authenticated user is the buyer.", + "tags": [ + "Orders" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/order" + } + ], + "responses": { + "204": { + "description": "The order was rejected by the authenticated user. Nothing is returned." + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } } - }, - "adValues" : { - "description" : "Only applicable when the custom field is linked entity of type `advertisement` and `hasValuesList` is `true`. Contains the possible advertisements.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Ad" + } + }, + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } } - }, - "transactionValues" : { - "description" : "Only applicable when the custom field is linked entity of type `transaction` and `hasValuesList` is `true`. Contains the possible transactions.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Transaction" + } + }, + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } } - }, - "transferValues" : { - "description" : "Only applicable when the custom field is linked entity of type `transfer` and `hasValuesList` is `true`. Contains the possible transfers.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Transfer" + } + }, + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } } - }, - "recordValues" : { - "description" : "Only applicable when the custom field is linked entity of type `record` and `hasValuesList` is `true`. Contains the possible records.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Record" + } + }, + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" + } } - }, - "userValues" : { - "description" : "Only applicable when the custom field is linked entity of type `user` and `hasValuesList` is `true`. Contains the possible users.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/User" + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } } - }, - "maxFiles" : { - "description" : "Only applicable when the custom field type is `file` or `image`. The maximun files that can be uploaded.", - "type" : "integer" - }, - "mimeTypes" : { - "description" : "The allowed mime types for binary custom fields. Only applicable when the custom field type is either `file` or `image`.", - "type" : "array", - "items" : { - "type" : "string" + } + } + }, + "requestBody": { + "description": "The parameters for rejecting the order.", + "required": false, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RejectOrder" } - }, - "showQrCodeScan" : { - "description" : "Only applicable when the custom field type is `string`. Indicates whether this field should support QR-code scan.", - "type" : "boolean" - }, - "automaticallyProcessAfterScan" : { - "description" : "Only applicable when the custom field type is `string` and the `allowQRCodeScan` is true. Indicates whether the form where is used this field should submit automatically after a successful QR-code scan.", - "type" : "boolean" } } - } ] - }, - "CustomFieldDynamicValue" : { - "description" : "Represents a single possible value of a dynamic custom field", - "type" : "object", - "properties" : { - "value" : { - "description" : "The internal value", - "type" : "string" + } + } + }, + "/{user}/delivery-methods/list-data": { + "parameters": [ + { + "$ref": "#/components/parameters/user" + } + ], + "get": { + "operationId": "getUserDeliveryMethodsListData", + "summary": "Returns data for webshop delivery methods listing of the given user.", + "description": "Returns the user webshop delivery methods, plus additional data related to them.", + "tags": [ + "DeliveryMethods" + ], + "security": [ + { + "basic": [] }, - "label" : { - "description" : "The display label", - "type" : "string" + { + "session": [] }, - "defaultValue" : { - "description" : "The value that should be suggested as default.", - "type" : "boolean" + { + "accessClient": [] } - } - }, - "CustomFieldPossibleValue" : { - "description" : "Represents a single possible value of an enumerated (single or multi selection) custom field", - "allOf" : [ { - "$ref" : "#/components/schemas/Entity" - }, { - "type" : "object", - "properties" : { - "value" : { - "type" : "string", - "description" : "The display value" - }, - "default" : { - "type" : "boolean", - "description" : "Indicates if this possible value is the default one." - }, - "internalName" : { - "type" : "string", - "description" : "The entity internal name, which can be seen as an extra identifier" - }, - "category" : { - "description" : "The internal name (if available) or id of the possible value category. Optional, and never used if custom field type is dynamic selection.", - "allOf" : [ { - "$ref" : "#/components/schemas/EntityReference" - } ] - } - } - } ] - }, - "CustomFieldValue" : { - "description" : "See the description on `BaseCustomFieldValue`", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseCustomFieldValue" - }, { - "type" : "object", - "properties" : { - "field" : { - "description" : "The custom field reference", - "allOf" : [ { - "$ref" : "#/components/schemas/CustomField" - } ] - } - } - } ] - }, - "DataForAccountHistory" : { - "description" : "Contains data used to search the history of a given account", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseTransferDataForSearch" - }, { - "type" : "object", - "properties" : { - "account" : { - "$ref" : "#/components/schemas/AccountWithOwnerAndCurrency" - }, - "accessClients" : { - "description" : "References for access clients which can be used to filter entries by transfers generated by a specific access client", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/EntityReference" - } - }, - "operators" : { - "description" : "References for operators, which can be used to filter entries by transfers performed or received by that specific operator", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/User" - } - }, - "transactionNumberMask" : { - "description" : "If a transaction number is used for this account, is a pattern that represent it.", - "type" : "string" - }, - "canFilterByDirection" : { - "description" : "Whether the current user can use the direction filter by direction. In some cases, such as restricted operators that can only see incoming or outgoing payments, this flag will be `false`.", - "type" : "boolean" - }, - "showDescriptionInFilters" : { - "description" : "Whether to show the description as filter or not", - "type" : "boolean" - }, - "showDescriptionInList" : { - "description" : "Whether to show the description in the result list or not", - "type" : "boolean" - }, - "customFieldsInSearch" : { - "description" : "Detailed references for custom fields that are set to be used as search filters", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/CustomFieldDetailed" - } - }, - "customFieldsInList" : { - "description" : "Simple references for custom fields that are set to be used on the search result list", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/CustomFieldDetailed" - } - }, - "query" : { - "description" : "Default query filters for the account history", - "allOf" : [ { - "$ref" : "#/components/schemas/AccountHistoryQueryFilters" - } ] - } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" } - } ] - }, - "DataForBalanceLimitsSearch" : { - "description" : "Configuration data for searching a account balance limits.", - "type" : "object", - "properties" : { - "groups" : { - "description" : "The groups the authenticated user can use to filter.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Group" + ], + "responses": { + "200": { + "description": "The data for listing webshop delivery methods", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserDeliveryMethodsListData" + } + } } }, - "accountTypes" : { - "description" : "The account types that can be used to filter.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/AccountType" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } } }, - "exportFormats" : { - "description" : "The formats which the search results can be exported.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ExportFormat" - } - } - } - }, - "DataForChangeForgottenPassword" : { - "description" : "Definitions for a user to confirm a forgotten password request, after the verification code was successfully verified.", - "type" : "object", - "properties" : { - "user" : { - "description" : "The user which is having the password changed", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } + } }, - "passwordType" : { - "description" : "The password type which is being changed", - "allOf" : [ { - "$ref" : "#/components/schemas/PasswordType" - } ] + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } }, - "securityQuestion" : { - "description" : "If configured in Cyclos will be the security question that needs to be answered in order to complete the forgotten password reset request. If required and the user hasn't set the security answher, the user won't be able to use the forgot password functionality.", - "type" : "string" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } + } }, - "principals" : { - "description" : "The list of user identifications (principals) which can be used in the current channel", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/UserRegistrationPrincipal" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } } } } - }, - "DataForDeviceConfirmationApproval" : { - "description" : "Contains data for approve / reject device confirmations", - "type" : "object", - "properties" : { - "allowGuest" : { - "description" : "Whether the user must be authenticated or not to approve / reject", - "type" : "boolean" - } + } + }, + "/{user}/delivery-methods/data-for-new": { + "parameters": [ + { + "$ref": "#/components/parameters/user" } - }, - "DataForDynamicDocument" : { - "description" : "Contains the data for processing a dynamic document for a given user", - "type" : "object", - "properties" : { - "document" : { - "description" : "The document which is being processed", - "allOf" : [ { - "$ref" : "#/components/schemas/Document" - } ] + ], + "get": { + "operationId": "getDeliveryMethodDataForNew", + "summary": "Returns data for creating a new webshop delivery method for a given user.", + "description": "Returns data for creating a new webshop delivery method for a given user.", + "tags": [ + "DeliveryMethods" + ], + "security": [ + { + "basic": [] }, - "user" : { - "description" : "The user for which the document is being processed", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] + { + "session": [] }, - "formFields" : { - "description" : "The document form fields to be filled in", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/CustomFieldDetailed" - } + { + "accessClient": [] } - } - }, - "DataForEasyInvoice" : { - "description" : "Contains data for an easy invoice. When called as guest, a subset of the fields are returned.", - "type" : "object", - "properties" : { - "to" : { - "description" : "The destination user details. Is only returned if called with a logged user or if the user's group is visible to guests accoerding to the current configuration.", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "amount" : { - "description" : "The easy invoice amount", - "type" : "string", - "format" : "number" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The data for creating a new webshop delivery method.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeliveryMethodDataForNew" + } + } + } }, - "currency" : { - "$ref" : "#/components/schemas/Currency" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } + } }, - "paymentTypeData" : { - "description" : "Contains the detailed data for the selected (or first) payment type. Only returned if there is a logged user. The custom fields will only contain those without a fixed value.", - "allOf" : [ { - "$ref" : "#/components/schemas/TransactionTypeData" - } ] + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } + } }, - "deviceConfirmationAvailability" : { - "description" : "Only returned if there is not a logged user. Whether the confirmation with a trusted device is not used, optional or required.", - "allOf" : [ { - "$ref" : "#/components/schemas/AvailabilityEnum" - } ] + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } }, - "paymentTypes" : { - "description" : "Only returned if there is a logged user, and a specific payment type was not informed. Contains the allowed payment types to the given user.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransferTypeWithCurrency" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } } }, - "customValues" : { - "description" : "The list of custom field values with a fixed value, as requested.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/CustomFieldValue" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } } } } - }, - "DataForEditFullProfile" : { - "description" : "Contains data for editing the full profile of a user", - "type" : "object", - "properties" : { - "userConfiguration" : { - "$ref" : "#/components/schemas/UserDataForEdit" - }, - "user" : { - "$ref" : "#/components/schemas/UserEdit" + } + }, + "/{user}/delivery-methods": { + "parameters": [ + { + "$ref": "#/components/parameters/user" + } + ], + "post": { + "operationId": "createDeliveryMethod", + "summary": "Creates a new webshop delivery method for a given user.", + "description": "Creates a new webshop delivery method for a given user.", + "tags": [ + "DeliveryMethods" + ], + "security": [ + { + "basic": [] }, - "phoneConfiguration" : { - "$ref" : "#/components/schemas/PhoneConfigurationForUserProfile" + { + "session": [] }, - "landLinePhones" : { - "description" : "The existing land-line phones that can be modified and posted back", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PhoneEditWithId" + { + "accessClient": [] + } + ], + "responses": { + "201": { + "description": "Returns the identifier of the new delivery method.", + "headers": { + "Location": { + "description": "URL for viewing the delivery method details.", + "schema": { + "type": "string" + } + } + }, + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } } }, - "mobilePhones" : { - "description" : "The existing mobile phones that can be modified and posted back", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PhoneEditWithId" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } } }, - "addressConfiguration" : { - "$ref" : "#/components/schemas/AddressConfigurationForUserProfile" - }, - "addresses" : { - "description" : "The existing addresses that can be modified and posted back", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/AddressEditWithId" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } } }, - "addressBinaryValues" : { - "description" : "Values for images and binary custom fields for address contact infos, keyed by address id.", - "type" : "object", - "additionalProperties" : { - "$ref" : "#/components/schemas/CustomFieldBinaryValues" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } } }, - "contactInfoConfiguration" : { - "$ref" : "#/components/schemas/ContactInfoConfigurationForUserProfile" - }, - "contactInfos" : { - "description" : "The existing additional contacts that can be modified and posted back", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ContactInfoEditWithId" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } } }, - "contactInfoBinaryValues" : { - "description" : "Values for images and binary custom fields for additional contacts, keyed by contact info id.", - "type" : "object", - "additionalProperties" : { - "$ref" : "#/components/schemas/ContactInfoBinaryValuesForUserProfile" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" + } + } } }, - "imageConfiguration" : { - "$ref" : "#/components/schemas/ImageConfigurationForUserProfile" - }, - "images" : { - "description" : "All current user images", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Image" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "requestBody": { + "description": "The delivery method to be created.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeliveryMethodNew" + } } - }, - "confirmationPasswordInput" : { - "description" : "If a confirmation password is used, contains the definitions on how to request that password from the user. This confirmation password is required when performing sensible actions. Sometimes this is dynamic, for example, the confirmation might be configured to be used only once per session, or operations like payments may have a limit per day to be without confirmation (pinless).", - "allOf" : [ { - "$ref" : "#/components/schemas/PasswordInput" - } ] } } - }, - "DataForEmailUnsubscribe" : { - "description" : "Contains data for unsubscribing from a given e-mail type.", - "type" : "object", - "properties" : { - "user" : { - "description" : "The user that received the e-mail", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "email" : { - "description" : "The e-mail address to which the key was sent", - "type" : "string" - }, - "kind" : { - "description" : "The e-mail kind", - "allOf" : [ { - "$ref" : "#/components/schemas/EmailUnsubscribeKind" - } ] - }, - "applicationName" : { - "description" : "The name of the Cyclos application", - "type" : "string" - }, - "shortcutIcon" : { - "description" : "The shortcut icon", - "allOf" : [ { - "$ref" : "#/components/schemas/Image" - } ] + } + }, + "/delivery-methods/{id}/data-for-edit": { + "parameters": [ + { + "$ref": "#/components/parameters/id" + } + ], + "get": { + "operationId": "getDeliveryMethodDataForEdit", + "summary": "Returns data for modifying a webshop delivery method.", + "description": "Returns data for modifying a webshop delivery method.", + "tags": [ + "DeliveryMethods" + ], + "security": [ + { + "basic": [] }, - "applicationLogo" : { - "description" : "The application logo", - "allOf" : [ { - "$ref" : "#/components/schemas/Image" - } ] + { + "session": [] }, - "locale" : { - "description" : "The Cyclos locale", - "type" : "string" + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The webshop delivery method data.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeliveryMethodDataForEdit" + } + } + } }, - "country" : { - "description" : "The Cyclos country code", - "type" : "string" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } + } }, - "resourceCacheKey" : { - "description" : "The key used for URL cache", - "type" : "string" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } + } }, - "rootUrl" : { - "description" : "The root URL for Cyclos", - "type" : "string" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } }, - "notificationSettingsUrl" : { - "description" : "The URL for changing the Cyclos notification settings", - "type" : "string" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } + } }, - "homeUrl" : { - "description" : "The URL for the user home", - "type" : "string" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } } } - }, - "DataForFrontend" : { - "description" : "Contains data used by the new frontend", - "type" : "object", - "properties" : { - "frontend" : { - "description" : "Which Cyclos frontend should be used for the logged user", - "allOf" : [ { - "$ref" : "#/components/schemas/FrontendEnum" - } ] + } + }, + "/delivery-methods/{id}": { + "parameters": [ + { + "$ref": "#/components/parameters/id" + } + ], + "get": { + "operationId": "viewDeliveryMethod", + "summary": "Returns details of a webshop delivery method.", + "description": "Returns details of a webshop delivery method.", + "tags": [ + "DeliveryMethods" + ], + "security": [ + { + "basic": [] }, - "hasHomePage" : { - "description" : "Is the guest home page used?", - "type" : "boolean" + { + "session": [] }, - "logoUrl" : { - "description" : "The application logo image URL", - "type" : "string" + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The webshop delivery method data.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeliveryMethodView" + } + } + } }, - "icons" : { - "description" : "The icons to use as page shortcut icon", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/FrontendIcon" - } - }, - "svgIconNames" : { - "description" : "The names of SVF icons used by entities, such as pages, records, advertisement categories, operations and wizards.", - "type" : "array", - "items" : { - "type" : "string" - } - }, - "mapMarkerUrl" : { - "description" : "The maps pin icon URL", - "type" : "string" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } + } }, - "altMapMarkerUrl" : { - "description" : "The alternative maps pin icon URL", - "type" : "string" - }, - "externalLoginUrl" : { - "description" : "The URL to redirect users for logging in", - "type" : "string" - }, - "afterLogoutUrl" : { - "description" : "The URL to redirect users after logging out", - "type" : "string" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } + } }, - "locales" : { - "description" : "Contains the available translation locales", - "type" : "array", - "items" : { - "type" : "string" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } } }, - "title" : { - "description" : "The title for tablets and desktops", - "type" : "string" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } + } }, - "mobileTitle" : { - "description" : "The title for mobiles", - "type" : "string" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + }, + "put": { + "operationId": "updateDeliveryMethod", + "summary": "Updates an existing webshop delivery method.", + "description": "Updates an existing webshop delivery method.", + "tags": [ + "DeliveryMethods" + ], + "security": [ + { + "basic": [] }, - "mobileMenuTitle" : { - "description" : "The title for the sidenav menu in mobiles / tablets", - "type" : "string" + { + "session": [] }, - "menuBar" : { - "description" : "Should the desktop show a separated menu bar?", - "type" : "boolean" + { + "accessClient": [] + } + ], + "responses": { + "204": { + "description": "The webshop delivery method was updated." }, - "mobileLandingPage" : { - "description" : "The landing page for mobiles", - "allOf" : [ { - "$ref" : "#/components/schemas/FrontendLandingPageEnum" - } ] + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" + } + } + } }, - "dataForUi" : { - "$ref" : "#/components/schemas/DataForUi" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } + } }, - "pages" : { - "description" : "The content pages to show", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/FrontendPage" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } } }, - "banners" : { - "description" : "The banners to show", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/FrontendBanner" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } } }, - "allowFrontendSwitching" : { - "description" : "Is the logged user allowed to switch between frontends?", - "type" : "boolean" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } + } }, - "voucherBuyingMenu" : { - "description" : "The menu for the voucher buying section", - "allOf" : [ { - "$ref" : "#/components/schemas/UserMenuEnum" - } ] + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" + } + } + } }, - "topUpEnabled" : { - "description" : "Indicates whether there is a voucher configuration supporting top-up which is visible for the authenticated user, this means the top-up feature was configured in the system.", - "type" : "boolean" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "requestBody": { + "description": "The webshop delivery method to be edited.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeliveryMethodEdit" + } + } } } }, - "DataForFrontendHome" : { - "description" : "Data for the home / dashboard in the new frontend", - "type" : "object", - "properties" : { - "content" : { - "description" : "Either the guest home content or the content in the dashboard", - "allOf" : [ { - "$ref" : "#/components/schemas/FrontendHomeContent" - } ] - }, - "fullWidthContent" : { - "description" : "Should the guest home content be displayed full width in large screens?", - "type" : "boolean" + "delete": { + "operationId": "deleteDeliveryMethod", + "summary": "Removes a webshop delivery method.", + "description": "Removes a webshop delivery method.", + "tags": [ + "DeliveryMethods" + ], + "security": [ + { + "basic": [] }, - "quickAccess" : { - "description" : "Contains the quick access items that should be displayed, and for each one, the screen sizes in which they should be displayed.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/FrontendQuickAccessTypeEnum" - } + { + "session": [] }, - "mergeAccounts" : { - "description" : "Should multiple accounts be merged in the same card?", - "type" : "boolean" + { + "accessClient": [] + } + ], + "responses": { + "204": { + "description": "The webshop delivery method was removed." }, - "accounts" : { - "description" : "The accounts to show in the dashboard", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/FrontendDashboardAccount" + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" + } + } } }, - "showLatestUsers" : { - "description" : "Should the latest users be displayed?", - "type" : "boolean" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } + } }, - "latestUsers" : { - "description" : "If displayed, is the list of the latest users.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/UserResult" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } } }, - "showLatestAds" : { - "description" : "Should the latest advertisements be displayed?", - "type" : "boolean" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } }, - "latestAds" : { - "description" : "If displayed, is the list of the latest advertisements.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/AdResult" - } - }, - "passwordsNeedingAttention" : { - "description" : "The passwords that need an attention from the user, such as expired, reset and pending.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PasswordStatusAndType" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } } }, - "pendingSecurityQuestion" : { - "description" : "Indicates whether the security question should be set", - "type" : "boolean" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } } } - }, - "DataForLogin" : { - "description" : "Contains data useful for a login form, as well as forgot password", - "type" : "object", - "properties" : { - "accessPasswordType" : { - "description" : "The password type used for login access", - "allOf" : [ { - "$ref" : "#/components/schemas/EntityReference" - } ] + } + }, + "/{user}/webshop-settings": { + "parameters": [ + { + "$ref": "#/components/parameters/user" + } + ], + "get": { + "operationId": "viewWebshopSettings", + "summary": "Returns the webshop settings for a given user.", + "description": "Returns the webshop settings for a given user.", + "tags": [ + "WebshopSettings" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] }, - "principalTypes" : { - "description" : "The identification methods accepted for login", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PrincipalTypeInput" + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The webshop settings.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebshopSettingsView" + } + } } - }, - "defaultPrincipalType" : { - "description" : "The internal name of the identification method that is marked as default for the current channel configuration. This is optional, and if there is no default, all possible identification methods will be attempted for login.", - "type" : "string" - }, - "extraForgotPasswordPrincipalTypes" : { - "description" : "The additional identification methods also accepted for the forgotten password request.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PrincipalTypeInput" + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } } - }, - "loginPasswordInput" : { - "description" : "Contains data for the password used on login", - "allOf" : [ { - "$ref" : "#/components/schemas/PasswordInput" - } ] - }, - "pinActive" : { - "description" : "Whether the given pin, when requesting the data, can be used for login. Only if a `pinId` was given when requesting the data, and the `loginPasswordInput.pinAvailability` is not `disabled`.", - "type" : "boolean" - }, - "deviceConfirmation" : { - "description" : "The pending device confirmation used to confirm a trusted session. Only returned if a trusted device identification was given when requesting the data and it exists and is active.", - "allOf" : [ { - "$ref" : "#/components/schemas/DeviceConfirmationView" - } ] - }, - "identityProviders" : { - "description" : "The identity providers available for login", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/IdentityProvider" + }, + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } } }, - "forgotPasswordCaptchaInput" : { - "description" : "If the forgot password request requires a captcha, contains information on how to input it. Otherwise will be null.", - "allOf" : [ { - "$ref" : "#/components/schemas/CaptchaInput" - } ] - }, - "forgotPasswordMediums" : { - "description" : "If the forgot password request is enabled, returns the mediums the user can choose to receive the confirmation key or code. If nothing is returned, forgot password is not enabled.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/SendMediumEnum" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } } }, - "forgotPasswordCaptchaProvider" : { - "deprecated" : true, - "x-remove-version" : 4.17, - "description" : "Use `forgotPasswordCaptchaInput.provider` instead.", - "allOf" : [ { - "$ref" : "#/components/schemas/CaptchaProviderEnum" - } ] - } - } - }, - "DataForMobileGuest" : { - "description" : "Contains definitions for the data for UI for guests", - "allOf" : [ { - "$ref" : "#/components/schemas/MobileBaseData" - }, { - "type" : "object", - "properties" : { - "allowQuickPayment" : { - "description" : "Enables a quick payment action by showing the option to scan a QR code at login page.", - "type" : "boolean" - }, - "dataForLogin" : { - "$ref" : "#/components/schemas/DataForLogin" - }, - "dataForDeviceConfirmationApproval" : { - "description" : "Data for confirmation approval. Only sent if a device id was given when getting the guest data and it was not removed.", - "allOf" : [ { - "$ref" : "#/components/schemas/DataForDeviceConfirmationApproval" - } ] - }, - "groupsForRegistration" : { - "description" : "The list of groups the authenticated user can use to perform a new user registration", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/GroupForRegistration" - } - }, - "header" : { - "$ref" : "#/components/schemas/TranslatableUIElementWithContent" - }, - "footer" : { - "$ref" : "#/components/schemas/TranslatableUIElementWithContent" - }, - "mediumScreenRegistrationWizard" : { - "description" : "Wizard which should be used for registration instead of the regular registration form, for clients with medium screens (tablets). When all `largeScreenRegistrationWizard`, `mediumScreenRegistrationWizard` and `smallScreenRegistrationWizard` are set, the regular registration form is disabled, as well as the `POST /users` operation for guests.", - "allOf" : [ { - "$ref" : "#/components/schemas/Wizard" - } ] - }, - "smallScreenRegistrationWizard" : { - "description" : "Wizard which should be used for registration instead of the regular registration form, for clients with small screens (phones). When all `largeScreenRegistrationWizard`, `mediumScreenRegistrationWizard` and `smallScreenRegistrationWizard` are set, the regular registration form is disabled, as well as the `POST /users` operation for guests.", - "allOf" : [ { - "$ref" : "#/components/schemas/Wizard" - } ] - } - } - } ] - }, - "DataForMobileUser" : { - "description" : "Contains definitions for the data for UI for users", - "allOf" : [ { - "$ref" : "#/components/schemas/MobileBaseData" - }, { - "type" : "object", - "properties" : { - "autoCompleteResults" : { - "description" : "Number of search results for user autocomplete component", - "type" : "integer" - }, - "hideUsersSearchMenu" : { - "description" : "Indicates if the user search menu should be hidden.", - "type" : "boolean" - }, - "auth" : { - "$ref" : "#/components/schemas/Auth" - }, - "nameOfUser" : { - "description" : "The name of the current user (if any)", - "type" : "string" - }, - "mobileHelp" : { - "description" : "The help content for mobile mode", - "allOf" : [ { - "$ref" : "#/components/schemas/UIElementWithContent" - } ] - }, - "posHelp" : { - "description" : "The help content for mobile mode", - "allOf" : [ { - "$ref" : "#/components/schemas/UIElementWithContent" - } ] - }, - "pages" : { - "description" : "The visible mobile pages", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/MobilePage" - } - }, - "operations" : { - "description" : "The custom operations the user can run", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Operation" - } - }, - "canReceiveFromNfcTag" : { - "description" : "Indicates whether there is at least one NFC tag the user can use to receive payments", - "type" : "boolean" - }, - "deviceActivationMode" : { - "description" : "Contains information needed when the authenticated user wants to activate a device as trusted.", - "allOf" : [ { - "$ref" : "#/components/schemas/DeviceActivationEnum" - } ] - }, - "personalizeOtherUsers" : { - "description" : "Indicates if the current user can personalize NFC tags for other users (as member)", - "type" : "boolean" - }, - "mobileCameraOnPayment" : { - "description" : "Indicates whether the scan QR code option should be displayed for payments", - "type" : "boolean" - }, - "principalsAllowingQRCode" : { - "description" : "Indicates the possible principals which are allowed to be used in QR code generation", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Principal" - } - }, - "scanQr" : { - "description" : "Indicates whether the scan QR code option (global) should be displayed by checking if the user can approve a ticket, or has a QR/Barcode for make payments, or has an easy invoice channel enabled", - "type" : "boolean" - }, - "enableBluetoothPrinter" : { - "description" : "Whether the bluetooth printer is enabled or not", - "type" : "boolean" - }, - "topUpEnabled" : { - "description" : "Indicates whether there is a voucher configuration supporting top-up which is visible for the authenticated user, this means the top-up feature was configured in the system.", - "type" : "boolean" - }, - "shoppingCartWebShopCount" : { - "description" : "The total number of webshop ads present in the shopping cart", - "type" : "integer" - }, - "messagesStatus" : { - "description" : "Status of user new messages", - "allOf" : [ { - "$ref" : "#/components/schemas/MessagesStatus" - } ] - }, - "notificationsStatus" : { - "description" : "Status of user notifications, like new received or unread notifications", - "allOf" : [ { - "$ref" : "#/components/schemas/NotificationsStatus" - } ] - }, - "allowedOperations" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/MobileOperationEnum" - } - }, - "wizards" : { - "description" : "The wizard operations the user can run", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Wizard" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } } - }, - "mapPreference" : { - "$ref" : "#/components/schemas/MapPreferenceEnum" - }, - "pinPrompt" : { - "description" : "How many times the user is prompted to set a PIN after login", - "type" : "integer" - }, - "trustedDevicePrompt" : { - "description" : "How many times the user is prompted to set as Trusted Device after login", - "type" : "integer" - } - } - } ] - }, - "DataForPaymentLimitsSearch" : { - "description" : "Configuration data for searching a account payment limits.", - "type" : "object", - "properties" : { - "groups" : { - "description" : "The groups the authenticated user can use to filter.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Group" - } - }, - "accountTypes" : { - "description" : "The account types that can be used to filter.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/AccountType" } }, - "exportFormats" : { - "description" : "The formats which the search results can be exported.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ExportFormat" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } } } } }, - "DataForSendInvitation" : { - "description" : "Information for sending invitation e-mails to external users.", - "type" : "object", - "properties" : { - "maxRecipients" : { - "description" : "Indicates the maximum number of e-mail addresses the user can send invitations in a single request.", - "type" : "integer" - }, - "subject" : { - "description" : "The subject which will be used in sent e-mails.", - "type" : "string" + "put": { + "operationId": "updateWebshopSettings", + "summary": "Updates a user's webshop settings.", + "description": "Updates a user's webshop settings.", + "tags": [ + "WebshopSettings" + ], + "security": [ + { + "basic": [] }, - "body" : { - "description" : "The body which will be used in sent e-mails.", - "type" : "string" + { + "session": [] }, - "send" : { - "description" : "Parameters which can be filled-in and posted back to `POST /invite`.", - "allOf" : [ { - "$ref" : "#/components/schemas/SendInvitation" - } ] - } - } - }, - "DataForSetSecurityAnswer" : { - "description" : "Data for setting the security answer.", - "type" : "object", - "properties" : { - "securityQuestions" : { - "description" : "The possible security questions.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/EntityReference" - } + { + "accessClient": [] } - } - }, - "DataForTransaction" : { - "description" : "Contains basic configuration data used when performing a transaction. The path that returns it will normally receive the main transaction owner (system or user), plus 2 other optional parameters: - The other subject (system or user) that will either receive or perform\n the payment.\n- The payment type. There are 3 possibilities when returning: - When the other subject wasn't selected. In this case, will contain very\n few information, mostly the accounts.\n- The other subject is selected, but not a payment type. If so, the\n payment types will be returned, but not information on how to pick\n the subject user, or the accounts.\n- Both other subject and payment type are selected: In this case\n only the payment type data will be returned", - "type" : "object", - "properties" : { - "accounts" : { - "description" : "Only returned when the payment type is not selected. Contains the possible accounts which can be used either as source (when performing the payment) or destination (when receiving the payment, on POS).", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/AccountWithStatus" + ], + "responses": { + "204": { + "description": "The webshop settings were updated." + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } } }, - "fromKind" : { - "description" : "Indicates the account kind that will perform the payment", - "allOf" : [ { - "$ref" : "#/components/schemas/AccountKind" - } ] + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } + } }, - "fromUser" : { - "description" : "Only returned if `fromKind` is `user`. Is the payer user.", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } }, - "toKind" : { - "description" : "Indicates the account kind that will receive the payment", - "allOf" : [ { - "$ref" : "#/components/schemas/AccountKind" - } ] - }, - "toUser" : { - "description" : "Only returned if `toKind` is `user`. Is the payee user.", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "paymentTypeData" : { - "description" : "Contains the detailed data for the selected (or first) payment type", - "allOf" : [ { - "$ref" : "#/components/schemas/TransactionTypeData" - } ] - }, - "paymentTypes" : { - "description" : "Only returned when the payment type is not selected. Contains the allowed payment types for a payment between the selected from and to owners.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransferTypeWithCurrency" - } - }, - "allowScanQrCode" : { - "description" : "Only returned when no subject is selected.Indicates if the QR-code scanning is allowed.", - "type" : "boolean" - }, - "allowAutocomplete" : { - "description" : "Only returned when no subject is selected. Indicates whether the payee can be obtaining by freely searching users", - "type" : "boolean" - }, - "allowContacts" : { - "description" : "Only returned when no subject is selected. Indicates whether the payee can be obtaining from the contact list", - "type" : "boolean" - }, - "allowedUsers" : { - "description" : "If the authorized user is a restricted operator, it may be that the owner user has defined exactly to which users the operator can pay. If this is the case, this will be the list with such users.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/User" - } - }, - "principalTypes" : { - "description" : "Only returned when no subject is selected. The possible principal types that can be used to locate the payee", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PrincipalTypeInput" - } - }, - "defaultPrincipalType" : { - "description" : "Only returned when no subject is selected. If the `defaultIdMethod` is `principalType`, contains the internal name or id of the principal type that should be the default. If there is a default, the user should be provided with the option to choose which principal type he's using. If there is no default, all possible principal types will be attempted. In this case, the UI will normally not show the option for which principal type should be used.", - "type" : "string" - }, - "defaultIdMethod" : { - "description" : "Only returned when no subject is selected. The default option for the identification method when performing a payment.", - "allOf" : [ { - "$ref" : "#/components/schemas/IdentificationMethodEnum" - } ] - } - } - }, - "DataForUi" : { - "description" : "Contains data to display an alternative user interface", - "type" : "object", - "properties" : { - "cyclosVersion" : { - "description" : "The version of the Cyclos server. It will of the form x.y[.z]", - "type" : "string" - }, - "cyclosRevision" : { - "description" : "The git revision hash of the Cyclos compilation.", - "type" : "string" - }, - "licenseKey" : { - "description" : "The Cyclos license key.", - "type" : "string" - }, - "licensee" : { - "description" : "The organization to which this Cyclos instance is licensed to.", - "type" : "string" - }, - "currentClientTime" : { - "description" : "The current time in the the user's time zone.", - "type" : "string", - "format" : "date-time" - }, - "auth" : { - "description" : "The logged user authentication. Not returned for guests.", - "allOf" : [ { - "$ref" : "#/components/schemas/Auth" - } ] - }, - "dataForLogin" : { - "description" : "The data used for logging the user in. Not returned for logged users.", - "allOf" : [ { - "$ref" : "#/components/schemas/DataForLogin" - } ] - }, - "publicRegistrationGroups" : { - "description" : "Groups that can be used for a public registration. Not returned for logged users. Also, not returned when a registration wizard is required.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/GroupForRegistration" - } - }, - "largeScreenRegistrationWizard" : { - "description" : "Wizard which should be used for registration instead of the regular registration form, for clients with large screens (desktops). When all `largeScreenRegistrationWizard`, `mediumScreenRegistrationWizard` and `smallScreenRegistrationWizard` are set, the regular registration form is disabled, as well as the `POST /users` operation for guests.", - "allOf" : [ { - "$ref" : "#/components/schemas/Wizard" - } ] - }, - "mediumScreenRegistrationWizard" : { - "description" : "Wizard which should be used for registration instead of the regular registration form, for clients with medium screens (tablets). When all `largeScreenRegistrationWizard`, `mediumScreenRegistrationWizard` and `smallScreenRegistrationWizard` are set, the regular registration form is disabled, as well as the `POST /users` operation for guests.", - "allOf" : [ { - "$ref" : "#/components/schemas/Wizard" - } ] - }, - "smallScreenRegistrationWizard" : { - "description" : "Wizard which should be used for registration instead of the regular registration form, for clients with small screens (phones). When all `largeScreenRegistrationWizard`, `mediumScreenRegistrationWizard` and `smallScreenRegistrationWizard` are set, the regular registration form is disabled, as well as the `POST /users` operation for guests.", - "allOf" : [ { - "$ref" : "#/components/schemas/Wizard" - } ] - }, - "mapData" : { - "description" : "Configuration data for map usage. Is null when maps are not used.", - "allOf" : [ { - "$ref" : "#/components/schemas/MapData" - } ] - }, - "decimalSeparator" : { - "description" : "The character used to specify the decimal point", - "type" : "string" - }, - "groupingSeparator" : { - "description" : "The character used to separate thousands.", - "type" : "string" - }, - "dateFormat" : { - "description" : "The pattern string used to format dates.\nThe following are the letters used in each supported pattern:\n* dd: The day of the month;\n* MM: The month ranging from 1 to 12;\n* yyyy: The full year number.", - "type" : "string" - }, - "timeFormat" : { - "description" : "The pattern string used to format time.\nThe following are the letters used in each supported pattern:\n* hh: The hour of the morning or afternoon (12-hour clock);\n* HH: The hour of the day (24-hour clock);\n* mm: The minute within the hour;\n* a: Marker to idicate whether the hour (hh) is before or after noon.", - "type" : "string" - }, - "timeZoneId" : { - "description" : "The time zone ID set in the configuration (e.g `Europe/Amsterdam`)", - "type" : "string" - }, - "distanceUnit" : { - "$ref" : "#/components/schemas/DistanceUnitEnum" - }, - "rootUrl" : { - "description" : "The main URL set in the configuration", - "type" : "string" - }, - "apiUrl" : { - "description" : "The public API URL for this Cyclos instance", - "type" : "string" - }, - "country" : { - "description" : "The ISO 3166-1 alpha-2 country code, as set in the configuration", - "type" : "string" - }, - "maxImageWidth" : { - "description" : "Maximum width (in pixels) for uploaded images", - "type" : "integer" - }, - "maxImageHeight" : { - "description" : "Maximum height (in pixels) for uploaded images", - "type" : "integer" - }, - "maxUploadSize" : { - "description" : "Maximum size (in bytes) for uploaded files", - "type" : "integer" - }, - "jpegQuality" : { - "description" : "Quality for JPEG image types (higher means better quality)", - "type" : "integer" - }, - "language" : { - "description" : "The language set in the configuration", - "allOf" : [ { - "$ref" : "#/components/schemas/Language" - } ] - }, - "allowedLocales" : { - "description" : "The locales the user can select, for example to change the language.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/UserLocale" - } - }, - "currentLocale" : { - "description" : "The locale which is currently in use.", - "allOf" : [ { - "$ref" : "#/components/schemas/UserLocale" - } ] - }, - "defaultLocale" : { - "description" : "The default locale.", - "allOf" : [ { - "$ref" : "#/components/schemas/UserLocale" - } ] - }, - "resourceCacheKey" : { - "description" : "A new key is generated after each server restart", - "type" : "string" - }, - "appleStoreUrl" : { - "description" : "The mobile app url in the Apple store.", - "type" : "string" - }, - "playStoreUrl" : { - "description" : "The mobile app url in the Play store.", - "type" : "string" - }, - "hideUserSearchInMenu" : { - "description" : "Whether the search users action must be shown or not in the menu. If the user doesn't have permission to search other users (`permissions.users.search`) then this flag will be `true`. Otherwise it depends on the configuration", - "type" : "boolean" - }, - "deviceActivationMode" : { - "description" : "Contains information needed when the authenticated user wants to activate a device as trusted.", - "allOf" : [ { - "$ref" : "#/components/schemas/DeviceActivationEnum" - } ] - }, - "theme" : { - "description" : "The theme content (i.e the CSS or its components according). Only returned when changed or if the corresponding `themeIf` parameter was not specified.\nThe returned theme will be the following according to the UI kind:\n\n- `main`: If there is a logged user then the theme for\n users associated to the configuration. Otherwise the theme for guests;\n\n- `mobile`: only returned for guest;\n- `pay`: The theme defined for the ticket / easy\n invoice confirmation application interface (it's the same for logged\n users and guests).", - "allOf" : [ { - "$ref" : "#/components/schemas/ThemeUIElement" - } ] - }, - "header" : { - "description" : "The header content. Only returned when changed or if the corresponding `headerIf` parameter was not specified. For all cases the content returned will be the same for logged users an for guests.\n\nThe returned header will be the following according to the UI kind:\n\n- `main`: The header configured for the main web interface;\n- `mobile`: The header configured for the mobile application. Only returned for guests;\n- `pay`: The header defined for the ticket / easy invoice confirmation interface.", - "allOf" : [ { - "$ref" : "#/components/schemas/TranslatableUIElementWithContent" - } ] - }, - "footer" : { - "description" : "The footer content. Only returned when changed or if the corresponding `footerIf` parameter was not specified. For all cases the content returned will be the same for logged users an for guests.\n\nThe returned footer will be the following according to the UI kind:\n\n- `main`: The footer configured for the main web interface;\n- `mobile`: The footer configured for the mobile application. Only returned for guests;\n- `pay`: The footer defined for the ticket / easy invoice confirmation interface.", - "allOf" : [ { - "$ref" : "#/components/schemas/TranslatableUIElementWithContent" - } ] - }, - "shoppingCartWebShopCount" : { - "description" : "The total number of webshop ads present in the shopping cart. Not returned for guests.", - "type" : "integer" - }, - "applicationName" : { - "description" : "The configured name of the application", - "type" : "string" - }, - "applicationUsername" : { - "description" : "An username used by the application to be displayed for example in system messages or accounts", - "type" : "string" - } - } - }, - "DataForUserAccountVisibility" : { - "description" : "Contains data regarding the account visibility for a given user", - "type" : "object", - "properties" : { - "user" : { - "$ref" : "#/components/schemas/User" - }, - "canManage" : { - "description" : "Indicates whether the logged user can manage the account visibility of this user", - "type" : "boolean" - }, - "accounts" : { - "description" : "If the authenticated user can change the user / operator to a new group, contains the list of groups that can be assigned.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/UserAccountVisibility" - } - } - } - }, - "DataForUserBalancesSearch" : { - "description" : "Data used for a user search together with account balances", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseUserDataForSearch" - }, { - "type" : "object", - "properties" : { - "accountTypes" : { - "description" : "The available account types for the search", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/AccountTypeWithDefaultMediumBalanceRange" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } } - }, - "query" : { - "description" : "Default query parameters", - "allOf" : [ { - "$ref" : "#/components/schemas/UsersWithBalanceQueryFilters" - } ] - } - } - } ] - }, - "DataForUserPasswords" : { - "description" : "Contains the data used to manage passwords of a user", - "type" : "object", - "properties" : { - "user" : { - "$ref" : "#/components/schemas/User" - }, - "passwords" : { - "description" : "The status and possible actions for each password", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PasswordStatusAndActions" - } - }, - "dataForSetSecurityAnswer" : { - "description" : "If the security answer is enabled in the configuration and the user has no security answer yet, contains data for setting it. Is not returned if not used or if the user already has an answer.", - "allOf" : [ { - "$ref" : "#/components/schemas/DataForSetSecurityAnswer" - } ] - }, - "sendMediums" : { - "description" : "The possible mediums for the reset and send password action", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/SendMediumEnum" - } - }, - "confirmationPasswordInput" : { - "description" : "If a confirmation password is used, contains the definitions on how to request that password from the user. This confirmation password is required when performing sensible actions. Sometimes this is dynamic, for example, the confirmation might be configured to be used only once per session, or operations like payments may have a limit per day to be without confirmation (pinless).", - "allOf" : [ { - "$ref" : "#/components/schemas/PasswordInput" - } ] - } - } - }, - "DataForVoucherInfo" : { - "description" : "Contains data the voucher information page.", - "type" : "object", - "properties" : { - "dataForUi" : { - "$ref" : "#/components/schemas/DataForUi" - }, - "shortcutIcon" : { - "description" : "The shortcut icon", - "allOf" : [ { - "$ref" : "#/components/schemas/Image" - } ] - }, - "applicationLogo" : { - "description" : "The application logo", - "allOf" : [ { - "$ref" : "#/components/schemas/Image" - } ] - }, - "locale" : { - "description" : "The Cyclos locale", - "type" : "string" - }, - "resourceCacheKey" : { - "description" : "The key used for URL cache", - "type" : "string" - }, - "mask" : { - "description" : "The token mask. Only returned when all possible voucher configurations share the same mask.", - "type" : "string" - } - } - }, - "DatePeriod" : { - "description" : "A period comprised of a begin and an end date", - "type" : "object", - "properties" : { - "begin" : { - "description" : "The period begin date, if any. Generally a period without a begin date can be seen as since all time.", - "type" : "string", - "format" : "date-time" - }, - "end" : { - "description" : "The period end date, if any. Generally a period without an end date can be seen as without a limit.", - "type" : "string", - "format" : "date-time" - } - } - }, - "DecimalRange" : { - "description" : "Represents a range of minimum / maximum decimal values (both optional). In general if both values are null the entire range is returned as null.", - "type" : "object", - "properties" : { - "min" : { - "description" : "The minimum value", - "type" : "string", - "format" : "number" - }, - "max" : { - "description" : "The maximum value", - "type" : "string", - "format" : "number" - } - } - }, - "DeliveryMethod" : { - "description" : "Reference to a webshop delivery method", - "allOf" : [ { - "$ref" : "#/components/schemas/NamedEntity" - }, { - "type" : "object", - "properties" : { - "description" : { - "type" : "string", - "description" : "A description on how this delivery method works." - }, - "enabled" : { - "type" : "boolean", - "description" : "Whether this delivery method is enabled for new sales." - }, - "chargeType" : { - "$ref" : "#/components/schemas/DeliveryMethodChargeTypeEnum" - }, - "deliveryType" : { - "$ref" : "#/components/schemas/DeliveryMethodTypeEnum" - }, - "minDeliveryTime" : { - "description" : "The minimum time interval expected for the products to be delivered.", - "allOf" : [ { - "$ref" : "#/components/schemas/TimeInterval" - } ] - }, - "maxDeliveryTime" : { - "description" : "The maximum time interval expected for the products to be delivered.", - "allOf" : [ { - "$ref" : "#/components/schemas/TimeInterval" - } ] - }, - "chargeAmount" : { - "description" : "The amount to be charged. Only makes sense if `chargeType` is `fixed`.", - "type" : "string", - "format" : "number" - }, - "chargeCurrency" : { - "description" : "The delivery price currency. Only makes sense if `chargeType` is `fixed`.", - "allOf" : [ { - "$ref" : "#/components/schemas/Currency" - } ] - }, - "address" : { - "description" : "The seller's pickup point address. Only makes sense if `deliveryType` is `pickup`.", - "allOf" : [ { - "$ref" : "#/components/schemas/Address" - } ] - } - } - } ] - }, - "DeliveryMethodBasicData" : { - "description" : "Contains data shared by both DeliveryMethodDataForNew and DeliveryMethodDataForEdit", - "type" : "object", - "properties" : { - "user" : { - "description" : "Reference to the owner of the delivery method", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "currencies" : { - "description" : "Contains the list of possible currencies for the delivery method", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Currency" - } - }, - "addresses" : { - "description" : "Contains the list of possible seller addresses for pickup point delivery type", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Address" - } - } - } - }, - "DeliveryMethodDataForEdit" : { - "description" : "Contains data for editing an exinsting webshop delivery method", - "allOf" : [ { - "$ref" : "#/components/schemas/DeliveryMethodBasicData" - }, { - "type" : "object", - "properties" : { - "canEdit" : { - "type" : "boolean", - "description" : "Can the authenticated user edit this delivery method?" - }, - "canRemove" : { - "type" : "boolean", - "description" : "Can the authenticated user remove this delivery method?" - }, - "deliveryMethod" : { - "description" : "The delivery method populated with the current fields. This value can be modified and sent back on `PUT /delivery-methods/{id}`.", - "allOf" : [ { - "$ref" : "#/components/schemas/DeliveryMethodEdit" - } ] - } - } - } ] - }, - "DeliveryMethodDataForNew" : { - "description" : "Contains data for creating a new webshop delivery method", - "allOf" : [ { - "$ref" : "#/components/schemas/DeliveryMethodBasicData" - }, { - "type" : "object", - "properties" : { - "deliveryMethod" : { - "description" : "The delivery method populated with the default fields. This value can be modified and sent back on `POST /{user}/delivery-methods`.", - "allOf" : [ { - "$ref" : "#/components/schemas/DeliveryMethodNew" - } ] - } - } - } ] - }, - "DeliveryMethodEdit" : { - "description" : "Fields for modifying a webshop delivery method.", - "allOf" : [ { - "$ref" : "#/components/schemas/DeliveryMethodManage" - }, { - "type" : "object", - "properties" : { - "version" : { - "type" : "integer", - "description" : "The version stamp for the current object, used for optimistic locking. When saving, the same version as previously received needs to be passed back. If no one else has saved the object, the version will match and the object will be updated. However, if someone other has saved the object, the version will no longer match, and an error will be raised. This is used to prevent multiple users (or processes) from updating the same object and unwilingly overridding the property values, leading to data loss." - } - } - } ] - }, - "DeliveryMethodManage" : { - "description" : "Common fields for either creating or editing a delivery method", - "type" : "object", - "x-abstract" : true, - "properties" : { - "enabled" : { - "type" : "boolean", - "description" : "Whether this delivery method is enabled for new sales." - }, - "name" : { - "type" : "string", - "description" : "The visible name for this delivery method." - }, - "description" : { - "type" : "string", - "description" : "A description on how this delivery method works." - }, - "chargeType" : { - "$ref" : "#/components/schemas/DeliveryMethodChargeTypeEnum" - }, - "deliveryType" : { - "$ref" : "#/components/schemas/DeliveryMethodTypeEnum" - }, - "minDeliveryTime" : { - "description" : "The minimum time interval expected for the products to be delivered.", - "allOf" : [ { - "$ref" : "#/components/schemas/TimeInterval" - } ] - }, - "maxDeliveryTime" : { - "description" : "The maximum time interval expected for the products to be delivered.", - "allOf" : [ { - "$ref" : "#/components/schemas/TimeInterval" - } ] - }, - "chargeAmount" : { - "type" : "string", - "format" : "number", - "description" : "The delivery price. Only makes sense if `chargeType` is `fixed`." - }, - "chargeCurrency" : { - "type" : "string", - "description" : "Either id or internal name of the price currency." - }, - "address" : { - "type" : "string", - "description" : "Either id or internal name of the seller delivery address." - } - } - }, - "DeliveryMethodNew" : { - "description" : "Fields for a new webshop delivery method.", - "allOf" : [ { - "$ref" : "#/components/schemas/DeliveryMethodManage" - } ] - }, - "DeliveryMethodView" : { - "description" : "Details of a webshop delivery method", - "allOf" : [ { - "$ref" : "#/components/schemas/DeliveryMethod" - }, { - "type" : "object", - "properties" : { - "canEdit" : { - "description" : "Can the authenticated user edit this delivery method?", - "type" : "boolean" - }, - "canRemove" : { - "description" : "Can the authenticated user remove this delivery method?", - "type" : "boolean" - }, - "user" : { - "description" : "The user which owns this delivery method", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - } - } - } ] - }, - "Device" : { - "description" : "A device reference", - "allOf" : [ { - "$ref" : "#/components/schemas/NamedEntity" - }, { - "type" : "object", - "properties" : { - "active" : { - "type" : "boolean", - "description" : "Whether this device is active or not." - }, - "date" : { - "type" : "string", - "format" : "date-time", - "description" : "When the device is not active it represents the creation date. Otherwise, the activation date." } - } - } ] - }, - "DeviceActivation" : { - "type" : "object", - "properties" : { - "code" : { - "type" : "string", - "description" : "The device activation code. Only required if the activation must be confirmed with code." }, - "deviceId" : { - "type" : "string", - "description" : "Trusted device identification. Only required if the activation must be confirmed with another trusted device." + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" + } + } + } }, - "deviceConfirmationId" : { - "type" : "string", - "description" : "The approved device confirmation identification used to validate the activation. Only required if the activation must be confirmed with another trusted device." + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } } - } - }, - "DeviceActivationResult" : { - "type" : "object", - "properties" : { - "device" : { - "$ref" : "#/components/schemas/Device" - }, - "key" : { - "type" : "string", - "description" : "The secret key that must be stored in the trusted device. This key in conjunction with the device identifier will be required to confirm operations in other channels." + }, + "requestBody": { + "description": "The new webshop settings", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebshopSettingsDetailed" + } + } } } - }, - "DeviceConfirmationActionParams" : { - "description" : "Contains data to perform a confirmation action (e.g approve / reject)", - "type" : "object", - "properties" : { - "deviceId" : { - "type" : "string", - "description" : "The id of the device used to perform the confirmation action." - }, - "hmac" : { - "type" : "string", - "description" : "The HMAC-SHA256 calculated for the QR code using the secret key stored in the device." - } + } + }, + "/{user}/marketplace-interests/list-data": { + "parameters": [ + { + "$ref": "#/components/parameters/user" } - }, - "DeviceConfirmationFeedbackPush" : { - "description" : "The result of the action accepted by a device confirmation", - "type" : "object", - "properties" : { - "deviceConfirmation" : { - "$ref" : "#/components/schemas/DeviceConfirmationView" + ], + "get": { + "operationId": "getUserAdInterestsListData", + "summary": "Returns data for advertisement interests listing of the given user.", + "description": "Returns data for advertisement interests listing of the given user.", + "tags": [ + "AdInterests" + ], + "security": [ + { + "basic": [] }, - "successful" : { - "description" : "True if the operation approved by the device confirmation has finished successfully.", - "type" : "boolean" - } - } - }, - "DeviceConfirmationView" : { - "description" : "Detailed information when viewing a device confirmation", - "allOf" : [ { - "$ref" : "#/components/schemas/Entity" - }, { - "type" : "object", - "properties" : { - "qrContent" : { - "type" : "string", - "description" : "The QR content for this confirmation. The content is a URL of the form: cyclos://confirmation?id=confirmation_id&description=i18n_confirmation_type&fields=Label1:Value1|Label2:Value2..." - }, - "type" : { - "description" : "The type of the device confirmation.", - "allOf" : [ { - "$ref" : "#/components/schemas/DeviceConfirmationTypeEnum" - } ] - }, - "status" : { - "description" : "The status of the device confirmation.", - "allOf" : [ { - "$ref" : "#/components/schemas/DeviceConfirmationStatusEnum" - } ] - } - } - } ] - }, - "DeviceDataForEdit" : { - "description" : "Contains data for editing an existing device", - "type" : "object", - "properties" : { - "device" : { - "description" : "The device that is being edited. This value can be modified and sent back on `PUT /devices/{id}`.", - "allOf" : [ { - "$ref" : "#/components/schemas/DeviceEdit" - } ] + { + "session": [] }, - "canEdit" : { - "type" : "boolean", - "description" : "Whether the authenticated user can edit this device or not." + { + "accessClient": [] } - } - }, - "DeviceDataForSend" : { - "description" : "Data for a send / resend the activation code", - "type" : "object", - "properties" : { - "email" : { - "description" : "The email to send the code if the selected medium is `email`.", - "type" : "string" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The data for listing advertisement interests.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserAdInterestsListData" + } + } + } }, - "phones" : { - "description" : "The available mobile phones to send the code. Verified and unverified phones will be included in this list. After a successful activation if the phone was not yet verified then it will automatically be marked as verified.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Phone" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } } }, - "mediums" : { - "description" : "The available mediums for the activation code to be sent. Only returned if the activation can be made by using an activation code.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/SendMediumEnum" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } } }, - "deviceConfirmation" : { - "description" : "The pending device confirmation used to confirm the device activation. Only returned if a trusted device is required for the new activation.", - "$ref" : "#/components/schemas/DeviceConfirmationView" - } - } - }, - "DeviceEdit" : { - "description" : "Fields for device edition.", - "type" : "object", - "properties" : { - "version" : { - "type" : "integer", - "description" : "The version stamp for the current object, used for optimistic locking. When saving, the same version as previously received needs to be passed back. If no one else has saved the object, the version will match and the object will be updated. However, if someone other has saved the object, the version will no longer match, and an error will be raised. This is used to prevent multiple users (or processes) from updating the same object and unwilingly overridding the property values, leading to data loss." + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } }, - "name" : { - "type" : "string", - "description" : "The new device name. It must be unique per user." - } - } - }, - "DevicePin" : { - "description" : "A device PIN reference", - "allOf" : [ { - "$ref" : "#/components/schemas/NamedEntity" - }, { - "type" : "object", - "properties" : { - "date" : { - "description" : "The last modification date or creation (if it was never modified).", - "type" : "string", - "format" : "date-time" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } } - } - } ] - }, - "DevicePinDataForEdit" : { - "description" : "Contains data for editing an existing device PIN", - "type" : "object", - "properties" : { - "pin" : { - "description" : "The device PIN that which name is being edited. The name can be modified and sent back on `PUT /device-pins/{key}`.", - "allOf" : [ { - "$ref" : "#/components/schemas/DevicePinEdit" - } ] }, - "canEdit" : { - "type" : "boolean", - "description" : "Whether the authenticated user can edit this device PIN or not." + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } } } - }, - "DevicePinEdit" : { - "description" : "Fields for device PIN edition.", - "type" : "object", - "properties" : { - "version" : { - "type" : "integer", - "description" : "The version stamp for the current object, used for optimistic locking. When saving, the same version as previously received needs to be passed back. If no one else has saved the object, the version will match and the object will be updated. However, if someone other has saved the object, the version will no longer match, and an error will be raised. This is used to prevent multiple users (or processes) from updating the same object and unwilingly overridding the property values, leading to data loss." + } + }, + "/{user}/marketplace-interests/data-for-new": { + "parameters": [ + { + "$ref": "#/components/parameters/user" + } + ], + "get": { + "operationId": "getAdInterestDataForNew", + "summary": "Returns data for creating a new advertisement interest for a given user.", + "description": "Returns data for creating a new advertisement interest for a given user.", + "tags": [ + "AdInterests" + ], + "security": [ + { + "basic": [] }, - "name" : { - "type" : "string", - "description" : "The new device PIN name. It must be unique per user." - } - } - }, - "DevicePinRemoveParams" : { - "description" : "Parameters for remove an existing device PIN.", - "type" : "object", - "properties" : { - "currentPin" : { - "description" : "The current PIN value. If a password is required according to `GET /device-pins/{key}` (i.e the `passwordInput` is not null) then the remove action must be confirmed with at least the current pin or the current login password but not both.", - "type" : "string" + { + "session": [] }, - "currentPassword" : { - "description" : "The current login password. If a password is required according to `GET /device-pins/{key}` (i.e the `passwordInput` is not null) then the remove action must be confirmed with at least the current login password or the current pin but not both.", - "type" : "string" + { + "accessClient": [] } - } - }, - "DevicePinView" : { - "description" : "Contains details about a device PIN", - "allOf" : [ { - "$ref" : "#/components/schemas/DevicePin" - }, { - "type" : "object", - "properties" : { - "user" : { - "description" : "The user associated to the PIN.", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "principalType" : { - "$ref" : "#/components/schemas/PrincipalType" - }, - "passwordInput" : { - "description" : "Only used for changing the value of an existing PIN or for remove it. If not null then it must be used to ask for the current login password / pin. In case of only name edition though the operation `PUT /device-pins/{key}` it can be ignored.", - "allOf" : [ { - "$ref" : "#/components/schemas/PasswordInput" - } ] - } - } - } ] - }, - "Document" : { - "description" : "Reference to a document", - "allOf" : [ { - "$ref" : "#/components/schemas/InternalNamedEntity" - }, { - "type" : "object", - "properties" : { - "kind" : { - "description" : "The document kind", - "allOf" : [ { - "$ref" : "#/components/schemas/DocumentKind" - } ] - }, - "description" : { - "description" : "The document description.", - "type" : "string" - }, - "category" : { - "description" : "The document category. Only if `kind` is either `static` or `dynamic`.", - "allOf" : [ { - "$ref" : "#/components/schemas/EntityReference" - } ] - }, - "file" : { - "description" : "The document file description. Only if `kind` is either `static` or `user`.", - "allOf" : [ { - "$ref" : "#/components/schemas/StoredFile" - } ] - } - } - } ] - }, - "DocumentBasicData" : { - "description" : "Contains data shared by both DocumentDataForNew and DocumentDataForEdit", - "type" : "object", - "x-abstract" : true, - "properties" : { - "kind" : { - "$ref" : "#/components/schemas/DocumentKind" - }, - "categories" : { - "description" : "The possible document categories. Only returned if `kind` is `static`.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/EntityReference" - } - }, - "user" : { - "description" : "The document owner user. Only returned if `kind` is `user`.", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - } - } - }, - "DocumentDataForEdit" : { - "description" : "Fields for editing a document", - "allOf" : [ { - "$ref" : "#/components/schemas/DocumentBasicData" - }, { - "type" : "object", - "properties" : { - "file" : { - "description" : "The current document file", - "allOf" : [ { - "$ref" : "#/components/schemas/StoredFile" - } ] - }, - "downloadUrlTemplate" : { - "description" : "The URL template where the document can be downloaded Only used if the document `kind` is `static`.", - "type" : "string" - }, - "document" : { - "description" : "The document that is being edited. This value can be modified and sent back to `PUT /documents/{id}`.", - "allOf" : [ { - "$ref" : "#/components/schemas/DocumentEdit" - } ] - } - } - } ] - }, - "DocumentDataForNew" : { - "description" : "Fields for creating a new document", - "allOf" : [ { - "$ref" : "#/components/schemas/DocumentBasicData" - }, { - "type" : "object", - "properties" : { - "document" : { - "description" : "The document that is being created. This value can be modified and sent back to either `POST /documents` (shared) or `POST /{user}/documents`.", - "allOf" : [ { - "$ref" : "#/components/schemas/DocumentNew" - } ] - } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" } - } ] - }, - "DocumentDataForSearch" : { - "description" : "Configuration data for searching documents", - "type" : "object", - "properties" : { - "categories" : { - "description" : "Visible document categories", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/EntityReference" - } - }, - "manageCategories" : { - "description" : "Either internal names of ids of categories the logged user can manage", - "type" : "array", - "items" : { - "type" : "string" - } - }, - "canManageIndividual" : { - "description" : "Indicates whether the logged user can manage individual documents of managed users", - "type" : "boolean" - }, - "user" : { - "description" : "The document's owner. Only returned if searching documents of a specfific user.", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "query" : { - "$ref" : "#/components/schemas/DocumentQueryFilters" - } - } - }, - "DocumentEdit" : { - "description" : "Fields for editing a document", - "allOf" : [ { - "$ref" : "#/components/schemas/DocumentManage" - }, { - "type" : "object", - "properties" : { - "version" : { - "type" : "integer", - "description" : "The version stamp for the current object, used for optimistic locking. When saving, the same version as previously received needs to be passed back. If no one else has saved the object, the version will match and the object will be updated. However, if someone other has saved the object, the version will no longer match, and an error will be raised. This is used to prevent multiple users (or processes) from updating the same object and unwilingly overridding the property values, leading to data loss." - } - } - } ] - }, - "DocumentManage" : { - "description" : "Common fields for either creating or editing a document", - "type" : "object", - "x-abstract" : true, - "properties" : { - "name" : { - "description" : "The document name", - "type" : "string" - }, - "internalName" : { - "description" : "The document internal name", - "type" : "string" - }, - "description" : { - "description" : "The document description", - "type" : "string" - }, - "enabled" : { - "description" : "Whether the document is enabled", - "type" : "boolean" - }, - "category" : { - "description" : "The shared document category internal name or id. Only used if the document `kind` is either `static` or `dynamic`.", - "type" : "string" - }, - "publiclyAccessible" : { - "description" : "Is this document visible to everyone? Only used if the document `kind` is `static`.", - "type" : "boolean" - }, - "userVisible" : { - "description" : "Is this document visible by the owner user? Only used if the document `kind` is `user`.", - "type" : "boolean" - }, - "brokerVisible" : { - "description" : "Is this document visible by the user's broker(s)? Only used if the document `kind` is `user`.", - "type" : "boolean" - }, - "brokerManageable" : { - "description" : "Can this document be managed by the user's broker(s)? Only used if the document `kind` is `user`.", - "type" : "boolean" - } - } - }, - "DocumentNew" : { - "description" : "Fields for creating a new individual document", - "allOf" : [ { - "$ref" : "#/components/schemas/DocumentManage" - }, { - "type" : "object" - } ] - }, - "DocumentQueryFilters" : { - "description" : "Filters used when searching documents", - "allOf" : [ { - "$ref" : "#/components/schemas/QueryFilters" - }, { - "type" : "object", - "properties" : { - "range" : { - "description" : "The range for returned documents. When not specified, defaults to `shared`.", - "allOf" : [ { - "$ref" : "#/components/schemas/DocumentRangeEnum" - } ] - }, - "categories" : { - "description" : "The shared document categories", - "type" : "array", - "items" : { - "type" : "string" - } - }, - "enabled" : { - "description" : "Only used if the logged user can manage documents. When set, filters documents by their `enabled` status, either `true` or `false`.", - "type" : "boolean" - }, - "groups" : { - "description" : "Either the ids or internal names of individual document owners' group", - "type" : "array", - "items" : { - "type" : "string" - } - }, - "brokers" : { - "description" : "Either the ids or identification methods of individual document owners' brokers", - "type" : "array", - "items" : { - "type" : "string" + ], + "responses": { + "200": { + "description": "The data for creating a new advertisement interest.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AdInterestDataForNew" + } } - }, - "user" : { - "description" : "Either the id or identifier of the document owner", - "type" : "string" - }, - "keywords" : { - "description" : "Used to filter documents containing that keywords in the the name or description (case insensitive)", - "type" : "string" - } - } - } ] - }, - "DocumentResult" : { - "description" : "Result from a document search", - "allOf" : [ { - "$ref" : "#/components/schemas/Document" - }, { - "type" : "object", - "properties" : { - "user" : { - "description" : "The document owner. Only if `kind` is `user`.", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "brokerManageable" : { - "description" : "Indicates whether the document owner brokers can manage this document. Only if `kind` is `user`.", - "type" : "boolean" - } - } - } ] - }, - "DocumentView" : { - "description" : "Details of a document", - "allOf" : [ { - "$ref" : "#/components/schemas/Document" - }, { - "type" : "object", - "properties" : { - "description" : { - "description" : "The document description.", - "type" : "string" - }, - "enabled" : { - "description" : "Whether the document is enabled or not.", - "type" : "boolean" - }, - "category" : { - "description" : "The document category, if a shared document", - "allOf" : [ { - "$ref" : "#/components/schemas/EntityReference" - } ] - }, - "user" : { - "description" : "The document owner. Only if `kind` is `user`.", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "publiclyAccessible" : { - "description" : "Is this document visible for everyone? Only used if the document `kind` is `static`.", - "type" : "boolean" - }, - "downloadUrl" : { - "description" : "The URL where the file can be downloaded Only used if the document `kind` is `static`.", - "type" : "string" - }, - "userVisible" : { - "description" : "Is this document visible by the owner user? Only used if the document `kind` is `user`.", - "type" : "boolean" - }, - "brokerVisible" : { - "description" : "Is this document visible by the user's broker(s)? Only used if the document `kind` is `user`.", - "type" : "boolean" - }, - "brokerManageable" : { - "description" : "Can this document be managed by the user's broker(s)? Only used if the document `kind` is `user`.", - "type" : "boolean" - } - } - } ] - }, - "DocumentsPermissions" : { - "description" : "Permissions over documents", - "type" : "object", - "properties" : { - "viewShared" : { - "description" : "Permissions over each visible document category (shared docs)", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/EntityReference" } }, - "viewIndividual" : { - "description" : "Whether the authenticated uses can view individual documents", - "type" : "boolean" - } - } - }, - "Entity" : { - "description" : "Basic definition of a persistent entity", - "x-abstract" : true, - "type" : "object", - "properties" : { - "id" : { - "type" : "string", - "description" : "The internal entity identifier" - } - } - }, - "EntityReference" : { - "description" : "Represents an entity that is being referenced from another one, without caring about the type of the referenced entity.", - "x-final" : true, - "allOf" : [ { - "$ref" : "#/components/schemas/InternalNamedEntity" - }, { - "type" : "object" - } ] - }, - "Error" : { - "description" : "An error that happened during the request processing", - "type" : "object", - "properties" : { - "exceptionType" : { - "description" : "The server exception class name. Not intended to be shown to final users. Only for logging purposes.", - "type" : "string" - }, - "exceptionMessage" : { - "description" : "The server exception message. Not intended to be shown to final users. Only for logging purposes.", - "type" : "string" - }, - "kind" : { - "$ref" : "#/components/schemas/ErrorKind" - } - }, - "required" : [ "exceptionType" ] - }, - "ExportFormat" : { - "description" : "Contains a reference to an export format", - "allOf" : [ { - "$ref" : "#/components/schemas/InternalNamedEntity" - }, { - "type" : "object", - "properties" : { - "contentType" : { - "type" : "string", - "description" : "Indicates the content type (mime type) for the generated content." - }, - "binary" : { - "type" : "boolean", - "description" : "Indicates whether the content generated by this format is binary (true) or textual (false)" - }, - "encoding" : { - "type" : "string", - "description" : "Indicates the character encoding for the textual content. Only returned `binary` is false." - } - } - } ] - }, - "ExternalPaymentPermissions" : { - "description" : "Permissions the user has over an external payment", - "type" : "object", - "properties" : { - "cancel" : { - "description" : "Can cancel the external payment?", - "type" : "boolean" - } - } - }, - "ExternalPaymentPreview" : { - "description" : "Parameters for previewing an external payment", - "allOf" : [ { - "$ref" : "#/components/schemas/TransactionPreview" - }, { - "type" : "object", - "properties" : { - "toPrincipalType" : { - "description" : "A reference to the external payment principal type", - "allOf" : [ { - "$ref" : "#/components/schemas/PrincipalType" - } ] - }, - "mainAmount" : { - "description" : "This reflects the new transaction amount. Depending on the configured fees, it could happen that the fee amount is deducted from transaction amount. If no fees deduct, it will be the same as transaction amount. E.g: payment from A to B by 100 units with two fees: 10 units deducted from payment amount and other of 15 not deducted. Then the `totalAmount` will be 115, 90 for the `mainAmount`, 10 for the first fee and 15 for the other fee.", - "type" : "string", - "format" : "number" - }, - "fees" : { - "description" : "Only returned for direct payments. Contains the fees that would be paid by the payer if the external payment is confirmed.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransferFeePreview" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } } - }, - "payment" : { - "description" : "Depending on the configuration, some script might alter the payment object, for example, filling in custom fields. This object can be used to show the actual data to the user, and to be posted again to the `POST /{owner}/external-payments/` path.", - "allOf" : [ { - "$ref" : "#/components/schemas/PerformExternalPayment" - } ] - } - } - } ] - }, - "ExternalPaymentsPermissions" : { - "description" : "Permissions over own external payments", - "type" : "object", - "properties" : { - "view" : { - "description" : "Can view external payments?", - "type" : "boolean" - }, - "perform" : { - "description" : "Can perform an external payments?", - "type" : "boolean" - }, - "cancel" : { - "description" : "Can cancel an external payments?", - "type" : "boolean" - } - } - }, - "FieldSection" : { - "description" : "Details for a section of fields", - "allOf" : [ { - "$ref" : "#/components/schemas/InternalNamedEntity" - }, { - "type" : "object", - "properties" : { - "informationText" : { - "description" : "An informative text that should be shown in the form. The text is formatted in HTML.", - "type" : "string" - } - } - } ] - }, - "ForbiddenError" : { - "description" : "Error returned when a HTTP status code 403 occurs", - "type" : "object", - "properties" : { - "passwordType" : { - "description" : "The password type of the failed password. Only sent if `code` is one of: - `invalidPassword` - `expiredPassword` - `temporarilyBlocked` - `indefinitelyBlocked`", - "allOf" : [ { - "$ref" : "#/components/schemas/EntityReference" - } ] - }, - "maxDeviceActivationReached" : { - "description" : "The maximum attemps for a device activation was reached. The authenticated user is blocked. Only sent if `code` is `invalidDeviceActivationCode`", - "type" : "boolean" - }, - "code" : { - "$ref" : "#/components/schemas/ForbiddenErrorCode" - }, - "invalidDeviceConfirmation" : { - "description" : "The result associated to an invalid device confrmation. Only sent if `code` is `invalidDeviceConfirmation`", - "allOf" : [ { - "$ref" : "#/components/schemas/InvalidDeviceConfirmationEnum" - } ] - } - } - }, - "ForgottenPasswordError" : { - "description" : "Error when changing a forgotten password", - "allOf" : [ { - "$ref" : "#/components/schemas/Error" - }, { - "type" : "object", - "properties" : { - "keyInvalidated" : { - "description" : "Flag indicating if the key received on the forgotten password reset request was invalidated because the maximum tries was reached. Only if code is `invalidSecurityAnswer`.", - "type" : "boolean" - }, - "code" : { - "$ref" : "#/components/schemas/ForgottenPasswordErrorCode" - } - } - } ] - }, - "ForgottenPasswordRequest" : { - "description" : "Definitions to request a the forgotten user identification or password change.", - "type" : "object", - "properties" : { - "user" : { - "description" : "An identification method for the user. Allows the same identification methods (principal types) as the login, plus e-mail and mobile phone (if they are used as identification methods).", - "type" : "string" - }, - "sendMedium" : { - "description" : "Which medium to send the code which is required for proceeding with the operation", - "allOf" : [ { - "$ref" : "#/components/schemas/SendMediumEnum" - } ] - }, - "captcha" : { - "description" : "The captcha response required when something is returned in `DataForLogin.forgotPasswordCaptchaProvider`.", - "allOf" : [ { - "$ref" : "#/components/schemas/CaptchaResponse" - } ] - } - } - }, - "ForgottenPasswordResponse" : { - "description" : "Result of a request to change a forgotten password", - "type" : "object", - "properties" : { - "sendMedium" : { - "description" : "The medium to which the verification code was sent", - "allOf" : [ { - "$ref" : "#/components/schemas/SendMediumEnum" - } ] - }, - "sentTo" : { - "description" : "Either a single element array with the e-mail address or the mobile phone number to which the verification code was sent. If not exactly the value used to identify the user, the values will be masked, for example: `joh*******@email.com` or `(**) *****-*123`.", - "type" : "array", - "items" : { - "type" : "string" - } - } - } - }, - "FrontendBanner" : { - "description" : "A banner displayed in the new frontend.", - "allOf" : [ { - "$ref" : "#/components/schemas/Entity" - }, { - "type" : "object", - "properties" : { - "content" : { - "description" : "The banner content, in HTML format.", - "type" : "string" - }, - "url" : { - "description" : "If set, is a URL to which the user should be redirected when clicking the banner.", - "type" : "string" - }, - "newWindow" : { - "description" : "Only returned if `url` has a value. Indicates whether the link should be opened in another browser tab / window (true) or in the same (false).", - "type" : "boolean" - }, - "menus" : { - "description" : "In which menus should this banner be displayed?", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/FrontendMenuEnum" + } + }, + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } } - }, - "themed" : { - "description" : "Whether banner background, border and padding should be applied.", - "type" : "boolean" } - } - } ] - }, - "FrontendDashboardAccount" : { - "description" : "Account information displayed on the dashboard", - "type" : "object", - "properties" : { - "account" : { - "$ref" : "#/components/schemas/AccountWithCurrency" }, - "balance" : { - "description" : "The current balance", - "type" : "string", - "format" : "number" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } }, - "balanceHistory" : { - "description" : "The balance at each data point", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/AccountBalanceEntry" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } } }, - "lastTransfers" : { - "description" : "The last transfers to show for this account. Only returned if not merging accounts", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/AccountHistoryResult" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } } } } - }, - "FrontendHomeContent" : { - "description" : "The home page displayed for guests", - "type" : "object", - "properties" : { - "layout" : { - "description" : "How this content page is presented", - "allOf" : [ { - "$ref" : "#/components/schemas/FrontendContentLayoutEnum" - } ] - }, - "title" : { - "description" : "The home page title, used when `layout` is a card", - "type" : "string" - }, - "content" : { - "description" : "The HTML content", - "type" : "string" - } + } + }, + "/{user}/marketplace-interests": { + "parameters": [ + { + "$ref": "#/components/parameters/user" } - }, - "FrontendIcon" : { - "description" : "Represents an icon metadata for the page", - "type" : "object", - "properties" : { - "rel" : { - "description" : "The type of relation for the HTML link tag", - "type" : "string" - }, - "width" : { - "description" : "The icon width", - "type" : "integer" + ], + "post": { + "operationId": "createAdInterest", + "summary": "Creates a new advertisement interest for a given user.", + "description": "Creates a new advertisement interest for a given user.", + "tags": [ + "AdInterests" + ], + "security": [ + { + "basic": [] }, - "height" : { - "description" : "The icon height", - "type" : "integer" + { + "session": [] }, - "url" : { - "description" : "The icon URL", - "type" : "string" + { + "accessClient": [] } - } - }, - "FrontendPage" : { - "description" : "A customized page displayed in the new frontend", - "allOf" : [ { - "$ref" : "#/components/schemas/InternalNamedEntity" - }, { - "type" : "object", - "properties" : { - "title" : { - "description" : "The page title", - "type" : "string" - }, - "type" : { - "$ref" : "#/components/schemas/FrontendPageTypeEnum" - }, - "menu" : { - "$ref" : "#/components/schemas/FrontendMenuEnum" - }, - "layout" : { - "$ref" : "#/components/schemas/FrontendContentLayoutEnum" - }, - "svgIcon" : { - "description" : "The name of the SVG icon. The content of the icon can be obtained with `GET /images/svg/{name}.svg`", - "type" : "string" - }, - "url" : { - "description" : "The URL to use in the iframe. Only returned if `type` is either `url` or `iframe`.", - "type" : "string" - }, - "operation" : { - "description" : "The custom operation to run. Only returned if `type` is `operation`.", - "allOf" : [ { - "$ref" : "#/components/schemas/Operation" - } ] + ], + "responses": { + "201": { + "description": "Returns the identifier of the new advertisement interest.", + "headers": { + "Location": { + "description": "URL for viewing the advertisement interest details.", + "schema": { + "type": "string" + } + } }, - "wizard" : { - "description" : "The custom wizard to run. Only returned if `type` is `wizard`.", - "allOf" : [ { - "$ref" : "#/components/schemas/Wizard" - } ] - } - } - } ] - }, - "FrontendPageWithContent" : { - "description" : "A customized page displayed in the new frontend, together with its content", - "allOf" : [ { - "$ref" : "#/components/schemas/FrontendPage" - }, { - "type" : "object", - "properties" : { - "content" : { - "description" : "The HTML content of the page", - "type" : "string" + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } } - } - } ] - }, - "FrontendSettings" : { - "description" : "The settings of a user regarding the frontend", - "type" : "object", - "properties" : { - "frontend" : { - "$ref" : "#/components/schemas/FrontendEnum" - } - } - }, - "FullProfileEdit" : { - "description" : "Data sent to the server to edit the full profile at once", - "type" : "object", - "properties" : { - "user" : { - "description" : "The basic fields. If null, the fields are not modified", - "allOf" : [ { - "$ref" : "#/components/schemas/UserEdit" - } ] }, - "createLandLinePhones" : { - "description" : "Land-line phones to be created. If not sent / empty, no land-line phones are created.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PhoneNew" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } } }, - "createMobilePhones" : { - "description" : "Mobile phones to be created. If not sent / empty, no mobile phones are created.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PhoneNew" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } } }, - "modifyLandLinePhones" : { - "description" : "Land-line phones to be modified. If not sent / empty, no land-line phones are modified", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PhoneEditWithId" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } } }, - "modifyMobilePhones" : { - "description" : "Mobile phones to be modified. If not sent / empty, no mobile phones are modified.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PhoneEditWithId" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } } }, - "removePhones" : { - "description" : "Phones (both land-line and mobile) to be removed. If not sent / empty, no phones are removed.", - "type" : "array", - "items" : { - "type" : "string" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" + } + } } }, - "createAddresses" : { - "description" : "Addresses to be created. If not sent / empty, no addresses are created.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/AddressNew" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } } - }, - "modifyAddresses" : { - "description" : "Addresses to be modified. If not sent / empty, no addresses are modified.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/AddressEditWithId" + } + }, + "requestBody": { + "description": "The advertisement interest to be created.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AdInterestNew" + } } + } + } + } + }, + "/marketplace-interests/{id}/data-for-edit": { + "parameters": [ + { + "$ref": "#/components/parameters/id" + } + ], + "get": { + "operationId": "getAdInterestDataForEdit", + "summary": "Returns data for modifying an advertisement interest.", + "description": "Returns data for modifying an advertisement interest.", + "tags": [ + "AdInterests" + ], + "security": [ + { + "basic": [] }, - "removeAddresses" : { - "description" : "Addresses to be removed. If not sent / empty, no addresses are removed.", - "type" : "array", - "items" : { - "type" : "string" - } + { + "session": [] }, - "createContactInfos" : { - "description" : "Additional contacts to be created. If not sent / empty, no additional contacts are created.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ContactInfoNew" + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The advertisement interest data.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AdInterestDataForEdit" + } + } } }, - "modifyContactInfos" : { - "description" : "Additional contacts to be modified. If not sent / empty, no additional contacts are modified.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ContactInfoEditWithId" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } } }, - "removeContactInfos" : { - "description" : "Additional contacts to be removed. If not sent / empty, no additional contacts are removed.", - "type" : "array", - "items" : { - "type" : "string" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } } }, - "addImages" : { - "description" : "Identifiers of previously uploaded temporary images to be added as profile images. If not sent / empty, no images are added.", - "type" : "array", - "items" : { - "type" : "string" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } } }, - "removeImages" : { - "description" : "Identifiers of existing profile images to be removed. If not sent / empty, no images are removed.", - "type" : "array", - "items" : { - "type" : "string" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } } }, - "reorderImages" : { - "description" : "Identifiers of either existing or added profile images in the order they should be listed.", - "type" : "array", - "items" : { - "type" : "string" - } - } - } - }, - "FullProfileEditResult" : { - "description" : "Result of saving the full profile at once", - "allOf" : [ { - "$ref" : "#/components/schemas/BasicFullProfileEditResult" - }, { - "type" : "object", - "properties" : { - "createdAddresses" : { - "description" : "Identifiers of created addresses", - "type" : "array", - "items" : { - "type" : "string" - } - }, - "createdContactInfos" : { - "description" : "Identifiers of created additional contacts", - "type" : "array", - "items" : { - "type" : "string" - } - }, - "createdImages" : { - "description" : "Identifiers of created profile images", - "type" : "array", - "items" : { - "type" : "string" - } - } - } - } ] - }, - "FullTextQueryFilters" : { - "description" : "Base definitions for search filters which have keywords and user profile fields", - "x-abstract" : true, - "allOf" : [ { - "$ref" : "#/components/schemas/QueryFilters" - }, { - "type" : "object", - "properties" : { - "keywords" : { - "type" : "string", - "description" : "Textual search keywords. Sometimes, like in user search, the fields matched depends on what is configured on the products." - }, - "profileFields" : { - "type" : "array", - "items" : { - "type" : "string" - }, - "description" : "User profile fields, both basic (full name, login name, phone, e-mail, etc) and custom fields, that are used for search. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by `:` (colon). For example, `profileFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, `profileFields=field1:valueA|valueB`. The accepted fields depend on the products the authenticated user has. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `profileFields=rank:bronze|silver,birthDate:2000-01-01|2001-12-31` would match results whose custom field with internal name 'rank' is either bronze or silver, and whose 'birthDate' is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `profileFields=birthDate:|2001-12-31`.\n\nThe basic profile fields have one of the following identifiers:\n\n- `name` or `fullName`: Full name;\n- `username`, `loginName` or `login`: Login name;\n- `email`: E-mail;\n- `phone`: Phone;\n- `accountNumber`, `account`: Account number;\n- `image`: Image (accepts a boolean value, indicating that either\n it is required that users either have images or not).\n\n\nIf address is an allowed profile field for search, specific address fields may be searched. The allowed ones are normally returned as the `addressFieldsInSearch` field in the corresponding result from a data-for-search request.\nThe specific address fields are:\n\n- `address`: Searches on any address field (not a specific field);\n- `address.address`: Searches on the fields that represent the\n street address, which are `addressLine1`,\n `addressLine2`,\n `street`,\n `buildingNumber` and\n `complement`.\n Note that normally only a subset of them should be enabled in the\n configuration (either line 1 / 2 or street + number + complement);\n\n- `address.zip`: Searches for matching zip (postal) code;\n- `address.poBox`: Searches for matching postal box;\n- `address.neighborhood`: Searches by neighborhood;\n- `address.city`: Searches by city;\n- `address.region`: Searches by region (or state);\n- `address.country`: Searches by ISO 3166-1 alpha-2 country code.\nA note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `profileFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `profileFields=dynamic:'business`." - } - } - } ] - }, - "FullTextWithDistanceQueryFilters" : { - "description" : "Base definitions for full-text search filters which also can search by distance", - "x-abstract" : true, - "allOf" : [ { - "$ref" : "#/components/schemas/FullTextQueryFilters" - }, { - "type" : "object", - "properties" : { - "latitude" : { - "description" : "The reference latitude for distance searches", - "type" : "number", - "format" : "double" - }, - "longitude" : { - "description" : "The reference longitude for distance searches", - "type" : "number", - "format" : "double" - }, - "maxDistance" : { - "description" : "Maximum straight-line distance between the informed location and the resulting address. Is measured either in kilometers or miles, depending on the configuration. Only accepted if both `longitude` and `latitude` parameters are passed with the actual reference position.", - "type" : "number", - "format" : "double" - } - } - } ] - }, - "GeneralAccountBalanceLimitsResult" : { - "description" : "Result for the list of a general search of account balance limits", - "allOf" : [ { - "$ref" : "#/components/schemas/AccountBalanceLimitsResult" - }, { - "type" : "object", - "properties" : { - "user" : { - "$ref" : "#/components/schemas/User" - } - } - } ] - }, - "GeneralAccountPaymentLimitsResult" : { - "description" : "Result for the list of a general search of account payment limits", - "allOf" : [ { - "$ref" : "#/components/schemas/AccountPaymentLimitsResult" - }, { - "type" : "object", - "properties" : { - "user" : { - "$ref" : "#/components/schemas/User" - } - } - } ] - }, - "GeneralOperatorsDataForSearch" : { - "type" : "object", - "properties" : { - "userGroups" : { - "description" : "The groups the authenticated user can use to filter users. Admins can always filter by groups, while users depend on a permission, which can be to only view group sets, only groups or none.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Group" - } - }, - "query" : { - "description" : "Default query filters to search operators", - "allOf" : [ { - "$ref" : "#/components/schemas/GeneralOperatorsQueryFilters" - } ] - } - } - }, - "GeneralOperatorsQueryFilters" : { - "description" : "Definitions for general operators search filters", - "allOf" : [ { - "$ref" : "#/components/schemas/BasicOperatorQueryFilters" - }, { - "type" : "object", - "properties" : { - "userGroups" : { - "type" : "array", - "items" : { - "type" : "string" - }, - "description" : "Either id or internal names of user groups / group sets" - }, - "broker" : { - "type" : "string", - "description" : "Either id or a principal (login name, e-mail, etc) of the user broker" - } - } - } ] - }, - "GeneralRecordsDataForSearch" : { - "description" : "Data for searching records of a type, from any user", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseRecordDataForSearch" - }, { - "type" : "object", - "properties" : { - "userStatuses" : { - "description" : "The possible statuses of the record's owner", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/UserStatusEnum" - } - }, - "groups" : { - "description" : "The groups the authenticated user can use to filter user records", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Group" - } - }, - "basicProfileFields" : { - "description" : "The list of basic user profile fields that can be used as search filters. Only returned if searching user records.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/BasicProfileFieldInput" - } - }, - "customProfileFields" : { - "description" : "The list of custom user profile fields that can be used as search filters. Only returned if searching user records.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/CustomFieldDetailed" - } - }, - "addressFieldsInSearch" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/AddressQueryFieldEnum" - } - }, - "query" : { - "description" : "Default query filters for searching records", - "allOf" : [ { - "$ref" : "#/components/schemas/GeneralRecordsQueryFilters" - } ] - } - } - } ] - }, - "GeneralRecordsQueryFilters" : { - "description" : "Query filters for searching records of a type, regardless the user", - "allOf" : [ { - "$ref" : "#/components/schemas/RecordQueryFilters" - }, { - "type" : "object", - "properties" : { - "brokers" : { - "description" : "Either the ids or identification methods of record owners' brokers", - "type" : "array", - "items" : { - "type" : "string" - } - }, - "groups" : { - "description" : "Either the ids or internal names of record owners' groups", - "type" : "array", - "items" : { - "type" : "string" - } - }, - "userStatuses" : { - "description" : "The possible statuses of the record's owner", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/UserStatusEnum" - } - }, - "user" : { - "description" : "Either the id or identifier of the record owner", - "type" : "string" - } - } - } ] - }, - "GeneralVouchersDataForSearch" : { - "description" : "Contains configuration data for a general vouchers search", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseVouchersDataForSearch" - }, { - "type" : "object", - "properties" : { - "canGenerate" : { - "description" : "Can the authenticated user generate vouchers?", - "type" : "boolean" - }, - "userGroups" : { - "description" : "Visible user groups for the authenticated user", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Group" - } - }, - "exportFormats" : { - "description" : "The formats which the search results can be exported.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ExportFormat" - } - }, - "query" : { - "$ref" : "#/components/schemas/VouchersQueryFilters" - }, - "customFields" : { - "description" : "The list of custom fields that can be used as search filters if the internal names are present in the `fieldsInBasicSearch` property.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/CustomFieldDetailed" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } } - }, - "fieldsInBasicSearch" : { - "description" : "The internal names of the custom fields that should be used as search filters in the basic section (separated fields, not keywords)", - "type" : "array", - "items" : { - "type" : "string" - } - } - } - } ] - }, - "GenerateVoucher" : { - "description" : "Parameters for generate vouchers", - "allOf" : [ { - "$ref" : "#/components/schemas/CreateVoucher" - }, { - "type" : "object", - "properties" : { - "inactive" : { - "description" : "When set to true, the generated vouchers will be in the `inactive` status.", - "type" : "boolean" - }, - "user" : { - "description" : "The vouchers owner. If not given, the vouchers are generated without owner. Ignored if `inactive` is true.", - "type" : "string" - } - } - } ] - }, - "GeographicalCoordinate" : { - "description" : "A geographical coordinate with latitude and longitude", - "type" : "object", - "properties" : { - "latitude" : { - "type" : "number", - "format" : "double", - "description" : "The latitude" - }, - "longitude" : { - "type" : "number", - "format" : "double", - "description" : "The longitude" - } - } - }, - "Group" : { - "description" : "Contains data of a group", - "allOf" : [ { - "$ref" : "#/components/schemas/InternalNamedEntity" - }, { - "type" : "object", - "properties" : { - "groupSet" : { - "description" : "The internal name or id of the group set of this group. Only makes sense if is a user or broker group. Administrator groups or group sets cannot have a group set.", - "type" : "string" - }, - "kind" : { - "$ref" : "#/components/schemas/GroupKind" } } - } ] - }, - "GroupForRegistration" : { - "description" : "Contains data for a possible group for user registration", - "allOf" : [ { - "$ref" : "#/components/schemas/InternalNamedEntity" - }, { - "type" : "object", - "properties" : { - "description" : { - "type" : "string", - "description" : "The description set on the group to be displayed to the user" - } - } - } ] - }, - "GroupMembershipData" : { - "description" : "Contains the current user / operator group, as well as other information", - "type" : "object", - "properties" : { - "user" : { - "$ref" : "#/components/schemas/User" - }, - "status" : { - "$ref" : "#/components/schemas/UserStatusEnum" + } + } + }, + "/marketplace-interests/{id}": { + "parameters": [ + { + "$ref": "#/components/parameters/id" + } + ], + "get": { + "operationId": "viewAdInterest", + "summary": "Returns details of an advertisement interest.", + "description": "Returns details of an advertisement interest.", + "tags": [ + "AdInterests" + ], + "security": [ + { + "basic": [] }, - "group" : { - "$ref" : "#/components/schemas/Group" + { + "session": [] }, - "groupSets" : { - "description" : "List of group sets which can be referenced on groups on either `possibleNewGroups` or `history.group`. Not sent for operators.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/EntityReference" + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The advertisement interest data.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AdInterestView" + } + } } }, - "possibleNewGroups" : { - "description" : "If the authenticated user can change the user / operator to a new group, contains the list of groups that can be assigned.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Group" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } } }, - "history" : { - "description" : "Contains the history entries for all group changes", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/GroupMembershipLog" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } } - } - } - }, - "GroupMembershipLog" : { - "description" : "Information regarding a specific group membership change", - "type" : "object", - "properties" : { - "by" : { - "$ref" : "#/components/schemas/User" }, - "group" : { - "$ref" : "#/components/schemas/Group" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } }, - "period" : { - "description" : "The begin and end date the for this group. The current group has no end date.", - "allOf" : [ { - "$ref" : "#/components/schemas/DatePeriod" - } ] + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } + } }, - "comment" : { - "description" : "Comments supplied by the manager that performed the group change", - "type" : "string" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } } } }, - "HttpRequestData" : { - "description" : "Contains data of an HTTP request", - "type" : "object", - "properties" : { - "method" : { - "type" : "string", - "description" : "The HTTP method" - }, - "headers" : { - "type" : "object", - "additionalProperties" : { - "type" : "string" - }, - "description" : "The HTTP request headers" + "put": { + "operationId": "updateAdInterest", + "summary": "Updates an existing advertisement interest.", + "description": "Updates an existing advertisement interest.", + "tags": [ + "AdInterests" + ], + "security": [ + { + "basic": [] }, - "parameters" : { - "type" : "object", - "additionalProperties" : { - "type" : "string" - }, - "description" : "The HTTP request query parameters" + { + "session": [] }, - "body" : { - "type" : "string", - "description" : "The HTTP request body" + { + "accessClient": [] } - } - }, - "IAddress" : { - "description" : "Interface containing the common address properties", - "type" : "object", - "x-interface" : true, - "properties" : { - "addressLine1" : { - "type" : "string", - "description" : "The first line of the descriptive address" - }, - "addressLine2" : { - "type" : "string", - "description" : "The second line of the descriptive address" - }, - "street" : { - "type" : "string", - "description" : "The street name" + ], + "responses": { + "204": { + "description": "The advertisement interest was updated." }, - "buildingNumber" : { - "type" : "string", - "description" : "The numeric identifier for a land parcel, house, building or other" - }, - "complement" : { - "type" : "string", - "description" : "The complement (like apartment number)" - }, - "zip" : { - "type" : "string", - "description" : "A zip code that identifies a specific geographic (postal) delivery area" + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" + } + } + } }, - "poBox" : { - "type" : "string", - "description" : "The post-office box, is an uniquely addressable box" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } + } }, - "neighborhood" : { - "type" : "string", - "description" : "The neighborhood name" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } + } }, - "city" : { - "type" : "string", - "description" : "The city name" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } }, - "region" : { - "type" : "string", - "description" : "The region or state" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } + } }, - "country" : { - "type" : "string", - "description" : "The country, represented as 2-letter, uppercase, ISO 3166-1 code" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" + } + } + } }, - "location" : { - "description" : "The geolocation of the current address", - "allOf" : [ { - "$ref" : "#/components/schemas/GeographicalCoordinate" - } ] + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "requestBody": { + "description": "The advertisement interest to be edited.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AdInterestEdit" + } + } } } }, - "IBasicUserNew" : { - "description" : "Interface containing the common properties to register a user / operator", - "x-interface" : true, - "type" : "object", - "properties" : { - "mobilePhones" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PhoneNew" - }, - "description" : "Mobile phones to be registered together with the user" + "delete": { + "operationId": "deleteAdInterest", + "summary": "Removes an advertisement interest.", + "description": "Removes an advertisement interest.", + "tags": [ + "AdInterests" + ], + "security": [ + { + "basic": [] }, - "landLinePhones" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PhoneNew" - }, - "description" : "Land-line phones to be registered together with the user" - }, - "passwords" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PasswordRegistration" - }, - "description" : "The initial passwords of the user" + { + "session": [] }, - "skipActivationEmail" : { - "type" : "boolean", - "description" : "When set to true, the activation e-mail is not sent to the registered user. Can only be used when an administrator / broker is registering a user, and ignored on public registrations (the e-mail is always sent on public registrations)." + { + "accessClient": [] } - } - }, - "IContactInfo" : { - "description" : "Interface containing the common contact info properties", - "type" : "object", - "x-interface" : true, - "properties" : { - "email" : { - "type" : "string", - "description" : "The e-mail for this additional contact information" + ], + "responses": { + "204": { + "description": "The advertisement interest was removed." }, - "mobilePhone" : { - "type" : "string", - "description" : "The formatted mobile phone for this additional contact information" + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" + } + } + } }, - "landLinePhone" : { - "type" : "string", - "description" : "The formatted landline phone for this additional contact information" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } + } }, - "landLineExtension" : { - "type" : "string", - "description" : "The landline phone extension for this additional contact information" - } - } - }, - "INormalizedPhones" : { - "description" : "Contains normalized phone numbers", - "x-interface" : true, - "type" : "object", - "properties" : { - "normalizedMobilePhone" : { - "type" : "string", - "description" : "The mobile phone, normalized to the E.164 format" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } + } }, - "normalizedLandLinePhone" : { - "type" : "string", - "description" : "The land-line phone, normalized to the E.164 format" - } - } - }, - "IPhone" : { - "description" : "Interface containing the common phone properties", - "type" : "object", - "x-interface" : true, - "properties" : { - "name" : { - "type" : "string", - "description" : "The phone name" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } }, - "number" : { - "type" : "string", - "description" : "The formatted number" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } + } }, - "extension" : { - "type" : "string", - "description" : "The number extension, only for landLine phones, and is only used if the phone configuration states that extensions are enabled." + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } } } - }, - "IPhoneDetailed" : { - "description" : "Interface containing additional common phone properties", - "type" : "object", - "x-interface" : true, - "x-implements" : "IPhone", - "properties" : { - "name" : { - "type" : "string", - "description" : "The phone name" - }, - "number" : { - "type" : "string", - "description" : "The formatted number" - }, - "extension" : { - "type" : "string", - "description" : "The number extension, only for landLine phones, and is only used if the phone configuration states that extensions are enabled." - }, - "hidden" : { - "type" : "boolean", - "description" : "Indicates whether this phone is private / hidden for other users (`true`) or public / visible to all users (`false`)." + } + }, + "/{user}/privacy-settings": { + "get": { + "operationId": "getPrivacySettingsData", + "summary": "Get the privacy settings data", + "description": "Returns the privacy settings data of the given user", + "tags": [ + "PrivacySettings" + ], + "security": [ + { + "basic": [] }, - "enabledForSms" : { - "type" : "boolean", - "description" : "Only applicable if this represents a mobile phone. Whether this mobile phone is enabled for SMS, both receiving notifications and sending SMS operations. Can only be set if the mobile phone is verified." + { + "session": [] }, - "verified" : { - "type" : "boolean", - "description" : "Only applicable if this represents a mobile phone. Whether this mobile is verified. Can only be directly set by administrators. Regular users need to verify it." + { + "accessClient": [] } - } - }, - "IUser" : { - "description" : "Interface containing the common user properties", - "type" : "object", - "x-interface" : true, - "properties" : { - "name" : { - "type" : "string", - "description" : "The user's full name" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" }, - "username" : { - "type" : "string", - "description" : "The user's login name" - }, - "email" : { - "type" : "string", - "description" : "The user's e-mail" + { + "$ref": "#/components/parameters/user" } - } - }, - "IdentityProvider" : { - "description" : "A reference to an identity provider", - "allOf" : [ { - "$ref" : "#/components/schemas/InternalNamedEntity" - }, { - "type" : "object", - "properties" : { - "backgroundColor" : { - "description" : "The background color for the button that represents this provider", - "type" : "string" - }, - "borderColor" : { - "description" : "The border color for the button that represents this provider", - "type" : "string" - }, - "textColor" : { - "description" : "The text color for the button that represents this provider", - "type" : "string" - }, - "image" : { - "description" : "The provider image", - "allOf" : [ { - "$ref" : "#/components/schemas/Image" - } ] + ], + "responses": { + "200": { + "description": "The privacy settings data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PrivacySettingsData" + } + } } - } - } ] - }, - "IdentityProviderCallbackResult" : { - "description" : "Result of a callback by an identity provider", - "type" : "object", - "properties" : { - "identityProvider" : { - "$ref" : "#/components/schemas/IdentityProvider" - }, - "status" : { - "$ref" : "#/components/schemas/IdentityProviderCallbackStatusEnum" - }, - "requestId" : { - "description" : "The identifier used to track this operation.", - "type" : "string" - }, - "sessionToken" : { - "description" : "If the user was logged-in, this is the token identifying the session. Only returned if `status` is either: `loginLink`, `loginEmail` or `registrationDone`.", - "type" : "string" - }, - "name" : { - "description" : "The user display name as returned by the provider. Only returned if `status` is `registrationData`.", - "type" : "string" - }, - "email" : { - "description" : "The user e-mail as returned by the provider. Only returned if `status` is `registrationData`.", - "type" : "string" - }, - "username" : { - "description" : "The user login name as returned by the provider. Only returned if `status` is `registrationData`.", - "type" : "string" - }, - "mobilePhone" : { - "description" : "The user mobile phone number name as returned by the provider. Only returned if `status` is `registrationData`.", - "type" : "string" - }, - "landLinePhone" : { - "description" : "The user land-line phone number name as returned by the provider. Only returned if `status` is `registrationData`.", - "type" : "string" - }, - "landLineExtension" : { - "description" : "The user land-line phone extension name as returned by the provider. Only returned if `status` is `registrationData`.", - "type" : "string" - }, - "image" : { - "description" : "The user image as returned by the provider. Only returned if `status` is `registrationData`.", - "allOf" : [ { - "$ref" : "#/components/schemas/Image" - } ] }, - "customValues" : { - "description" : "The user custom field values as returned by the provider. Only returned if `status` is `registrationData`.", - "type" : "object", - "additionalProperties" : { - "type" : "string" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } } }, - "wizardExecutionData" : { - "description" : "Only when the request is for a registration wizard. Contains the data for the next wizard step.", - "allOf" : [ { - "$ref" : "#/components/schemas/WizardExecutionData" - } ] - }, - "errorMessage" : { - "description" : "Description for the error being returned. It is possible that no message is returned. In this case, a generic error message should be displayed for the user. Only returned if `status` is `error`.", - "type" : "string" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } + } }, - "pinCreationToken" : { - "description" : "A token (challenge) generated only If the user was logged-in (i.e a `sessionToken` is returned). It can be used to confirm the pin creation operation. Is has a validity of 6 minutes after the session was created. After that time the pin creation can be confirmed only using the current login password.", - "type" : "string" - } - } - }, - "IdentityProviderRequestResult" : { - "description" : "Result of the preparation of an operation with an identity provider", - "type" : "object", - "properties" : { - "identityProvider" : { - "$ref" : "#/components/schemas/IdentityProvider" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } }, - "requestId" : { - "description" : "The identifier used to track this operation", - "type" : "string" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } + } }, - "url" : { - "description" : "The URL which should be opened in a new browser window / popup to get the user consent.", - "type" : "string" - } - } - }, - "IdentityProvidersPermissions" : { - "description" : "Permissions over the logged user's identity provider links", - "type" : "object", - "properties" : { - "enabled" : { - "description" : "Is the identity providers functionality enabled for the logged user?", - "type" : "boolean" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } } } }, - "Image" : { - "description" : "Contains data for displaying an image", - "allOf" : [ { - "$ref" : "#/components/schemas/StoredFile" - }, { - "type" : "object", - "properties" : { - "width" : { - "type" : "integer", - "description" : "The image width, in pixels" - }, - "height" : { - "type" : "integer", - "description" : "The image height, in pixels" - } + "post": { + "operationId": "savePrivacySettings", + "summary": "Saves the privacy settings for a given user.", + "description": "Saves the privacy settings for a given user.", + "tags": [ + "PrivacySettings" + ], + "parameters": [ + { + "$ref": "#/components/parameters/user" } - } ] - }, - "ImageConfigurationForUserProfile" : { - "description" : "User images data sent when editing the full profile", - "type" : "object", - "properties" : { - "manage" : { - "description" : "Can the authenticated user has permission to manage images?", - "type" : "boolean" + ], + "responses": { + "204": { + "description": "The privacy settings was saved" }, - "maxImages" : { - "description" : "The maximum allowed number of profile images", - "type" : "integer" - }, - "availability" : { - "$ref" : "#/components/schemas/AvailabilityEnum" - } - } - }, - "ImageView" : { - "description" : "Details about an image", - "allOf" : [ { - "$ref" : "#/components/schemas/Image" - }, { - "type" : "object", - "properties" : { - "convertedToJpeg" : { - "description" : "Indicates whether this was originally a PNG format that exceeded the maximum allowed size and was automatically converted to JPEG.", - "type" : "boolean" - }, - "kind" : { - "$ref" : "#/components/schemas/ImageKind" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } } - } - } ] - }, - "ImagesListData" : { - "description" : "Contains information for a list of images, such as permissions and the list of images itself", - "type" : "object", - "properties" : { - "canEdit" : { - "description" : "Does the authenticated user has permission to edit these images?", - "type" : "boolean" }, - "canCreate" : { - "description" : "Does the authenticated user has permission to create a new image?", - "type" : "boolean" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } + } }, - "maxImages" : { - "description" : "The maximum number of images allowed", - "type" : "integer" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } }, - "images" : { - "description" : "The list of images", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Image" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } } }, - "availability" : { - "$ref" : "#/components/schemas/AvailabilityEnum" - } - } - }, - "ImagesPermissions" : { - "description" : "Permissions over images", - "type" : "object", - "properties" : { - "myCustom" : { - "description" : "Whether custom images are enabled for the logged user", - "type" : "boolean" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" + } + } + } }, - "systemCategories" : { - "description" : "Visible system image categories.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/SystemImageCategoryPermissions" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } } } - } - }, - "IncomingMessage" : { - "description" : "An incoming message (in the user's inbox)", - "allOf" : [ { - "$ref" : "#/components/schemas/Entity" - }, { - "type" : "object", - "properties" : { - "date" : { - "description" : "The message date", - "type" : "string", - "format" : "date-time" - }, - "category" : { - "description" : "The message category, for messages from system", - "allOf" : [ { - "$ref" : "#/components/schemas/EntityReference" - } ] - }, - "fromUser" : { - "$ref" : "#/components/schemas/User" - }, - "subject" : { - "description" : "The message subject", - "type" : "string" - }, - "body" : { - "description" : "The message body", - "type" : "string" + }, + "requestBody": { + "description": "The privacy settings data to be saved", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PrivacySettingsParams" + } } } - } ] - }, - "InitializeNfcError" : { - "description" : "Error when initialize a NFC card", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseNfcError" - }, { - "type" : "object", - "properties" : { - "code" : { - "$ref" : "#/components/schemas/InitializeNfcErrorCode" + } + } + }, + "/firebase/fcm-tokens": { + "post": { + "operationId": "assignFcmToken", + "summary": "Assign a new FCM registration token to the authenticated user", + "description": "Assign a new FCM registration token to the authenticated user only if the token is not already assigned. Otherwise only the current date is stamped in the token to track the last use.", + "tags": [ + "Firebase" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "requestBody": { + "description": "The registration token", + "required": true, + "content": { + "text/plain": { + "schema": { + "type": "string" + } } } - } ] - }, - "InputError" : { - "description" : "Error returned when some input data failed validation", - "type" : "object", - "properties" : { - "generalErrors" : { - "description" : "A list of errors that cannot be attributed to a specific property. Only returned if `code` is `validation`.", - "type" : "array", - "items" : { - "type" : "string" + }, + "responses": { + "204": { + "description": "The token was assigned, nothing is returned" + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } } }, - "properties" : { - "description" : "An array of properties which contains errors, in the order they were processed. As `propertyErrors` is an object (without a guaranteed order for its keys) the original order would be lost otherwise. Only returned if `code` is `validation`.", - "type" : "array", - "items" : { - "type" : "string" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } } }, - "propertyErrors" : { - "description" : "An object keyed by property name, whose values are lists of errors for that property. Only returned if `code` is `validation`.", - "type" : "object", - "additionalProperties" : { - "type" : "array", - "items" : { - "type" : "string" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } } } }, - "customFields" : { - "description" : "An array of custom field internal names which contains errors, in the order they were processed. As `customFieldErrors` is an object (without a guaranteed order for its keys) the original order would be lost otherwise. Only returned if `code` is `validation`.", - "type" : "array", - "items" : { - "type" : "string" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } } }, - "customFieldErrors" : { - "description" : "An object keyed by custom field internal name, whose values are lists of errors for that custom field. Only returned if `code` is `validation`.", - "type" : "object", - "additionalProperties" : { - "type" : "array", - "items" : { - "type" : "string" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } } } + } + } + }, + "put": { + "operationId": "updateFcmTokens", + "summary": "Updates an existing FCM token", + "description": "Updates an existing FCM token. This operation allows guest users.", + "tags": [ + "Firebase" + ], + "responses": { + "204": { + "description": "The token was updated" }, - "maxItems" : { - "description" : "The maximum allowed items. Only returned if `code` is `maxItems`.", - "type" : "integer" + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" + } + } + } }, - "maxFileSize" : { - "description" : "The maximum file size, in bytes, allowed for uploads. Only returned if `code` is `fileUploadSize`.", - "type" : "integer" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } + } }, - "value" : { - "description" : "The value that failed conversion to the expected data type, or the original full-text query keywords that failed parsing. Only returned if `code` is either `dataConversion` or `queryParse`.", - "type" : "string" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } + } }, - "name" : { - "description" : "The name of the required request parameter Only returned if `code` is `missingParameter`.", - "type" : "string" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } }, - "errors" : { - "description" : "The aggregated `InputError`s for each regular property, that is, those that have a single input. Only returned if `code` is `aggregated`.", - "type" : "object", - "additionalProperties" : { - "$ref" : "#/components/schemas/InputError" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } } }, - "indexedErrors" : { - "description" : "The aggregated `InputError`s for each list property, that is, those that have a list of inputs. It is guaranteed that the indexes in the input array correspond to the indexes in the corresponding value. The positions with no errors will contain `null`. Only returned if `code` is `aggregated`.", - "type" : "object", - "additionalProperties" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/InputError" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" + } } } }, - "code" : { - "$ref" : "#/components/schemas/InputErrorCode" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } } - } - }, - "Installment" : { - "description" : "Reference to a scheduled payment installment", - "allOf" : [ { - "$ref" : "#/components/schemas/Entity" - }, { - "type" : "object", - "properties" : { - "number" : { - "description" : "The installment number.", - "type" : "integer" - }, - "dueDate" : { - "description" : "The installment due date.", - "type" : "string", - "format" : "date-time" - }, - "amount" : { - "description" : "The installment amount", - "type" : "string", - "format" : "number" - }, - "status" : { - "$ref" : "#/components/schemas/InstallmentStatusEnum" - } - } - } ] - }, - "InstallmentDataForSearch" : { - "description" : "Contains data used to search installments for a given owner", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseInstallmentDataForSearch" - }, { - "type" : "object", - "properties" : { - "user" : { - "description" : "When the given owner is a user, is the reference to it", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "query" : { - "description" : "Default query filters for the installments search", - "allOf" : [ { - "$ref" : "#/components/schemas/InstallmentQueryFilters" - } ] - } - } - } ] - }, - "InstallmentOverviewDataForSearch" : { - "description" : "Contains data used to search installments regardless of an owner", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseInstallmentDataForSearch" - }, { - "type" : "object", - "properties" : { - "preselectedPeriods" : { - "description" : "Contains the pre-selected period filter ranges according to the Cyclos configuration", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PreselectedPeriod" - } - }, - "query" : { - "description" : "Default query filters for the general installments search", - "allOf" : [ { - "$ref" : "#/components/schemas/InstallmentOverviewQueryFilters" - } ] - } - } - } ] - }, - "InstallmentOverviewQueryFilters" : { - "description" : "Query filters for installments regardless of an account owner.", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseInstallmentQueryFilters" - }, { - "type" : "object", - "properties" : { - "currencies" : { - "description" : "The currencies internal names or ids.", - "type" : "array", - "items" : { - "type" : "string" - } - }, - "fromAccountTypes" : { - "description" : "The source account types internal names or ids.", - "type" : "array", - "items" : { - "type" : "string" - } - }, - "toAccountTypes" : { - "description" : "The source account types internal names or ids.", - "type" : "array", - "items" : { - "type" : "string" - } - } - } - } ] - }, - "InstallmentOverviewResult" : { - "description" : "Represents an installment.", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseInstallmentResult" - }, { - "type" : "object", - "properties" : { - "transaction" : { - "description" : "The transaction that originated this installment", - "allOf" : [ { - "$ref" : "#/components/schemas/TransactionOverviewResult" - } ] - } - } - } ] - }, - "InstallmentPreview" : { - "description" : "Preview of an installment", - "type" : "object", - "properties" : { - "number" : { - "description" : "The installment number", - "type" : "integer" - }, - "dueDate" : { - "description" : "The installment due date", - "type" : "string", - "format" : "date-time" - }, - "totalAmount" : { - "description" : "The final total installment amount", - "type" : "string", - "format" : "number" - }, - "mainAmount" : { - "description" : "Depending on the configured fees, it could happen that the main amount is deducted from fees amount. This reflects the new main amount. If no fees deduct, it will be the same as `totalAmount`.", - "type" : "string", - "format" : "number" - }, - "fees" : { - "description" : "Only returned for direct payments. Contains the fees that would be paid by the payer if the payment is confirmed.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransferFeePreview" - } - } - } - }, - "InstallmentQueryFilters" : { - "description" : "Query filters for transactions related to an account owner.", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseInstallmentQueryFilters" - }, { - "type" : "object", - "properties" : { - "accountTypes" : { - "description" : "The account types", - "type" : "array", - "items" : { - "type" : "string" + }, + "requestBody": { + "description": "The old and new token values", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateFcmTokenParams" } - }, - "direction" : { - "$ref" : "#/components/schemas/TransferDirectionEnum" - } - } - } ] - }, - "InstallmentResult" : { - "description" : "Represents an installment, as viewed from the point-of-view of an account owner. This means that credits will have a positive amount, while debits will be negative.", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseInstallmentResult" - }, { - "type" : "object", - "properties" : { - "transaction" : { - "description" : "The transaction that originated this installment", - "allOf" : [ { - "$ref" : "#/components/schemas/TransactionResult" - } ] - } - } - } ] - }, - "InstallmentView" : { - "description" : "Contains details about an installment", - "allOf" : [ { - "$ref" : "#/components/schemas/Installment" - }, { - "type" : "object", - "properties" : { - "by" : { - "description" : "The user that performed an status change. For example, who manually paid, settled or canceled an open installment", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "transferId" : { - "description" : "Only if the installment was processed, contains the internal identifier of the generated transfer.", - "type" : "string" - }, - "transferTransactionNumber" : { - "description" : "Only if the installment was processed, contains the transaction number of the generated transfer.", - "type" : "string" - }, - "transferDate" : { - "description" : "The date the transfer was processed.", - "type" : "string", - "format" : "date-time" - }, - "canProcess" : { - "description" : "Can the authenticated user process this installment?", - "type" : "boolean" - }, - "canSettle" : { - "description" : "Can the authenticated user settle this installment?", - "type" : "boolean" - } - } - } ] - }, - "IntegerRange" : { - "description" : "Represents a range of minimum / maximum integer values (both optional). In general if both values are null the entire range is returned as null.", - "type" : "object", - "properties" : { - "min" : { - "description" : "The minimum value", - "type" : "integer" - }, - "max" : { - "description" : "The maximum value", - "type" : "integer" - } - } - }, - "InternalNamedEntity" : { - "description" : "Basic definition of a persistent entity which has both a name and an internal name", - "x-abstract" : true, - "allOf" : [ { - "$ref" : "#/components/schemas/NamedEntity" - }, { - "type" : "object", - "properties" : { - "internalName" : { - "type" : "string", - "description" : "The entity internal name, which can be seen as an extra identifier" - } - } - } ] - }, - "InternalTransactionPreview" : { - "description" : "Base definitions for a preview before performing an internal transaction", - "allOf" : [ { - "$ref" : "#/components/schemas/TransactionPreview" - }, { - "type" : "object", - "properties" : { - "pendingAuthorization" : { - "description" : "Indicates whether the transaction would be initially pending authorization in order to be processed", - "type" : "boolean" - }, - "toAccount" : { - "$ref" : "#/components/schemas/AccountWithOwner" - }, - "toOperator" : { - "description" : "The operator who is receiving the payment. Only sent if the payment is made to an operator.", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - } - } - } ] - }, - "InvitePermissions" : { - "description" : "Permissions for sending invitations to external users", - "type" : "object", - "properties" : { - "send" : { - "description" : "Can send invitation to external users?", - "type" : "boolean" - } - } - }, - "JWKSResponse" : { - "type" : "object", - "properties" : { - "keys" : { - "description" : "Each of the JWK", - "type" : "array", - "items" : { - "type" : "object", - "additionalProperties" : true } } } }, - "Language" : { - "description" : "Reference to a language in Cyclos", - "allOf" : [ { - "$ref" : "#/components/schemas/VersionedEntity" - }, { - "type" : "object", - "properties" : { - "code" : { - "description" : "The ISO 639-1 language code", - "type" : "string" + "delete": { + "operationId": "deleteFcmToken", + "summary": "Removes a FCM token from a set of users", + "description": "Removes a FCM token from a set of users. This operation allows guest users.", + "tags": [ + "Firebase" + ], + "requestBody": { + "description": "The token and the users to whom the token will be removed from.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RemoveFcmTokenParams" + } } } - } ] - }, - "LocalizationSettings" : { - "description" : "Localization preferences about user language.", - "type" : "object", - "properties" : { - "locale" : { - "description" : "The locale selected by user to work with the according language and settings.", - "type" : "string" - } - } - }, - "LoginAuth" : { - "description" : "Contains information for the recently logged in user", - "allOf" : [ { - "$ref" : "#/components/schemas/Auth" - }, { - "type" : "object", - "properties" : { - "identityProviderNotLinkReason" : { - "$ref" : "#/components/schemas/IdentityProviderNotLinkReasonEnum" - }, - "pinCreationToken" : { - "description" : "A token (challenge) generated only if the login was not performed using a device pin. It can be used to confirm the pin creation operation. Is has a validity of 6 minutes after the session was created. After that time the pin creation can be confirmed only using the current login password.", - "type" : "string" - } - } - } ] - }, - "LoginUser" : { - "description" : "Contains fields to login an user as administrator", - "type" : "object", - "properties" : { - "user" : { - "description" : "The user identification for login. The accepted kind of identification (login name, e-mail, etc) depend on the channel configuration.", - "type" : "string" - }, - "password" : { - "description" : "The user password. The password type is set in the channel configuration.", - "type" : "string" - }, - "remoteAddress" : { - "description" : "The IP address of the user requesting the login.", - "type" : "string" - }, - "channel" : { - "description" : "The channel internal name. Defaults to `main`.", - "type" : "string" - }, - "sessionTimeout" : { - "description" : "The amount of time the session is valid. The channel configuration has the session timeout, which is the maximum amount of time that can be set. If the given value is higher than the one in the configuration, it will be ignored. Defaults to the timeout set in the configuration.", - "allOf" : [ { - "$ref" : "#/components/schemas/TimeInterval" - } ] - } - } - }, - "MapData" : { - "description" : "Contains data relative to maps displayed in the application", - "type" : "object", - "properties" : { - "googleMapsApiKey" : { - "description" : "The Google Maps API key to be used by clients", - "type" : "string" - }, - "defaultLocation" : { - "description" : "The default location, if any, for map displays", - "allOf" : [ { - "$ref" : "#/components/schemas/GeographicalCoordinate" - } ] - }, - "defaultZoomMobile" : { - "description" : "The default zoom level for mobile views", - "type" : "integer" - }, - "defaultZoom" : { - "description" : "The default zoom level for larger views", - "type" : "integer" - }, - "distanceUnit" : { - "$ref" : "#/components/schemas/DistanceUnitEnum" - } - } - }, - "MarketplacePermissions" : { - "description" : "Permissions for the marketplace", - "type" : "object", - "properties" : { - "mySimple" : { - "description" : "Simple advertisement permissions for the logged user. Only returned if there is an authenticated user.", - "$ref" : "#/components/schemas/MyMarketplacePermissions" - }, - "myWebshop" : { - "description" : "Webshop ad permissions for the logged user. Only returned if there is an authenticated user.", - "$ref" : "#/components/schemas/MyMarketplacePermissions" - }, - "userSimple" : { - "description" : "Permissions over simple advertisements of other users", - "$ref" : "#/components/schemas/UserBaseAdPermissions" - }, - "userWebshop" : { - "description" : "Permissions over webshop ads of other users", - "$ref" : "#/components/schemas/UserBaseAdPermissions" - }, - "interests" : { - "description" : "Are ad interests enabled? Only returned if there is an authenticated user.", - "type" : "boolean" - } - } - }, - "Message" : { - "description" : "Base properties for messages", - "allOf" : [ { - "$ref" : "#/components/schemas/Entity" - }, { - "type" : "object", - "properties" : { - "kind" : { - "description" : "The message kind", - "allOf" : [ { - "$ref" : "#/components/schemas/MessageKind" - } ] - }, - "date" : { - "description" : "The message date", - "type" : "string", - "format" : "date-time" - }, - "subject" : { - "description" : "The subject", - "type" : "string" - }, - "category" : { - "description" : "The message category. Only for messages from / to system", - "$ref" : "#/components/schemas/MessageCategory" + }, + "responses": { + "204": { + "description": "The token was deleted" + }, + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" + } + } } - } - } ] - }, - "MessageCategory" : { - "description" : "Reference to a message category", - "allOf" : [ { - "$ref" : "#/components/schemas/InternalNamedEntity" - } ] - }, - "MessageDataForReply" : { - "description" : "Data for replying a message", - "type" : "object", - "properties" : { - "reply" : { - "description" : "The new reply message to be sent pre-filled with data", - "$ref" : "#/components/schemas/ReplyMessage" }, - "repliedMessage" : { - "description" : "The message being replied.", - "$ref" : "#/components/schemas/RepliedMessage" - } - } - }, - "MessageDataForSearch" : { - "description" : "Contains data for searching messages", - "type" : "object", - "properties" : { - "canSend" : { - "description" : "Whether the authenticated user can send a new message or not", - "type" : "boolean" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } + } }, - "visibleCategories" : { - "description" : "The categories the authenticated user can search for messages. Only for authenticated administrators.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/MessageCategory" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } } }, - "sources" : { - "description" : "The sources the authenticated user can choose as the \"from\" when searching for incoming messages. Only for authenticated members and brokers.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/MessageSourceEnum" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } } }, - "destinations" : { - "description" : "The destinations the authenticated user can choose as the \"to\" when searching for outgoing messages. Only for authenticated members and brokers.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/MessageDestinationEnum" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } } }, - "query" : { - "$ref" : "#/components/schemas/MessageQueryFilters" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } } } - }, - "MessageDataForSend" : { - "description" : "Data for sending a message", - "type" : "object", - "properties" : { - "categories" : { - "description" : "The possible categories for the message.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/MessageCategory" + } + }, + "/{user}/payment-feedbacks/data-for-search": { + "parameters": [ + { + "$ref": "#/components/parameters/user" + } + ], + "get": { + "operationId": "getPaymentFeedbacksDataForSearch", + "summary": "Returns data for searching payment feedbacks of a specific user.", + "description": "Returns data for searching payment feedbacks in which the given user could be the payer or the receiver.", + "tags": [ + "PaymentFeedbacks" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The data for searching payment feedbacks", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentFeedbackDataForSearch" + } + } } }, - "destinations" : { - "description" : "The possible destinations for the message.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/MessageDestinationEnum" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } } }, - "message" : { - "description" : "The new message to be sent pre-filled with data", - "$ref" : "#/components/schemas/SendMessage" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } + } }, - "toUser" : { - "description" : "The user being messaged.", - "$ref" : "#/components/schemas/User" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } }, - "maxRecipients" : { - "description" : "Maximum recipients when sending a message to users. Only if `user` is in the possible destinations.", - "type" : "integer" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } + } }, - "groups" : { - "description" : "The available groups for sending a message. Only for administrators.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Group" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } } } } - }, - "MessageQueryFilters" : { - "description" : "Definitions for messages searching.", - "allOf" : [ { - "$ref" : "#/components/schemas/QueryFilters" - }, { - "type" : "object", - "properties" : { - "onlyUnread" : { - "description" : "Boolean value indicating wether return only the unread messages", - "type" : "boolean" - }, - "messageBox" : { - "description" : "The message box to search. Defaults to `inbox`", - "allOf" : [ { - "$ref" : "#/components/schemas/MessageBoxEnum" - } ] - }, - "category" : { - "description" : "The category to filter by.", - "type" : "string" - }, - "destination" : { - "description" : "The destination to filter by.", - "$ref" : "#/components/schemas/MessageDestinationEnum" - }, - "keywords" : { - "description" : "The keywords to filter by. Used to match the subject or the body of the messages.", - "type" : "string" - }, - "period" : { - "description" : "The minimum / maximum date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "type" : "array", - "items" : { - "type" : "string", - "format" : "date-time" + } + }, + "/{user}/payment-feedbacks": { + "parameters": [ + { + "$ref": "#/components/parameters/user" + } + ], + "get": { + "operationId": "searchPaymentFeedbacks", + "summary": "Searches for payment feedbacks of a specific user.", + "description": "Returns payment feedbacks matching the search criteria, for a specific user.", + "tags": [ + "PaymentFeedbacks" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "direction", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReferenceDirectionEnum" + } + }, + { + "name": "levels", + "in": "query", + "required": false, + "description": "The levels to filter", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReferenceLevelEnum" + } + } + }, + { + "name": "noReplied", + "in": "query", + "required": false, + "description": "If true only those payment feedbacks without a reply comment would be returned", + "schema": { + "type": "boolean" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number (zero-based) of the search. The default value is zero.", + "schema": { + "type": "integer" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", + "schema": { + "type": "integer" + } + }, + { + "name": "period", + "in": "query", + "required": false, + "description": "The minimum / maximum reference date", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "relatedUser", + "in": "query", + "required": false, + "description": "The user that either gave or received the reference to the user specified in the path or the other user involved in the payment feedback. Should be either the id or some other allowed identification (login name, email, etc).", + "schema": { + "type": "string" + } + }, + { + "name": "skipTotalCount", + "in": "query", + "required": false, + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "The payment feedbacks matching the search filters.", + "headers": { + "X-Total-Count": { + "schema": { + "type": "integer" + }, + "description": "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." + }, + "X-Page-Size": { + "schema": { + "type": "integer" + }, + "description": "The maximum number of results per page" + }, + "X-Current-Page": { + "schema": { + "type": "integer" + }, + "description": "The current page the results are in" + }, + "X-Has-Next-Page": { + "schema": { + "type": "boolean" + }, + "description": "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." } }, - "user" : { - "description" : "Either the id or identifier of the from / to user", - "type" : "string" - } - } - } ] - }, - "MessageResult" : { - "description" : "Result for the list of messages", - "allOf" : [ { - "$ref" : "#/components/schemas/Message" - }, { - "type" : "object", - "properties" : { - "read" : { - "description" : "Whether the message was read or not", - "type" : "boolean" - }, - "replied" : { - "description" : "Whether the message was replied or not", - "type" : "boolean" - }, - "fromOwnerKind" : { - "description" : "The kind of the message sender. Only returned if `kind` is `incoming`.", - "allOf" : [ { - "$ref" : "#/components/schemas/MessageOwnerEnum" - } ] - }, - "fromOwner" : { - "description" : "Only returned if `kind` is `incoming` and `fromOwnerKind` is `user`. Is a reference to the user who sent the incoming message.", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "toGroups" : { - "description" : "The list of groups the outgoing message was sent. Only returned if `kind` is `outgoing`.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Group" + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PaymentFeedbackResult" + } + } } - }, - "toUsers" : { - "description" : "The list of users the outgoing message was sent. Only returned if `kind` is `outgoing`.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/User" + } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } } - }, - "destination" : { - "description" : "The message destination. Only returned if `kind` is `outgoing`.", - "allOf" : [ { - "$ref" : "#/components/schemas/MessageDestinationEnum" - } ] - }, - "sentBy" : { - "description" : "Only returned if `kind` is `outgoing`. Is a reference to the user who sent the outgoing message.", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - } - } - } ] - }, - "MessageView" : { - "description" : "Contains the details of a message", - "allOf" : [ { - "$ref" : "#/components/schemas/MessageResult" - }, { - "type" : "object", - "properties" : { - "canRemove" : { - "description" : "Whether the message can be removed or not.", - "type" : "boolean" - }, - "canReply" : { - "description" : "Whether the message can be replied.", - "type" : "boolean" - }, - "canMarkUnread" : { - "description" : "Whether the message can be marked as unread.", - "type" : "boolean" - }, - "canMoveToTrash" : { - "description" : "Whether the message can be moved to trash box.", - "type" : "boolean" - }, - "canRestore" : { - "description" : "Whether the message can be restored or not.", - "type" : "boolean" - }, - "ownerKind" : { - "description" : "The kind of the message owner", - "allOf" : [ { - "$ref" : "#/components/schemas/MessageOwnerEnum" - } ] - }, - "owner" : { - "description" : "Only returned if `ownerKind` is `user`. Is a reference to the owner user.", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "removedAt" : { - "description" : "The remotion date (if any)", - "type" : "string", - "format" : "date-time" - }, - "body" : { - "description" : "The message body", - "type" : "string" - }, - "replyPosition" : { - "description" : "The reply position in the conversation or -1 when it is the first message sent.", - "type" : "integer" - }, - "replies" : { - "description" : "The list with the replies to the message", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Message" + } + }, + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } } } - } - } ] - }, - "MessagesPermissions" : { - "description" : "Permissions for messages", - "type" : "object", - "properties" : { - "my" : { - "description" : "Permissions over the own messages.", - "$ref" : "#/components/schemas/MyMessagesPermissions" }, - "system" : { - "description" : "Permissions over system messages.", - "$ref" : "#/components/schemas/SystemMessagesPermissions" - } - } - }, - "MessagesStatus" : { - "description" : "Contains details about messages", - "type" : "object", - "properties" : { - "newMessages" : { - "description" : "Indicates the number of received messages after the last view date (i.e `lastViewDate`).", - "type" : "integer" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } }, - "unreadMessages" : { - "description" : "Indicates the total number of unread messages.", - "type" : "integer" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } + } }, - "lastViewDate" : { - "description" : "The last view date tracked by the server through `POST /messages/viewed`", - "type" : "string", - "format" : "date-time" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } } } - }, - "MobileBaseData" : { - "description" : "Contains basic definitions for the data for UI results for the mobile", - "type" : "object", - "properties" : { - "cyclosVersion" : { - "description" : "The version of the Cyclos server", - "type" : "string" + } + }, + "/{user}/payment-feedbacks/statistics": { + "parameters": [ + { + "$ref": "#/components/parameters/user" + } + ], + "get": { + "operationId": "getPaymentFeedbackStatistics", + "summary": "Returns payment feedback statistics of a specific user.", + "description": "Returns payment feedback statistics of a specific user.", + "tags": [ + "PaymentFeedbacks" + ], + "security": [ + { + "basic": [] }, - "currentClientTime" : { - "description" : "The current client time according to the server", - "type" : "string", - "format" : "date-time" + { + "session": [] }, - "locale" : { - "description" : "The current locale", - "type" : "string" + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" }, - "allowedLocales" : { - "description" : "The locales the user can select for example to change the language.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/UserLocale" + { + "name": "direction", + "in": "query", + "required": false, + "description": "Whether to return statistics on received or given feedbacks. When not specified, defaults to received.", + "schema": { + "$ref": "#/components/schemas/ReferenceDirectionEnum" } }, - "rootUrl" : { - "description" : "The main URL set in the configuration", - "type" : "string" - }, - "theme" : { - "description" : "The mobile theme. Only returned when changed.", - "allOf" : [ { - "$ref" : "#/components/schemas/ThemeUIElement" - } ] - }, - "translations" : { - "description" : "The mobile translations. Only returned when changed.", - "allOf" : [ { - "$ref" : "#/components/schemas/MobileTranslations" - } ] - }, - "maxImageWidth" : { - "description" : "Maximum width (in pixels) for uploaded images", - "type" : "integer" - }, - "maxImageHeight" : { - "description" : "Maximum height (in pixels) for uploaded images", - "type" : "integer" - }, - "maxUploadSize" : { - "description" : "Maximum size (in bytes) for uploaded files", - "type" : "integer" - }, - "jpegQuality" : { - "description" : "Quality for JPEG image types (higher means better quality)", - "type" : "integer" - }, - "mapBrowserApiKey" : { - "description" : "The Google Maps browser API key", - "type" : "string" - }, - "applicationUsername" : { - "description" : "An username used by the application to be displayed for example in system messages", - "type" : "string" - }, - "numberFormat" : { - "$ref" : "#/components/schemas/NumberFormatEnum" - }, - "dateFormat" : { - "$ref" : "#/components/schemas/DateFormatEnum" - }, - "timeFormat" : { - "$ref" : "#/components/schemas/TimeFormatEnum" - } - } - }, - "MobilePage" : { - "description" : "Represents a content page for the mobile application", - "allOf" : [ { - "$ref" : "#/components/schemas/InternalNamedEntity" - }, { - "type" : "object", - "properties" : { - "version" : { - "type" : "integer", - "description" : "The version stamp for the current object, used for optimistic locking. When saving, the same version as previously received needs to be passed back. If no one else has saved the object, the version will match and the object will be updated. However, if someone other has saved the object, the version will no longer match, and an error will be raised. This is used to prevent multiple users (or processes) from updating the same object and unwilingly overridding the property values, leading to data loss." - }, - "icon" : { - "description" : "The character that represents the icon in the Cyclos font", - "type" : "string" - } - } - } ] - }, - "MobileTranslations" : { - "description" : "Contains definitions for translations that are returned for the mobile app", - "allOf" : [ { - "$ref" : "#/components/schemas/VersionedEntity" - }, { - "type" : "object", - "properties" : { - "locale" : { - "description" : "The locale represented by this language, in either of the following formats: `<2-letter lowercase language code>` or `<2-letter lowercase language code>`_`<2-letter uppercase country code>`.", - "type" : "string" - }, - "translations" : { - "description" : "The translation keys / values for the mobile application", - "type" : "object", - "additionalProperties" : { - "type" : "string" - } - } - } - } ] - }, - "MyMarketplacePermissions" : { - "description" : "Permissions for the marketplace for the logged user", - "type" : "object", - "properties" : { - "enable" : { - "description" : "Are advertisements enabled? Only returned if there is an authenticated user.", - "type" : "boolean" - }, - "manage" : { - "description" : "Can manage own advertisements? Only returned if there is an authenticated user.", - "type" : "boolean" - }, - "questions" : { - "description" : "Are questions enabled? Only returned if there is an authenticated user.", - "type" : "boolean" - } - } - }, - "MyMessagesPermissions" : { - "description" : "Permissions ovre messages for the logged user", - "type" : "object", - "properties" : { - "view" : { - "description" : "Whether the logged user can view messages or not", - "type" : "boolean" - }, - "sendToUser" : { - "description" : "Whether the logged user can send messages to other users or not", - "type" : "boolean" - }, - "sendToSystem" : { - "description" : "Whether the logged user can send messages to system or not", - "type" : "boolean" - }, - "sendToBrokered" : { - "description" : "Whether the logged broker can send messages brokered users or not", - "type" : "boolean" - } - } - }, - "NamedEntity" : { - "description" : "Basic definition of a persistent entity which has a name", - "x-abstract" : true, - "allOf" : [ { - "$ref" : "#/components/schemas/Entity" - }, { - "type" : "object", - "properties" : { - "name" : { - "type" : "string", - "description" : "The entity name" - } - } - } ] - }, - "NestedError" : { - "description" : "Error when an operation may generate another error for a specific property. An example of this is when saving the full profile, which can have an error in the basic fields, or in the n-th new land-line phone, or in the n-th removed image.", - "allOf" : [ { - "$ref" : "#/components/schemas/Error" - }, { - "type" : "object", - "properties" : { - "inputError" : { - "description" : "The nested error when `InputError`", - "allOf" : [ { - "$ref" : "#/components/schemas/InputError" - } ] - }, - "forbiddenError" : { - "description" : "The nested error when `ForbiddenError`", - "allOf" : [ { - "$ref" : "#/components/schemas/ForbiddenError" - } ] - }, - "unauthorizedError" : { - "description" : "The nested error when `UnauthorizedError`", - "allOf" : [ { - "$ref" : "#/components/schemas/UnauthorizedError" - } ] - }, - "notFoundError" : { - "description" : "The nested error when `NotFoundError`", - "allOf" : [ { - "$ref" : "#/components/schemas/NotFoundError" - } ] - }, - "conflictError" : { - "description" : "The nested error when `ConflictError`", - "allOf" : [ { - "$ref" : "#/components/schemas/ConflictError" - } ] - }, - "error" : { - "description" : "The nested error when `Error`", - "allOf" : [ { - "$ref" : "#/components/schemas/Error" - } ] - }, - "property" : { - "description" : "The property name that generated the error", - "type" : "string" - }, - "index" : { - "description" : "If the property is indexed, contains the index with error", - "type" : "integer" - } - } - } ] - }, - "NewMessagePush" : { - "description" : "A new message has been received", - "type" : "object", - "properties" : { - "message" : { - "$ref" : "#/components/schemas/IncomingMessage" - }, - "newMessages" : { - "description" : "The number of new messages since the last login", - "type" : "integer" - }, - "unreadMessages" : { - "description" : "The current number of unread messages", - "type" : "integer" - } - } - }, - "NewNotificationPush" : { - "description" : "A new notification has been received", - "allOf" : [ { - "$ref" : "#/components/schemas/NotificationsStatus" - }, { - "type" : "object", - "properties" : { - "notification" : { - "$ref" : "#/components/schemas/Notification" - } - } - } ] - }, - "NfcAuthError" : { - "description" : "Error when make a NFC external authentication", - "allOf" : [ { - "$ref" : "#/components/schemas/Error" - }, { - "type" : "object", - "properties" : { - "posError" : { - "description" : "The POS error details. Only if `code` is `pos`", - "allOf" : [ { - "$ref" : "#/components/schemas/PosError" - } ] - }, - "code" : { - "$ref" : "#/components/schemas/NfcAuthErrorCode" + { + "name": "periods", + "description": "The requested periods for statistics. The result will have the `periods` field corresponding to the input periods. When not specified, the default is to return 2 periods: all time and last 30 days. The maximum allowed number of periods is 5. Each period can either be:\n\n- Single date: in ISO 8601 format, from that date and up.\n Example: `2019-10-30`;\n\n- 2 dates, split by pipe: Both in ISO 8601 format, specifying\n a period range. Example: `2019-10-01|2019-12-31T23:59:59.999`.", + "in": "query", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } } } - } ] - }, - "NfcDataForInitialize" : { - "description" : "Contains data NFC tag initialization and personalization", - "type" : "object", - "properties" : { - "initilizeTypes" : { - "description" : "The NFC token types the authenticated user can initialize tags", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/EntityReference" + ], + "responses": { + "200": { + "description": "The feedback statistics for the requested periods.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReferenceStatistics" + } + } } }, - "personalizeTypes" : { - "description" : "The NFC token types the authenticated user can parsonalize tags", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/EntityReference" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } } - } - } - }, - "NfcDataForPersonalize" : { - "description" : "Contains data NFC tag personalization", - "type" : "object", - "properties" : { - "tokenType" : { - "description" : "The token type reference", - "allOf" : [ { - "$ref" : "#/components/schemas/EntityReference" - } ] }, - "confirmationPasswordInput" : { - "description" : "If a confirmation password is used, contains the definitions on how to request that password from the user. This confirmation password is required when performing sensible actions. Sometimes this is dynamic, for example, the confirmation might be configured to be used only once per session, or operations like payments may have a limit per day to be without confirmation (pinless).", - "allOf" : [ { - "$ref" : "#/components/schemas/PasswordInput" - } ] - } - } - }, - "NfcExternalAuthenticateParameter" : { - "description" : "Parameters for an external authentication", - "allOf" : [ { - "$ref" : "#/components/schemas/NfcTokenParameter" - }, { - "type" : "object", - "properties" : { - "tagChallenge" : { - "description" : "The challenge generated by the NFC tag, encoded as hex", - "type" : "string" - }, - "user" : { - "description" : "If informed then it means we are requesting for external authentication to personalize a tag for that user, also the `group` property will be ignored.", - "type" : "string" - }, - "group" : { - "description" : "In case of registering a user and personalizing a tag at the same time we need to inform the group in which the user is registering.", - "type" : "string" - }, - "asMember" : { - "description" : "Only valid if the logged user is a broker, for that case we need to distinguish if the user registration is as member or as broker. This option must be specified in conjunction with the `group` property.", - "type" : "boolean" - }, - "key" : { - "description" : "The NFC key over which the authentication is performed. Defaults to `operational`.", - "allOf" : [ { - "$ref" : "#/components/schemas/NfcTagKeyEnum" - } ] + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } } - } - } ] - }, - "NfcExternalAuthenticateResult" : { - "description" : "Result for a NFC external authenticate", - "type" : "object", - "properties" : { - "cyclosChallenge" : { - "description" : "The Cyclos-generated challenge encoded as hex. This challenge has to be encrypted by the NFC tag", - "type" : "string" }, - "sessionKey" : { - "description" : "The session key to be used on subsequent NFC operations, encoded as hex", - "type" : "string" - } - } - }, - "NfcInitializeParameter" : { - "description" : "Parameters for initializing an NFC tag", - "allOf" : [ { - "$ref" : "#/components/schemas/NfcTokenWithUserParameter" - }, { - "type" : "object", - "properties" : { - "label" : { - "description" : "A label to be displayed on the tokens list.", - "type" : "string" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } } - } - } ] - }, - "NfcInitializeResult" : { - "description" : "Contains the keys that should be stored on the NFC tag", - "type" : "object", - "properties" : { - "tagKey" : { - "description" : "The PICC Master Key that should be used to seal the NFC tag, encoded as hex.", - "type" : "string" }, - "applicationKey" : { - "description" : "The Application Master Key that should be used on the application entry of the NFC tag, encoded as hex.", - "type" : "string" - }, - "operationalKey" : { - "description" : "The Application Key used to operate with the tag, encoded as hex. Used when making a payment or to assign an already initialized tag to a user.", - "type" : "string" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } + } }, - "tokenLabel" : { - "description" : "The same label given by the client at initialization or the label generated according the the pattern defined.", - "type" : "string" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } } } - }, - "NfcPersonalizeDataParameter" : { - "description" : "Parameters used to identify the NFC token type and user who will own a NFC tag.", - "type" : "object", - "properties" : { - "user" : { - "description" : "A user to whom this tag is being personalized", - "type" : "string" - }, - "type" : { - "description" : "Either the identifier or internal name of fhe NFC token type", - "type" : "string" + } + }, + "/payment-feedbacks/{key}/data-for-give": { + "parameters": [ + { + "name": "key", + "in": "path", + "required": true, + "description": "Either the id or transaction number", + "schema": { + "type": "string" } } - }, - "NfcPersonalizeParameter" : { - "description" : "Parameters for personalizing an NFC tag", - "allOf" : [ { - "$ref" : "#/components/schemas/NfcTokenWithUserParameter" - }, { - "type" : "object", - "properties" : { - "cyclosChallenge" : { - "description" : "The challenge that was previously generated by Cyclos, encrypted by the NFC tag. Encoded as hex.", - "type" : "string" - } - } - } ] - }, - "NfcTokenParameter" : { - "description" : "Definitions for parameters of actions over NFC tokens", - "type" : "object", - "properties" : { - "type" : { - "description" : "Either the identifier or internal name of fhe NFC token type", - "type" : "string" - }, - "token" : { - "description" : "The token value. Is normally the internal tag idenfifier, encoded as hex", - "type" : "string" - } - } - }, - "NfcTokenPermissions" : { - "description" : "Permissions over a specific nfc token", - "type" : "object", - "properties" : { - "type" : { - "description" : "The token type", - "allOf" : [ { - "$ref" : "#/components/schemas/EntityReference" - } ] - }, - "initialize" : { - "description" : "Can initialize tokens of this type?", - "type" : "boolean" - }, - "personalize" : { - "description" : "Can personalize tokens of this type?", - "type" : "boolean" - }, - "personalizeAsMember" : { - "description" : "Can personalize tokens of this type as member? Always `false` if the authenticated user is a not a broker.", - "type" : "boolean" - } - } - }, - "NfcTokenWithChallengeParameter" : { - "description" : "Parameters for personalizing an NFC tag for a new user", - "allOf" : [ { - "$ref" : "#/components/schemas/NfcTokenParameter" - }, { - "type" : "object", - "properties" : { - "cyclosChallenge" : { - "description" : "The challenge that was previously generated by Cyclos, encrypted by the NFC tag. Encoded as hex.", - "type" : "string" - } - } - } ] - }, - "NfcTokenWithUserParameter" : { - "description" : "Contains shared properties by NfcInitializeParameter and NfcPersonalizeParameter", - "allOf" : [ { - "$ref" : "#/components/schemas/NfcTokenParameter" - }, { - "type" : "object", - "properties" : { - "user" : { - "description" : "a user to whom this tag is being initialized/personalized.", - "type" : "string" - } - } - } ] - }, - "NotFoundError" : { - "description" : "Error returned when some expected data was not found", - "type" : "object", - "properties" : { - "entityType" : { - "type" : "string", - "description" : "The name of the entity being attempted, but not found" - }, - "key" : { - "type" : "string", - "description" : "The identifier used to attempt to find the entity, such as id, internal name, principal, etc" - } - } - }, - "Notification" : { - "description" : "A received notification", - "allOf" : [ { - "$ref" : "#/components/schemas/Entity" - }, { - "type" : "object", - "properties" : { - "date" : { - "description" : "The notification date", - "type" : "string", - "format" : "date-time" - }, - "relatedUser" : { - "description" : "a user related to this message", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "subject" : { - "description" : "The notification subject", - "type" : "string" - }, - "message" : { - "description" : "The notification message", - "type" : "string" - }, - "read" : { - "description" : "Indicates whether the notification was marked as already read or not", - "type" : "boolean" - }, - "entityId" : { - "description" : "The identifier of the entity referenced by the notification, if any. The `entityType` and `entityId` attributes are both not null or both null in case there is a referenced entity.", - "type" : "string" - }, - "type" : { - "$ref" : "#/components/schemas/NotificationTypeEnum" - }, - "entityType" : { - "$ref" : "#/components/schemas/NotificationEntityTypeEnum" - } - } - } ] - }, - "NotificationQueryFilters" : { - "description" : "Definitions for a notifications search.", - "allOf" : [ { - "$ref" : "#/components/schemas/QueryFilters" - }, { - "type" : "object", - "properties" : { - "onlyUnread" : { - "description" : "Boolean value indicating wether return only the unread notifications", - "type" : "boolean" - }, - "onlyNew" : { - "description" : "Boolean value indicating wether return only the new notifications received after the last view date tracked using `POST /notifications/viewed`", - "type" : "boolean" - } - } - } ] - }, - "NotificationSettingsDataForEdit" : { - "description" : "Contains configuration data to edit the notification settings a given user. The regular user (member / broker / operator) and administrator notification settings use different notification types.", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseNotificationSettings" - }, { - "type" : "object", - "properties" : { - "settings" : { - "description" : "The object that can be modified and `POST`ed back to `/{user}/notification-settings` to save the notifications.", - "allOf" : [ { - "$ref" : "#/components/schemas/NotificationSettingsEdit" - } ] - }, - "payments" : { - "description" : "The visible regular payment types. Only applicable for administrators, not users (members / brokers).", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransferType" - } - }, - "authorizablePayments" : { - "description" : "The visible regular payment types that require authorization. Only applicable for administrators, not users (members / brokers).", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransferType" - } - }, - "externalPayments" : { - "description" : "The visible payment types that allow external payments. Only applicable for administrators, not users (members / brokers).", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransferType" - } - }, - "voucherConfigurations" : { - "description" : "The visible voucher configurations. Only applicable for administrators, not users (members / brokers).", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/EntityReference" - } - }, - "userAccounts" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/AccountType" - }, - "description" : "The available accounts types for user payment notifications" - }, - "userGroups" : { - "description" : "The visible user groups. Only applicable for administrators, not users (members / brokers).", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Group" - } - }, - "messageCategories" : { - "description" : "The visible message categories. Only applicable for administrators, not users (members / brokers).", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/EntityReference" - } - }, - "forwardMessages" : { - "deprecated" : true, - "x-remove-version" : 4.17, - "description" : "Use `settings.forwardMessages` instead.", - "type" : "boolean" - } - } - } ] - }, - "NotificationSettingsEdit" : { - "description" : "The parameters used to save the notification settings", - "type" : "object", - "properties" : { - "notifications" : { - "description" : "Per notification type, indicates the mediums it is sent. It is guaranteed that all and only the allowed types are sent.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/NotificationTypeMediums" - } - }, - "forwardMessages" : { - "description" : "Indicates whether to forward received internal messages to the user's e-mail. Only applicable for users, not administrators.", - "type" : "boolean" - }, - "emailMailings" : { - "description" : "Indicates whether the user will receive email mailings. Only applicable for users (members / brokers), not administrators.", - "type" : "boolean" - }, - "smsMailings" : { - "description" : "Indicates whether the user will receive SMS mailings. Only applicable for users (members / brokers), not administrators.", - "type" : "boolean" - }, - "userAccounts" : { - "type" : "object", - "additionalProperties" : { - "$ref" : "#/components/schemas/AccountNotificationSettings" - }, - "description" : "Contains the settings for each user account. Only applicable for users, not administrators. The key is the account type id or internal name. Only applicable for users, not administrators." + ], + "get": { + "operationId": "getPaymentFeedbacksDataForGive", + "summary": "Returns data for create or update a payment feedback.", + "description": "Returns data for create or update a payment feedback. The logged user must be the payer with permission to give payment feedbacks.", + "tags": [ + "PaymentFeedbacks" + ], + "security": [ + { + "basic": [] }, - "payments" : { - "description" : "The qualified internal names (accountType.paymentType) or ids of payment types to be notified for notifications of type `paymentPerformed`. Only applicable for administrators, not users.", - "type" : "array", - "items" : { - "type" : "string" + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The data for giving payment feedbacks.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentFeedbackDataForGive" + } + } } }, - "authorizablePayments" : { - "description" : "The qualified internal names (accountType.paymentType) or ids of payment types to be notified for notifications of type `paymentAwaitingAdminAuthorization`. Only applicable for administrators, not users.", - "type" : "array", - "items" : { - "type" : "string" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } } }, - "externalPaymentsFailed" : { - "description" : "The qualified internal names (accountType.paymentType) or ids of payment types to be notified for notifications of type `externalUserPaymentPerformedFailed`. Only applicable for administrators, not users.", - "type" : "array", - "items" : { - "type" : "string" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } } }, - "externalPaymentsExpired" : { - "description" : "The qualified internal names (accountType.paymentType) or ids of payment types to be notified for notifications of type `externalUserPaymentExpired`. Only applicable for administrators, not users.", - "type" : "array", - "items" : { - "type" : "string" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } } }, - "voucherConfigurations" : { - "description" : "The internal names or ids of voucher configurations to be notified for notifications of types `generatedVouchersAboutToExpire` and `generatedVouchersExpired`. Only applicable for administrators, not users.", - "type" : "array", - "items" : { - "type" : "string" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } } }, - "voucherConfigurationsBuying" : { - "description" : "The internal names or ids of voucher configurations to be notified for notifications of type `voucherBuyingAboutToExpire`. Only applicable for administrators, not users.", - "type" : "array", - "items" : { - "type" : "string" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } } + } + } + } + }, + "/payment-feedbacks/{key}/give": { + "parameters": [ + { + "name": "key", + "in": "path", + "required": true, + "description": "Either the id or transaction number", + "schema": { + "type": "string" + } + } + ], + "post": { + "operationId": "givePaymentFeedback", + "summary": "Creates or updates a payment feedback.", + "description": "Creates or updates a payment feedback as the payer of the payment. After a feedback was given it can be changed until a given deadline.", + "tags": [ + "PaymentFeedbacks" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] }, - "userGroups" : { - "description" : "The internal names or ids of groups to be notified for notifications of type `userRegistration`. Only applicable for administrators, not users.", - "type" : "array", - "items" : { - "type" : "string" + { + "accessClient": [] + } + ], + "responses": { + "204": { + "description": "The payment feedback was created/updated", + "headers": { + "Location": { + "description": "URL for viewing the payment feedback details", + "schema": { + "type": "string" + } + } } }, - "systemAlerts" : { - "description" : "The kinds of system alerts to be notified for notifications of type `systemAlert`. Only applicable for administrators, not users.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/SystemAlertTypeEnum" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } } }, - "userAlerts" : { - "description" : "The kinds of user alerts to be notified for notifications of type `userAlert`. Only applicable for administrators, not users.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/UserAlertTypeEnum" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } } }, - "forwardMessageCategories" : { - "description" : "The internal names or ids of message categories to which new messages to system will be forwarded to the administrator e-mail. Not tied to any notification type. Only applicable for administrators, not users.", - "type" : "array", - "items" : { - "type" : "string" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } } }, - "version" : { - "type" : "integer", - "description" : "The version stamp for the current object, used for optimistic locking. When saving, the same version as previously received needs to be passed back. If no one else has saved the object, the version will match and the object will be updated. However, if someone other has saved the object, the version will no longer match, and an error will be raised. This is used to prevent multiple users (or processes) from updating the same object and unwilingly overridding the property values, leading to data loss." - } - } - }, - "NotificationSettingsPermissions" : { - "description" : "Permissions over notification settings", - "type" : "object", - "properties" : { - "enable" : { - "description" : "Whether the own notification settings are enabled or not.", - "type" : "boolean" - } - } - }, - "NotificationSettingsView" : { - "description" : "Contains the current notification settings for a given user. The regular user (member / broker) and administrator notification settings use different notification kinds.", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseNotificationSettings" - }, { - "type" : "object", - "properties" : { - "notifications" : { - "description" : "Per notification kind, indicates the mediums it is sent. It is guaranteed that all and only the allowed kinds are sent.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/NotificationTypeMediums" - } - }, - "forwardMessages" : { - "description" : "Indicates whether to forward received internal messages to the user's e-mail. Only applicable for users, not administrators.", - "type" : "boolean" - }, - "emailMailings" : { - "description" : "Indicates whether the user will receive email mailings. Only applicable for users (members / brokers), not administrators.", - "type" : "boolean" - }, - "smsMailings" : { - "description" : "Indicates whether the user will receive SMS mailings. Only applicable for users (members / brokers), not administrators.", - "type" : "boolean" - }, - "userAccounts" : { - "description" : "Contains the settings for each user account. Only applicable for users (members / brokers), not administrators.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/AccountNotificationSettingsView" - } - }, - "payments" : { - "description" : "The payment types to be notified for notifications of type `paymentPerformed`. Only applicable for administrators, not users (members / brokers).", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransferType" - } - }, - "authorizablePayments" : { - "description" : "The payment types to be notified for notifications of type `paymentAwaitingAdminAuthorization`. Only applicable for administrators, not users (members / brokers).", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransferType" - } - }, - "externalPaymentsFailed" : { - "description" : "The payment types to be notified for notifications of type `externalUserPaymentPerformedFailed`. Only applicable for administrators, not users (members / brokers).", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransferType" - } - }, - "externalPaymentsExpired" : { - "description" : "The payment types to be notified for notifications of type `externalUserPaymentExpired`. Only applicable for administrators, not users (members / brokers).", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransferType" - } - }, - "voucherConfigurations" : { - "description" : "The voucher configurations to be notified for notifications of types `generatedVouchersAboutToExpire` and `generatedVouchersExpired`. Only applicable for administrators, not users (members / brokers).", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/EntityReference" - } - }, - "voucherConfigurationsBuying" : { - "description" : "The voucher configurations to be notified for notifications of type `voucherBuyingAboutToExpire`. Only applicable for administrators, not users (members / brokers).", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/EntityReference" - } - }, - "userGroups" : { - "description" : "The groups to be notified for notifications of type `userRegistration`. Only applicable for administrators, not users (members / brokers).", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Group" - } - }, - "systemAlerts" : { - "description" : "The kinds of system alerts to be notified for notifications of type `systemAlert`. Only applicable for administrators, not users (members / brokers).", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/SystemAlertTypeEnum" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } } - }, - "userAlerts" : { - "description" : "The kinds of user alerts to be notified for notifications of type `userAlert`. Only applicable for administrators, not users (members / brokers).", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/UserAlertTypeEnum" + } + }, + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" + } } - }, - "forwardMessageCategories" : { - "description" : "The message categories to which new messages to system will be forwarded to the administrator e-mail. Not tied to any notification type. Only applicable for administrators, not users (members / brokers).", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/EntityReference" + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } } } } - } ] - }, - "NotificationTypeMediums" : { - "description" : "Indicates the mediums a notification type is sent", - "type" : "object", - "properties" : { - "kind" : { - "deprecated" : true, - "x-remove-version" : 4.17, - "description" : "Use `type` instead.", - "allOf" : [ { - "$ref" : "#/components/schemas/NotificationKind" - } ] - }, - "type" : { - "$ref" : "#/components/schemas/NotificationTypeEnum" - }, - "internal" : { - "description" : "Indicates whether a given type of notification is enabled. Internal notifications act as a 'master control' for the notification type. If disabled, no other mediums will be enabled either.", - "type" : "boolean" - }, - "email" : { - "description" : "Indicates whether notifications of this type will be sent to the user's e-mail.", - "type" : "boolean" - }, - "sms" : { - "description" : "Indicates whether notifications of this type will be sent as SMS to the user's mobile phone.", - "type" : "boolean" + }, + "requestBody": { + "description": "The payment feedback details", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentFeedbackGive" + } + } } } - }, - "NotificationsPermissions" : { - "description" : "Permissions over notifications", - "type" : "object", - "properties" : { - "enable" : { - "description" : "Whether the own notifications are enabled or not.", - "type" : "boolean" + } + }, + "/payment-feedbacks/{key}/data-for-reply": { + "parameters": [ + { + "name": "key", + "in": "path", + "required": true, + "description": "Either the id or transaction number", + "schema": { + "type": "string" } } - }, - "NotificationsStatus" : { - "description" : "Contains details about the notifications", - "type" : "object", - "properties" : { - "newNotifications" : { - "description" : "Indicates the number of received notifications after the last view date (i.e `lastViewDate`).", - "type" : "integer" + ], + "get": { + "operationId": "getPaymentFeedbacksDataForReply", + "summary": "Returns data for reply a given payment feedback.", + "description": "Returns data for reply a given payment feedback. The logged user must be the payment's receiver (i.e payee) with permission to receive payment feedbacks.", + "tags": [ + "PaymentFeedbacks" + ], + "security": [ + { + "basic": [] }, - "unreadNotifications" : { - "description" : "Indicates the total number of unread notifications.", - "type" : "integer" + { + "session": [] }, - "lastViewDate" : { - "description" : "The last view date tracked by the server through `POST /notifications/viewed`", - "type" : "string", - "format" : "date-time" + { + "accessClient": [] } - } - }, - "OidcAuthorizeResult" : { - "description" : "Result after an OAuth2 / OpenID Connect approve / deny", - "type" : "object", - "properties" : { - "url" : { - "description" : "The URL to which the user should be redirected", - "type" : "string" - }, - "postData" : { - "type" : "object", - "additionalProperties" : { - "type" : "string" - }, - "description" : "Variables that should be POSTed to the given URL. When null it means that a plain redirect should be performed." + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" } - } - }, - "OidcClient" : { - "description" : "Represents a client", - "allOf" : [ { - "$ref" : "#/components/schemas/InternalNamedEntity" - }, { - "type" : "object", - "properties" : { - "image" : { - "$ref" : "#/components/schemas/Image" + ], + "responses": { + "200": { + "description": "The data for reply a given payment feedbacks.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentFeedbackDataForReply" + } + } } - } - } ] - }, - "OidcError" : { - "description" : "Error generating an OAuth2 / OpenID Connect response", - "type" : "object", - "properties" : { - "error" : { - "description" : "The error code", - "type" : "string" - }, - "error_description" : { - "description" : "The error description", - "type" : "string" - } - } - }, - "OidcTokenResult" : { - "description" : "Result after an OAuth2 / OpenID Connect token request", - "type" : "object", - "properties" : { - "access_token" : { - "description" : "The access token which can be used to make additional requests. It will be used as a `Bearer` token.", - "type" : "string" }, - "token_type" : { - "description" : "Cyclos always returns `bearer` tokens.", - "type" : "string" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } + } }, - "id_token" : { - "description" : "The JWT-encoded ID token.", - "type" : "string" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } + } }, - "state" : { - "description" : "The same opaque `state` value provided by the client on the authenticate request.", - "type" : "string" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } }, - "expires_in" : { - "description" : "The number of seconds until the token expires, counted from the time the request was received.", - "type" : "integer" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } + } }, - "refresh_token" : { - "description" : "The refresh token, which can be used to obtain additional access tokens. Is only issued if the `offline_access` scope has been granted, and only when the `grant_type` is `authorization_code`.", - "type" : "string" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } } } - }, - "Operation" : { - "description" : "Contains definitions used to run a custom operation", - "allOf" : [ { - "$ref" : "#/components/schemas/InternalNamedEntity" - }, { - "type" : "object", - "properties" : { - "svgIcon" : { - "description" : "The name of the SVG icon. The content of the icon can be obtained with `GET /images/svg/{name}.svg`", - "type" : "string" - }, - "icon" : { - "description" : "The character that represents the icon in the Cyclos font", - "type" : "string" - }, - "label" : { - "description" : "A representative label about the operation", - "type" : "string" - }, - "informationText" : { - "description" : "A message to be displayed to the user when displaying the parameters form. Only returned in contexts where the operation can be executed.", - "type" : "string" - }, - "confirmationText" : { - "description" : "A message to be shown to the user in order to confirm the operation execution. Only returned in contexts where the operation can be executed.", - "type" : "string" - }, - "requireConfirmationPassword" : { - "description" : "Indicates whether this operation requires confirmation password. Only returned in contexts where the operation can be executed.", - "type" : "boolean" - }, - "hasFileUpload" : { - "description" : "Indicates whether this operation accepts a file upload as input. Only returned in contexts where the operation can be executed.", - "type" : "boolean" - }, - "allowExport" : { - "description" : "Does this operation allows exporting the result page as file? Only returned if `resultType` is `resultPage`. Only returned in contexts where the operation can be executed.", - "type" : "boolean" - }, - "allowPrint" : { - "description" : "Should the front-end show a print action for the custom operation result? Before Cyclos 4.13 this was used for `resultType` `resultPage`, but since 4.13 is only used for `plainText` or `richText`. Only returned in contexts where the operation can be executed.", - "type" : "boolean" - }, - "submitWithQrCodeScan" : { - "description" : "Should the form for this custom operation present a scan QR-code action instead of a submit button?", - "type" : "boolean" - }, - "missingOptionalParameters" : { - "description" : "The optional custom fields without a value. The front-end could opt-in to rely on the `showFormForMissingOptionalParameters` flag to determine whether to show or not an input form if there's a missing poptional form field. Only returned in contexts where the operation can be executed.", - "type" : "array", - "items" : { - "type" : "string" - } - }, - "missingRequiredParameters" : { - "description" : "The required custom fields without a value. This means the operation will fail with a validation error if the parameters present in this list are not given when run it. Only returned in contexts where the operation can be executed.", - "type" : "array", - "items" : { - "type" : "string" + } + }, + "/payment-feedbacks/{key}/reply": { + "parameters": [ + { + "name": "key", + "in": "path", + "required": true, + "description": "Either the id or transaction number", + "schema": { + "type": "string" + } + } + ], + "post": { + "operationId": "replyPaymentFeedback", + "summary": "Replies an already given payment feedback.", + "description": "Replies an already given payment feedback as the receiver. After a reply was performed it can not be changed", + "tags": [ + "PaymentFeedbacks" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "responses": { + "204": { + "description": "The payment feedback was replied", + "headers": { + "Location": { + "description": "URL for viewing the payment feedback details", + "schema": { + "type": "string" + } } - }, - "showForm" : { - "description" : "Indicates the conditions in which the form with the parameters must be shown. Only returned if the `resultType` is not `resultPage`, for this `resultType` see `OperationDataForRun.searchAutomatically`. Only returned in contexts where the operation can be executed.", - "allOf" : [ { - "$ref" : "#/components/schemas/OperationShowFormEnum" - } ] - }, - "scope" : { - "$ref" : "#/components/schemas/OperationScopeEnum" - }, - "resultType" : { - "description" : "The type of data returned after the operation is executed. Only returned in contexts where the operation can be executed.", - "allOf" : [ { - "$ref" : "#/components/schemas/OperationResultTypeEnum" - } ] - }, - "adminMenu" : { - "description" : "In which administration menu the operation shows up. Only returned in contexts where the operation can be executed.", - "allOf" : [ { - "$ref" : "#/components/schemas/AdminMenuEnum" - } ] - }, - "userMenu" : { - "description" : "In which user menu the operation shows up. Only returned in contexts where the operation can be executed.", - "allOf" : [ { - "$ref" : "#/components/schemas/UserMenuEnum" - } ] - }, - "userProfileSection" : { - "description" : "In which user profile section the operation shows up. Only returned in contexts where the operation can be executed.", - "allOf" : [ { - "$ref" : "#/components/schemas/UserProfileSectionEnum" - } ] - } - } - } ] - }, - "OperationDataForRun" : { - "description" : "Contains definitions used to run a custom operation", - "allOf" : [ { - "$ref" : "#/components/schemas/Operation" - }, { - "type" : "object", - "properties" : { - "resultInformationText" : { - "description" : "A message to be displayed to the user when displaying the page results. Only returned if `resultType` is `resultPage`.", - "type" : "string" - }, - "customSubmitLabel" : { - "description" : "A label to be shown on the submit button. When not returned, a generic 'Submit' should be displayed.", - "type" : "string" - }, - "formParameters" : { - "description" : "The custom fields which are used in a form as parameters for the operation execution.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/CustomFieldDetailed" + } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } } - }, - "confirmationPasswordInput" : { - "description" : "If a confirmation password is used, contains the definitions on how to request that password from the user. This confirmation password is required when performing sensible actions. Sometimes this is dynamic, for example, the confirmation might be configured to be used only once per session, or operations like payments may have a limit per day to be without confirmation (pinless).", - "allOf" : [ { - "$ref" : "#/components/schemas/PasswordInput" - } ] - }, - "exportFormats" : { - "description" : "The formats which a custom operation result of type `resultPage` can be exported.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ExportFormat" + } + }, + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } } - }, - "closeAfterSeconds" : { - "description" : "When returned indicates the number of seconds the result of a content custom operation should be visible before automatically closing and restarting the operation. Only returned if `resultType` is either `plainText` or `richText`.", - "type" : "integer" - }, - "searchAutomatically" : { - "description" : "Should the operation be immediately executed by the third party client software when first presenting the form to the user (when `true`) or only when the user clicks submit (when `false`)? Only returned if `resultType` is `resultPage`.", - "type" : "boolean" - }, - "autoRunActionId" : { - "description" : "If it is present, it indicates the id of the action that should be executed automatically.", - "type" : "string" - }, - "actions" : { - "description" : "Actions are other internal custom operations that can be executed from this custom operation. The returned parameters should be passed to the server when running this action.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/RunOperationAction" + } + }, + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } } - }, - "rowLocation" : { - "description" : "The location to which the client should be redirected when selecting a row in the results table. Only returned if `resultType` is `resultPage` and `rowAction` is `location`.", - "type" : "string" - }, - "rowOperation" : { - "description" : "The custom operation that should be executed when clicking a row. Only returned if `resultType` is `resultPage` and `rowAction` is `operation`.", - "allOf" : [ { - "$ref" : "#/components/schemas/Operation" - } ] - }, - "rowUrl" : { - "description" : "The URL the client should be redirected when clicking a row. Only returned if `resultType` is `resultPage` and `rowAction` is `url`.", - "type" : "string" - }, - "rowParameters" : { - "description" : "The names of parameters belonging to each custom operation result that should be passed as parameter to the custom operation or URL which is executed when selecting a row in the table. Only returned if `resultType` is `resultPage`.", - "type" : "array", - "items" : { - "type" : "string" + } + }, + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } } - }, - "rowAction" : { - "$ref" : "#/components/schemas/OperationRowActionEnum" - }, - "user" : { - "description" : "The user for whom this custom operation will be executed. Returned if `scope` is either `user`, `advertisement`, `contact` (the contact owner), `contactInfo` or `record` (for user records).", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "ad" : { - "description" : "The advertisement for which this custom operation will be executed. Only returned if `scope` is `advertisement`", - "allOf" : [ { - "$ref" : "#/components/schemas/Ad" - } ] - }, - "contact" : { - "description" : "The contact for whom this custom operation will be executed. Only returned if `scope` is `contact`", - "allOf" : [ { - "$ref" : "#/components/schemas/Contact" - } ] - }, - "contactInfo" : { - "description" : "The additional contact for which this custom operation will be executed. Only returned if `scope` is `contactInfo`", - "allOf" : [ { - "$ref" : "#/components/schemas/ContactInfo" - } ] - }, - "record" : { - "description" : "The record for which this custom operation will be executed. Only returned if `scope` is `record`", - "allOf" : [ { - "$ref" : "#/components/schemas/Record" - } ] - }, - "recordType" : { - "description" : "The record type of the record for which this custom operation will be executed. Only returned if `scope` is `record`", - "allOf" : [ { - "$ref" : "#/components/schemas/RecordType" - } ] - }, - "transfer" : { - "description" : "The transfer for which this custom operation will be executed. Only returned if `scope` is `transfer`", - "allOf" : [ { - "$ref" : "#/components/schemas/Transfer" - } ] - }, - "menuItem" : { - "description" : "The custom menu item on which this custom operation will be executed. Only returned if `scope` is `menu`", - "allOf" : [ { - "$ref" : "#/components/schemas/EntityReference" - } ] } - } - } ] - }, - "OperationPermissions" : { - "description" : "Permissions over a specific custom operation", - "type" : "object", - "properties" : { - "operation" : { - "$ref" : "#/components/schemas/Operation" }, - "run" : { - "description" : "Can run this operation?", - "type" : "boolean" - } - } - }, - "OperationsPermissions" : { - "description" : "Permissions over own or system operations", - "type" : "object", - "properties" : { - "user" : { - "description" : "Permissions over custom operations applied to the authenticated user, with `scope` = `user`.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/OperationPermissions" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" + } + } } }, - "system" : { - "description" : "Custom operations the authenticated has access, with `scope` = `system`. Only returned for administrators.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/OperationPermissions" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } } } - } - }, - "OperatorDataForNew" : { - "description" : "Contains data used to register an operator", - "allOf" : [ { - "$ref" : "#/components/schemas/BasicUserDataForNew" - }, { - "type" : "object", - "properties" : { - "user" : { - "description" : "Details of user that will be the owner of the new operator", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "groups" : { - "description" : "The available operator groups for the given owner. When a group was passed on the request, will contain only that group. If no group was passed, will return all available groups.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/EntityReference" + }, + "requestBody": { + "description": "The reply comments", + "required": true, + "content": { + "text/plain": { + "schema": { + "type": "string" } - }, - "operator" : { - "description" : "The object that can be altered and posted back to register the operator", - "allOf" : [ { - "$ref" : "#/components/schemas/OperatorNew" - } ] - } - } - } ] - }, - "OperatorGroupAccount" : { - "description" : "Settings for an account access for an operator group", - "type" : "object", - "properties" : { - "access" : { - "$ref" : "#/components/schemas/OperatorGroupAccountAccessEnum" - }, - "notificationAmount" : { - "description" : "The minimum / maximum amount for payment notifications to be sent", - "allOf" : [ { - "$ref" : "#/components/schemas/DecimalRange" - } ] - } - } - }, - "OperatorGroupAccountView" : { - "description" : "Settings for an account access for an operator group", - "allOf" : [ { - "$ref" : "#/components/schemas/OperatorGroupAccount" - }, { - "type" : "object", - "properties" : { - "accountType" : { - "$ref" : "#/components/schemas/AccountType" - } - } - } ] - }, - "OperatorGroupBasicData" : { - "description" : "Contains data shared by both OperatorGroupDataForNew and OperatorGroupDataForEdit", - "type" : "object", - "properties" : { - "user" : { - "description" : "Details of the user that is the owner of the operator group", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "canChargebackPayments" : { - "type" : "boolean", - "description" : "Can the permission to chargeback payments be granted?" - }, - "canReceivePayments" : { - "type" : "boolean", - "description" : "Can the permission to receive payments be granted?" - }, - "canRequestPayments" : { - "type" : "boolean", - "description" : "Can the permission to request payments be granted?" - }, - "canPerformVoucherTransactions" : { - "type" : "boolean", - "description" : "Can the permission to redeem / top-up vouchers and view voucher transactions be granted?" - }, - "canViewAdvertisements" : { - "type" : "boolean", - "description" : "Can the permission to view advertisements be granted?" - }, - "canManageAdvertisements" : { - "type" : "boolean", - "description" : "Can the permission to manage advertisements be granted?" - }, - "canBlockToken" : { - "type" : "boolean", - "description" : "Can the permission to block tokens (cards) be granted?" - }, - "canCancelToken" : { - "type" : "boolean", - "description" : "Can the permission to cancel tokens (cards) be granted?" - }, - "canEnableToken" : { - "type" : "boolean", - "description" : "Can the permission to enable tokens (cards) be granted?" - }, - "canUnblockToken" : { - "type" : "boolean", - "description" : "Can the permission to unblock tokens (cards) be granted?" - }, - "broker" : { - "type" : "boolean", - "description" : "Indicates whether the owner user is a broker. If so, can delegate brokering operations to operators." - }, - "canHaveMessages" : { - "type" : "boolean", - "description" : "Can the permission over messages be granted?" - }, - "canHaveNotifications" : { - "type" : "boolean", - "description" : "Can the permission over notificationsto be granted?" - }, - "operations" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Operation" - }, - "description" : "Custom operations that can be granted" - }, - "recordTypes" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/RecordType" - }, - "description" : "Record types that can be granted" - }, - "accountTypes" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/AccountType" - }, - "description" : "Account types details for the account settings" - }, - "paymentTypes" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransferTypeWithCurrency" - }, - "description" : "Payment types details for the payment settings" - }, - "topUpEnabled" : { - "description" : "Indicates whether there is a voucher configuration supporting top-up which is enabled for this user and visible for the authenticated user. This flag is not related to the top-up permission.", - "type" : "boolean" - }, - "canRedeemVouchers" : { - "type" : "boolean", - "x-remove-version" : 4.17, - "deprecated" : true, - "description" : "Use `canPerformVoucherTransactions` instead" + } } } - }, - "OperatorGroupDataForEdit" : { - "description" : "Contains data for editing an existing operator group", - "allOf" : [ { - "$ref" : "#/components/schemas/OperatorGroupBasicData" - }, { - "type" : "object", - "properties" : { - "restrictPaymentsToUsers" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/User" - }, - "description" : "Details of the currently set users in the `restrictPaymentsToUsers` property in `operatorGroup` (which have only the ids)." - }, - "operatorGroup" : { - "description" : "The operator group that is being edited. This value can be modified and sent back on `PUT /operator-groups/{id}`.", - "allOf" : [ { - "$ref" : "#/components/schemas/OperatorGroupEdit" - } ] - }, - "canEdit" : { - "type" : "boolean", - "description" : "Can the authenticated user edit this operator group?" - }, - "canRemove" : { - "type" : "boolean", - "description" : "Can the authenticated user remove this operator group?" - } - } - } ] - }, - "OperatorGroupDataForNew" : { - "description" : "Contains data for creating a new operator group", - "allOf" : [ { - "$ref" : "#/components/schemas/OperatorGroupBasicData" - }, { - "type" : "object", - "properties" : { - "operatorGroup" : { - "description" : "The operator group populated with the default fields. This value can be modified and sent back on `POST /{user}/operator-groups`.", - "allOf" : [ { - "$ref" : "#/components/schemas/OperatorGroupNew" - } ] - } - } - } ] - }, - "OperatorGroupEdit" : { - "description" : "Fields for editing an operator group.", - "allOf" : [ { - "$ref" : "#/components/schemas/OperatorGroupManage" - }, { - "type" : "object", - "properties" : { - "version" : { - "type" : "integer", - "description" : "The version stamp for the current object, used for optimistic locking. When saving, the same version as previously received needs to be passed back. If no one else has saved the object, the version will match and the object will be updated. However, if someone other has saved the object, the version will no longer match, and an error will be raised. This is used to prevent multiple users (or processes) from updating the same object and unwilingly overridding the property values, leading to data loss." - } - } - } ] - }, - "OperatorGroupManage" : { - "description" : "Common fields for either creating or editing an operator group", - "type" : "object", - "x-abstract" : true, - "properties" : { - "name" : { - "type" : "string", - "description" : "The operator group name" - }, - "description" : { - "type" : "string", - "description" : "Optional description of the group" - }, - "editOwnProfile" : { - "type" : "boolean", - "description" : "Can operators of this group edit their own profile?" - }, - "chargebackPayments" : { - "type" : "boolean", - "description" : "Can operators of this group chargeback payments received by the owner?" - }, - "messages" : { - "type" : "boolean", - "description" : "Can operators of this group access the message box of the owner?" - }, - "notifications" : { - "type" : "boolean", - "description" : "Can operators of this group own notifications?" - }, - "receivePayments" : { - "type" : "boolean", - "description" : "Can operators of this group receive payments?" - }, - "voucherTransactions" : { - "type" : "boolean", - "description" : "Can operators of this group redeem / top-up vouchers and view transactions?" - }, - "requestPayments" : { - "type" : "boolean", - "description" : "Can operators of this group request payments?" - }, - "viewAdvertisements" : { - "type" : "boolean", - "description" : "Can operators of this group view advertisements?" - }, - "manageAdvertisements" : { - "type" : "boolean", - "description" : "Can operators of this group manage advertisements of the owner?" - }, - "enableToken" : { - "type" : "boolean", - "description" : "Can operators of this group have tokens (cards)?" - }, - "cancelToken" : { - "type" : "boolean", - "description" : "Can operators of this group cancel their own tokens (cards)?" - }, - "blockToken" : { - "type" : "boolean", - "description" : "Can operators of this group block their own tokens (cards)?" - }, - "unblockToken" : { - "type" : "boolean", - "description" : "Can operators of this group unblock their own tokens (cards)?" - }, - "brokering" : { - "type" : "boolean", - "description" : "Can operators of this group perform brokering operations? This includes full brokering operatations the user is allowed, including user registration, accounts access, payments as user, etc." - }, - "restrictPaymentsToUsers" : { - "type" : "array", - "items" : { - "type" : "string" - }, - "description" : "When set, operators of this group will only be able to perform payments to one of this users" - }, - "operations" : { - "type" : "array", - "items" : { - "type" : "string" - }, - "description" : "Ids / internal names of custom operators that operators of this group will only be able to run" - }, - "records" : { - "type" : "array", - "items" : { - "type" : "string" - }, - "description" : "Ids / internal names of record types that operators of this group will only be able to access" - }, - "accounts" : { - "type" : "object", - "additionalProperties" : { - "$ref" : "#/components/schemas/OperatorGroupAccount" - }, - "description" : "Defines how operators access the owner accounts, and defines restrictions on payment notifications. The key is the account type id or internal name." - }, - "payments" : { - "type" : "object", - "additionalProperties" : { - "$ref" : "#/components/schemas/OperatorGroupPayment" - }, - "description" : "Defines which payment types can be used by operators to perform payments or authorize payments performed by other operators. Also defines the maximum daily amount that can be paid per operator." - }, - "redeemVouchers" : { - "type" : "boolean", - "x-remove-version" : 4.17, - "deprecated" : true, - "description" : "Use `voucherTransactions` instead" - } - } - }, - "OperatorGroupNew" : { - "description" : "Fields for a new operator group.", - "allOf" : [ { - "$ref" : "#/components/schemas/OperatorGroupManage" - } ] - }, - "OperatorGroupPayment" : { - "description" : "Settings for payments for an operator group.", - "type" : "object", - "properties" : { - "authorize" : { - "type" : "boolean", - "description" : "Can operators of this group authorize payments of this type which were performed by other operators?" - }, - "perform" : { - "type" : "boolean", - "description" : "Can operators of this group perform payments of this type?" - }, - "requiresAuthorization" : { - "type" : "boolean", - "description" : "Do performed payments of this type by operators require authorization by the owner or other operators?" - }, - "maxAmountPerDay" : { - "type" : "string", - "format" : "number", - "description" : "Maximum amount of payments that operators of this group can perform per day." - } - } - }, - "OperatorGroupPaymentView" : { - "description" : "Settings for payments for an operator group.", - "allOf" : [ { - "$ref" : "#/components/schemas/OperatorGroupPayment" - }, { - "type" : "object", - "properties" : { - "paymentType" : { - "$ref" : "#/components/schemas/TransferTypeWithCurrency" - } - } - } ] - }, - "OperatorGroupView" : { - "description" : "Detailed information when viewing an operator group", - "allOf" : [ { - "$ref" : "#/components/schemas/NamedEntity" - }, { - "type" : "object", - "properties" : { - "user" : { - "description" : "The user which owns this operator group", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "canEdit" : { - "description" : "Can the authenticated user edit / remove this operator group?", - "type" : "boolean" - }, - "description" : { - "type" : "string", - "description" : "Optional description of the group" - }, - "editOwnProfile" : { - "type" : "boolean", - "description" : "Can operators of this group edit their own profile?" - }, - "chargebackPayments" : { - "type" : "boolean", - "description" : "Can operators of this group chargeback payments received by the owner?" - }, - "messages" : { - "type" : "boolean", - "description" : "Can operators of this group access the message box of the owner?" - }, - "notifications" : { - "type" : "boolean", - "description" : "Can operators of this group own notifications?" - }, - "receivePayments" : { - "type" : "boolean", - "description" : "Can operators of this group receive payments?" - }, - "voucherTransactions" : { - "type" : "boolean", - "description" : "Can operators of this group redeem / top-up vouchers and view transactions?" - }, - "requestPayments" : { - "type" : "boolean", - "description" : "Can operators of this group request payments?" - }, - "viewAdvertisements" : { - "type" : "boolean", - "description" : "Can operators of this group view advertisements?" - }, - "manageAdvertisements" : { - "type" : "boolean", - "description" : "Can operators of this group manage advertisements of the owner?" - }, - "enableToken" : { - "type" : "boolean", - "description" : "Can operators of this group have tokens (cards)?" - }, - "cancelToken" : { - "type" : "boolean", - "description" : "Can operators of this group cancel their own tokens (cards)?" - }, - "blockToken" : { - "type" : "boolean", - "description" : "Can operators of this group block their own tokens (cards)?" - }, - "unblockToken" : { - "type" : "boolean", - "description" : "Can operators of this group unblock their own tokens (cards)?" - }, - "brokering" : { - "type" : "boolean", - "description" : "Can operators of this group perform brokering operations?" - }, - "restrictPaymentsToUsers" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/User" - }, - "description" : "When set, operators of this group will only be able to perform payments to one of this users" - }, - "operations" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Operation" - }, - "description" : "Custom operators that operators of this group will only be able to run" - }, - "records" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/RecordType" - }, - "description" : "Record types that operators of this group will only be able to access" - }, - "accounts" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/OperatorGroupAccountView" - }, - "description" : "Settings for the access operators will have over owner accounts." - }, - "payments" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/OperatorGroupPaymentView" - }, - "description" : "Settings for payments that can be performed by operators." - }, - "redeemVouchers" : { - "type" : "boolean", - "x-remove-version" : 4.17, - "deprecated" : true, - "description" : "Use `voucherTransactions` instead" - } - } - } ] - }, - "OperatorNew" : { - "description" : "Contains data used to register an operator. All basic profile fields (full name, login name, e-mail, phones and addresses) can be enabled or disabled on Cyclos, via products.", - "x-implements" : "IBasicUserNew", - "allOf" : [ { - "$ref" : "#/components/schemas/BasicUserManage" - }, { - "type" : "object", - "properties" : { - "group" : { - "type" : "string", - "description" : "The operator group. When not specified the operator will be an 'alias', that means, will have all permissions of his owner." - }, - "mobilePhones" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PhoneNew" + } + }, + "/{user}/payments-awaiting-feedback": { + "parameters": [ + { + "$ref": "#/components/parameters/user" + } + ], + "get": { + "operationId": "searchPaymentAwaitingFeedback", + "summary": "Searches for payments performed by the user without feedback.", + "description": "Searches for payments performed by the user without feedback.", + "tags": [ + "PaymentFeedbacks" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number (zero-based) of the search. The default value is zero.", + "schema": { + "type": "integer" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", + "schema": { + "type": "integer" + } + }, + { + "name": "relatedUser", + "in": "query", + "required": false, + "description": "The user that received the payment feedback in reference to the user specified in the path. Should be either the id or some other allowed identification (login name, email, etc).", + "schema": { + "type": "string" + } + }, + { + "name": "skipTotalCount", + "in": "query", + "required": false, + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "The transaction entries matching the criteria", + "headers": { + "X-Total-Count": { + "schema": { + "type": "integer" + }, + "description": "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." }, - "description" : "Mobile phones to be registered together with the user" - }, - "landLinePhones" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PhoneNew" + "X-Page-Size": { + "schema": { + "type": "integer" + }, + "description": "The maximum number of results per page" }, - "description" : "Land-line phones to be registered together with the user" - }, - "passwords" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PasswordRegistration" + "X-Current-Page": { + "schema": { + "type": "integer" + }, + "description": "The current page the results are in" }, - "description" : "The initial passwords of the user" + "X-Has-Next-Page": { + "schema": { + "type": "boolean" + }, + "description": "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." + } }, - "skipActivationEmail" : { - "type" : "boolean", - "description" : "When set to true, the activation e-mail is not sent to the registered user. Can only be used when an administrator / broker is registering a user, and ignored on public registrations (the e-mail is always sent on public registrations)." + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TransactionResult" + } + } + } } - } - } ] - }, - "OperatorResult" : { - "description" : "Result of a operator search.", - "allOf" : [ { - "$ref" : "#/components/schemas/UserResult" - }, { - "type" : "object", - "properties" : { - "group" : { - "$ref" : "#/components/schemas/EntityReference" + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } + } + }, + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } + } + }, + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } } - } - } ] - }, - "OperatorsPermissions" : { - "description" : "Permissions over own operators", - "type" : "object", - "properties" : { - "enable" : { - "description" : "Whether operators are enabled", - "type" : "boolean" }, - "manageOperators" : { - "description" : "Whether I can manage my own operators", - "type" : "boolean" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } + } }, - "manageGroups" : { - "description" : "Whether I can manage my own operator groups", - "type" : "boolean" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } } } - }, - "OrderBasicData" : { - "description" : "Common data for `OrderDataForNew` and `OrderDataForEdit`", - "type" : "object", - "properties" : { - "seller" : { - "$ref" : "#/components/schemas/User" - }, - "buyer" : { - "$ref" : "#/components/schemas/User" + } + }, + "/{user}/payment-feedback-ignored-users": { + "parameters": [ + { + "$ref": "#/components/parameters/user" + } + ], + "get": { + "operationId": "listPaymentFeedbackIgnoredUsers", + "summary": "Lists the users marked as ignored for payment feedbacks.", + "description": "Returns a list containing the users marked as ignored to give feedback for payments performed to them. Currently the only supported value for the user parameter is `self` (i.e the authenticated user must be the payer)", + "tags": [ + "PaymentFeedbacks" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The list of ignored users", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/User" + } + } + } + } }, - "deliveryMethods" : { - "description" : "List with all delivery methods defined for the seller. When creating or updating an order it can be filled with the fields from one of these existing delivery methods or a custom delivery method can be set.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/DeliveryMethod" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } } }, - "addressConfiguration" : { - "description" : "The address configuration for the buyer\n", - "$ref" : "#/components/schemas/AddressConfiguration" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } + } }, - "addresses" : { - "description" : "List containing the visible addresses of the buyer. When creating or updating an order it can be filled with the fields from one of these existing addresses or a custom delivery address can be set.\n", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Address" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } } }, - "sellerAddressConfiguration" : { - "description" : "The address configuration for the seller\n", - "$ref" : "#/components/schemas/AddressConfiguration" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } + } }, - "sellerAddresses" : { - "description" : "List containing the visible addresses of the seller for pickup point delivery methods.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Address" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } } } } }, - "OrderDataForAcceptByBuyer" : { - "description" : "Data used to accept an order by the buyer.", - "type" : "object", - "properties" : { - "paymentTypes" : { - "description" : "Contains the allowed payment types.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransferType" - } + "post": { + "operationId": "addPaymentFeedbackIgnoredUser", + "summary": "Adds a user as ignored for payment feedback.", + "description": "Adds a user as ignored for payment feedback. Currently the only supported value for the user parameter is `self` (i.e the authenticated user must be the payer)", + "tags": [ + "PaymentFeedbacks" + ], + "security": [ + { + "basic": [] }, - "confirmationPasswordInput" : { - "description" : "If a confirmation password is used, contains the definitions on how to request that password from the user. This confirmation password is required when performing sensible actions. Sometimes this is dynamic, for example, the confirmation might be configured to be used only once per session, or operations like payments may have a limit per day to be without confirmation (pinless).", - "allOf" : [ { - "$ref" : "#/components/schemas/PasswordInput" - } ] + { + "session": [] + }, + { + "accessClient": [] } - } - }, - "OrderDataForEdit" : { - "description" : "Data for edit an order as the seller", - "allOf" : [ { - "$ref" : "#/components/schemas/OrderBasicData" - }, { - "type" : "object", - "properties" : { - "canEdit" : { - "description" : "Can the authenticated user edit this order?", - "type" : "boolean" - }, - "canRemove" : { - "description" : "Can the authenticated user remove this order?", - "type" : "boolean" - }, - "currency" : { - "$ref" : "#/components/schemas/Currency" - }, - "order" : { - "description" : "The order that is being edited", - "$ref" : "#/components/schemas/OrderEdit" - }, - "creationDate" : { - "type" : "string", - "format" : "date-time", - "description" : "The creation date when the order was saved for first time" - }, - "number" : { - "type" : "string", - "description" : "The generated order number according to the webshop settings." - }, - "status" : { - "$ref" : "#/components/schemas/OrderStatusEnum" - }, - "items" : { - "description" : "The list of product items added to the order", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/WebshopAd" + ], + "responses": { + "204": { + "description": "The user was added to be ignored." + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } } } - } - } ] - }, - "OrderDataForNew" : { - "description" : "Data for create a new order as the seller", - "allOf" : [ { - "$ref" : "#/components/schemas/OrderBasicData" - }, { - "type" : "object", - "properties" : { - "currencies" : { - "description" : "The available currencies for the sale", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Currency" + }, + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } + } + }, + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } } - }, - "order" : { - "description" : "The order that is being created", - "$ref" : "#/components/schemas/OrderNew" } - } - } ] - }, - "OrderDataForSearch" : { - "description" : "Data for searching orders (purchases / sales)", - "type" : "object", - "properties" : { - "user" : { - "$ref" : "#/components/schemas/User" }, - "query" : { - "description" : "Default query filters to search operators", - "allOf" : [ { - "$ref" : "#/components/schemas/OrderQueryFilters" - } ] - }, - "numberMask" : { - "type" : "string", - "description" : "The order number mask according to the webshop settings if it is manually generated. Only for sales" - }, - "currencies" : { - "description" : "The visible currencies the user have. Only for sales", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Currency" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" + } + } } }, - "canCreateNew" : { - "description" : "Whether the logged user can create a new sale or not.", - "type" : "boolean" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "requestBody": { + "description": "The identification value, such as id, username, e-mail, phone, etc. of the user to be ignored.", + "required": true, + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } } } - }, - "OrderDataForSetDeliveryMethod" : { - "description" : "Data used to to set a delivery method.", - "type" : "object", - "properties" : { - "currency" : { - "$ref" : "#/components/schemas/Currency" + } + }, + "/{user}/payment-feedback-ignored-users/{ignored}": { + "parameters": [ + { + "$ref": "#/components/parameters/user" + } + ], + "delete": { + "operationId": "removePaymentFeedbackIgnoredUser", + "summary": "Removes a user from the ignored users list.", + "description": "Removes a user from the ignored users list. Currently the only supported value for the user parameter is `self` (i.e the authenticated user must be the payer)", + "tags": [ + "PaymentFeedbacks" + ], + "security": [ + { + "basic": [] }, - "deliveryMethods" : { - "description" : "List with all delivery methods shared by all products contained in the order.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/DeliveryMethod" + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "name": "ignored", + "in": "path", + "required": true, + "description": "The identification value, such as id, username, e-mail, phone, etc. of the user to be removed from the list of ignored.", + "schema": { + "type": "string" } } - } - }, - "OrderDeliveryMethod" : { - "description" : "The order delivery method", - "type" : "object", - "properties" : { - "name" : { - "description" : "The name of the delivery method", - "type" : "string" + ], + "responses": { + "204": { + "description": "The user was removed from the ignored list." }, - "minTime" : { - "description" : "The minimum time interval expected for the products to be delivered.", - "allOf" : [ { - "$ref" : "#/components/schemas/TimeInterval" - } ] + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } + } }, - "maxTime" : { - "description" : "The maximum time interval expected for the products to be delivered.", - "allOf" : [ { - "$ref" : "#/components/schemas/TimeInterval" - } ] + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } + } }, - "price" : { - "description" : "The amount to be charged for the delivery method", - "type" : "string", - "format" : "number" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } }, - "deliveryType" : { - "$ref" : "#/components/schemas/DeliveryMethodTypeEnum" - } - } - }, - "OrderEdit" : { - "description" : "Fields for modifying an order.", - "allOf" : [ { - "$ref" : "#/components/schemas/OrderManage" - }, { - "type" : "object", - "properties" : { - "version" : { - "type" : "integer", - "description" : "The version stamp for the current object, used for optimistic locking. When saving, the same version as previously received needs to be passed back. If no one else has saved the object, the version will match and the object will be updated. However, if someone other has saved the object, the version will no longer match, and an error will be raised. This is used to prevent multiple users (or processes) from updating the same object and unwilingly overridding the property values, leading to data loss." + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } } - } - } ] - }, - "OrderItem" : { - "description" : "Data for an order item.", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseOrderItem" - }, { - "type" : "object", - "properties" : { - "totalPrice" : { - "description" : "The total price for this item, i.e the charged price of the product multiplied by its corresponding quantity.", - "type" : "string", - "format" : "number" - } - } - } ] - }, - "OrderItemManage" : { - "description" : "Data for create / edit an order item", - "type" : "object", - "properties" : { - "quantity" : { - "description" : "It represents how much of the product was ordered. It could be a decimal number only if it's allowed by the product (i.e the webshopad).", - "type" : "string", - "format" : "number" }, - "price" : { - "description" : "The charged price of the product.", - "type" : "string", - "format" : "number" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" + } + } + } }, - "product" : { - "description" : "Can be either the ad webshop internal identifier or the product number. If the number is solely comprised of numbers, it must be prefixed by a single quote.", - "type" : "string" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } } } - }, - "OrderLog" : { - "description" : "Information regarding a specific order status change", - "type" : "object", - "properties" : { - "by" : { - "$ref" : "#/components/schemas/User" - }, - "date" : { - "description" : "When the chage was made", - "type" : "string", - "format" : "date-time" + } + }, + "/payment-feedbacks/{key}/data-for-edit": { + "parameters": [ + { + "name": "key", + "in": "path", + "required": true, + "description": "Either the id or transaction number", + "schema": { + "type": "string" + } + } + ], + "get": { + "operationId": "getPaymentFeedbackDataForEdit", + "summary": "Returns configuration data for editing a payment feedback as manager.", + "description": "Returns configuration data for editing a payment feedback as admin/broker.", + "tags": [ + "PaymentFeedbacks" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "security": [ + { + "basic": [] }, - "remarks" : { - "description" : "The remarks associated to the change made by the user", - "type" : "string" + { + "session": [] }, - "status" : { - "description" : "The new status for the order", - "allOf" : [ { - "$ref" : "#/components/schemas/OrderStatusEnum" - } ] - } - } - }, - "OrderManage" : { - "description" : "Common fields for either creating or editing an order", - "type" : "object", - "properties" : { - "deliveryMethod" : { - "$ref" : "#/components/schemas/OrderDeliveryMethod" - }, - "deliveryAddress" : { - "$ref" : "#/components/schemas/SimpleAddress" - }, - "draft" : { - "description" : "If `true` then the order is saved with status `draft` and is visible only for the seller. Otherwise, the order is saved with status `pendingBuyer` and sent to the buyer for acceptance.", - "type" : "boolean" - }, - "remarks" : { - "description" : "Remarks shown to the buyer if set", - "type" : "string" - }, - "items" : { - "description" : "The order items", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/OrderItemManage" - } + { + "accessClient": [] } - } - }, - "OrderNew" : { - "description" : "A new order to be created", - "allOf" : [ { - "$ref" : "#/components/schemas/OrderManage" - }, { - "type" : "object", - "properties" : { - "currency" : { - "description" : "Either internal name or id of the order currency.", - "type" : "string" - }, - "buyer" : { - "description" : "Either internal id or other accepted identification (username, e-mail, etc) for the buyer", - "type" : "string" - } - } - } ] - }, - "OrderQueryFilters" : { - "description" : "Search filters for orders.", - "allOf" : [ { - "$ref" : "#/components/schemas/QueryFilters" - }, { - "type" : "object", - "properties" : { - "relatedUser" : { - "type" : "string", - "description" : "Either id or an identification, such as login name, e-mail, etc, for the seller or buyer according whether we are searching for purchases or sales. The allowed identification methods are those the authenticated user can use on keywords search." - }, - "number" : { - "type" : "string", - "description" : "The generated order number according to the webshop settings." - }, - "creationPeriod" : { - "description" : "The minimum / maximum order creation date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "type" : "array", - "items" : { - "type" : "string", - "format" : "date-time" - } - }, - "sales" : { - "type" : "boolean", - "description" : "Are we searching for sales or purchases? If not specified it's assumed purchases (i.e `false`)" - }, - "statuses" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/OrderStatusEnum" + ], + "responses": { + "200": { + "description": "The data for editing a payment feedback.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentFeedbackDataForEdit" + } } - }, - "productNumber" : { - "type" : "string", - "description" : "The product number (with the mask if there is one) of an advertisement contained in the orders." - } - } - } ] - }, - "OrderResult" : { - "description" : "Data of an order as returned on list.", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseOrder" - }, { - "type" : "object", - "properties" : { - "creationDate" : { - "type" : "string", - "format" : "date-time", - "description" : "The creation date corresponding to the date when the first item of this order was added to the shopping cart." - }, - "currency" : { - "description" : "The currency of the order.", - "allOf" : [ { - "$ref" : "#/components/schemas/Currency" - } ] - }, - "number" : { - "type" : "string", - "description" : "The generated order number according to the webshop settings." - }, - "totalPrice" : { - "type" : "string", - "format" : "number", - "description" : "The total price of the order, i.e the sum of the total price of all of its `items` and the delivery method (if any)." - }, - "image" : { - "description" : "This represents the first image of the first item in the order (if any).", - "allOf" : [ { - "$ref" : "#/components/schemas/Image" - } ] - }, - "status" : { - "$ref" : "#/components/schemas/OrderStatusEnum" - } - } - } ] - }, - "OrderView" : { - "description" : "Detailed information when viewing an order", - "allOf" : [ { - "$ref" : "#/components/schemas/OrderResult" - }, { - "type" : "object", - "properties" : { - "buyer" : { - "description" : "The buyer of the order.", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "seller" : { - "description" : "The seller of the order.", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "deliveryAddress" : { - "$ref" : "#/components/schemas/SimpleAddress" - }, - "deliveryMethod" : { - "$ref" : "#/components/schemas/OrderDeliveryMethod" - }, - "paymentType" : { - "$ref" : "#/components/schemas/TransferType" - }, - "items" : { - "description" : "The order items", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/OrderItem" + } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } } - }, - "remarks" : { - "type" : "string", - "description" : "The current order remarks (i.e those for check-out, accept or reject)." - }, - "sale" : { - "type" : "boolean", - "description" : "Is it a sale (initiated by the seller)?" - }, - "canAccept" : { - "description" : "An order can be accepted only for the following statuses:\n\n- `draft`: only if the authenticated user is the seller meaning the seller can submit the sale to the buyer.\n- `pendingBuyer`: only if the authenticated user is the buyer\n- `pendingSeller`: only if the authenticated user is the seller and the order has a delivery method already set", - "type" : "boolean" - }, - "canReject" : { - "description" : "An order can be rejected only for the following statuses:\n\n- `pendingBuyer`: only if the authenticated user is the buyer or the seller\n- `pendingSeller`: only if the authenticated user is the seller", - "type" : "boolean" - }, - "canSetDeliveryInformation" : { - "description" : "Delivery information can be set only for the following statuses:\n\n- `draft`: only if the authenticated user is the seller\n- `pendingSeller`: only if the authenticated user is the seller and a delivery method was not already set", - "type" : "boolean" - }, - "history" : { - "description" : "Contains the history entries for all order status changes", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/OrderLog" + } + }, + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } } - }, - "exportFormats" : { - "description" : "The formats which the ordercan be exported", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ExportFormat" - } - } - } - } ] - }, - "OtpError" : { - "description" : "Starting with Cyclos 4.14, email and SMS sending errors are reported as code 503.\n\n\nError when requesting a new One-time-Password (OTP) or a verification code", - "deprecated" : true, - "x-remove-version" : 4.16, - "allOf" : [ { - "$ref" : "#/components/schemas/Error" - } ] - }, - "OwnerAccountsListData" : { - "description" : "Contains information for list accounts, plus status information", - "type" : "object", - "properties" : { - "accounts" : { - "description" : "The list of accounts plus status information", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/AccountWithStatus" - } - }, - "user" : { - "description" : "The accounts owner. Only returned if the owner is a user.", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - } - } - }, - "OwnerRecordData" : { - "description" : "Data over a user record type for a given owner", - "allOf" : [ { - "$ref" : "#/components/schemas/RecordPermissions" - }, { - "type" : "object", - "properties" : { - "count" : { - "description" : "The current number of records of this type for this owner", - "type" : "integer" - } - } - } ] - }, - "OwnerRecordPermissions" : { - "description" : "Permissions over a user record for a given owner", - "allOf" : [ { - "$ref" : "#/components/schemas/RecordPermissions" - }, { - "type" : "object", - "properties" : { - "count" : { - "deprecated" : true, - "x-remove-version" : 4.16, - "description" : "Use `UserView.records` instead using the record type id or internal name as the key of the map.\n\n\nThe current number of records of this type for this owner", - "type" : "integer" - } - } - } ] - }, - "PasswordActions" : { - "description" : "Indicates the possible actions the authenticated user can perform over this password", - "type" : "object", - "properties" : { - "change" : { - "description" : "Manually change the password.", - "type" : "boolean" - }, - "changeGenerated" : { - "description" : "Manually generate another value for a generated password. Can only be done for the authenticated user himself.", - "type" : "boolean" - }, - "generate" : { - "description" : "Generate the password value for the first time. Can only be done for the authenticated user himself.", - "type" : "boolean" - }, - "allowGeneration" : { - "description" : "Granted only for those generated passwords that have a setting to require administration authorization and have the status `neverCreated`. Can only be done by administrators with permissions to enable/disable the password.", - "type" : "boolean" - }, - "disable" : { - "description" : "Disables a password, making it unusable until being enabled again.", - "type" : "boolean" - }, - "enable" : { - "description" : "Enables a disabled password, either manually disabled or by exceeding the wrong tries, depending on the password type configuration.", - "type" : "boolean" - }, - "resetGenerated" : { - "description" : "Resets a generated password, making it go back to the `pending` state. The user will then be able to generate a new value for it.", - "type" : "boolean" - }, - "resetAndSend" : { - "description" : "Resets a manual password to a generated value and send it to the user. Can also be used to reset and send the main channel's access password if it is generated. The new password is initially expired, so the user needs to change it on first login.", - "type" : "boolean" - }, - "unblock" : { - "description" : "Unblocks a password which has been blocked by exceeding the wrong tries", - "type" : "boolean" - } - } - }, - "PasswordInput" : { - "description" : "Contains all information for a password entry. Passwords in Cyclos may be entered as regular texts or as virtual keyboards. For `virtualKeyboard`, a number of information is sent, such as an unique `virtualKeyboardId`, the number of buttons to be displayed, the number of rows that should visually hold those buttons, the sequences of characters that should be displayed on each button. When sending the value of a password of type virtual keyboard, that `virtualKeyboardId` must be sent, together with the entire sequence for each entered button, all separated by pipes. So, suppose a very simple (and weakly configured) example where the `virtualKeyboardId` is `123` and the sequences are: `[[\"abc\", \"def\", \"fgh\"], [\"ijk\", \"lmn\", \"opq\"]]`. This describes 2 sequences of 3 buttons each. First, the buttons with the options `abc`, `def` and `fgh` should be shown. Suppose the user chooses the second one. Then the button labels should be changed to `ijk`, `lmn` and `opq`. Now the user picks the first one. The password value sent to the server must be `123|def|ijk`.", - "allOf" : [ { - "$ref" : "#/components/schemas/PasswordType" - }, { - "type" : "object", - "properties" : { - "hasActivePassword" : { - "description" : "Only returned when there is an authenticated user (not for login). Describes whether the user has created a password of this type. If not, a proper message can be shown to the user indicating that this password needs to be created.", - "type" : "boolean" - }, - "hasActiveDevice" : { - "description" : "Only returned when there is an authenticated user (not for login). Describes whether the user has at least one trusted device. If not, and the device confirmation is required a proper message can be shown to the user indicating that the user must activate a device as trusted.", - "type" : "boolean" - }, - "confirmationPasswordOncePerSession" : { - "description" : "Only returned when there is an authenticated user (not for login). Determines whether this password, when used as confirmation, should be requested only once until the user logs out.", - "type" : "boolean" - }, - "numberOfButtons" : { - "description" : "Only for `virtualKeyboard`, is the number of buttons to be displayed", - "type" : "integer" - }, - "buttonsPerRow" : { - "description" : "Only for `virtualKeyboard`, is the number of buttons that should be displayed on each row", - "type" : "integer" - }, - "buttons" : { - "description" : "Only for `virtualKeyboard`, contains the sequences of buttons that should be displayed for the user. The explanation for the value that should be sent on virtual keyboard mode is shown above, in the description of this type.", - "type" : "array", - "items" : { - "type" : "array", - "items" : { - "type" : "string" + } + }, + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" } } - }, - "inputMethod" : { - "description" : "The explanation for the value that should be sent for `virtualKeyboard` cases is given above, in the description of this type.", - "allOf" : [ { - "$ref" : "#/components/schemas/PasswordInputMethodEnum" - } ] - }, - "virtualKeyboardId" : { - "description" : "The id that should be sent together with the sequences when `inputMethod` is `virtualKeyboard`.", - "type" : "string" - }, - "deviceAvailability" : { - "description" : "Whether the confirmation with a trusted device is not used, optional or required.", - "allOf" : [ { - "$ref" : "#/components/schemas/AvailabilityEnum" - } ] - }, - "pinAvailability" : { - "description" : "Whether the confirmation with a device PIN is not used, optional or required.", - "allOf" : [ { - "$ref" : "#/components/schemas/AvailabilityEnum" - } ] - }, - "pinInput" : { - "description" : "The device PIN min length. Only if `pinAvailability` is not `disabled`", - "allOf" : [ { - "$ref" : "#/components/schemas/PinInput" - } ] - }, - "emailToSendOtp" : { - "description" : "The email available to request a new otp. Only returned if `otpSendMediums` contains `email`", - "type" : "string" - }, - "mobilePhonesToSendOtp" : { - "description" : "The phones available to request a new otp. Only returned if `otpSendMediums` contains `sms`", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Phone" + } + }, + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } } - }, - "otpSendMediums" : { - "description" : "Only for `otp`, the available mediums for the password to be sent", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/SendMediumEnum" + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } } - }, - "typeId" : { - "deprecated" : true, - "x-remove-version" : 4.16, - "description" : "Starting with Cyclos 4.16, the `id` property is always the password type id. Before 4.16, the `id` is overridden by the virtual keyboard id when it is used.", - "type" : "string" } } - } ] - }, - "PasswordLog" : { - "type" : "object", - "properties" : { - "by" : { - "description" : "The user that performed the action", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "action" : { - "$ref" : "#/components/schemas/PasswordActionEnum" - }, - "date" : { - "description" : "The action date", - "type" : "string", - "format" : "date-time" + } + } + }, + "/payment-feedbacks/{key}": { + "parameters": [ + { + "name": "key", + "in": "path", + "required": true, + "description": "Either the id or transaction number", + "schema": { + "type": "string" } } - }, - "PasswordPermissions" : { - "description" : "Permissions a single password", - "type" : "object", - "properties" : { - "type" : { - "$ref" : "#/components/schemas/PasswordType" - }, - "change" : { - "description" : "Can change this password?", - "type" : "boolean" - }, - "enable" : { - "description" : "Can enable / disable this password?", - "type" : "boolean" + ], + "get": { + "operationId": "viewPaymentFeedback", + "summary": "Returns details of a specific payment feedback.", + "description": "Returns details of a specific payment feedback.", + "tags": [ + "PaymentFeedbacks" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "security": [ + { + "basic": [] }, - "reset" : { - "description" : "Can reset this password?", - "type" : "boolean" + { + "session": [] }, - "unblock" : { - "description" : "Can unblock this password if blocked by exceeding tries?", - "type" : "boolean" + { + "accessClient": [] } - } - }, - "PasswordRegistration" : { - "description" : "Data regarding a password being registered with the user", - "type" : "object", - "properties" : { - "type" : { - "type" : "string", - "description" : "The password type" + ], + "responses": { + "200": { + "description": "The payment feedback details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentFeedbackView" + } + } + } }, - "value" : { - "type" : "string", - "description" : "The password value" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } + } }, - "checkConfirmation" : { - "type" : "boolean", - "description" : "Depending on the client, if a confirm password field is shown to users, it might be useful to check the confirmation password value on the server. This way, if there are other validation exceptions, they are all shown together. In this case, this field should be set to `true` and the `confirmationValue` should be passed in with the user input. However, in cases where clients just want to register a user with a password non interactively (like in a bulk registration), passing the password value twice is not desirable. In such cases, this field can be left empty (or set to `false`), and the `confirmationValue` will be ignored." + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } + } }, - "confirmationValue" : { - "type" : "string", - "description" : "The password confirmation value. Is ignored unless `checkConfirmation` is set to `true`." + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } }, - "forceChange" : { - "type" : "boolean", - "description" : "When set to true will force the user to change it after the first login" - } - } - }, - "PasswordStatus" : { - "description" : "Contains the status of a password", - "type" : "object", - "properties" : { - "date" : { - "description" : "The date this status took place", - "type" : "string", - "format" : "date-time" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } + } }, - "status" : { - "$ref" : "#/components/schemas/PasswordStatusEnum" - } - } - }, - "PasswordStatusAndActions" : { - "description" : "Contains the status and possible actions over a password", - "allOf" : [ { - "$ref" : "#/components/schemas/PasswordStatus" - }, { - "type" : "object", - "properties" : { - "type" : { - "$ref" : "#/components/schemas/PasswordType" - }, - "requireOldPasswordForChange" : { - "description" : "Indicates whether the `change` action, if enabled, requires the old password to be sent. This is the case when changing the password of the logged user, and the current password was ever set and is not currently expired / reset.", - "type" : "boolean" - }, - "permissions" : { - "description" : "The permissions over actions the authenticated user can perform on this password", - "allOf" : [ { - "$ref" : "#/components/schemas/PasswordActions" - } ] - }, - "history" : { - "description" : "The password history", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PasswordLog" - } - } - } - } ] - }, - "PasswordStatusAndType" : { - "description" : "Contains the status of a password and its type.", - "allOf" : [ { - "$ref" : "#/components/schemas/PasswordStatus" - }, { - "type" : "object", - "properties" : { - "type" : { - "description" : "The password type", - "allOf" : [ { - "$ref" : "#/components/schemas/PasswordType" - } ] - } - } - } ] - }, - "PasswordType" : { - "description" : "Contains base definitions for a password type", - "allOf" : [ { - "$ref" : "#/components/schemas/InternalNamedEntity" - }, { - "type" : "object", - "properties" : { - "onlyNumeric" : { - "type" : "boolean", - "description" : "Indicates whether this password type only allows numbers as possible characters" - }, - "minLength" : { - "type" : "integer", - "description" : "Indicates the minimum length of characters allowed for a password definition" - }, - "maxLength" : { - "type" : "integer", - "description" : "Indicates the maximum length of characters allowed for a password definition" - }, - "global" : { - "type" : "boolean", - "description" : "Indicates whether this password type is defined in global mode (`true`) or in a network (`false`)" - }, - "mode" : { - "$ref" : "#/components/schemas/PasswordModeEnum" - }, - "description" : { - "type" : "string", - "description" : "The description of the password type. Useful to know what a password must contain to meet the restrictions of this type." - } - } - } ] - }, - "PasswordTypeRegistration" : { - "description" : "Data for a given password type to be used on user registration", - "allOf" : [ { - "$ref" : "#/components/schemas/PasswordType" - }, { - "type" : "object", - "properties" : { - "canForceChange" : { - "type" : "boolean", - "description" : "Whether the current user can set the password to be changed on the first user login" - } - } - } ] - }, - "PasswordsPermissions" : { - "description" : "Permissions over own passwords", - "type" : "object", - "properties" : { - "manage" : { - "description" : "Can manage any password?", - "type" : "boolean" - }, - "passwords" : { - "description" : "Permissions over each password type", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PasswordPermissions" - } - } - } - }, - "PaymentAwaitingFeedbackQueryFilters" : { - "description" : "Query filters for transactions without a given feedback", - "allOf" : [ { - "$ref" : "#/components/schemas/QueryFilters" - }, { - "type" : "object", - "properties" : { - "relatedUser" : { - "description" : "The user that received the payment feedback in reference to the user specified in the path. Should be either the id or some other allowed identification (login name, email, etc).", - "type" : "string" - } - } - } ] - }, - "PaymentError" : { - "description" : "Error when performing a payment", - "allOf" : [ { - "$ref" : "#/components/schemas/Error" - }, { - "type" : "object", - "properties" : { - "currency" : { - "description" : "Currency reference. Only if `code` is `dailyAmountExceeded`, `weeklyAmountExceeded` or `monthlyAmountExceeded`", - "allOf" : [ { - "$ref" : "#/components/schemas/Currency" - } ] - }, - "maxAmount" : { - "description" : "The maximum amount. Only if `code` is `dailyAmountExceeded`, `weeklyAmountExceeded` or `monthlyAmountExceeded`", - "type" : "string", - "format" : "number" - }, - "maxPayments" : { - "description" : "The maximum payments count. Only if `code` is `dailyPaymentsExceeded`, `weeklyPaymentsExceeded` or `monthlyPaymentsExceeded`", - "type" : "integer" - }, - "posError" : { - "description" : "The POS error details. Only if `code` is `pos`", - "allOf" : [ { - "$ref" : "#/components/schemas/PosError" - } ] - }, - "code" : { - "$ref" : "#/components/schemas/PaymentErrorCode" - } - } - } ] - }, - "PaymentFeedback" : { - "description" : "A payment feedback", - "allOf" : [ { - "$ref" : "#/components/schemas/Reference" - }, { - "type" : "object", - "properties" : { - "replyComments" : { - "description" : "The payment feedback reply comments", - "type" : "string" - }, - "replyCommentsDate" : { - "description" : "The payment feedback reply comments date", - "type" : "string", - "format" : "date-time" - } - } - } ] - }, - "PaymentFeedbackDataForEdit" : { - "description" : "Contains data for editing an existing payment feedback", - "type" : "object", - "properties" : { - "feedback" : { - "description" : "The payment feedback being edited.", - "allOf" : [ { - "$ref" : "#/components/schemas/PaymentFeedbackEdit" - } ] - }, - "transaction" : { - "description" : "The payment for which the feedback was given. Only if the authenticated user as access at least to one of the involved accounts.", - "allOf" : [ { - "$ref" : "#/components/schemas/Transaction" - } ] + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } } } }, - "PaymentFeedbackDataForGive" : { - "description" : "Data for give or change and already given a payment feedback", - "type" : "object", - "properties" : { - "canGive" : { - "description" : "Whether the user can give a feedback", - "type" : "boolean" - }, - "deadline" : { - "description" : "The deadline until the feedback is allowed", - "type" : "string", - "format" : "date-time" + "put": { + "operationId": "updatePaymentFeedback", + "summary": "Updates an existing payment feedback as manager.", + "description": "Updates an existing payment feedback as admin/broker with manage permission.", + "tags": [ + "PaymentFeedbacks" + ], + "security": [ + { + "basic": [] }, - "required" : { - "description" : "Whether payment feedbacks are required or not", - "type" : "boolean" + { + "session": [] }, - "feedback" : { - "description" : "The payment feedback being given", - "allOf" : [ { - "$ref" : "#/components/schemas/PaymentFeedbackGive" - } ] - }, - "transaction" : { - "description" : "The payment for which the feedback is being given. Only if the authenticated user as access at least to one of the involved accounts.", - "allOf" : [ { - "$ref" : "#/components/schemas/Transaction" - } ] + { + "accessClient": [] } - } - }, - "PaymentFeedbackDataForReply" : { - "description" : "Data for reply for a given a payment feedback", - "type" : "object", - "properties" : { - "level" : { - "$ref" : "#/components/schemas/ReferenceLevelEnum" - }, - "comments" : { - "description" : "Given comments for this payment feedback", - "type" : "string" - }, - "canReply" : { - "description" : "Whether the user can reply for a given feedback", - "type" : "boolean" - }, - "deadline" : { - "description" : "The deadline until the reply is allowed. Null means there is no limit for reply and the user can reply while the feedback has not expired.", - "type" : "string", - "format" : "date-time" - }, - "transaction" : { - "description" : "The payment for which the feedback is being replied. Only if the authenticated user as access at least to one of the involved accounts.", - "allOf" : [ { - "$ref" : "#/components/schemas/Transaction" - } ] - } - } - }, - "PaymentFeedbackDataForSearch" : { - "description" : "Data for searching payment feedbacks of a given user", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseReferenceDataForSearch" - }, { - "type" : "object", - "properties" : { - "query" : { - "description" : "Default query filters", - "allOf" : [ { - "$ref" : "#/components/schemas/PaymentFeedbackQueryFilters" - } ] - } - } - } ] - }, - "PaymentFeedbackEdit" : { - "description" : "Parameters for editing an existing payment feedback", - "type" : "object", - "properties" : { - "level" : { - "$ref" : "#/components/schemas/ReferenceLevelEnum" - }, - "giveComments" : { - "description" : "The modified payer's comment", - "type" : "string" - }, - "replyComments" : { - "description" : "The modified reply comment", - "type" : "string" - }, - "managerComments" : { - "description" : "The admin/broker comments", - "type" : "string" - }, - "version" : { - "type" : "integer", - "description" : "The version stamp for the current object, used for optimistic locking. When saving, the same version as previously received needs to be passed back. If no one else has saved the object, the version will match and the object will be updated. However, if someone other has saved the object, the version will no longer match, and an error will be raised. This is used to prevent multiple users (or processes) from updating the same object and unwilingly overridding the property values, leading to data loss." - } - } - }, - "PaymentFeedbackGive" : { - "description" : "Data for give (create or change) a payment feedback", - "type" : "object", - "properties" : { - "level" : { - "$ref" : "#/components/schemas/ReferenceLevelEnum" - }, - "comments" : { - "description" : "Comments for this payment feedback", - "type" : "string" - } - } - }, - "PaymentFeedbackQueryFilters" : { - "description" : "Query filters for a user's payment feedbacks", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseReferenceQueryFilters" - }, { - "type" : "object", - "properties" : { - "noReplied" : { - "description" : "If true only those payment feedbacks without a reply comment would be returned", - "type" : "boolean" - } - } - } ] - }, - "PaymentFeedbackResult" : { - "description" : "Result of searching payment feedbacks of a given user", - "allOf" : [ { - "$ref" : "#/components/schemas/PaymentFeedback" - }, { - "type" : "object", - "properties" : { - "relatedUser" : { - "description" : "The user that either gave to (i.e the payer) or received from (the payee) the user specified in the path variable.", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "direction" : { - "description" : "Whether this payment feedback was given to or received from the user specified in the path variable.", - "allOf" : [ { - "$ref" : "#/components/schemas/ReferenceDirectionEnum" - } ] - } - } - } ] - }, - "PaymentFeedbackView" : { - "description" : "Details of a payment feedback", - "allOf" : [ { - "$ref" : "#/components/schemas/PaymentFeedback" - }, { - "type" : "object", - "properties" : { - "canEdit" : { - "description" : "Indicates whether the feedback can be edited or removed if the authenticated user is a manager", - "type" : "boolean" - }, - "canGive" : { - "description" : "Indicates if feedback can be given also checking it's deadline", - "type" : "boolean" - }, - "canReply" : { - "description" : "Indicates if feedback can be replied also checking it's deadline", - "type" : "boolean" - }, - "from" : { - "description" : "The user that gave the feedback (i.e the payer)", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "to" : { - "description" : "The user that received the feedback (i.e the payee)", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "managerComments" : { - "description" : "The admin/broker comments. Only returned if the authenticated user is a manager.", - "type" : "string" - }, - "managerCommentsDate" : { - "description" : "The admin/broker comments date. Only returned if the authenticated user is a manager.", - "type" : "string", - "format" : "date-time" - }, - "transaction" : { - "description" : "The payment for which the feedback was given. Only if the authenticated user as access at least to one of the involved accounts.", - "allOf" : [ { - "$ref" : "#/components/schemas/Transaction" - } ] - } - } - } ] - }, - "PaymentFeedbacksPermissions" : { - "description" : "Permissions over payment feedbacks", - "type" : "object", - "properties" : { - "view" : { - "description" : "Can view other user's payment feedbacks?", - "type" : "boolean" - }, - "give" : { - "description" : "Can give payment feedbacks?", - "type" : "boolean" - }, - "receive" : { - "description" : "Can receive payment feedbacks?", - "type" : "boolean" - } - } - }, - "PaymentPreview" : { - "description" : "Preview of either a direct or scheduled payment", - "allOf" : [ { - "$ref" : "#/components/schemas/InternalTransactionPreview" - }, { - "type" : "object", - "properties" : { - "mainAmount" : { - "description" : "This reflects the new transaction amount. Depending on the configured fees, it could happen that the fee amount is deducted from transaction amount. If no fees deduct, it will be the same as transaction amount. E.g: payment from A to B by 100 units with two fees: 10 units deducted from payment amount and other of 15 not deducted. Then the `totalAmount` will be 115, 90 for the `mainAmount`, 10 for the first fee and 15 for the other fee.", - "type" : "string", - "format" : "number" - }, - "fees" : { - "description" : "Only returned for direct payments. Contains the fees that would be paid by the payer if the payment is confirmed.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransferFeePreview" + ], + "responses": { + "204": { + "description": "The payment feedback was updated", + "headers": { + "Location": { + "description": "URL for viewing the payment feedback details", + "schema": { + "type": "string" + } } - }, - "installments" : { - "description" : "Only returned for scheduled payments. Contains the previews of each installment, if the payment is confirmed.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/InstallmentPreview" + } + }, + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" + } + } + } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } + } + }, + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } + } + }, + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } } - }, - "payment" : { - "description" : "Depending on the configuration, some script might alter the payment object, for example, filling in custom fields. This object can be used to show the actual data to the user, and to be posted again to the `POST /{owner}/payments/` path.", - "allOf" : [ { - "$ref" : "#/components/schemas/PerformPayment" - } ] - }, - "ARate" : { - "description" : "The balance aging counter used for this payment", - "type" : "string", - "format" : "number" - }, - "DRate" : { - "description" : "The balance maturity used for this payment", - "type" : "string", - "format" : "number" - }, - "previousDRate" : { - "description" : "The number of days until the present balance reaches its maturity", - "type" : "string", - "format" : "number" - }, - "transferDRate" : { - "description" : "The maturity used for this payment", - "type" : "string", - "format" : "number" - }, - "skipConfirmation" : { - "description" : "True if the payment should be performed directly without showing the preview. If there is a `confirmationPasswordInput` defined then this flag will be false regardless the setting in the transfer type.", - "type" : "boolean" - } - } - } ] - }, - "PaymentRequestPermissions" : { - "description" : "Permissions the user has over a payment request.", - "type" : "object", - "properties" : { - "accept" : { - "description" : "The payment request can be accepted by the payer.", - "type" : "boolean" - }, - "reject" : { - "description" : "The payment request can be rejected by the payer.", - "type" : "boolean" - }, - "cancel" : { - "description" : "The payment request can be canceled by the payee or managers.", - "type" : "boolean" - }, - "reschedule" : { - "description" : "The payment request can be rescheduled by the payee or managers.", - "type" : "boolean" - }, - "changeExpiration" : { - "description" : "The payment request expiration date can be changed by the payee or managers.", - "type" : "boolean" - } - } - }, - "PaymentRequestPreview" : { - "description" : "Contains a preview of the payment that would be performed upon accepting a payment request.", - "allOf" : [ { - "$ref" : "#/components/schemas/PaymentPreview" - }, { - "type" : "object", - "properties" : { - "paymentRequest" : { - "description" : "A reference to the payment request being previewed", - "allOf" : [ { - "$ref" : "#/components/schemas/TransactionView" - } ] - } - } - } ] - }, - "PaymentRequestsPermissions" : { - "description" : "Permissions over own payment requests", - "allOf" : [ { - "$ref" : "#/components/schemas/PaymentRequestPermissions" - }, { - "type" : "object", - "properties" : { - "view" : { - "description" : "Can view payment requests?", - "type" : "boolean" - }, - "sendToSystem" : { - "description" : "Can the authenticated user send payment requests to system accounts?", - "type" : "boolean" - }, - "sendToUser" : { - "description" : "Can the authenticated user send payment requests to users?", - "type" : "boolean" } - } - } ] - }, - "PaymentsPermissions" : { - "description" : "General payment permissions", - "type" : "object", - "properties" : { - "user" : { - "description" : "Can perform payments to users?", - "type" : "boolean" }, - "system" : { - "description" : "Can perform payments to system accounts?", - "type" : "boolean" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } + } }, - "self" : { - "description" : "Can perform payments between own accounts?", - "type" : "boolean" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" + } + } + } }, - "pos" : { - "description" : "Can receive payments from users?", - "type" : "boolean" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } } - } - }, - "PendingPaymentActionParams" : { - "description" : "Parameters for actions over pending payments", - "type" : "object", - "properties" : { - "comments" : { - "description" : "Comments for the current action", - "type" : "string" + }, + "requestBody": { + "description": "The payment feedback details", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentFeedbackEdit" + } + } } } }, - "PerformBaseTransaction" : { - "description" : "Base definitions for performing a transaction", - "type" : "object", - "x-abstract" : true, - "properties" : { - "amount" : { - "description" : "The transaction amount", - "type" : "string", - "format" : "number" + "delete": { + "operationId": "removePaymentFeedback", + "summary": "Deletes an existing payment feedback as manager.", + "description": "Deletes an existing payment feedback as admin/broker with manage permission.", + "tags": [ + "PaymentFeedbacks" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] }, - "description" : { - "description" : "The (optional) transaction description", - "type" : "string" + { + "accessClient": [] + } + ], + "responses": { + "204": { + "description": "The payment feedback was removed." }, - "currency" : { - "description" : "The currency id or internal name. Only used when not specifying a payment type. In this case, will narrow the search for the payment type.", - "type" : "string" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } + } }, - "type" : { - "description" : "The payment type, either the id or qualified internal name (in the form `fromAccountType.paymentType`). If no payment type is specified, if a single one is possible, it will be used. If a currency is specified, it will be taken into account in order to find the payment type. If, however, there would be multiple possibilities, a validation error is returned.", - "type" : "string" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } + } }, - "customValues" : { - "type" : "object", - "description" : "Holds the custom field values, keyed by field internal name or id. The format of the value depends on the custom field type.", - "additionalProperties" : { - "type" : "string" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } } - } - } - }, - "PerformExternalPayment" : { - "description" : "Parameters for performing an external payment", - "allOf" : [ { - "$ref" : "#/components/schemas/PerformTransaction" - }, { - "type" : "object", - "properties" : { - "toPrincipalType" : { - "description" : "The principal type used to identify the external user. Generally `email` or `mobilePhone`.", - "type" : "string" - }, - "toPrincipalValue" : { - "description" : "The value for the corresponding principal type, for example, the e-mail address or mobile phone number.", - "type" : "string" + }, + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } + } + }, + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } } } - } ] - }, - "PerformInstallment" : { - "description" : "An installment definition when performing a scheduled payment", - "type" : "object", - "properties" : { - "dueDate" : { - "description" : "The installment due date", - "type" : "string", - "format" : "date-time" + } + } + }, + "/invite/data-for-send": { + "get": { + "operationId": "getDataForInvite", + "summary": "Returns data for inviting external users to join the system", + "description": "Returns data for inviting external users to join the system", + "tags": [ + "Invite" + ], + "security": [ + { + "basic": [] }, - "amount" : { - "description" : "The installment amount", - "type" : "string", - "format" : "number" + { + "session": [] + }, + { + "accessClient": [] } - }, - "required" : [ "dueDate", "amount" ] - }, - "PerformInternalTransaction" : { - "description" : "Base definitions to performing a transaction to an internal account (any except `externalPayment`, or `chargeback` which is performed distinctly).", - "allOf" : [ { - "$ref" : "#/components/schemas/PerformTransaction" - }, { - "type" : "object", - "properties" : { - "fromName" : { - "description" : "If the payment type allows setting a custom name for the origin account, is its name. If not allowed, is ignored. For example, integration with other systems could use 'Bank account [IBAN]'.", - "type" : "string" - }, - "toName" : { - "description" : "If the payment type allows setting a custom name for the destination account, is its name. If not allowed, is ignored. For example, integration with other systems could use 'Bank account [IBAN]'.", - "type" : "string" - } - } - } ] - }, - "PerformPayment" : { - "description" : "Definitions used to perform either a direct, scheduled or recurring payment. Regarding scheduling, the `scheduling` field must be set if some scheduling option (other than direct payment) is desired. The scheduling possibilities are:\n\n- Direct payment: For a direct payment, leave empty the `scheduling`\n field or set it to `direct`;\n\n- Single future payment: For a payment scheduled to a future date, set\n the `scheduling` field to `scheduled` and set\n the `firstDueDate` property with the desired due date;\n\n- Multiple installments, being the first immediately and the rest with\n regular 1 month interval in-between: For this, set the `scheduling` field\n to `scheduled` and the `installmentsCount` to\n a value greater than 1;\n\n- Multiple installments, starting at a specific date, with other\n installments with regular 1 month interval in-between: For this, set the\n `scheduling` field to `scheduled`, the\n `installmentsCount` to a value greater than 1 and the\n `firstInstallmentDate` with a future date;\n\n- Custom installments: For a full control on the generated installments,\n set the `scheduling` field to `scheduled`\n and pass in the `installments` array. However, there are some rules:\n\n - The total amount must be equals the sum of all installment amounts;\n\n - The first due date must be in the future;\n\n - The due dates of all installments must be in ascending order;\n\n - There must be at least one day between distinct due dates.\n\n- Recurring payment with the first payment immediately, the others at fixed\n future dates: This can be achieved by setting the `scheduling` field to\n `recurring` and leaving blank the\n `firstOccurrenceDate`. It is possible to schedule a limited number of\n occurrences, by setting `occurrencesCount`, or until it is manually\n canceled, by leaving `occurrencesCount` empty. Also, it is possible to\n customize the interval (default is 1 month) between each occurrence, by\n setting the `occurrenceInterval` field.\n\n- Recurring payment starting in a future date: This can be achieved by\n setting the `scheduling` field to `recurring`\n and setting the `firstOccurrenceDate`. The other options, the fixed number\n of occurrences (`occurrencesCount`) and interval between each occurrence\n (`occurrenceInterval`) can be set just like the case above.", - "allOf" : [ { - "$ref" : "#/components/schemas/PerformInternalTransaction" - }, { - "type" : "object", - "properties" : { - "installmentsCount" : { - "description" : "Represents the number of installments. When not specified, assumes a single installment. Used only if `scheduling` is `scheduled`. Can be used together with `installmentsCount` as an alternative to providing individual `installments` definitions.", - "type" : "integer", - "minimum" : 1 - }, - "firstInstallmentDate" : { - "description" : "Represents the first installment date. When not specified, assumes the first installment is processed instantly. Used only if `scheduling` is `scheduled`. Can be used together with `installmentsCount` as an alternative to providing individual `installments` definitions.", - "type" : "string", - "format" : "date-time" - }, - "installments" : { - "description" : "An array containing individual installments definitions, allowing full control over generated installments. Used only if `scheduling` is `scheduled`.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PerformInstallment" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The data for sending invitations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DataForSendInvitation" + } } - }, - "occurrencesCount" : { - "description" : "Represents the number of occurrences in a recurring payment. When not provided, the payment will be repeated until it is manually canceled. Used only if `scheduling` is `recurring`.", - "type" : "integer", - "minimum" : 1 - }, - "firstOccurrenceDate" : { - "description" : "Represents the first occurrence date for a recurring payment. If none is given, it is assumed that the first occurrence is immediate. Used only if `scheduling` is `recurring`.", - "type" : "string", - "format" : "date-time" - }, - "occurrenceInterval" : { - "description" : "Defines the interval between payment occurrences. If none is given, it is assumed 1 month between occurrences. Used only if `scheduling` is `recurring`.", - "allOf" : [ { - "$ref" : "#/components/schemas/TimeInterval" - } ] - }, - "nfcChallence" : { - "description" : "If this payment is performed with a NFC token, must be the challenge (as returned by the server) encrypted by the NFC chip, encoded in HEX form (2 hex chars per byte).", - "type" : "string" - }, - "scheduling" : { - "$ref" : "#/components/schemas/PaymentSchedulingEnum" - } - } - } ] - }, - "PerformTransaction" : { - "description" : "Base definitions for performing a transaction", - "allOf" : [ { - "$ref" : "#/components/schemas/PerformBaseTransaction" - }, { - "type" : "object", - "x-abstract" : true, - "properties" : { - "subject" : { - "description" : "The payment destination (in case of perform payment) or payer (in case of receive payment). Either a user principal (id, login name, etc) or the word `system` when the payment is to be performed to / from a system account. Note that a valid numeric value is always considered as id. For example, when using another identification method that can be numeric only, prefix the value with a single quote (like in Excel spreadsheets), for example, `'1234567890`.", - "type" : "string" - } - } - } ] - }, - "PerformVoucherTransaction" : { - "description" : "Common parameters for a voucher transaction", - "type" : "object", - "properties" : { - "amount" : { - "description" : "The transaction amount. In some cases, such as when redeeming vouchers that don't allow partial redeems, is optional.", - "type" : "string", - "format" : "number" - }, - "paymentCustomValues" : { - "type" : "object", - "description" : "Holds the custom field values for the payment generated on this voucher transaction. The object keys are custom field internal names. The format of the value depends on the custom field type.", - "additionalProperties" : { - "type" : "string" - } - } - } - }, - "Permissions" : { - "description" : "Contains all permissions and configurations a user or guest can perform in the REST API", - "type" : "object", - "properties" : { - "users" : { - "description" : "Permissions over other users", - "allOf" : [ { - "$ref" : "#/components/schemas/UsersPermissions" - } ] - }, - "myProfile" : { - "description" : "Permissions over own profile", - "allOf" : [ { - "$ref" : "#/components/schemas/UserProfilePermissions" - } ] - }, - "banking" : { - "description" : "Permissions over banking / accounts", - "allOf" : [ { - "$ref" : "#/components/schemas/BankingPermissions" - } ] - }, - "marketplace" : { - "description" : "Permissions for marketplace", - "allOf" : [ { - "$ref" : "#/components/schemas/MarketplacePermissions" - } ] - }, - "passwords" : { - "description" : "Permissions over own passwords", - "allOf" : [ { - "$ref" : "#/components/schemas/PasswordsPermissions" - } ] - }, - "records" : { - "description" : "Permissions over own records", - "allOf" : [ { - "$ref" : "#/components/schemas/RecordsPermissions" - } ] - }, - "operations" : { - "description" : "Permissions over own custom operations", - "allOf" : [ { - "$ref" : "#/components/schemas/OperationsPermissions" - } ] - }, - "wizards" : { - "description" : "Permissions over own custom wizards", - "allOf" : [ { - "$ref" : "#/components/schemas/WizardsPermissions" - } ] - }, - "contacts" : { - "description" : "Permissions over contacts", - "allOf" : [ { - "$ref" : "#/components/schemas/ContactsPermissions" - } ] - }, - "operators" : { - "description" : "Permissions over own operators", - "allOf" : [ { - "$ref" : "#/components/schemas/OperatorsPermissions" - } ] - }, - "notifications" : { - "description" : "Permissions over notifications", - "allOf" : [ { - "$ref" : "#/components/schemas/NotificationsPermissions" - } ] - }, - "notificationSettings" : { - "description" : "Permissions over notifications settings", - "allOf" : [ { - "$ref" : "#/components/schemas/NotificationSettingsPermissions" - } ] - }, - "tokens" : { - "description" : "Permissions over tokens", - "allOf" : [ { - "$ref" : "#/components/schemas/TokensPermissions" - } ] - }, - "sessions" : { - "description" : "Permissions over user sessions", - "allOf" : [ { - "$ref" : "#/components/schemas/SessionsPermissions" - } ] - }, - "alerts" : { - "description" : "Permissions related to user alers", - "allOf" : [ { - "$ref" : "#/components/schemas/AlertsPermissions" - } ] - }, - "vouchers" : { - "description" : "Permissions over vouchers", - "allOf" : [ { - "$ref" : "#/components/schemas/VouchersPermissions" - } ] - }, - "identityProviders" : { - "description" : "Permissions over identity provider links", - "allOf" : [ { - "$ref" : "#/components/schemas/IdentityProvidersPermissions" - } ] - }, - "privacySettings" : { - "description" : "Permissions over own privacy settings", - "allOf" : [ { - "$ref" : "#/components/schemas/PrivacySettingsPermissions" - } ] - }, - "agreements" : { - "description" : "Permissions over own agreements", - "allOf" : [ { - "$ref" : "#/components/schemas/AgreementsPermissions" - } ] - }, - "images" : { - "description" : "Permissions over images (others than the profile image)", - "allOf" : [ { - "$ref" : "#/components/schemas/ImagesPermissions" - } ] - }, - "documents" : { - "description" : "Permissions over documents", - "allOf" : [ { - "$ref" : "#/components/schemas/DocumentsPermissions" - } ] - }, - "references" : { - "description" : "Permissions over general references", - "allOf" : [ { - "$ref" : "#/components/schemas/ReferencesPermissions" - } ] - }, - "paymentFeedbacks" : { - "description" : "Permissions over payment feedbacks", - "allOf" : [ { - "$ref" : "#/components/schemas/PaymentFeedbacksPermissions" - } ] - }, - "invite" : { - "description" : "Permissions for sending invitations to external users", - "allOf" : [ { - "$ref" : "#/components/schemas/InvitePermissions" - } ] - }, - "messages" : { - "description" : "Permissions over messages", - "allOf" : [ { - "$ref" : "#/components/schemas/MessagesPermissions" - } ] - } - } - }, - "PersonalizeNfcError" : { - "description" : "Error when personalize a NFC card", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseNfcError" - }, { - "type" : "object", - "properties" : { - "code" : { - "$ref" : "#/components/schemas/PersonalizeNfcErrorCode" - } - } - } ] - }, - "Phone" : { - "description" : "A phone reference", - "allOf" : [ { - "$ref" : "#/components/schemas/NamedEntity" - }, { - "type" : "object", - "properties" : { - "name" : { - "type" : "string", - "description" : "The phone name" - }, - "number" : { - "type" : "string", - "description" : "The formatted number" - }, - "extension" : { - "type" : "string", - "description" : "The number extension, only for landLine phones, and is only used if the phone configuration states that extensions are enabled." - }, - "normalizedNumber" : { - "type" : "string", - "description" : "The number, normalized to the E.164 format", - "readOnly" : true - }, - "type" : { - "$ref" : "#/components/schemas/PhoneKind" - } - } - } ] - }, - "PhoneBasicData" : { - "description" : "Contains data shared by both PhoneDataForNew and PhoneDataForEdit", - "type" : "object", - "properties" : { - "country" : { - "description" : "The 2-letter country code used by default for numbers. Unless an international number is specified (using the `+` prefix), the phone number is assumed to belong to this country.", - "type" : "string" - }, - "alwaysShowInternationalNumber" : { - "description" : "Indicates the it is configured to always format numbers using the international format. If set to false, numbers will be formatted in the national format.", - "type" : "boolean" - }, - "example" : { - "description" : "An example phone number. Can be either a land-line or mobile phone number example, depending on this phone kind phone", - "type" : "string" - }, - "extensionEnabled" : { - "description" : "Only returned for land line phones. Indicates whether the extension is enabled.", - "type" : "boolean" - }, - "smsEnabled" : { - "description" : "Only returned for mobile phones. Indicates whether outbound SMS is enabled in Cyclos", - "type" : "boolean" - }, - "enablePrivacy" : { - "description" : "Indicates whether privacy can be used for this phone", - "type" : "boolean" - }, - "managePrivacy" : { - "type" : "boolean", - "description" : "Can the authenticated user manage the privacy of this phone?" - }, - "manuallyVerify" : { - "type" : "boolean", - "description" : "Can the authenticated user manully verify a mobile phone?" - }, - "confirmationPasswordInput" : { - "description" : "If a confirmation password is used, contains the definitions on how to request that password from the user. This confirmation password is required when performing sensible actions. Sometimes this is dynamic, for example, the confirmation might be configured to be used only once per session, or operations like payments may have a limit per day to be without confirmation (pinless).", - "allOf" : [ { - "$ref" : "#/components/schemas/PasswordInput" - } ] - }, - "type" : { - "$ref" : "#/components/schemas/PhoneKind" - }, - "user" : { - "description" : "The user which owns the phone", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - } - } - }, - "PhoneConfiguration" : { - "description" : "Contains configuration information related to phones", - "type" : "object", - "properties" : { - "country" : { - "description" : "The 2-letter country code used by default for numbers. Unless an international number is specified (using the `+` prefix), the phone number is assumed to belong to this country.", - "type" : "string" - }, - "alwaysShowInternationalNumber" : { - "description" : "Indicates the it is configured to always format numbers using the international format. If set to false, numbers will be formatted in the national format.", - "type" : "boolean" - }, - "extensionEnabled" : { - "description" : "Indicates whether the extension is enabled for land-line phones", - "type" : "boolean" - }, - "smsEnabled" : { - "description" : "Indicates whether outbound SMS is enabled in Cyclos", - "type" : "boolean" - }, - "landLineExample" : { - "description" : "An example phone number for a land-line phone", - "type" : "string" - }, - "mobileExample" : { - "description" : "An example phone number for a mobile phone", - "type" : "string" - } - } - }, - "PhoneConfigurationForUserProfile" : { - "description" : "Contains extended phone configuration for a user profile", - "allOf" : [ { - "$ref" : "#/components/schemas/PhoneConfiguration" - }, { - "type" : "object", - "properties" : { - "mobilePhone" : { - "description" : "Contains a template with default values for a new mobile phone", - "allOf" : [ { - "$ref" : "#/components/schemas/PhoneNew" - } ] - }, - "landLinePhone" : { - "description" : "Contains a template the default values for a new land-line phone", - "allOf" : [ { - "$ref" : "#/components/schemas/PhoneNew" - } ] - }, - "edit" : { - "type" : "boolean", - "description" : "Can edit phones?" - }, - "managePrivacy" : { - "type" : "boolean", - "description" : "Can manage the privacy of phones?" - }, - "maxLandLines" : { - "type" : "integer", - "description" : "The maximum number of land-line phones the user can own" - }, - "maxMobiles" : { - "type" : "integer", - "description" : "The maximum number of mobile phones the user can own" - }, - "mobileAvailability" : { - "$ref" : "#/components/schemas/AvailabilityEnum" - }, - "landLineAvailability" : { - "$ref" : "#/components/schemas/AvailabilityEnum" - } - } - } ] - }, - "PhoneDataForEdit" : { - "description" : "Contains data for editing an existing phone", - "allOf" : [ { - "$ref" : "#/components/schemas/PhoneBasicData" - }, { - "type" : "object", - "properties" : { - "phone" : { - "description" : "The phone that is being edited. This value can be modified and sent back on `PUT /phones/{id}`.", - "allOf" : [ { - "$ref" : "#/components/schemas/PhoneEdit" - } ] - }, - "canEdit" : { - "type" : "boolean", - "description" : "Can the authenticated user edit this phone?" - }, - "canRemove" : { - "type" : "boolean", - "description" : "Can the authenticated user remove this phone?" - } - } - } ] - }, - "PhoneDataForNew" : { - "description" : "Contains data for creating a new phone", - "allOf" : [ { - "$ref" : "#/components/schemas/PhoneBasicData" - }, { - "type" : "object", - "properties" : { - "phone" : { - "description" : "The phone populated with the default fields. This value can be modified and sent back on `POST /{user}/phones`.", - "allOf" : [ { - "$ref" : "#/components/schemas/PhoneNew" - } ] - }, - "example" : { - "description" : "An example phone number", - "type" : "string" - } - } - } ] - }, - "PhoneEdit" : { - "description" : "Parameters for editing an existing phone", - "allOf" : [ { - "$ref" : "#/components/schemas/PhoneManage" - }, { - "type" : "object", - "properties" : { - "version" : { - "type" : "integer", - "description" : "The version stamp for the current object, used for optimistic locking. When saving, the same version as previously received needs to be passed back. If no one else has saved the object, the version will match and the object will be updated. However, if someone other has saved the object, the version will no longer match, and an error will be raised. This is used to prevent multiple users (or processes) from updating the same object and unwilingly overridding the property values, leading to data loss." - } - } - } ] - }, - "PhoneEditWithId" : { - "description" : "Parameters for editing an existing phone", - "allOf" : [ { - "$ref" : "#/components/schemas/PhoneEdit" - }, { - "type" : "object", - "properties" : { - "id" : { - "type" : "string", - "description" : "The internal entity identifier" - } - } - } ] - }, - "PhoneManage" : { - "description" : "Common fields for either creating or editing a phone", - "type" : "object", - "x-implements" : "IPhoneDetailed", - "x-abstract" : true, - "properties" : { - "name" : { - "type" : "string", - "description" : "The phone name" - }, - "number" : { - "type" : "string", - "description" : "The formatted number" - }, - "extension" : { - "type" : "string", - "description" : "The number extension, only for landLine phones, and is only used if the phone configuration states that extensions are enabled." - }, - "hidden" : { - "type" : "boolean", - "description" : "Indicates whether this phone is private / hidden for other users (`true`) or public / visible to all users (`false`)." - }, - "enabledForSms" : { - "type" : "boolean", - "description" : "Only applicable if this represents a mobile phone. Whether this mobile phone is enabled for SMS, both receiving notifications and sending SMS operations. Can only be set if the mobile phone is verified." - }, - "verified" : { - "type" : "boolean", - "description" : "Only applicable if this represents a mobile phone. Whether this mobile is verified. Can only be directly set by administrators. Regular users need to verify it." - } - } - }, - "PhoneNew" : { - "description" : "Parameters for creating a new phone", - "allOf" : [ { - "$ref" : "#/components/schemas/PhoneManage" - }, { - "type" : "object", - "properties" : { - "kind" : { - "$ref" : "#/components/schemas/PhoneKind" - } - } - } ] - }, - "PhoneResult" : { - "description" : "Data for a phone as returned on list", - "allOf" : [ { - "$ref" : "#/components/schemas/Phone" - }, { - "type" : "object", - "properties" : { - "verified" : { - "description" : "Indicates whether this phone is verified. Is only returned if `kind` is `mobile` and the authenticated user manages the owner of this phone.", - "type" : "boolean" - }, - "enabledForSms" : { - "description" : "Indicates whether this phone is verified and enabled for SMS. Is only returned if `kind` is `mobile` and the authenticated user manages the owner of this phone.", - "type" : "boolean" - }, - "hidden" : { - "description" : "Indicates whether this phone is hidden for other users. It always returns false if the authenticated user doesn't manage the owner of this phone.", - "type" : "boolean" - }, - "verificationCodeSendDate" : { - "description" : "The date the verification code was sent, if any. Is only returned if `kind` is `mobile` and the authenticated user manages the owner of this phone.", - "type" : "string", - "format" : "date-time" - } - } - } ] - }, - "PhoneView" : { - "description" : "Detailed information when viewing a phone", - "allOf" : [ { - "$ref" : "#/components/schemas/PhoneResult" - }, { - "type" : "object", - "x-implements" : "IPhoneDetailed", - "properties" : { - "user" : { - "description" : "The user which owns this phone", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "canEdit" : { - "description" : "Can the authenticated user edit / remove this phone?", - "type" : "boolean" - }, - "name" : { - "type" : "string", - "description" : "The phone name" - }, - "number" : { - "type" : "string", - "description" : "The formatted number" - }, - "extension" : { - "type" : "string", - "description" : "The number extension, only for landLine phones, and is only used if the phone configuration states that extensions are enabled." - }, - "hidden" : { - "type" : "boolean", - "description" : "Indicates whether this phone is private / hidden for other users (`true`) or public / visible to all users (`false`)." - }, - "enabledForSms" : { - "type" : "boolean", - "description" : "Only applicable if this represents a mobile phone. Whether this mobile phone is enabled for SMS, both receiving notifications and sending SMS operations. Can only be set if the mobile phone is verified." - }, - "verified" : { - "type" : "boolean", - "description" : "Only applicable if this represents a mobile phone. Whether this mobile is verified. Can only be directly set by administrators. Regular users need to verify it." - }, - "enablePrivacy" : { - "description" : "Indicates whether phone privacy can be used for this user", - "type" : "boolean" - } - } - } ] - }, - "PinInput" : { - "description" : "Contains all information for a PIN entry. PINs are always numeric.", - "type" : "object", - "properties" : { - "minLength" : { - "description" : "The minimum allowed PIN length", - "type" : "integer" - }, - "maxLength" : { - "description" : "The maximum allowed PIN length", - "type" : "integer" - } - } - }, - "PosError" : { - "description" : "Error when performing a POS operation", - "allOf" : [ { - "$ref" : "#/components/schemas/Error" - }, { - "type" : "object", - "properties" : { - "code" : { - "$ref" : "#/components/schemas/PosErrorCode" - } - } - } ] - }, - "PreselectedPeriod" : { - "description" : "Represents a pre-calculated date period", - "type" : "object", - "properties" : { - "defaultOption" : { - "description" : "Indicates whether this period should be pre-selected", - "type" : "boolean" - }, - "name" : { - "description" : "The period display name", - "type" : "string" - }, - "begin" : { - "description" : "The period begin date", - "type" : "string", - "format" : "date-time" - }, - "end" : { - "description" : "The period begin date", - "type" : "string", - "format" : "date-time" - } - } - }, - "Principal" : { - "description" : "Represents a user identification method of a user", - "type" : "object", - "properties" : { - "value" : { - "description" : "This is the value which is used to identify the user", - "type" : "string" - }, - "type" : { - "description" : "This is the type of the user identification which can be a token, profile field, etc", - "allOf" : [ { - "$ref" : "#/components/schemas/EntityReference" - } ] - } - } - }, - "PrincipalType" : { - "description" : "A reference to a principal type", - "allOf" : [ { - "$ref" : "#/components/schemas/InternalNamedEntity" - }, { - "type" : "object", - "properties" : { - "kind" : { - "$ref" : "#/components/schemas/PrincipalTypeKind" - } - } - } ] - }, - "PrincipalTypeInput" : { - "description" : "Definition on how a principal value can be entered by the user", - "allOf" : [ { - "$ref" : "#/components/schemas/PrincipalType" - }, { - "type" : "object", - "properties" : { - "customField" : { - "description" : "If this principal is based on a custom field, holds its definition", - "allOf" : [ { - "$ref" : "#/components/schemas/CustomFieldDetailed" - } ] - }, - "mask" : { - "description" : "If this principal is either a token or account number, holds the (optional) mask which clients can use to input the value.", - "type" : "string" - }, - "allowManualInput" : { - "description" : "Only returned if `kind` is `token`. Specifies if the principal type allows enter manually the token value.", - "type" : "boolean" - }, - "example" : { - "description" : "If this principal is mobile phone, holds an example number.", - "type" : "string" - }, - "tokenType" : { - "description" : "If this principal is a token, contains its type", - "allOf" : [ { - "$ref" : "#/components/schemas/TokenTypeEnum" - } ] - } - } - } ] - }, - "PrivacyControl" : { - "description" : "A privacy control definition", - "allOf" : [ { - "$ref" : "#/components/schemas/InternalNamedEntity" - }, { - "type" : "object", - "properties" : { - "fieldsAlwaysVisible" : { - "description" : "If true an admin having this control will see all fields", - "type" : "boolean" - }, - "informationText" : { - "description" : "A message about this control to be displayed to the user.", - "type" : "string" } - } - } ] - }, - "PrivacySettingsData" : { - "description" : "The privacy settings of a user with the information to edit it", - "type" : "object", - "properties" : { - "user" : { - "description" : "The privacy settings owner", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] }, - "enabled" : { - "description" : "Whether the privacy control is enabled or not for the owner", - "type" : "boolean" - }, - "canEdit" : { - "description" : "Can the authenticated user edit this privacy setting data?", - "type" : "boolean" - }, - "controlledFields" : { - "description" : "The profile fields defined in the configuration subject to privacy control.", - "type" : "array", - "items" : { - "type" : "string" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } } }, - "customFields" : { - "description" : "Detailed information for those custom fields included in the `controlledFields` list.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/CustomField" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } } }, - "availableControls" : { - "description" : "The available privacy controls (departments) that could be selected to put the fields under control.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PrivacyControl" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } } }, - "selectedControls" : { - "description" : "The internal name or id of the already selected controls.", - "type" : "array", - "items" : { - "type" : "string" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } } - } - } - }, - "PrivacySettingsParams" : { - "description" : "The parameters to save a privacy control", - "type" : "object", - "properties" : { - "enabled" : { - "description" : "If false the controlled fields in the configuration are not subject to privacy control. Otherwise only the `selectedControls` can view the user fields", - "type" : "boolean" }, - "selectedControls" : { - "description" : "The internal name or id of the controls that can view the user fields.", - "type" : "array", - "items" : { - "type" : "string" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } } } } - }, - "PrivacySettingsPermissions" : { - "description" : "Permissions regarding the privacy settings", - "type" : "object", - "properties" : { - "view" : { - "description" : "Can the current user view his own privacy settings?", - "type" : "boolean" + } + }, + "/invite": { + "post": { + "operationId": "sendInvitation", + "summary": "Sends invitation e-mails for external users.", + "description": "Sends invitation e-mails for external users.", + "parameters": [], + "tags": [ + "Invite" + ], + "security": [ + { + "basic": [] }, - "manage" : { - "description" : "Can the current user manage his own privacy settings?", - "type" : "boolean" + { + "session": [] + }, + { + "accessClient": [] } - } - }, - "ProcessDynamicDocument" : { - "description" : "Defines parameters used to process a dynamic document", - "type" : "object", - "properties" : { - "formFields" : { - "description" : "Holds the form field values, keyed by field internal name or id. The format of the value depends on the custom field type.", - "type" : "object", - "additionalProperties" : { - "type" : "string" + ], + "responses": { + "204": { + "description": "The invitation e-mails were sent" + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } } - } - } - }, - "Product" : { - "description" : "Reference to a product", - "allOf" : [ { - "$ref" : "#/components/schemas/InternalNamedEntity" - }, { - "type" : "object", - "properties" : { - "kind" : { - "$ref" : "#/components/schemas/ProductKind" + }, + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } } - } - } ] - }, - "ProductAssignmentLog" : { - "description" : "Information regarding a specific product assignment change", - "type" : "object", - "properties" : { - "by" : { - "$ref" : "#/components/schemas/User" }, - "product" : { - "$ref" : "#/components/schemas/Product" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } }, - "date" : { - "description" : "When the action was performed", - "type" : "string", - "format" : "date-time" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } + } }, - "action" : { - "$ref" : "#/components/schemas/ProductAssignmentActionEnum" - } - } - }, - "ProductWithUserAccount" : { - "description" : "Reference to a product, together with the related user account", - "allOf" : [ { - "$ref" : "#/components/schemas/Product" - }, { - "type" : "object", - "properties" : { - "userAccount" : { - "$ref" : "#/components/schemas/AccountType" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } } } - } ] - }, - "ProfileFieldActions" : { - "description" : "Determines the allowed actions over a given profile field", - "type" : "object", - "properties" : { - "edit" : { - "type" : "boolean", - "description" : "Can the authenticated user edit this field?" - }, - "managePrivacy" : { - "type" : "boolean", - "description" : "Can the authenticated user manage the privacy for this field?" + }, + "requestBody": { + "description": "The invitation details.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SendInvitation" + } + } } } - }, - "QueryFilters" : { - "description" : "Base definitions for objects used as filters for queries", - "x-abstract" : true, - "type" : "object", - "properties" : { - "page" : { - "type" : "integer", - "description" : "The page number (zero-based) of the search. The default value is zero." - }, - "pageSize" : { - "type" : "integer", - "description" : "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting." - }, - "skipTotalCount" : { - "type" : "boolean", - "description" : "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit." + } + }, + "/imported-files/{context}/data-for-search": { + "parameters": [ + { + "name": "context", + "in": "path", + "required": true, + "description": "The context over which imports will be searched", + "schema": { + "$ref": "#/components/schemas/GeneralImportedFileContextEnum" } } - }, - "Receipt" : { - "description" : "Structured data to be sent to a receipt printer", - "type" : "object", - "properties" : { - "timestamp" : { - "description" : "When returned, the given timestamp is printed before the header.", - "type" : "string", - "format" : "date-time" - }, - "header" : { - "description" : "A text to be shown before the title. By default the text is normal size, normal style, left-alienged, and a line break is printed afterwards.", - "allOf" : [ { - "$ref" : "#/components/schemas/ReceiptPart" - } ] + ], + "get": { + "operationId": "getGeneralImportedFilesDataForSearch", + "summary": "Returns data for searching imported files.", + "description": "Returns data for searching imported files.", + "tags": [ + "Imports" + ], + "security": [ + { + "basic": [] }, - "title" : { - "description" : "The receipt title, shown below the header and before the items. By default the text is normal size, bold, centered, and a line break is printed afterwards.", - "allOf" : [ { - "$ref" : "#/components/schemas/ReceiptPart" - } ] - }, - "items" : { - "description" : "The main content of the receipt. Contains a list of items.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ReceiptItem" - } + { + "session": [] }, - "footer" : { - "description" : "A text to be shown after the items. By default the text is normal size, normal style, left-alienged, and a line break is printed afterwards.", - "allOf" : [ { - "$ref" : "#/components/schemas/ReceiptPart" - } ] - }, - "labelSuffix" : { - "description" : "When the items have label, is the suffix appended to each label. Defaults to `: `.", - "type" : "string" - }, - "autoPrint" : { - "description" : "Should the mobile application print the receipt as soon as the custom operation result is displayed? Defaults to false.", - "type" : "boolean" - } - } - }, - "ReceiptItem" : { - "description" : "An item in the main section of a receipt.", - "allOf" : [ { - "$ref" : "#/components/schemas/ReceiptPart" - }, { - "type" : "object", - "properties" : { - "label" : { - "description" : "When set, this item is handled as a field, printing a left-aligned label and a right-aligned value. In this case, the following attributes are ignored: `align`, `width` and `height`.", - "type" : "string" - }, - "labelStyle" : { - "description" : "The label font style. Defaults to bold. Not returned when there is no label.", - "allOf" : [ { - "$ref" : "#/components/schemas/ReceiptPartStyleEnum" - } ] - } - } - } ] - }, - "ReceiptPart" : { - "description" : "A generic part of data to be printed in a receipt printer", - "type" : "object", - "properties" : { - "text" : { - "description" : "The text contained in the part", - "type" : "string" - }, - "style" : { - "description" : "The font style. The default value depends on the section:\n\n- Header and items are `normal`; - Title and footer are `bold`.", - "allOf" : [ { - "$ref" : "#/components/schemas/ReceiptPartStyleEnum" - } ] - }, - "align" : { - "description" : "The text align. The default value depends on the section:\n\n- Header and items are `left`; - Title and footer are `center`.\n\nNot returned for items with a label.", - "allOf" : [ { - "$ref" : "#/components/schemas/ReceiptPartAlignEnum" - } ] - }, - "width" : { - "description" : "The font width. The default is `normal`. Not returned for items with a label.", - "allOf" : [ { - "$ref" : "#/components/schemas/ReceiptPartSizeEnum" - } ] - }, - "height" : { - "description" : "The font height. The default value depends on the section:\n\n- Title is `double`; - Others are `normal`.\n\nNot returned for items with a label.", - "allOf" : [ { - "$ref" : "#/components/schemas/ReceiptPartSizeEnum" - } ] - }, - "lineBefore" : { - "description" : "Should a line be printed before the text? By default, is true on footer, false on others.", - "type" : "boolean" - }, - "lineAfter" : { - "description" : "Should a line be printed after the text? By default, is true on footer, false on others.", - "type" : "boolean" - } - } - }, - "Record" : { - "description" : "A custom record is a structured data stored either for a user or for system (a general record, unrelated to a user).", - "allOf" : [ { - "$ref" : "#/components/schemas/Entity" - }, { - "type" : "object", - "properties" : { - "display" : { - "type" : "string", - "description" : "The descriptive text for this record, according to the record type configuration in Cyclos" - }, - "kind" : { - "$ref" : "#/components/schemas/RecordKind" - } + { + "accessClient": [] } - } ] - }, - "RecordBasePermissions" : { - "description" : "Basic definitions shared by `OwnerRecordPermissions` and `BaseRecordDataForSearch`", - "type" : "object", - "properties" : { - "type" : { - "$ref" : "#/components/schemas/RecordType" - }, - "create" : { - "description" : "Can the authenticated user create new records of this type?", - "type" : "boolean" - }, - "edit" : { - "description" : "Can the authenticated user edit records of this type?", - "type" : "boolean" - }, - "remove" : { - "description" : "Can the authenticated user remove records of this type?", - "type" : "boolean" + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" } - } - }, - "RecordBasicData" : { - "description" : "Contains data shared by both RecordDataForNew and RecordDataForEdit", - "type" : "object", - "x-abstract" : true, - "properties" : { - "type" : { - "$ref" : "#/components/schemas/RecordTypeDetailed" - }, - "fields" : { - "description" : "The record custom fields (either defined within this record type or shared fields linked with this record type)", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/RecordCustomFieldDetailed" + ], + "responses": { + "200": { + "description": "The data for searching imports", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ImportedFileDataForSearch" + } + } } }, - "user" : { - "description" : "The record owner user. Only returned if `kind` is `user`.", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "kind" : { - "$ref" : "#/components/schemas/RecordKind" - } - } - }, - "RecordCustomField" : { - "description" : "Adds to `CustomField` some record-specific definitions", - "allOf" : [ { - "$ref" : "#/components/schemas/CustomField" - }, { - "type" : "object", - "properties" : { - "section" : { - "description" : "The record fields section", - "allOf" : [ { - "$ref" : "#/components/schemas/EntityReference" - } ] - }, - "colspan" : { - "description" : "The number of columns this field spans", - "type" : "integer" - } - } - } ] - }, - "RecordCustomFieldDetailed" : { - "description" : "Adds to `CustomFieldDetailed` some record-specific definitions", - "allOf" : [ { - "$ref" : "#/components/schemas/CustomFieldDetailed" - }, { - "type" : "object", - "properties" : { - "section" : { - "description" : "The record fields section", - "allOf" : [ { - "$ref" : "#/components/schemas/EntityReference" - } ] - }, - "colspan" : { - "description" : "The number of columns this field spans", - "type" : "integer" - } - } - } ] - }, - "RecordCustomFieldValue" : { - "description" : "Adds to `CustomFieldValue` the section where this field should be shown", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseCustomFieldValue" - }, { - "type" : "object", - "properties" : { - "field" : { - "description" : "The custom field reference", - "allOf" : [ { - "$ref" : "#/components/schemas/RecordCustomField" - } ] - } - } - } ] - }, - "RecordDataForEdit" : { - "description" : "Contains data for editing an existing record", - "allOf" : [ { - "$ref" : "#/components/schemas/RecordBasicData" - }, { - "type" : "object", - "properties" : { - "canEdit" : { - "description" : "Can the authenticated user edit records of this type?", - "type" : "boolean" - }, - "canRemove" : { - "description" : "Can the authenticated user remove records of this type?", - "type" : "boolean" - }, - "editableFields" : { - "description" : "The internal names of fields that can be edited", - "type" : "array", - "items" : { - "type" : "string" - } - }, - "record" : { - "description" : "The record that is being edited. This value can be modified and sent back to `PUT /records/{id}`", - "allOf" : [ { - "$ref" : "#/components/schemas/RecordEdit" - } ] - }, - "binaryValues" : { - "description" : "Holds the current values for file / image custom fields as lists of `StoredFile`s / `Image`s.", - "allOf" : [ { - "$ref" : "#/components/schemas/CustomFieldBinaryValues" - } ] - } - } - } ] - }, - "RecordDataForNew" : { - "description" : "Contains data for creating a new record", - "allOf" : [ { - "$ref" : "#/components/schemas/RecordBasicData" - }, { - "type" : "object", - "properties" : { - "record" : { - "description" : "The record populated with the default fields. This value can be modified and sent back to `POST /{owner}/records/{type}`.", - "allOf" : [ { - "$ref" : "#/components/schemas/RecordNew" - } ] - } - } - } ] - }, - "RecordDataForSearch" : { - "description" : "Data for searching records of a specific owner and type", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseRecordDataForSearch" - }, { - "type" : "object", - "properties" : { - "user" : { - "description" : "The records owner. Only returned if is not system.", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "hideKeywordsSearch" : { - "description" : "Whether the keywords search filter should be hidden. Only returned if is not system.", - "type" : "boolean" - }, - "query" : { - "description" : "Default query filters for searching records", - "allOf" : [ { - "$ref" : "#/components/schemas/RecordQueryFilters" - } ] - } - } - } ] - }, - "RecordEdit" : { - "description" : "Parameters for editing an existing record", - "allOf" : [ { - "$ref" : "#/components/schemas/RecordManage" - }, { - "type" : "object", - "properties" : { - "version" : { - "type" : "integer", - "description" : "The version stamp for the current object, used for optimistic locking. When saving, the same version as previously received needs to be passed back. If no one else has saved the object, the version will match and the object will be updated. However, if someone other has saved the object, the version will no longer match, and an error will be raised. This is used to prevent multiple users (or processes) from updating the same object and unwilingly overridding the property values, leading to data loss." - } - } - } ] - }, - "RecordManage" : { - "description" : "Common fields for either creating or editing a record", - "type" : "object", - "x-abstract" : true, - "properties" : { - "customValues" : { - "type" : "object", - "description" : "Holds the custom field values, keyed by field internal name or id. The format of the value depends on the custom field type. Example: `{..., \"customValues\": {\"gender\": \"male\", \"birthDate\": \"1980-10-27\"}}`", - "additionalProperties" : { - "type" : "string" - } - } - } - }, - "RecordNew" : { - "description" : "Parameters for creating a new record", - "allOf" : [ { - "$ref" : "#/components/schemas/RecordManage" - }, { - "type" : "object" - } ] - }, - "RecordPermissions" : { - "description" : "Permissions over own records of a given type", - "allOf" : [ { - "$ref" : "#/components/schemas/RecordBasePermissions" - }, { - "type" : "object", - "properties" : { - "singleRecordId" : { - "description" : "If this record type layout is single, and the record exists, contains its identifier", - "type" : "string" - } - } - } ] - }, - "RecordQueryFilters" : { - "description" : "Query filters for records", - "allOf" : [ { - "$ref" : "#/components/schemas/FullTextQueryFilters" - }, { - "type" : "object", - "properties" : { - "customFields" : { - "type" : "array", - "items" : { - "type" : "string" - }, - "description" : "Record custom field values used as filters. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by : (colon). For example, `customFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, customFields=field1:valueA|valueB. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `customFields=tradeType:offer|search,extraDate:2000-01-01|2001-12-31` would match results whose custom field with internal name `tradeType` is either `offer` or `search`, and whose `extraDate` is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `customFields=extraDate:|2001-12-31`.\nA note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `customFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `customFields=dynamic:'business`." - }, - "creationPeriod" : { - "description" : "The minimum / maximum record creation date", - "type" : "array", - "items" : { - "type" : "string", - "format" : "date-time" - } - }, - "createdBy" : { - "description" : "Either the id or identifier of the user that created the record", - "type" : "string" - } - } - } ] - }, - "RecordResult" : { - "description" : "Contains data returned when searching for records", - "allOf" : [ { - "$ref" : "#/components/schemas/Record" - }, { - "type" : "object", - "properties" : { - "creationDate" : { - "description" : "The record creation date", - "type" : "string", - "format" : "date-time" - }, - "createdBy" : { - "$ref" : "#/components/schemas/User" - }, - "lastModificationDate" : { - "description" : "The record last modification date", - "type" : "string", - "format" : "date-time" - }, - "lastModifiedBy" : { - "$ref" : "#/components/schemas/User" - }, - "customValues" : { - "type" : "object", - "description" : "Holds the values for custom record fields, keyed by field internal name", - "additionalProperties" : { - "type" : "string" - } - } - } - } ] - }, - "RecordSection" : { - "description" : "Details for a section of fields in a record type", - "allOf" : [ { - "$ref" : "#/components/schemas/FieldSection" - }, { - "type" : "object", - "properties" : { - "fields" : { - "description" : "The internal names of the custom fields which are part of this section.", - "type" : "array", - "items" : { - "type" : "string" - } - } - } - } ] - }, - "RecordType" : { - "description" : "Contains definitions for a record type", - "allOf" : [ { - "$ref" : "#/components/schemas/InternalNamedEntity" - }, { - "type" : "object", - "properties" : { - "pluralName" : { - "description" : "The name for the plural form", - "type" : "string" - }, - "svgIcon" : { - "description" : "The name of the SVG icon. The content of the icon can be obtained with `GET /images/svg/{name}.svg`", - "type" : "string" - }, - "useViewPage" : { - "description" : "Whether the record type is set to use a separated view / edit page", - "type" : "boolean" - }, - "layout" : { - "$ref" : "#/components/schemas/RecordLayoutEnum" - }, - "adminMenu" : { - "description" : "In which administration menu the record type shows up. Only returned for system record types.", - "allOf" : [ { - "$ref" : "#/components/schemas/AdminMenuEnum" - } ] - }, - "userMenu" : { - "description" : "In which user menu the record type shows up. Only returned for user record types.", - "allOf" : [ { - "$ref" : "#/components/schemas/UserMenuEnum" - } ] - }, - "userProfileSection" : { - "description" : "In which user profile section the record type shows up. Only returned for user record types.", - "allOf" : [ { - "$ref" : "#/components/schemas/UserProfileSectionEnum" - } ] - } - } - } ] - }, - "RecordTypeDetailed" : { - "description" : "A record type with more information for its records", - "allOf" : [ { - "$ref" : "#/components/schemas/RecordType" - }, { - "type" : "object", - "properties" : { - "fieldColumns" : { - "description" : "The number of columns which should be used to layout fields", - "type" : "integer" - }, - "nowrapLabels" : { - "description" : "Indicates whether labels in the form should be prevented from wrapping lines", - "type" : "boolean" - }, - "informationText" : { - "description" : "An informative text that should be shown in the form. The text is formatted in HTML.", - "type" : "string" - }, - "sections" : { - "description" : "The field sections in this record type", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/RecordSection" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } } } - } - } ] - }, - "RecordView" : { - "description" : "Detailed information when viewing a record", - "allOf" : [ { - "$ref" : "#/components/schemas/Record" - }, { - "type" : "object", - "properties" : { - "type" : { - "$ref" : "#/components/schemas/RecordTypeDetailed" - }, - "user" : { - "description" : "The user which owns this record, only returned if `kind` is `user`", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "creationDate" : { - "description" : "The record creation date", - "type" : "string", - "format" : "date-time" - }, - "createdBy" : { - "$ref" : "#/components/schemas/User" - }, - "lastModificationDate" : { - "description" : "The record last modification date", - "type" : "string", - "format" : "date-time" - }, - "lastModifiedBy" : { - "$ref" : "#/components/schemas/User" - }, - "customValues" : { - "description" : "The list of custom field values this record has", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/RecordCustomFieldValue" - } - }, - "canEdit" : { - "description" : "Can the authenticated user edit this record?", - "type" : "boolean" - }, - "canRemove" : { - "description" : "Can the authenticated user remove this record?", - "type" : "boolean" - }, - "operations" : { - "description" : "List of runnable custom operations.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Operation" + }, + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } } } - } - } ] - }, - "RecordWithOwnerResult" : { - "description" : "Results for a shared record search, containing the owner user as well", - "allOf" : [ { - "$ref" : "#/components/schemas/RecordResult" - }, { - "type" : "object", - "properties" : { - "user" : { - "description" : "The record owner", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] + }, + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } } - } - } ] - }, - "RecordsPermissions" : { - "description" : "Permissions over own or system records", - "type" : "object", - "properties" : { - "user" : { - "description" : "Permissions over each visible own user record type.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/RecordPermissions" - } - }, - "userManagement" : { - "description" : "Permissions over each visible user record type of managed users.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/RecordPermissions" + }, + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } } }, - "system" : { - "description" : "Permissions over each visible system record type.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/RecordPermissions" - } - } - } - }, - "RecurringPaymentDataForEdit" : { - "description" : "Contains data for editing a recurring payment", - "type" : "object", - "properties" : { - "originalRecurringPayment" : { - "description" : "The original recurring payment being edited", - "allOf" : [ { - "$ref" : "#/components/schemas/Transaction" - } ] - }, - "recurringPayment" : { - "description" : "The recurring payment edition. This value can be modified and sent back on `PUT /recurring-payments/{key}/modify`.", - "allOf" : [ { - "$ref" : "#/components/schemas/RecurringPaymentEdit" - } ] - }, - "canEdit" : { - "type" : "boolean", - "description" : "Can the authenticated user edit this recurring payment?" - }, - "confirmationPasswordInput" : { - "description" : "If a confirmation password is used, contains the definitions on how to request that password from the user. This confirmation password is required when performing sensible actions. Sometimes this is dynamic, for example, the confirmation might be configured to be used only once per session, or operations like payments may have a limit per day to be without confirmation (pinless).", - "allOf" : [ { - "$ref" : "#/components/schemas/PasswordInput" - } ] - } - } - }, - "RecurringPaymentEdit" : { - "description" : "Parameters for editing an existing recurring payment", - "type" : "object", - "properties" : { - "occurrencesCount" : { - "description" : "Represents the number of occurrences in a recurring payment. When not provided, the payment will be repeated until it is manually canceled. Used only if `scheduling` is `recurring`.", - "type" : "integer", - "minimum" : 1 - }, - "firstOccurrenceDate" : { - "description" : "Represents the first occurrence date for a recurring payment. If none is given, it is assumed that the first occurrence is immediate. Used only if `scheduling` is `recurring`.", - "type" : "string", - "format" : "date-time" - }, - "occurrenceInterval" : { - "description" : "Defines the interval between payment occurrences. If none is given, it is assumed 1 month between occurrences. Used only if `scheduling` is `recurring`.", - "allOf" : [ { - "$ref" : "#/components/schemas/TimeInterval" - } ] - }, - "version" : { - "type" : "integer", - "description" : "The version stamp for the current object, used for optimistic locking. When saving, the same version as previously received needs to be passed back. If no one else has saved the object, the version will match and the object will be updated. However, if someone other has saved the object, the version will no longer match, and an error will be raised. This is used to prevent multiple users (or processes) from updating the same object and unwilingly overridding the property values, leading to data loss." - } - } - }, - "RecurringPaymentPermissions" : { - "description" : "Permissions the user has over a recurring payment", - "type" : "object", - "properties" : { - "cancel" : { - "description" : "Can cancel the recurring payment?", - "type" : "boolean" - }, - "block" : { - "description" : "Can block the recurring payment?", - "type" : "boolean" - }, - "unblock" : { - "description" : "Can unblock the recurring payment?", - "type" : "boolean" - }, - "edit" : { - "description" : "Can edit the recurring payment?", - "type" : "boolean" - } - } - }, - "RecurringPaymentsPermissions" : { - "description" : "Permissions over own recurring payments", - "allOf" : [ { - "$ref" : "#/components/schemas/RecurringPaymentPermissions" - }, { - "type" : "object", - "properties" : { - "view" : { - "description" : "Can view recurring payments?", - "type" : "boolean" - } - } - } ] - }, - "RedeemVoucher" : { - "description" : "Parameters to redeem a voucher", - "allOf" : [ { - "$ref" : "#/components/schemas/PerformVoucherTransaction" - }, { - "type" : "object", - "properties" : { - "pin" : { - "description" : "The voucher PIN. The definition on whether a PIN is used is in the voucher type. When needed, must be passed in. Otherwise is ignored.", - "type" : "string" - } - } - } ] - }, - "RedeemVoucherError" : { - "description" : "Error when redeeming a voucher", - "allOf" : [ { - "$ref" : "#/components/schemas/Error" - }, { - "type" : "object", - "properties" : { - "redeemAfterDate" : { - "description" : "Indicates the date after which this voucher can be redeemed. Only if `code` is `notAllowedYet`.", - "type" : "string", - "format" : "date-time" - }, - "paymentError" : { - "description" : "The `PaymentError` generated when the voucher payment was being created. Only if `code` is `payment`.", - "allOf" : [ { - "$ref" : "#/components/schemas/PaymentError" - } ] - }, - "code" : { - "$ref" : "#/components/schemas/RedeemVoucherErrorCode" - }, - "voucherStatus" : { - "description" : "Only if `code` is `notAllowedForVoucher`", - "allOf" : [ { - "$ref" : "#/components/schemas/VoucherStatusEnum" - } ] - }, - "allowedDays" : { - "description" : "Only if `code` is `notAllowedToday`", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/WeekDayEnum" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } } - }, - "balance" : { - "description" : "Only if `code` is `insufficientBalance` and the voucher has a fixed amount (doesn't allows multiple top-ups, i.e., works like a wallet).", - "type" : "string", - "format" : "number" - }, - "currency" : { - "description" : "Only returned if `balance` is returned.", - "allOf" : [ { - "$ref" : "#/components/schemas/Currency" - } ] - } - } - } ] - }, - "Reference" : { - "description" : "A general reference between 2 users or payment feedback", - "allOf" : [ { - "$ref" : "#/components/schemas/Entity" - }, { - "type" : "object", - "properties" : { - "date" : { - "description" : "The date the reference/payment feedback was set", - "type" : "string", - "format" : "date-time" - }, - "level" : { - "$ref" : "#/components/schemas/ReferenceLevelEnum" - }, - "comments" : { - "description" : "The reference/payment feedback comments", - "type" : "string" - } - } - } ] - }, - "ReferenceDataForSet" : { - "description" : "Configuration data for setting a reference", - "type" : "object", - "properties" : { - "from" : { - "description" : "The user that gave the reference", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "to" : { - "description" : "The user that received the reference", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "reference" : { - "description" : "The object that should be edited and posted back", - "allOf" : [ { - "$ref" : "#/components/schemas/ReferenceSet" - } ] - }, - "date" : { - "description" : "The date when the reference was given", - "type" : "string", - "format" : "date-time" - } - } - }, - "ReferencePeriodStatistics" : { - "description" : "Statistics for received or given references in a given period", - "type" : "object", - "properties" : { - "period" : { - "description" : "The date period ranges. Null when the results are for all time.", - "allOf" : [ { - "$ref" : "#/components/schemas/DatePeriod" - } ] - }, - "total" : { - "type" : "integer", - "description" : "The total number of accounted references." - }, - "totalNegative" : { - "description" : "The total number of accounted `bad` or `veryBad` references.", - "type" : "integer" - }, - "totalPositive" : { - "description" : "The total number of accounted `good` or `veryGood` references.", - "type" : "integer" - }, - "counts" : { - "description" : "References count per level.", - "type" : "object", - "additionalProperties" : { - "type" : "integer" - } - }, - "score" : { - "type" : "number", - "format" : "float", - "description" : "The score is a value from 1 to 5 which contains the average score when counting all levels. Each reference level has a score:\n\n- `veryBad`: 1;\n- `bad`: 2;\n- `neutral`: 3;\n- `good`: 4;\n- `veryGood`: 5.\n\nThe score will be 0 when there are no references." - } - } - }, - "ReferenceSet" : { - "description" : "Parameters for setting a reference value. When modifying an existing reference, the `version` field must be passed in with the correct value, as returned in `GET /{from}/reference/{to}/data-for-set`.", - "type" : "object", - "properties" : { - "level" : { - "$ref" : "#/components/schemas/ReferenceLevelEnum" - }, - "comments" : { - "description" : "Comments for this reference", - "type" : "string" - }, - "version" : { - "type" : "integer", - "description" : "The version stamp for the current object, used for optimistic locking. When saving, the same version as previously received needs to be passed back. If no one else has saved the object, the version will match and the object will be updated. However, if someone other has saved the object, the version will no longer match, and an error will be raised. This is used to prevent multiple users (or processes) from updating the same object and unwilingly overridding the property values, leading to data loss." - } - } - }, - "ReferenceStatistics" : { - "description" : "Statistics for received or given references", - "type" : "object", - "properties" : { - "user" : { - "$ref" : "#/components/schemas/User" - }, - "periods" : { - "description" : "For each requested period, contains corresponding statistics", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ReferencePeriodStatistics" } } } - }, - "ReferenceView" : { - "description" : "Details of a reference", - "allOf" : [ { - "$ref" : "#/components/schemas/Reference" - }, { - "type" : "object", - "properties" : { - "from" : { - "description" : "The user that gave the reference", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "to" : { - "description" : "The user that received the reference", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] + } + }, + "/imported-files/{context}": { + "parameters": [ + { + "name": "context", + "in": "path", + "required": true, + "description": "The context over which imports will be searched", + "schema": { + "$ref": "#/components/schemas/GeneralImportedFileContextEnum" + } + } + ], + "get": { + "operationId": "searchGeneralImportedFiles", + "summary": "Searches for general imported files.", + "description": "Returns a list with matching imported files.", + "tags": [ + "Imports" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "creationPeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum creation date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "kinds", + "in": "query", + "required": false, + "description": "The kinds to filter", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImportedFileKind" + } + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number (zero-based) of the search. The default value is zero.", + "schema": { + "type": "integer" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", + "schema": { + "type": "integer" + } + }, + { + "name": "skipTotalCount", + "in": "query", + "required": false, + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", + "schema": { + "type": "boolean" + } + }, + { + "name": "statuses", + "in": "query", + "required": false, + "description": "The statuses to filter", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImportedFileStatusEnum" + } + } + } + ], + "responses": { + "200": { + "description": "The imports which match the criteria", + "headers": { + "X-Total-Count": { + "schema": { + "type": "integer" + }, + "description": "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." + }, + "X-Page-Size": { + "schema": { + "type": "integer" + }, + "description": "The maximum number of results per page" + }, + "X-Current-Page": { + "schema": { + "type": "integer" + }, + "description": "The current page the results are in" + }, + "X-Has-Next-Page": { + "schema": { + "type": "boolean" + }, + "description": "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." + } }, - "canEdit" : { - "description" : "Can the authenticated user edit this reference?", - "type" : "boolean" - } - } - } ] - }, - "ReferencesPermissions" : { - "description" : "Permissions over general user references", - "type" : "object", - "properties" : { - "view" : { - "description" : "Can view other user's references?", - "type" : "boolean" - }, - "give" : { - "description" : "Can give references?", - "type" : "boolean" - }, - "receive" : { - "description" : "Can receive references?", - "type" : "boolean" - } - } - }, - "RejectOrder" : { - "description" : "Parameters used to reject an order by the authenticated user.", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseOrderAction" - }, { - "type" : "object" - } ] - }, - "RelatedTransferType" : { - "description" : "A transfer type related to an account point-of-view", - "allOf" : [ { - "$ref" : "#/components/schemas/InternalNamedEntity" - }, { - "type" : "object", - "properties" : { - "related" : { - "description" : "Reference to the related account type", - "allOf" : [ { - "$ref" : "#/components/schemas/EntityReference" - } ] - } - } - } ] - }, - "RemoveFcmTokenParams" : { - "description" : "Parameters for removing a FCM token.", - "type" : "object", - "properties" : { - "token" : { - "description" : "The FCM registration token", - "type" : "string" - }, - "users" : { - "description" : "The user identifiers which the token will be removed from.", - "type" : "array", - "items" : { - "type" : "string" - } - } - } - }, - "RepliedMessage" : { - "description" : "Contains data about a replied message.", - "type" : "object", - "properties" : { - "subject" : { - "description" : "The subject of the incoming message.", - "type" : "string" - }, - "body" : { - "description" : "The body of the incoming message.", - "type" : "string" - }, - "date" : { - "description" : "The date of the incoming message.", - "type" : "string", - "format" : "date-time" - }, - "from" : { - "description" : "The user or system who sent the message.", - "$ref" : "#/components/schemas/User" - } - } - }, - "ReplyMessage" : { - "description" : "Contains data for a message reply", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseSendMessage" - }, { - "type" : "object" - } ] - }, - "ResendActivationCodeRequest" : { - "description" : "Parameters for sending a device activation code.", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseActivationCodeRequest" - }, { - "type" : "object" - } ] - }, - "RunOperation" : { - "description" : "Defines parameters used to run a custom operation", - "type" : "object", - "properties" : { - "formParameters" : { - "description" : "Holds the form field values, keyed by field internal name or id. The format of the value depends on the custom field type.", - "type" : "object", - "additionalProperties" : { - "type" : "string" - } - }, - "confirmationPassword" : { - "description" : "If the custom operation requires confirmation password, the `OperationDataForRun.confirmationPasswordInput` will contain the data for inputting the confirmation password. When such value is present, the password value should be provided in this property.", - "type" : "string" - }, - "scannedQrCode" : { - "description" : "When the operation's `submitWithQrCodeScan` is true. Is the value which was scanned when submitting the operation.", - "type" : "string" - }, - "page" : { - "description" : "When running a custom operation with `resultType` = `resultPage`, determines the current page offset. Whether this is implemented depends on the script code itself.", - "type" : "integer" - }, - "pageSize" : { - "description" : "When running a custom operation with `resultType` = `resultPage`, determines the number of results per page. Whether this is implemented depends on the script code itself.", - "type" : "integer" - }, - "skipTotalCount" : { - "description" : "When running a custom operation with `resultType` = `resultPage`, when set to true will ignre the total count when searching. Of course, it should be honored by the script implementing the query in order to make effect.", - "type" : "boolean" - }, - "exportFormat" : { - "description" : "Only when running a custom operation with `resultType` = `resultPage`. Is the internal name of the format to export the results. If unset will not generate a file, but return the result data.", - "type" : "string" - } - } - }, - "RunOperationAction" : { - "description" : "Describes an action that can be executed after running an operation.", - "type" : "object", - "properties" : { - "action" : { - "description" : "The custom operation that executes this action", - "allOf" : [ { - "$ref" : "#/components/schemas/Operation" - } ] - }, - "parameters" : { - "description" : "The parameters that should be sent back when executing this action", - "type" : "object", - "additionalProperties" : { - "type" : "string" + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImportedFileResult" + } + } + } } }, - "primary" : { - "description" : "Indicates whether this action is a primary one.", - "type" : "boolean" - } - } - }, - "RunOperationResult" : { - "description" : "Defines what is returned when a custom operation is executed. The actual property that are filled depend on the `resultType` property. Not returned when the `resultType` is file. In that case, the response content will be the file content", - "type" : "object", - "properties" : { - "title" : { - "description" : "The text title. May be returned only if `resultType` is either `plainText`, `richText` or `resultPage`.", - "type" : "string" - }, - "content" : { - "description" : "The execution result content. Only returned if `resultType` is either `plainText` or `richText`.", - "type" : "string" - }, - "notification" : { - "description" : "The execution result as string that should be shown as a notification. Only returned if `resultType` is `notification`.", - "type" : "string" - }, - "url" : { - "description" : "The execution result as an URL, to which the client should be redirected. Only returned if `resultType` is either `externalRedirect` or `url`.", - "type" : "string" - }, - "backTo" : { - "description" : "Either the id or internal name of the custom operation to go back after run the operation.", - "allOf" : [ { - "$ref" : "#/components/schemas/EntityReference" - } ] - }, - "backToRoot" : { - "description" : "A boolean value indicating if the client application must go back to the page that originated the custom operation executions.", - "type" : "boolean" - }, - "reRun" : { - "description" : "A boolean value indicating if the custom operation we went back to or the current action container operation must be re-run before display it.", - "type" : "boolean" - }, - "autoRunActionId" : { - "description" : "If it is present, it indicates the id of the action that should be executed automatically.", - "type" : "string" - }, - "columns" : { - "description" : "Contains the definitions for each column in the result. Only returned if `resultType` is `resultPage`.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/RunOperationResultColumn" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } } }, - "rows" : { - "description" : "Each row is an object containing the cells for that row, keyed by each column's `property`. Only returned if `resultType` is `resultPage`.", - "type" : "array", - "items" : { - "type" : "object", - "additionalProperties" : true + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } } }, - "actions" : { - "description" : "Actions are other internal custom operations that can be executed from this custom operation. The returned parameters should be passed to the server when running this action.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/RunOperationAction" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } } }, - "resultType" : { - "$ref" : "#/components/schemas/OperationResultTypeEnum" - }, - "notificationLevel" : { - "description" : "Only returned if `resultType` is `notification`.", - "allOf" : [ { - "$ref" : "#/components/schemas/NotificationLevelEnum" - } ] - }, - "receipt" : { - "description" : "When returned, contains the structured data that should be printed via a receipt printer", - "allOf" : [ { - "$ref" : "#/components/schemas/Receipt" - } ] - } - } - }, - "RunOperationResultColumn" : { - "description" : "A column definition when the result type is `resultPage`.", - "type" : "object", - "properties" : { - "header" : { - "description" : "The column header text", - "type" : "string" - }, - "property" : { - "description" : "Contains the property name for each row element to access this column value.", - "type" : "string" - }, - "type" : { - "$ref" : "#/components/schemas/RunOperationResultColumnTypeEnum" - }, - "align" : { - "description" : "The horizontal alignment. The actual values depend on the semantics of both the script result and the client application.", - "type" : "string" - }, - "decimalDigits" : { - "description" : "The number of decimal digits (scale) to format numbers. -1 represents variable scale. Only if `type` is `number`.", - "type" : "integer" - }, - "valign" : { - "description" : "The vertical alignment. The actual values depend on the semantics of both the script result and the client application.", - "type" : "string" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } + } }, - "width" : { - "description" : "The column width. The actual values depend on the semantics of both the script result and the client application.", - "type" : "string" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } } } - }, - "SaveUserAccountVisibilityAsVisibleParams" : { - "description" : "Parameters for saving he account visibility of a user", - "type" : "object", - "properties" : { - "accounts" : { - "description" : "Either the ids or internal names of account types the user want to be visible. All non-included accounts will be hidden.", - "type" : "array", - "items" : { - "type" : "string" - } + } + }, + "/{user}/imported-files/{context}/data-for-search": { + "parameters": [ + { + "$ref": "#/components/parameters/user" + }, + { + "name": "context", + "in": "path", + "required": true, + "description": "The context over which imports will be searched", + "schema": { + "$ref": "#/components/schemas/UserImportedFileContextEnum" } } - }, - "ScheduledPaymentPermissions" : { - "description" : "Permissions the user has over a scheduled payment", - "type" : "object", - "properties" : { - "block" : { - "description" : "Can block the whole scheduled payment?", - "type" : "boolean" - }, - "unblock" : { - "description" : "Can unblock the whole scheduled payment?", - "type" : "boolean" + ], + "get": { + "operationId": "getUserImportedFilesDataForSearch", + "summary": "Returns data for searching imported files of a user.", + "description": "Returns data for searching imported files of a user.", + "tags": [ + "Imports" + ], + "security": [ + { + "basic": [] }, - "cancel" : { - "description" : "Can cancel the whole scheduled payment?", - "type" : "boolean" + { + "session": [] }, - "settle" : { - "description" : "Can settle open installments?", - "type" : "boolean" + { + "accessClient": [] } - } - }, - "ScheduledPaymentsPermissions" : { - "description" : "Permissions over own scheduled payments", - "allOf" : [ { - "$ref" : "#/components/schemas/ScheduledPaymentPermissions" - }, { - "type" : "object", - "properties" : { - "view" : { - "description" : "Can view own scheduled payments?", - "type" : "boolean" - }, - "process" : { - "description" : "Can process installments?", - "type" : "boolean" - } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" } - } ] - }, - "SearchByDistanceData" : { - "description" : "Contains configuration information for searching data by distance", - "type" : "object", - "properties" : { - "addresses" : { - "description" : "The list of addresses owned by the authenticated user", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Address" + ], + "responses": { + "200": { + "description": "The data for searching imports", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ImportedFileDataForSearch" + } + } } }, - "defaultValues" : { - "description" : "The default values, keyed by field name, for address fields", - "type" : "object", - "additionalProperties" : { - "type" : "string" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } } }, - "distanceUnit" : { - "$ref" : "#/components/schemas/DistanceUnitEnum" - } - } - }, - "SendActivationCodeRequest" : { - "description" : "Parameters for requesting sending a device activation code.", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseActivationCodeRequest" - }, { - "type" : "object", - "properties" : { - "name" : { - "type" : "string", - "description" : "The device name. This name must be unique per user, in case it already exist then a suffix will be added in the form `_i` with `i` being a number. E.g if a device with name 'my_device' already exist then the final name will be 'my_device_1'. It's ignored if authenticated with a PIN or if a valid `pinId` was given." - }, - "pinId" : { - "type" : "string", - "description" : "Only if the device for which the activation is requested for already has a defined pin, then it must be specified here. This is necessary to get in sync when a device is activated after a pin was already defined." + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } } - } - } ] - }, - "SendActivationCodeResult" : { - "description" : "Contains the result of sending a device activation code.", - "type" : "object", - "properties" : { - "device" : { - "description" : "The pending device. The device's name is the same name given in `GET /devices/send-activation-code` only if it was not already in use. Otherwise, it contains a new name generated from the selected one but adding a suffix. The name generated is of the form `name_i` with `i` a number and `name` the selected name.\"", - "allOf" : [ { - "$ref" : "#/components/schemas/Device" - } ] }, - "sentTo" : { - "type" : "string", - "description" : "The e-mail or the normalized mobile phone number that received the activation code." - } - } - }, - "SendInvitation" : { - "description" : "Parameters for sending invitation e-mails to external users", - "type" : "object", - "properties" : { - "toEmails" : { - "description" : "The e-mail address to which the invitation will be sent. The maximum number of allowed addresses is defined in `DataForSendInvitation.maxRecipients`", - "type" : "array", - "items" : { - "type" : "string" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } } }, - "assignBroker" : { - "description" : "When the authenticated user is a broker, this flag indicates whether the user that was registered by clicking the link in the sent e-mail will be immediately assigned to that broker. Ignored when the authenticated user is not a broker.", - "type" : "boolean" - } - } - }, - "SendMessage" : { - "description" : "Contains data for a new message to be sent", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseSendMessage" - }, { - "type" : "object", - "properties" : { - "category" : { - "description" : "The category for a message send to system. Required for messages between system and members.", - "type" : "string" - }, - "destination" : { - "description" : "The message destination", - "$ref" : "#/components/schemas/MessageDestinationEnum" - }, - "toGroups" : { - "description" : "The groups to send the message to. Only for administrators. Used only if `destination` is `user`", - "type" : "array", - "items" : { - "type" : "string" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } } - }, - "toUsers" : { - "description" : "The users to send the message to. Used only if `destination` is `user`", - "type" : "array", - "items" : { - "type" : "string" - } - } - } - } ] - }, - "SendPaymentRequest" : { - "description" : "Definitions used to send a payment request. The request has an expiration date (which can be hidden from the user, depending on the configuration) and can be set to be scheduled.", - "allOf" : [ { - "$ref" : "#/components/schemas/PerformInternalTransaction" - }, { - "type" : "object", - "properties" : { - "expirationDate" : { - "description" : "The payment request expiration date. Required, unless the expiration date is configured in the payment type to be hidden from users.", - "type" : "string", - "format" : "date-time" - }, - "firstInstallmentIsImmediate" : { - "description" : "Indicates whether the first installment should be immediately processed once the scheduled payment is accepted. Used only if `scheduling` is `scheduled`. When not explicitly set to `false` will process the first installment immediately.", - "type" : "boolean" - }, - "installmentsCount" : { - "description" : "Represents the number of installments. When not specified, assumes a single installment. Used only if `scheduling` is `scheduled`.", - "type" : "integer", - "minimum" : 1 - }, - "scheduling" : { - "$ref" : "#/components/schemas/PaymentRequestSchedulingEnum" - }, - "occurrencesCount" : { - "description" : "Represents the number of occurrences. When not specified, assumes a the payment will continue until be manually canceled. Used only if `scheduling` is `enum:PaymentRequestSchedulingEnum.recurring`.", - "type" : "integer" - }, - "firstOccurrenceIsImmediate" : { - "description" : "Indicates whether the first occurrence should be immediately processed once the recurring payment is accepted. Used only if `scheduling` is `enum:PaymentRequestSchedulingEnum.recurring`. When not explicitly set to `false` will process the first occurrence immediately.", - "type" : "boolean" } - } - } ] - }, - "SendVoucher" : { - "description" : "Parameters for sending a voucher", - "type" : "object", - "properties" : { - "email" : { - "description" : "The e-mail address to which the voucher will be sent", - "type" : "string" }, - "message" : { - "description" : "A message to include in the e-mail that will be sent", - "type" : "string" - }, - "amount" : { - "description" : "The voucher amount", - "type" : "string", - "format" : "number" - }, - "type" : { - "description" : "Either the `id` or `internalName` of the voucher type", - "type" : "string" - }, - "voucherCustomValues" : { - "type" : "object", - "description" : "Holds the custom field values, keyed by field internal name or id. The format of the value depends on the custom field type. Example: `{..., \"customValues\": {\"gender\": \"male\", \"birthDate\": \"1980-10-27\"}}`", - "additionalProperties" : { - "type" : "string" - } - }, - "paymentCustomValues" : { - "type" : "object", - "description" : "Holds the payment custom field values, keyed by field internal name or id. The format of the value depends on the custom field type.", - "additionalProperties" : { - "type" : "string" - } - } - } - }, - "SessionDataForSearch" : { - "description" : "Data for searching user sessions", - "type" : "object", - "properties" : { - "roles" : { - "description" : "The roles the authenticated user can use to filter sessions.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/RoleEnum" - } - }, - "channels" : { - "description" : "The channel internal names the authenticated user can use to filter sessions.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/EntityReference" - } - }, - "query" : { - "description" : "Default query filters for searching sessions", - "allOf" : [ { - "$ref" : "#/components/schemas/SessionQueryFilters" - } ] - } - } - }, - "SessionPropertiesEdit" : { - "description" : "Session properties to be modified.", - "type" : "object", - "properties" : { - "source" : { - "description" : "Changes the session source. Can only be changed when the current session is trusted.", - "allOf" : [ { - "$ref" : "#/components/schemas/SessionSourceEnum" - } ] - } - } - }, - "SessionPropertiesView" : { - "description" : "Contains properties of a user session", - "type" : "object", - "properties" : { - "createdAt" : { - "description" : "The timestamp of the session creation", - "type" : "string", - "format" : "date-time" - }, - "expirationInterval" : { - "description" : "The inactivity interval for this session to expire", - "allOf" : [ { - "$ref" : "#/components/schemas/TimeInterval" - } ] - }, - "expiresAt" : { - "description" : "The current session expiration timestamp. After each usage of this session, the timeout is renewed, and the additional timeout will be the operation timestamp added to `expirationInterval`.", - "type" : "string", - "format" : "date-time" - }, - "source" : { - "description" : "Indicates how the session was created. Can be modified in runtime.", - "allOf" : [ { - "$ref" : "#/components/schemas/SessionSourceEnum" - } ] - }, - "device" : { - "description" : "Reference to the trusted device that wither created or confirmed this session. When null, the session is not trusted.", - "allOf" : [ { - "$ref" : "#/components/schemas/EntityReference" - } ] - }, - "devicePin" : { - "description" : "Reference to the device PIN that was used to login. Otherwise, when the session was created with a trusted device, and the device has a PIN attached, will reflect it.", - "allOf" : [ { - "$ref" : "#/components/schemas/DevicePin" - } ] - } - } - }, - "SessionQueryFilters" : { - "description" : "Search filters for sessions", - "allOf" : [ { - "$ref" : "#/components/schemas/QueryFilters" - }, { - "type" : "object", - "properties" : { - "broker" : { - "description" : "Either id or a principal (login name, e-mail, etc) of a broker. Used to filter the sessions of users brokered by the given broker.", - "type" : "string" - }, - "channels" : { - "description" : "Internal names of the sessions channels that can be returned.", - "type" : "array", - "items" : { - "type" : "string" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } } - }, - "excludeCurrentSession" : { - "type" : "boolean", - "description" : "Whether to exclude or not the current session." - }, - "operatorsOf" : { - "description" : "Either id or a principal (login name, e-mail, etc) of a user. The owner member of the operators sessions Used to filter the operator sessions of the given user.", - "type" : "string" - }, - "roles" : { - "description" : "The role of the logged user in the sessions.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/RoleEnum" + } + } + } + } + }, + "/{user}/imported-files/{context}": { + "parameters": [ + { + "$ref": "#/components/parameters/user" + }, + { + "name": "context", + "in": "path", + "required": true, + "description": "The context over which imports will be searched", + "schema": { + "$ref": "#/components/schemas/UserImportedFileContextEnum" + } + } + ], + "get": { + "operationId": "searchUserImportedFiles", + "summary": "Searches for imports of a given user and context.", + "description": "Returns a list with matching imported files.", + "tags": [ + "Imports" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "creationPeriod", + "in": "query", + "required": false, + "description": "The minimum / maximum creation date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "string", + "format": "date-time" + } + } + }, + { + "name": "kinds", + "in": "query", + "required": false, + "description": "The kinds to filter", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImportedFileKind" + } + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number (zero-based) of the search. The default value is zero.", + "schema": { + "type": "integer" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", + "schema": { + "type": "integer" + } + }, + { + "name": "skipTotalCount", + "in": "query", + "required": false, + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", + "schema": { + "type": "boolean" + } + }, + { + "name": "statuses", + "in": "query", + "required": false, + "description": "The statuses to filter", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImportedFileStatusEnum" + } + } + } + ], + "responses": { + "200": { + "description": "The imports which match the criteria", + "headers": { + "X-Total-Count": { + "schema": { + "type": "integer" + }, + "description": "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." + }, + "X-Page-Size": { + "schema": { + "type": "integer" + }, + "description": "The maximum number of results per page" + }, + "X-Current-Page": { + "schema": { + "type": "integer" + }, + "description": "The current page the results are in" + }, + "X-Has-Next-Page": { + "schema": { + "type": "boolean" + }, + "description": "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." } }, - "user" : { - "description" : "Either id or a principal (login name, e-mail, etc) of the sessions owner.", - "type" : "string" - } - } - } ] - }, - "SessionResult" : { - "description" : "Contains data returned when searching for sessions", - "type" : "object", - "properties" : { - "sessionToken" : { - "description" : "The session token", - "type" : "string" - }, - "creationDate" : { - "description" : "The session creation date", - "type" : "string", - "format" : "date-time" - }, - "remoteAddress" : { - "description" : "The session remote address", - "type" : "string" - }, - "user" : { - "$ref" : "#/components/schemas/User" - }, - "channel" : { - "$ref" : "#/components/schemas/EntityReference" - }, - "currentSession" : { - "description" : "Whether the session is the current one", - "type" : "boolean" - } - } - }, - "SessionsPermissions" : { - "description" : "Permissions over user sessions", - "type" : "object", - "properties" : { - "view" : { - "description" : "Whether the logged user can view connected users or not", - "type" : "boolean" - }, - "disconnect" : { - "description" : "Whether the logged user can disconnect users or not", - "type" : "boolean" - }, - "login" : { - "description" : "Whether the logged user can login (i.e create a session) users or not", - "type" : "boolean" - } - } - }, - "SetAccountBalanceLimits" : { - "description" : "Parameters for setting the new account limits.", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseAccountBalanceLimits" - }, { - "type" : "object", - "properties" : { - "comment" : { - "description" : "Comments supplied by the manager regarding the limit change.", - "type" : "string" - } - } - } ] - }, - "SetAccountPaymentLimits" : { - "description" : "Parameters for setting the new account payment limits.", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseAccountPaymentLimits" - }, { - "type" : "object", - "properties" : { - "comment" : { - "description" : "Comments supplied by the manager regarding the limit change.", - "type" : "string" - } - } - } ] - }, - "SetDeliveryMethod" : { - "description" : "Delivery method information", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseOrderAction" - }, { - "type" : "object", - "properties" : { - "name" : { - "description" : "The delivery method name.", - "type" : "string" - }, - "chargeAmount" : { - "description" : "The delivery method charge amount.", - "type" : "string", - "format" : "number" - }, - "deliveryType" : { - "$ref" : "#/components/schemas/DeliveryMethodTypeEnum" - }, - "minTime" : { - "description" : "The delivery method minimum time interval", - "allOf" : [ { - "$ref" : "#/components/schemas/TimeInterval" - } ] - }, - "maxTime" : { - "description" : "The delivery method maximum time interval", - "allOf" : [ { - "$ref" : "#/components/schemas/TimeInterval" - } ] - } - } - } ] - }, - "SetSecurityAnswer" : { - "description" : "Parameters to define the security answer.", - "type" : "object", - "properties" : { - "securityQuestion" : { - "type" : "string", - "description" : "If the server is configured to use security question, is the `internalName` of the question present in the result of `data-for-new`, in the `securityQuestions` property. Is optional and only used in public registration." - }, - "securityAnswer" : { - "type" : "string", - "description" : "If a `securityQuestion` is informed, this is the answer. Required in this case. Only used in public registration..." - } - } - }, - "SharedRecordsDataForSearch" : { - "description" : "Data for searching records with shared fields (multiple types)", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseRecordDataForSearch" - }, { - "type" : "object", - "properties" : { - "recordTypes" : { - "description" : "The possible record types.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/RecordType" + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImportedFileResult" + } + } } - }, - "query" : { - "description" : "Default query filters for searching records", - "allOf" : [ { - "$ref" : "#/components/schemas/SharedRecordsQueryFilters" - } ] - } - } - } ] - }, - "SharedRecordsQueryFilters" : { - "description" : "Query filters for searching distinct record types which shared common fields", - "allOf" : [ { - "$ref" : "#/components/schemas/GeneralRecordsQueryFilters" - }, { - "type" : "object", - "properties" : { - "types" : { - "description" : "Either the ids or identification methods of record types", - "type" : "array", - "items" : { - "type" : "string" - } - } - } - } ] - }, - "ShoppingCartCheckout" : { - "description" : "Contains data required to check-out a shopping cart", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseOrderAction" - }, { - "type" : "object", - "properties" : { - "deliveryAddress" : { - "description" : "The address used for delivery in this specific order. The fields `name`, `defaultAddress` and `hidden` are ignored.", - "allOf" : [ { - "$ref" : "#/components/schemas/AddressNew" - } ] - }, - "deliveryMethod" : { - "description" : "The id of the selected delivery method (if any)", - "type" : "string" - }, - "paymentType" : { - "description" : "Either the internal name or id of the selected payment type.", - "type" : "string" - } - } - } ] - }, - "ShoppingCartCheckoutError" : { - "description" : "Error when check-out a shopping cart.", - "allOf" : [ { - "$ref" : "#/components/schemas/Error" - }, { - "type" : "object", - "properties" : { - "shoppingCartError" : { - "description" : "The `ShoppingCartError` generated when the products in the cart were being validated. Only if `code` is `products`.", - "allOf" : [ { - "$ref" : "#/components/schemas/ShoppingCartError" - } ] - }, - "code" : { - "$ref" : "#/components/schemas/ShoppingCartCheckoutErrorCode" - } - } - } ] - }, - "ShoppingCartDataForCheckout" : { - "description" : "Confiugration data need to check-out a shopping cart.", - "type" : "object", - "properties" : { - "cart" : { - "description" : "The cart containing the currency and items.", - "allOf" : [ { - "$ref" : "#/components/schemas/ShoppingCartView" - } ] - }, - "paymentTypes" : { - "description" : "Contains the allowed payment types.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransferType" - } - }, - "deliveryMethods" : { - "description" : "The list of delivery method commons to all of the products added to the shopping cart ordered by name.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/DeliveryMethod" - } - }, - "addressConfiguration" : { - "$ref" : "#/components/schemas/AddressConfiguration" - }, - "confirmationPasswordInput" : { - "description" : "If a confirmation password is used, contains the definitions on how to request that password from the user. This confirmation password is required when performing sensible actions. Sometimes this is dynamic, for example, the confirmation might be configured to be used only once per session, or operations like payments may have a limit per day to be without confirmation (pinless).", - "allOf" : [ { - "$ref" : "#/components/schemas/PasswordInput" - } ] - }, - "addresses" : { - "description" : "The addresses the logged user (i.e the buyer) has.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Address" - } - } - } - }, - "ShoppingCartError" : { - "description" : "Error when interacting with the shopping cart.", - "allOf" : [ { - "$ref" : "#/components/schemas/Error" - }, { - "type" : "object", - "properties" : { - "ad" : { - "description" : "The webshop ad for which there is not enough stock. Only if `code` is `notEnoughStock`", - "allOf" : [ { - "$ref" : "#/components/schemas/WebshopAd" - } ] - }, - "seller" : { - "description" : "The seller whose webshop ad can not be bought. Only if `code` is `canNotBuyFromSeller`", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "code" : { - "$ref" : "#/components/schemas/ShoppingCartErrorCode" - } - } - } ] - }, - "ShoppingCartItem" : { - "description" : "An item in a shopping cart.", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseOrderItem" - }, { - "type" : "object", - "properties" : { - "priceWhenAdded" : { - "description" : "The current product price at the moment of add it to the shopping cart. Be carefull, this could not be the same price finally charged at check-out (e.g because the promotional period has finished). It could be used to show a warning message to the client indicating the price has changed if it is different from the current price of the `product`.", - "type" : "string", - "format" : "number" - }, - "promotionalPrice" : { - "description" : "The promotional price (aka the current price). if it is present then that is the current price that would be charged at check-out. Otherwise would be the `price`. Only present if it is defined and the promotional period has not yet finished.", - "type" : "string", - "format" : "number" - } - } - } ] - }, - "ShoppingCartItemDetailed" : { - "description" : "Detailed information of a shopping cart item.", - "allOf" : [ { - "$ref" : "#/components/schemas/ShoppingCartItem" - }, { - "type" : "object", - "properties" : { - "totalPrice" : { - "description" : "The total price for this item, i.e the curent price of the product multiplied by its corresponding quantity.", - "type" : "string", - "format" : "number" - }, - "availability" : { - "$ref" : "#/components/schemas/ShoppingCartItemAvailabilityEnum" - }, - "quantityAdjustment" : { - "$ref" : "#/components/schemas/ShoppingCartItemQuantityAdjustmentEnum" - } - } - } ] - }, - "ShoppingCartResult" : { - "description" : "Represents a group of webshop ads offered by the same seller and in the same currency.", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseShoppingCart" - }, { - "type" : "object", - "properties" : { - "items" : { - "description" : "The webshop ads added to the cart.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ShoppingCartItem" - } - } - } - } ] - }, - "ShoppingCartView" : { - "description" : "Represents a group of webshop ads offered by the same seller and in the same currency.", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseShoppingCart" - }, { - "type" : "object", - "properties" : { - "totalPrice" : { - "description" : "The total price of this cart, i.e the sum of the total price of all of its `items`.", - "type" : "string", - "format" : "number" - }, - "items" : { - "description" : "Detailed information of the items present in the cart.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ShoppingCartItemDetailed" + } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } } } - } - } ] - }, - "SimpleAddress" : { - "description" : "Address fields container", - "type" : "object", - "x-implements" : "IAddress", - "properties" : { - "addressLine1" : { - "type" : "string", - "description" : "The first line of the descriptive address" }, - "addressLine2" : { - "type" : "string", - "description" : "The second line of the descriptive address" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } + } }, - "street" : { - "type" : "string", - "description" : "The street name" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } }, - "buildingNumber" : { - "type" : "string", - "description" : "The numeric identifier for a land parcel, house, building or other" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } + } }, - "complement" : { - "type" : "string", - "description" : "The complement (like apartment number)" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/imported-files/{kind}/data-for-new": { + "parameters": [ + { + "name": "kind", + "in": "path", + "required": true, + "description": "The import kind for the new import.", + "schema": { + "$ref": "#/components/schemas/GeneralImportedFileKind" + } + } + ], + "get": { + "operationId": "getGeneralImportedFileDataForNew", + "summary": "Returns data for a new general import of a given kind.", + "description": "Returns data for a new general import of a given kind.", + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "tags": [ + "Imports" + ], + "security": [ + { + "basic": [] }, - "zip" : { - "type" : "string", - "description" : "A zip code that identifies a specific geographic (postal) delivery area" + { + "session": [] }, - "poBox" : { - "type" : "string", - "description" : "The post-office box, is an uniquely addressable box" + { + "accessClient": [] + } + ], + "responses": { + "200": { + "description": "The data for a new import.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ImportedFileDataForNew" + } + } + } }, - "neighborhood" : { - "type" : "string", - "description" : "The neighborhood name" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } + } }, - "city" : { - "type" : "string", - "description" : "The city name" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } + } }, - "region" : { - "type" : "string", - "description" : "The region or state" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } }, - "country" : { - "type" : "string", - "description" : "The country, represented as 2-letter, uppercase, ISO 3166-1 code" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } + } }, - "location" : { - "description" : "The geolocation of the current address", - "allOf" : [ { - "$ref" : "#/components/schemas/GeographicalCoordinate" - } ] + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } } } - }, - "SimpleChangeVoucherPin" : { - "description" : "Parameters for changing the voucher pin, shared by both the operation for `Vouchers` and `VoucherInfo` tags.", - "type" : "object", - "properties" : { - "newPin" : { - "description" : "The new pin.", - "type" : "string" + } + }, + "/imported-files/{kind}": { + "parameters": [ + { + "name": "kind", + "in": "path", + "required": true, + "description": "The import kind for the new import.", + "schema": { + "$ref": "#/components/schemas/GeneralImportedFileKind" + } + } + ], + "post": { + "operationId": "importGeneralFile", + "summary": "Starts a general file import for a given kind.", + "description": "Starts a general file import for a given kind.", + "tags": [ + "Imports" + ], + "parameters": [ + { + "$ref": "#/components/parameters/confirmationPassword" + } + ], + "security": [ + { + "basic": [] }, - "newPinConfirmation" : { - "description" : "The new pin confirmation.", - "type" : "string" + { + "session": [] }, - "checkPinConfirmation" : { - "type" : "boolean", - "description" : "Depending on the client, if a confirm PIN field is shown to users, it might be useful to check the confirmation password value on the server. This way, if there are other validation exceptions, they are all shown together. In this case, this field should be set to `true` and the `newPinConfirmation` should be passed in with the user input. However, in cases where clients just want to change the voucher PIN in a non-interactive way, this field can be left empty (or set to `false`), and the `newPinConfirmation` field will be ignored." + { + "accessClient": [] } - } - }, - "StoredFile" : { - "description" : "Contains data about a stored file", - "allOf" : [ { - "$ref" : "#/components/schemas/NamedEntity" - }, { - "type" : "object", - "properties" : { - "contentType" : { - "type" : "string", - "description" : "MIME type of the stored file" - }, - "length" : { - "type" : "integer", - "description" : "The file size, in bytes" + ], + "responses": { + "201": { + "description": "Returns the identifier of the new imported file.", + "headers": { + "Location": { + "description": "URL for viewing the imported file details.", + "schema": { + "type": "string" + } + } }, - "url" : { - "type" : "string", - "description" : "The URL for getting the content of this file" + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } } - } - } ] - }, - "SystemImageCategoryListData" : { - "description" : "Contains information for a given system image category, with its images.", - "type" : "object", - "properties" : { - "category" : { - "$ref" : "#/components/schemas/EntityReference" }, - "canCreate" : { - "description" : "Does the authenticated admin has permission to create a new image in this category?", - "type" : "boolean" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } + } }, - "canEdit" : { - "description" : "Does the authenticated user has permission to edit images in this category?", - "type" : "boolean" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } + } }, - "images" : { - "description" : "The list of images in this category", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Image" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } } - } - } - }, - "SystemImageCategoryPermissions" : { - "description" : "Permissions over categories of system custom images", - "type" : "object", - "properties" : { - "category" : { - "$ref" : "#/components/schemas/EntityReference" }, - "canEdit" : { - "description" : "Whether the logged user can edit images in this category", - "type" : "boolean" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } + } + }, + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } } - } - }, - "SystemImagesListData" : { - "description" : "Contains for each system image category", - "type" : "object", - "properties" : { - "categories" : { - "description" : "Contains each of the system image categories, together with their permissions and images.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/SystemImageCategoryListData" + }, + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "params": { + "description": "The additional import metadata", + "allOf": [ + { + "$ref": "#/components/schemas/ImportedFileNew" + } + ] + }, + "file": { + "type": "string", + "format": "binary", + "description": "The file being uploaded" + } + } + } } } } - }, - "SystemMessagesPermissions" : { - "description" : "Permissions ovre messages for the logged administrator", - "type" : "object", - "properties" : { - "view" : { - "description" : "Whether the logged administrator can view system messages or not", - "type" : "boolean" - }, - "manage" : { - "description" : "Whether the logged administrator can manage system messages or not", - "type" : "boolean" - }, - "sendToUser" : { - "description" : "Whether the logged administrator can send messages to managed users or not", - "type" : "boolean" - }, - "sendToGroups" : { - "description" : "Whether the logged administrator can send messages to managed groups or not", - "type" : "boolean" + } + }, + "/{user}/imported-files/{kind}/data-for-new": { + "parameters": [ + { + "$ref": "#/components/parameters/user" + }, + { + "name": "kind", + "in": "path", + "required": true, + "description": "The import kind for the new import.", + "schema": { + "$ref": "#/components/schemas/UserImportedFileKind" } } - }, - "ThemeUIElement" : { - "description" : "UI element containing wether the content or the components.", - "allOf" : [ { - "$ref" : "#/components/schemas/UIElementWithContent" - }, { - "type" : "object", - "properties" : { - "definitions" : { - "description" : "Base LESS variables.", - "type" : "string" - }, - "advancedDefinitions" : { - "description" : "Advanced (based on the base ones) LESS variables.", - "type" : "string" - }, - "customStyle" : { - "description" : "Customized CSS.", - "type" : "string" - } - } - } ] - }, - "TicketApprovalResult" : { - "description" : "Ticket approval result.", - "allOf" : [ { - "$ref" : "#/components/schemas/Entity" - }, { - "type" : "object", - "properties" : { - "ticketNumber" : { - "description" : "The ticket number identifier.", - "type" : "string" - }, - "cancelUrl" : { - "type" : "string", - "description" : "The URL to redirect when canceling the accept ticket flow" - }, - "successUrl" : { - "type" : "string", - "description" : "The URL to redirect after successfully accepting a ticket" - }, - "transaction" : { - "description" : "The generated payment. Only if `status` is `processed`.", - "allOf" : [ { - "$ref" : "#/components/schemas/Transaction" - } ] - }, - "ticketStatus" : { - "$ref" : "#/components/schemas/TicketStatusEnum" - } - } - } ] - }, - "TicketNew" : { - "description" : "Contain the information to create a new ticket for the logged user", - "allOf" : [ { - "$ref" : "#/components/schemas/PerformBaseTransaction" - }, { - "type" : "object", - "properties" : { - "payer" : { - "type" : "string", - "description" : "An identification for the user which will pay the ticket. Is optional, and in most cases, should be left empty. If empty, at the moment the client will pay the ticket, both user identification and password will be entered, and the ticket will be confirmed. If specified, when confirming, only that user will be able to pay the ticket." - }, - "cancelUrl" : { - "type" : "string", - "description" : "The url to redirect when canceling the approve ticket flow. If an `orderId` is given then it will be added as a query parameter to this url when redirect as well as the ticket number too." - }, - "successUrl" : { - "type" : "string", - "description" : "The url to redirect after successful approving a ticket. If an `orderId` is given then it will be added as a query parameter to this url when redirect as well as the ticket number too." - }, - "successWebhook" : { - "type" : "string", - "description" : "The url to be invoked by the server after successfully approving a ticket. If an `orderId` is given then it will be added as a query parameter to this url when redirect as well as the ticket number too." - }, - "orderId" : { - "type" : "string", - "description" : "An optional order identifier given by the ticket's creator. If given then that identifier will be used at ticket processing to ensure the ticket is for that order. This attribute is usefull in case the client doesn't want to reflect the generated ticket number in its database after creating the ticket," - }, - "expiresAfter" : { - "description" : "Defines the expiration interval. If none is given, it is assumed that the ticket expires in one day.", - "allOf" : [ { - "$ref" : "#/components/schemas/TimeInterval" - } ] - } - } - } ] - }, - "TicketPreview" : { - "description" : "null", - "allOf" : [ { - "$ref" : "#/components/schemas/PaymentPreview" - }, { - "type" : "object", - "properties" : { - "cancelUrl" : { - "type" : "string", - "description" : "The URL to redirect when canceling the accept ticket flow" - }, - "successUrl" : { - "type" : "string", - "description" : "The URL to redirect after successfully accepting a ticket" - } - } - } ] - }, - "TicketProcessResult" : { - "description" : "Ticket process result.", - "allOf" : [ { - "$ref" : "#/components/schemas/Entity" - }, { - "type" : "object", - "properties" : { - "ticketNumber" : { - "description" : "The ticket number identifier.", - "type" : "string" - }, - "actuallyProcessed" : { - "description" : "Flag indicating if the ticket was processed by this invocation or the ticket was already processed in a previous invocation. This will only be true for the first invocation of the `process` service method.", - "type" : "boolean" - }, - "transaction" : { - "description" : "The generated payment.", - "allOf" : [ { - "$ref" : "#/components/schemas/Transaction" - } ] - } + ], + "get": { + "operationId": "getUserImportedFileDataForNew", + "summary": "Returns data for importing a new file of a given kind and user.", + "description": "Returns data for importing a new file of a given kind and user.", + "parameters": [ + { + "$ref": "#/components/parameters/fields" } - } ] - }, - "TicketsPermissions" : { - "description" : "Permissions over own tickets", - "type" : "object", - "properties" : { - "view" : { - "description" : "Can view tickets?", - "type" : "boolean" + ], + "tags": [ + "Imports" + ], + "security": [ + { + "basic": [] }, - "create" : { - "description" : "Can create tickets?", - "type" : "boolean" + { + "session": [] }, - "cancel" : { - "description" : "Can cancel tickets?", - "type" : "boolean" - }, - "approve" : { - "description" : "Can approve tickets from others?", - "type" : "boolean" + { + "accessClient": [] } - } - }, - "TimeInterval" : { - "description" : "Represents a time interval such as 1 month, 3 weeks, 12 months, etc.", - "type" : "object", - "properties" : { - "amount" : { - "description" : "The amount of time units", - "type" : "integer" + ], + "responses": { + "200": { + "description": "The data for a new import.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ImportedFileDataForNew" + } + } + } }, - "field" : { - "$ref" : "#/components/schemas/TimeFieldEnum" - } - } - }, - "Token" : { - "description" : "Contains reference to a token. Tokens are used to identify users, and are normally used as cards.", - "allOf" : [ { - "$ref" : "#/components/schemas/Entity" - }, { - "type" : "object", - "properties" : { - "value" : { - "description" : "The token value only if not NFC. Otherwise is the token label.", - "type" : "string" - }, - "activationDate" : { - "description" : "When the owner user activated the token.", - "type" : "string", - "format" : "date-time" - }, - "creationDate" : { - "description" : "The creation date.", - "type" : "string", - "format" : "date-time" - }, - "expiryDate" : { - "description" : "The expiration date. Only if the corresponding token type defines an expiration period.", - "type" : "string", - "format" : "date-time" - }, - "status" : { - "$ref" : "#/components/schemas/TokenStatusEnum" - } - } - } ] - }, - "TokenDataForNew" : { - "description" : "Configuration data to create a new token", - "type" : "object", - "properties" : { - "type" : { - "$ref" : "#/components/schemas/TokenType" - }, - "user" : { - "description" : "The user details, in case a user was requested.", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "token" : { - "description" : "The object that should be modified and posted back.", - "allOf" : [ { - "$ref" : "#/components/schemas/TokenNew" - } ] - } - } - }, - "TokenDataForSearch" : { - "description" : "Configuration data for a general tokens search of a given type", - "allOf" : [ { - "$ref" : "#/components/schemas/TokenPermissions" - }, { - "type" : "object", - "properties" : { - "groups" : { - "description" : "The groups the authenticated user can use to filter tokens. Admins can always filter by groups, while brokers depend on a permission, which can be to only view group sets, only groups or none.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Group" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } } - }, - "exportFormats" : { - "description" : "The formats which the data can be exported", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ExportFormat" + } + }, + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } } - }, - "query" : { - "description" : "Default query filters to search tokens", - "allOf" : [ { - "$ref" : "#/components/schemas/TokenQueryFilters" - } ] } - } - } ] - }, - "TokenDetailed" : { - "description" : "Contains detailed information of a token.", - "allOf" : [ { - "$ref" : "#/components/schemas/TokenResult" - }, { - "type" : "object", - "properties" : { - "type" : { - "$ref" : "#/components/schemas/TokenType" + }, + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } } - } - } ] - }, - "TokenNew" : { - "description" : "Data to create a new token", - "type" : "object", - "properties" : { - "user" : { - "description" : "Either id or identification of the user to initially assign the token to. If set the token initial status will be either `pending` or `active` (if `activateNow` is true). If the user is not set, the initial status will always be `unassigned`.", - "type" : "string" }, - "value" : { - "description" : "The token value to create. The token value is commonly used as the card number.", - "type" : "string" + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } + } }, - "activateNow" : { - "description" : "When set to true, the token will be initially active when `user` is also set. Has no effect if `user` is null.", - "type" : "boolean" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } } } - }, - "TokenPermissions" : { - "description" : "Permissions over tokens of a specific type", - "type" : "object", - "properties" : { - "type" : { - "$ref" : "#/components/schemas/TokenType" + } + }, + "/{user}/imported-files/{kind}": { + "parameters": [ + { + "$ref": "#/components/parameters/user" + }, + { + "name": "kind", + "in": "path", + "required": true, + "description": "The import kind for the new import.", + "schema": { + "$ref": "#/components/schemas/UserImportedFileKind" + } + } + ], + "post": { + "operationId": "importUserFile", + "summary": "Starts a file import for a given user and kind.", + "description": "Starts importing a given file. The required metadata fields will depend on the import kind.", + "tags": [ + "Imports" + ], + "security": [ + { + "basic": [] }, - "create" : { - "description" : "Can create tokens of this type? For NFC tags, this permission is mapped to the 'Initialize' action.", - "type" : "boolean" + { + "session": [] }, - "activate" : { - "description" : "Can activate tokens of this type? For NFC tags, this permission is mapped to the 'Personalize' action.", - "type" : "boolean" + { + "accessClient": [] } - } - }, - "TokenQueryFilters" : { - "description" : "Query filters for tokens", - "allOf" : [ { - "$ref" : "#/components/schemas/QueryFilters" - }, { - "type" : "object", - "properties" : { - "activationPeriod" : { - "description" : "The minimum / maximum token activation date.", - "type" : "array", - "items" : { - "type" : "string", - "format" : "date-time" + ], + "parameters": [ + { + "$ref": "#/components/parameters/confirmationPassword" + } + ], + "responses": { + "201": { + "description": "Returns the identifier of the new imported file.", + "headers": { + "Location": { + "description": "URL for viewing the imported file details.", + "schema": { + "type": "string" + } } }, - "expiryPeriod" : { - "description" : "The minimum / maximum token expiry date.", - "type" : "array", - "items" : { - "type" : "string", - "format" : "date-time" + "content": { + "text/plain": { + "schema": { + "type": "string" + } } - }, - "groups" : { - "type" : "array", - "items" : { - "type" : "string" - }, - "description" : "Either id or internal names of groups / group sets" - }, - "brokers" : { - "type" : "array", - "items" : { - "type" : "string" - }, - "description" : "Either id or a principal (login name, e-mail, etc) for brokers" - }, - "user" : { - "type" : "string", - "description" : "Either id or a principal (login name, e-mail, etc) for the token owner user" - }, - "value" : { - "type" : "string", - "description" : "The token value" - }, - "statuses" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TokenStatusEnum" - }, - "description" : "The desired token statuses" - } - } - } ] - }, - "TokenResult" : { - "description" : "Result of a general token search", - "allOf" : [ { - "$ref" : "#/components/schemas/Token" - }, { - "type" : "object", - "properties" : { - "user" : { - "description" : "The assigned user. Only if status is not `unassigned`.", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - } - } - } ] - }, - "TokenType" : { - "description" : "A reference to a token type", - "allOf" : [ { - "$ref" : "#/components/schemas/InternalNamedEntity" - }, { - "type" : "object", - "properties" : { - "pluralName" : { - "description" : "The name for the plural form", - "type" : "string" - }, - "mask" : { - "description" : "In case the token value is entered by users or formatted, this is the (optional) mask to be used.", - "type" : "string" - }, - "physicalType" : { - "$ref" : "#/components/schemas/PhysicalTokenTypeEnum" - } - } - } ] - }, - "TokenView" : { - "description" : "Contains all data regarding a token", - "allOf" : [ { - "$ref" : "#/components/schemas/TokenDetailed" - }, { - "type" : "object", - "properties" : { - "activationDeadline" : { - "description" : "Limit date a pending token can be activated. Not returned when status is not `pending`.", - "type" : "string", - "format" : "date-time" - }, - "activate" : { - "description" : "Can this token be directly activated?", - "type" : "boolean" - }, - "assign" : { - "description" : "Can this token be assigned to a user?", - "type" : "boolean" - }, - "block" : { - "description" : "Can this token be blocked?", - "type" : "boolean" - }, - "unblock" : { - "description" : "Can this token be unblocked?", - "type" : "boolean" - }, - "cancel" : { - "description" : "Can this token be canceled?", - "type" : "boolean" - }, - "setActivationDeadline" : { - "description" : "Can the activation deadline date of this token be changed?", - "type" : "boolean" - }, - "setExpiryDate" : { - "description" : "Can the expiry date of this token be changed?", - "type" : "boolean" } - } - } ] - }, - "TokensPermissions" : { - "description" : "Permissions over tokens", - "type" : "object", - "properties" : { - "my" : { - "description" : "Permissions over my own tokens type", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TokenPermissions" + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } + } + }, + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } + } + }, + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } } }, - "user" : { - "description" : "Permissions over tokens types of other users", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TokenPermissions" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" + } + } } }, - "personalizeNfcTokensAsMember" : { - "description" : "NFC token types the authenticated member can personalize to other members (example, a business personalizing cards for clients).", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TokenType" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "params": { + "description": "The additional import metadata", + "allOf": [ + { + "$ref": "#/components/schemas/ImportedFileNew" + } + ] + }, + "file": { + "type": "string", + "format": "binary", + "description": "The file being uploaded" + } + } + } } } } - }, - "TopUpVoucher" : { - "description" : "Parameter to top-up / activate a voucher", - "allOf" : [ { - "$ref" : "#/components/schemas/PerformVoucherTransaction" - }, { - "type" : "object", - "properties" : { - "email" : { - "description" : "The e-mail address to which the voucher PIN will be sent. Only used when `pinOnActivation` is `send`.", - "type" : "string" - }, - "mobilePhone" : { - "description" : "The phone number to which the voucher PIN will be sent via SMS. Only used when `pinOnActivation` is `send`.", - "type" : "string" - }, - "pin" : { - "description" : "The value for the voucher PIN. Only used when `pinOnActivation` is `input`.", - "type" : "string" - }, - "pinConfirmation" : { - "description" : "Confirmation for the voucher PIN. Only used when `pinOnActivation` is `input` and `checkPinConfirmation` is set to true.", - "type" : "string" - }, - "checkPinConfirmation" : { - "type" : "boolean", - "description" : "Depending on the client, if a confirm PIN field is shown to users, it might be useful to check the confirmation password value on the server. This way, if there are other validation exceptions, they are all shown together. In this case, this field should be set to `true` and the `pinConfirmation` should be passed in with the user input. However, in cases where clients just want to activate vouchers in a non-interactive way, this field can be left empty (or set to `false`), and the `pinConfirmation` field will be ignored." - }, - "voucherCustomValues" : { - "type" : "object", - "description" : "Holds the voucher custom field values, keyed by field internal name or id. The format of the value depends on the custom field type. Example: `{..., \"customValues\": {\"gender\": \"male\", \"birthDate\": \"1980-10-27\"}}`", - "additionalProperties" : { - "type" : "string" - } - } - } - } ] - }, - "TopUpVoucherError" : { - "description" : "Error when topping-up a voucher", - "allOf" : [ { - "$ref" : "#/components/schemas/Error" - }, { - "type" : "object", - "properties" : { - "activationLimit" : { - "description" : "The limit date the voucher had to be activated. Only if `code` is `activationExpired`.", - "type" : "string", - "format" : "date-time" - }, - "voucherStatus" : { - "description" : "Only if `code` is `notAllowedForVoucher`", - "allOf" : [ { - "$ref" : "#/components/schemas/VoucherStatusEnum" - } ] - }, - "paymentError" : { - "description" : "The `PaymentError` generated when the voucher payment was being created. Only if `code` is `payment`.", - "allOf" : [ { - "$ref" : "#/components/schemas/PaymentError" - } ] - }, - "code" : { - "$ref" : "#/components/schemas/TopUpVoucherErrorCode" - } - } - } ] - }, - "Trans" : { - "description" : "Common data for transfer and transaction", - "allOf" : [ { - "$ref" : "#/components/schemas/Entity" - }, { - "type" : "object", - "properties" : { - "display" : { - "type" : "string", - "description" : "A display text for this transfer / transaction, according to the transaction type and currency configuration in Cyclos." - }, - "transactionNumber" : { - "description" : "The transaction number identifying this transfer / transaction. The currency configuration has the definition on whether transaction numbers are enabled and which format they have.", - "type" : "string" - }, - "date" : { - "description" : "The creation date and time.", - "type" : "string", - "format" : "date-time" - }, - "amount" : { - "description" : "The transfer / transaction amount.", - "type" : "string", - "format" : "number" - }, - "from" : { - "description" : "The debited account.", - "allOf" : [ { - "$ref" : "#/components/schemas/AccountWithOwner" - } ] - }, - "to" : { - "description" : "The credited account.", - "allOf" : [ { - "$ref" : "#/components/schemas/AccountWithOwner" - } ] - }, - "type" : { - "description" : "Reference to the transfer type", - "allOf" : [ { - "$ref" : "#/components/schemas/EntityReference" - } ] - }, - "currency" : { - "description" : "The transfer / transaction currency.", - "allOf" : [ { - "$ref" : "#/components/schemas/Currency" - } ] - } - } - } ] - }, - "TransResult" : { - "description" : "Base fields for results of both transfers and transactions", - "allOf" : [ { - "$ref" : "#/components/schemas/Entity" - }, { - "type" : "object", - "properties" : { - "transactionNumber" : { - "description" : "The transaction number identifying this balance transfer. The currency configuration has the definition on whether transaction numbers are enabled and which format they have.", - "type" : "string" - }, - "date" : { - "description" : "The transaction date and time.", - "type" : "string", - "format" : "date-time" - }, - "amount" : { - "description" : "The transaction amount.", - "type" : "string", - "format" : "number" - }, - "type" : { - "description" : "Reference to the transfer type", - "allOf" : [ { - "$ref" : "#/components/schemas/EntityReference" - } ] - }, - "description" : { - "description" : "The transaction description. Is optional.", - "type" : "string" - }, - "image" : { - "description" : "Reference an image. Is returned on special cases, like voucher buying / redeeming. Generally the image which should be displayed will be in the corresponding account", - "allOf" : [ { - "$ref" : "#/components/schemas/Image" - } ] - } - } - } ] - }, - "Transaction" : { - "description" : "Reference to a transaction", - "allOf" : [ { - "$ref" : "#/components/schemas/Trans" - }, { - "type" : "object", - "properties" : { - "ticketNumber" : { - "description" : "A 32-length alphanumeric ticket identifier. Only returned if kind is `ticket`.", - "type" : "string" - }, - "fromName" : { - "description" : "Contains an optional custom from name, which can be set when the transaction is performed.", - "type" : "string" - }, - "toName" : { - "description" : "Contains an optional custom to name, which can be set when the transaction is performed.", - "type" : "string" - }, - "description" : { - "description" : "The optional transaction description.", - "type" : "string" - }, - "kind" : { - "description" : "The transaction kind. For example, if the front end has distinct views for a regular payment, scheduled payment and so on, this information is useful to determine the actual view.", - "allOf" : [ { - "$ref" : "#/components/schemas/TransactionKind" - } ] - }, - "creationType" : { - "description" : "Indicates how this payment was created. Only returned if `kind` is either `payment`, `scheduledPayment` or `recurringPayment`.", - "allOf" : [ { - "$ref" : "#/components/schemas/PaymentCreationTypeEnum" - } ] - }, - "authorizationStatus" : { - "description" : "Indicates the authorization status for this payment. Only returned if `kind` is either `payment`, `scheduledPayment` or `recurringPayment`.", - "allOf" : [ { - "$ref" : "#/components/schemas/TransactionAuthorizationStatusEnum" - } ] - } - } - } ] - }, - "TransactionAuthorization" : { - "description" : "Contains details of an authorization.", - "allOf" : [ { - "$ref" : "#/components/schemas/Entity" - }, { - "type" : "object", - "properties" : { - "action" : { - "$ref" : "#/components/schemas/TransactionAuthorizationActionEnum" - }, - "by" : { - "$ref" : "#/components/schemas/User" - }, - "comments" : { - "description" : "The authorizer's comment.", - "type" : "string" - }, - "date" : { - "description" : "When the authorization was made.", - "type" : "string", - "format" : "date-time" - }, - "level" : { - "description" : "The level number.", - "type" : "integer" - } - } - } ] - }, - "TransactionAuthorizationLevelData" : { - "description" : "Contains detailed data of a payment's authorization level.", - "type" : "object", - "properties" : { - "allowBroker" : { - "description" : "Indicates that any of the payer's brokers can authorize this level.", - "type" : "boolean" - }, - "allowPayer" : { - "description" : "Indicates that the payer can authorize this level.", - "type" : "boolean" - }, - "allowReceiver" : { - "description" : "Indicates that the payer can authorize this level.", - "type" : "boolean" - }, - "allowAdmin" : { - "description" : "Indicates that an administrator can authorize this level.", - "type" : "boolean" - }, - "brokers" : { - "description" : "Contains the brokers that can authorize this level.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/User" - } - } - } - }, - "TransactionAuthorizationPermissions" : { - "description" : "Permissions the user has over a pending payment.", - "type" : "object", - "properties" : { - "authorize" : { - "description" : "The payment can be authorized.", - "type" : "boolean" - }, - "deny" : { - "description" : "The payment can be denied.", - "type" : "boolean" - }, - "cancel" : { - "description" : "The payment can be cenceled regardless the current authorization level.", - "type" : "boolean" - } - } - }, - "TransactionAuthorizationsPermissions" : { - "description" : "Permissions over own authorized payments", - "allOf" : [ { - "$ref" : "#/components/schemas/TransactionAuthorizationPermissions" - }, { - "type" : "object", - "properties" : { - "view" : { - "description" : "Can view own authorized payments?", - "type" : "boolean" - } - } - } ] - }, - "TransactionDataForSearch" : { - "description" : "Contains data used to search transactions for a given owner", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseTransactionDataForSearch" - }, { - "type" : "object", - "properties" : { - "user" : { - "description" : "When the given owner is a user, is the reference to it", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "userPermissions" : { - "description" : "When the given owner is a user, contains the transaction permissions over that user", - "allOf" : [ { - "$ref" : "#/components/schemas/UserTransactionPermissions" - } ] - }, - "accessClients" : { - "description" : "References for access clients which can be used to filter entries by transfers generated by a specific access client", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/EntityReference" + } + }, + "/imported-file/{id}": { + "parameters": [ + { + "$ref": "#/components/parameters/id" + } + ], + "get": { + "operationId": "viewImportedFile", + "summary": "Returns details of an imported file.", + "description": "Returns view data, as well as permissions, over the given imported file.", + "tags": [ + "Imports" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The imported file details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ImportedFileView" + } } - }, - "operators" : { - "description" : "References for operators, which can be used to filter entries by transfers performed or received by that specific operator", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/User" + } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } } - }, - "query" : { - "description" : "Default query filters for the transactions search", - "allOf" : [ { - "$ref" : "#/components/schemas/TransactionQueryFilters" - } ] - } - } - } ] - }, - "TransactionOverviewDataForSearch" : { - "description" : "Contains data used to search transactions regardless of an account owner", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseTransactionDataForSearch" - }, { - "type" : "object", - "properties" : { - "authorizablePaymentTypes" : { - "description" : "Payment types the authenticated administrator can authorize. Only returned when logged-in as administrator and the request had the `pendingMyAuthorization` flag set to true.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransferType" + } + }, + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } } - }, - "query" : { - "description" : "Default query filters for the transactions search", - "allOf" : [ { - "$ref" : "#/components/schemas/TransactionOverviewQueryFilters" - } ] - } - } - } ] - }, - "TransactionOverviewQueryFilters" : { - "description" : "Query filters for transactions regardless of an account owner.", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseTransactionQueryFilters" - }, { - "type" : "object", - "properties" : { - "currencies" : { - "description" : "The currencies internal names or ids.", - "type" : "array", - "items" : { - "type" : "string" + } + }, + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } } - }, - "fromAccountTypes" : { - "description" : "The source account types internal names or ids.", - "type" : "array", - "items" : { - "type" : "string" + } + }, + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } } - }, - "toAccountTypes" : { - "description" : "The source account types internal names or ids.", - "type" : "array", - "items" : { - "type" : "string" + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } } - }, - "pendingMyAuthorization" : { - "description" : "When set to true will only return transactions (`payment`, `recurringPayment` or `scheduledPayment`) in pending authorization state that the logged user can authorize", - "type" : "boolean" - } - } - } ] - }, - "TransactionOverviewResult" : { - "description" : "Represents a transaction.", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseTransactionResult" - }, { - "type" : "object", - "properties" : { - "from" : { - "description" : "The debited account", - "allOf" : [ { - "$ref" : "#/components/schemas/AccountWithOwner" - } ] - }, - "fromName" : { - "description" : "Contains an optional custom from name, which can be set when the transaction is performed.", - "type" : "string" - }, - "to" : { - "description" : "The credited account", - "allOf" : [ { - "$ref" : "#/components/schemas/AccountWithOwner" - } ] - }, - "toName" : { - "description" : "Contains an optional custom to name, which can be set when the transaction is performed.", - "type" : "string" } } - } ] + } }, - "TransactionPreview" : { - "description" : "Base definitions for a preview before performing a transaction", - "type" : "object", - "properties" : { - "confirmationMessage" : { - "description" : "If configured in the payment type, is a message to be shown to the user before confirming the transaction", - "type" : "string" + "put": { + "operationId": "updateImportedFile", + "summary": "Updates details of an imported file.", + "description": "Currently, only the description can be changed.", + "tags": [ + "Imports" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] }, - "confirmationPasswordInput" : { - "description" : "If a confirmation password is used, contains the definitions on how to request that password from the user. This confirmation password is required when performing sensible actions. Sometimes this is dynamic, for example, the confirmation might be configured to be used only once per session, or operations like payments may have a limit per day to be without confirmation (pinless).", - "allOf" : [ { - "$ref" : "#/components/schemas/PasswordInput" - } ] + { + "accessClient": [] + } + ], + "requestBody": { + "description": "The new imported file details", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ImportedFileEdit" + } + } + } + }, + "responses": { + "204": { + "description": "The imported file was updated." }, - "paymentType" : { - "$ref" : "#/components/schemas/TransferType" + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } + } }, - "currency" : { - "$ref" : "#/components/schemas/Currency" + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } + } }, - "fromAccount" : { - "$ref" : "#/components/schemas/AccountWithOwner" + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } }, - "fromOperator" : { - "description" : "The operator who is performing the payment. Only sent if the payment is made from an operator.", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } + } }, - "totalAmount" : { - "description" : "The final amount charged to the payer including fees.", - "type" : "string", - "format" : "number" + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" + } + } + } }, - "customValues" : { - "description" : "The list of custom field values, in a detailed view", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/CustomFieldValue" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } } } } }, - "TransactionQueryFilters" : { - "description" : "Query filters for transactions related to an account owner.", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseTransactionQueryFilters" - }, { - "type" : "object", - "properties" : { - "accountTypes" : { - "description" : "The account types", - "type" : "array", - "items" : { - "type" : "string" + "delete": { + "operationId": "deleteImportedFile", + "summary": "Deletes an imported file.", + "description": "Deletes an imported file.", + "tags": [ + "Imports" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "responses": { + "204": { + "description": "The imported file was deleted." + }, + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" + } } - }, - "direction" : { - "$ref" : "#/components/schemas/TransferDirectionEnum" - } - } - } ] - }, - "TransactionResult" : { - "description" : "Represents a transaction, as viewed from the point-of-view of an account owner. This means that credits will have a positive amount, while debits will be negative.", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseTransactionResult" - }, { - "type" : "object", - "properties" : { - "related" : { - "description" : "Either from or to account", - "allOf" : [ { - "$ref" : "#/components/schemas/AccountWithOwner" - } ] - }, - "relatedName" : { - "description" : "Contains an optional custom from / to name, which can be set when the transaction is performed.", - "type" : "string" - } - } - } ] - }, - "TransactionTypeData" : { - "description" : "Contains definitions regarding a given payment type when performing a transaction (payment or payment request).", - "allOf" : [ { - "$ref" : "#/components/schemas/InternalNamedEntity" - }, { - "type" : "object", - "properties" : { - "currency" : { - "$ref" : "#/components/schemas/Currency" - }, - "fixedAmount" : { - "description" : "The only allowed amount if the payment type uses a fixed amount", - "type" : "string", - "format" : "number" - }, - "allowsRecurringPayments" : { - "description" : "Can payments of this type be made recurring?", - "type" : "boolean" - }, - "maxInstallments" : { - "description" : "The maximum allowed installments. If it is zero, no kind of scheduled payments is allowed. If it is 1, a single future date can be used.", - "type" : "integer" - }, - "defaultExpirationDate" : { - "description" : "The default expiration date, according to the configuration. Only for payment requests.", - "type" : "string", - "format" : "date-time" - }, - "hideExpirationDate" : { - "description" : "Whether the expiration date should be hidden from users, Only for payment requests.", - "type" : "boolean" - }, - "customFields" : { - "description" : "The custom fields related to this payment type", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/CustomFieldDetailed" + } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } } - }, - "ARate" : { - "description" : "The balance aging counter used for this payment. Only for payments.", - "type" : "string", - "format" : "number" - }, - "DRate" : { - "description" : "The balance maturity used for this payment. Only for payments.", - "type" : "string", - "format" : "number" - }, - "DRateCreationValue" : { - "description" : "The initial value for the balance maturity on this payment type. Only for payments.", - "type" : "string", - "format" : "number" - }, - "limitedAwaitingAuthorization" : { - "type" : "boolean", - "description" : "Only for payments." - }, - "noNegativesMaturityPolicy" : { - "type" : "boolean", - "description" : "Only for payments." - }, - "maxAmountByMaturityPolicy" : { - "description" : "The maximum amount that can be performed when `maturityPolicy` is `history`. It corresponds to the maturity table entry indicated by `maturityTableWinnerId`. Only for payments.", - "type" : "string", - "format" : "number" - }, - "maturityTableWinnerId" : { - "description" : "When `maturityPolicy` is `history`, contains the id of the maturity table entry that granted. Only for payments.", - "type" : "string" - }, - "descriptionAvailability" : { - "$ref" : "#/components/schemas/AvailabilityEnum" - }, - "maturityPolicy" : { - "description" : "Only for payments.", - "allOf" : [ { - "$ref" : "#/components/schemas/MaturityPolicyEnum" - } ] - } - } - } ] - }, - "TransactionView" : { - "description" : "Details about a transaction", - "allOf" : [ { - "$ref" : "#/components/schemas/Transaction" - }, { - "type" : "object", - "properties" : { - "channel" : { - "description" : "The channel this transaction was performed on", - "allOf" : [ { - "$ref" : "#/components/schemas/EntityReference" - } ] - }, - "accessClient" : { - "description" : "The access client in use when this transaction was performed", - "allOf" : [ { - "$ref" : "#/components/schemas/EntityReference" - } ] - }, - "oidcClient" : { - "description" : "When the transaction was performed from an OpenID Connect / OAuth2 client, contains a reference to it. The client is the third party application used to perform the payment", - "allOf" : [ { - "$ref" : "#/components/schemas/OidcClient" - } ] - }, - "by" : { - "description" : "The user that actually performed the action. May be different than the from, for example, an administrator can perform payments in behalf of other users", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "receivedBy" : { - "description" : "The operator that actually received the payment. Only available if some other user has paid directly to it or the operator has received the payment via POS.", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "received" : { - "description" : "True if the payment was received via POS.", - "type" : "boolean" - }, - "customValues" : { - "description" : "The list of custom field values", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/CustomFieldValue" + } + }, + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } } - }, - "confirmationPasswordInput" : { - "description" : "If a confirmation password is used, contains the definitions on how to request that password from the user. This confirmation password is required when performing sensible actions. Sometimes this is dynamic, for example, the confirmation might be configured to be used only once per session, or operations like payments may have a limit per day to be without confirmation (pinless).", - "allOf" : [ { - "$ref" : "#/components/schemas/PasswordInput" - } ] - }, - "authorizationLevelData" : { - "description" : "Only returned if the `kind` is either `payment`, `scheduledPayment` or `recurringPayment` and the transaction is pending for authorization. Contains data related to the current autorization level that can be authorized / denied.", - "allOf" : [ { - "$ref" : "#/components/schemas/TransactionAuthorizationLevelData" - } ] - }, - "authorizationPermissions" : { - "description" : "Permissions the authenticated user has over this payment regarding authorizations.", - "allOf" : [ { - "$ref" : "#/components/schemas/TransactionAuthorizationPermissions" - } ] - }, - "authorizations" : { - "description" : "Contains the details of the authorizations this payment has (for the previous levels). To see the final status of the payment please check the `authorizationStatus` property.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransactionAuthorization" + } + }, + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } } - }, - "transfer" : { - "description" : "Only returned if the `kind` is `payment`. This is the transfer generated when the payment was processed. Will be null if the went through authorization and was not authorized. Only returned if this `TransactionView` is not already in a `TransactionView`.", - "allOf" : [ { - "$ref" : "#/components/schemas/TransferView" - } ] - }, - "scheduledPaymentPermissions" : { - "description" : "Only returned if the `kind` is `scheduledPayment`. Permissions over the scheduled payment.", - "allOf" : [ { - "$ref" : "#/components/schemas/ScheduledPaymentPermissions" - } ] - }, - "dueAmount" : { - "description" : "Only returned if the `kind` is `scheduledPayment`. Means the amount that is still needs to be paid until the last installment.", - "type" : "string", - "format" : "number" - }, - "installments" : { - "description" : "Only returned if the `kind` is `scheduledPayment`. Contains the installment references.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/InstallmentView" + } + }, + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } } - }, - "recurringPaymentPermissions" : { - "description" : "Only returned if the `kind` is `recurringPayment`. Permissions over the scheduled payment.", - "allOf" : [ { - "$ref" : "#/components/schemas/RecurringPaymentPermissions" - } ] - }, - "nextOccurrenceDate" : { - "description" : "Only returned if the `kind` is `recurringPayment`. The scheduled date for the next occurrence.", - "type" : "string", - "format" : "date-time" - }, - "occurrenceInterval" : { - "description" : "Only returned if the `kind` is `recurringPayment`. The interval between occurrences.", - "allOf" : [ { - "$ref" : "#/components/schemas/TimeInterval" - } ] - }, - "occurrencesCount" : { - "description" : "Only returned if the `kind` is `recurringPayment` or if it is `paymentRequest` and `scheduling` is `recurring`. The programmed number of occurrences. If not set, means the payment will be processed until manually canceled.", - "type" : "integer" - }, - "occurrences" : { - "description" : "Only returned if the `kind` is `recurringPayment`. A list with all occurrences this payment has.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/InstallmentView" + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } } - }, - "originalTransfer" : { - "description" : "Only returned if the `kind` is `chargeback`. This is the original transfer that has been charged back.", - "allOf" : [ { - "$ref" : "#/components/schemas/Transfer" - } ] - }, - "chargebackTransfer" : { - "description" : "Only returned if the `kind` is `chargeback`. This is the transfer which performed the chargeback.", - "allOf" : [ { - "$ref" : "#/components/schemas/Transfer" - } ] - }, - "paymentRequestPermissions" : { - "description" : "Permissions the user has over this payment request.", - "allOf" : [ { - "$ref" : "#/components/schemas/PaymentRequestPermissions" - } ] - }, - "comments" : { - "description" : "Only returned if the `kind` is either `paymentRequest` or `externalPayment`. The comments the user informed when performing the payment.", - "type" : "string" - }, - "expirationDate" : { - "description" : "Only returned if the `kind` is either `paymentRequest`, `externalPayment` or `ticket`. The deadline for the payment to be processed. In case of `externalPayment` if no user is registered with either e-mail or mobile phone matching, it is canceled. The same is done in case of `ticket` if it is not accepted by any user.", - "type" : "string", - "format" : "date-time" - }, - "changeExpirationDateComments" : { - "description" : "Only returned if the `kind` is `paymentRequest`. The comments the user informed when changing the expiration date.", - "type" : "string" - }, - "processDate" : { - "description" : "Only returned if the `kind` is either `paymentRequest`, `ticket` or `externalPayment` and the status is `processed`. In case of `payementRequest` the status could also be `scheduled`. The date the `externalPayment`, `paymentRequest`, `ticket` was processed if the `status` is `processed` or the date the `paymentRequest` will be processed if the `status` is `scheduled`.", - "type" : "string", - "format" : "date-time" - }, - "transaction" : { - "description" : "Only returned if the `kind` is `paymentRequest`, `ticket` or `externalPayment` and `status` is `processed`. Reference to the transaction that was generated when processing this payment request / externalPayment / ticket.", - "allOf" : [ { - "$ref" : "#/components/schemas/Transaction" - } ] - }, - "smsCode" : { - "description" : "Only returned if the `kind` is either `paymentRequest` and `status` is not `processed`. The code that can be used by the receiver to confirm this payment request via SMS operation.", - "type" : "string" - }, - "scheduling" : { - "description" : "Only returned if the `kind` is `paymentRequest`. Indicates whether the generated payment will be a scheduled, recurring or regular payment once this payment request is confirmed.", - "allOf" : [ { - "$ref" : "#/components/schemas/PaymentRequestSchedulingEnum" - } ] - }, - "installmentsCount" : { - "description" : "Only returned if the `kind` is `paymentRequest` and `scheduling` is `scheduled`. Indicates the number of installments to be generated.", - "type" : "integer" - }, - "firstInstallmentIsImmediate" : { - "description" : "Only returned if the `kind` is `paymentRequest` and `scheduling` is `scheduled`. Indicates whether the first installment should be processed immediately when the payment request is confirmed.", - "type" : "boolean" - }, - "firstOccurrenceIsImmediate" : { - "description" : "Only returned if the `kind` is `paymentRequest` and `scheduling` is `recurring`. Indicates whether the first occurrence should be processed immediately when the payment request is confirmed.", - "type" : "boolean" - }, - "externalPaymentPermissions" : { - "description" : "Only returned if the `kind` is `externalPayment`. Permissions over the external payment.", - "allOf" : [ { - "$ref" : "#/components/schemas/ExternalPaymentPermissions" - } ] - }, - "toPrincipalType" : { - "description" : "Only returned if the `kind` is `externalPayment`. Is the user identification method for this external payment (for example, e-mail or mobile phone).", - "allOf" : [ { - "$ref" : "#/components/schemas/PrincipalType" - } ] - }, - "toPrincipalValue" : { - "description" : "Only returned if the `kind` is `externalPayment`. Is the user identification value for this external payment (for example, the e-mail or mobile phone values).", - "type" : "string" - }, - "payee" : { - "description" : "Only returned if the `kind` is `ticket` and the ticket status is `open`. Is user that created the ticket.", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "payerPrincipal" : { - "description" : "Only returned if the `kind` is `ticket`, the ticket status is `open` and there is a fixed payer. Is the principal (for example, login name or e-mail) which can be used to login the user, so he can accept the ticket.", - "type" : "string" - }, - "payer" : { - "description" : "Only returned if the `kind` is `ticket` and the ticket status is `open`. Is the fixed payer user, if any.", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "approveUrl" : { - "description" : "Only returned if the `kind` is `ticket` and `status` is `open`. The URL used by clients to approve the ticket.", - "type" : "string" - }, - "cancelUrl" : { - "description" : "Only returned if the `kind` is `ticket`. The URL to redirect when canceling the ticket.", - "type" : "string" - }, - "successUrl" : { - "description" : "Only returned if the `kind` is `ticket`. The URL to redirect after successfully accepting a ticket", - "type" : "string" - }, - "preview" : { - "description" : "Only returned if the `kind` is `ticket` and the ticket can be accepted. Is the payment preview if accepting the ticket. The preview will never contain a confirmation password input, because this object already contains it on the `confirmationPasswordInput` property, neither a payment to be sent back, as this payment is supposed to be confirmed by accepting the ticket. Also, the preview's currency is never sent, as it is the same one of the ticket.", - "allOf" : [ { - "$ref" : "#/components/schemas/PaymentPreview" - } ] - }, - "boughtVouchers" : { - "description" : "Only returned if the `kind` is `payment` and the payment was done to buy vouchers.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Voucher" + } + } + } + } + }, + "/imported-file/{id}/data-for-edit": { + "parameters": [ + { + "$ref": "#/components/parameters/id" + } + ], + "get": { + "operationId": "getImportedFileDataForEdit", + "summary": "Returns data for editing an imported file.", + "description": "Returns data for editing an imported file.", + "tags": [ + "Imports" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The data for editing an imported file.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ImportedFileDataForEdit" + } } - }, - "voucherTransaction" : { - "description" : "Only returned if the `kind` is `payment` and the payment was done to due to a voucher transaction (redeem or top-up).", - "allOf" : [ { - "$ref" : "#/components/schemas/VoucherTransactionResult" - } ] - }, - "usersWhichCanAddToContacts" : { - "$ref" : "#/components/schemas/TransactionSubjectsEnum" - }, - "usersWhichCanViewProfile" : { - "$ref" : "#/components/schemas/TransactionSubjectsEnum" - }, - "authorizationType" : { - "$ref" : "#/components/schemas/TransactionAuthorizationTypeEnum" - }, - "scheduledPaymentStatus" : { - "$ref" : "#/components/schemas/ScheduledPaymentStatusEnum" - }, - "recurringPaymentStatus" : { - "$ref" : "#/components/schemas/RecurringPaymentStatusEnum" - }, - "paymentRequestStatus" : { - "$ref" : "#/components/schemas/PaymentRequestStatusEnum" - }, - "externalPaymentStatus" : { - "$ref" : "#/components/schemas/ExternalPaymentStatusEnum" - }, - "ticketStatus" : { - "$ref" : "#/components/schemas/TicketStatusEnum" - }, - "exportFormats" : { - "description" : "The formats which the data can be exported", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ExportFormat" + } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } } - }, - "feedback" : { - "description" : "The payment feedback ()if any). Only returned if the `kind` is either `payment`, `scheduledPayment` or `recurringPayment` and the transaction between users.", - "allOf" : [ { - "$ref" : "#/components/schemas/PaymentFeedback" - } ] - }, - "feedbackPermissions" : { - "description" : "Permissions the authenticated user has over this payment regarding feedback. Only returned if the `kind` is either `payment`, `scheduledPayment` or `recurringPayment` and is a user-to.user payment.", - "allOf" : [ { - "$ref" : "#/components/schemas/PaymentFeedbacksPermissions" - } ] - }, - "feesOnAuthorization" : { - "description" : "Only returned for direct payments which are in pending authorization status. Contains the (visible) transfer fees that would be triggered once the payment is authorized", - "allOf" : [ { - "$ref" : "#/components/schemas/TransferFeesPreview" - } ] - } - } - } ] - }, - "Transfer" : { - "description" : "Reference to a balance transfer between accounts", - "allOf" : [ { - "$ref" : "#/components/schemas/Trans" - }, { - "type" : "object", - "properties" : { - "kind" : { - "$ref" : "#/components/schemas/TransferKind" - }, - "statuses" : { - "description" : "Contains the current status for each status flow this transfer has", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransferStatus" + } + }, + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } + } + }, + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } } } } - } ] - }, - "TransferDataForSearch" : { - "description" : "Contains data for searching transfers over multiple accounts", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseTransferDataForSearch" - }, { - "type" : "object", - "properties" : { - "accountTypes" : { - "description" : "References for the account types", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/AccountType" + } + } + }, + "/imported-file/{id}/process": { + "parameters": [ + { + "$ref": "#/components/parameters/id" + } + ], + "post": { + "operationId": "processImportedFile", + "summary": "Starts processing rows of the given imported file.", + "description": "Starts the processing of rows which are valid and not marked as skipped.", + "tags": [ + "Imports" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "responses": { + "204": { + "description": "The file will start being processed in the background." + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } } - }, - "currencies" : { - "description" : "References for the available currencies", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Currency" + } + }, + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } } - }, - "query" : { - "description" : "Default query filters for the general transfers search", - "allOf" : [ { - "$ref" : "#/components/schemas/TransferQueryFilters" - } ] - } - } - } ] - }, - "TransferDetailed" : { - "description" : "More detailed information on a transfer.", - "allOf" : [ { - "$ref" : "#/components/schemas/Transfer" - }, { - "type" : "object", - "properties" : { - "parent" : { - "description" : "Reference to the parent transfer that generated this one, if any. When returned, will never have `parent` nor `children`.", - "allOf" : [ { - "$ref" : "#/components/schemas/TransferDetailed" - } ] - }, - "children" : { - "description" : "Reference to the transfers generated by this one, if any. When returned, will never have `parent` nor `children`.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransferDetailed" + } + }, + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } } - }, - "transferFee" : { - "description" : "Reference to the transfer fee which generated this transfer. Only returned if `kind` is `transferFee` and logged-in as an administrator.", - "allOf" : [ { - "$ref" : "#/components/schemas/EntityReference" - } ] - }, - "accountFee" : { - "description" : "Reference to the account fee which generated this transfer. Only returned if `kind` is `accountFee` and logged-in as an administrator.", - "allOf" : [ { - "$ref" : "#/components/schemas/EntityReference" - } ] - }, - "installment" : { - "description" : "Reference to the installment which triggered this transfer. Only returned if `kind` is `installment`.", - "allOf" : [ { - "$ref" : "#/components/schemas/Installment" - } ] - }, - "chargebackOf" : { - "description" : "Reference to the transfer that this transfer has charged back. Only returned if `kind` is `chargeback`.", - "allOf" : [ { - "$ref" : "#/components/schemas/Transfer" - } ] - }, - "chargedBackBy" : { - "description" : "Reference to the transfer that has charged back this transfer. Only returned if this transfer has been charged back.", - "allOf" : [ { - "$ref" : "#/components/schemas/Transfer" - } ] - }, - "description" : { - "description" : "The transfer description. Only returned for transfers whose types are generated. Otherwise, the description, if any, should be obtained from `transaction.description`.", - "type" : "string" - }, - "ARate" : { - "description" : "The balance aging counter", - "type" : "string", - "format" : "number" - }, - "DRate" : { - "description" : "The balance maturity", - "type" : "string", - "format" : "number" - } - } - } ] - }, - "TransferFeePreview" : { - "description" : "Preview of a transfer fee in case a payment is confirmed", - "type" : "object", - "properties" : { - "fee" : { - "description" : "The transfer fee", - "allOf" : [ { - "$ref" : "#/components/schemas/EntityReference" - } ] - }, - "amount" : { - "description" : "The transfer fee amout", - "type" : "string", - "format" : "number" - }, - "currency" : { - "description" : "The transfer fee currency", - "allOf" : [ { - "$ref" : "#/components/schemas/Currency" - } ] - }, - "from" : { - "description" : "The account from which funds will be transferred", - "allOf" : [ { - "$ref" : "#/components/schemas/AccountWithOwner" - } ] - }, - "to" : { - "description" : "The account to which funds will be transferred", - "allOf" : [ { - "$ref" : "#/components/schemas/AccountWithOwner" - } ] - }, - "type" : { - "description" : "The payment type of the generated fee", - "allOf" : [ { - "$ref" : "#/components/schemas/TransferType" - } ] - } - } - }, - "TransferFeesPreview" : { - "description" : "Preview of applied fees", - "type" : "object", - "properties" : { - "mainAmount" : { - "description" : "This reflects the new transaction amount. Depending on the configured fees, it could happen that the fee amount is deducted from transaction amount. If no fees deduct, it will be the same as transaction amount. E.g: payment from A to B by 100 units with two fees: 10 units deducted from payment amount and other of 15 not deducted. Then the `totalAmount` will be 115, 90 for the `mainAmount`, 10 for the first fee and 15 for the other fee.", - "type" : "string", - "format" : "number" - }, - "totalAmount" : { - "description" : "Indicates the total amount to be paid, including fees.", - "type" : "string", - "format" : "number" - }, - "fees" : { - "description" : "Only returned for direct payments. Contains the fees that would be paid by the payer if the payment is confirmed.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransferFeePreview" - } - } - } - }, - "TransferFilter" : { - "description" : "Reference to a transfer filter", - "allOf" : [ { - "$ref" : "#/components/schemas/InternalNamedEntity" - }, { - "type" : "object", - "properties" : { - "accountType" : { - "description" : "Reference to the account type", - "allOf" : [ { - "$ref" : "#/components/schemas/EntityReference" - } ] - } - } - } ] - }, - "TransferQueryFilters" : { - "description" : "Query filters for transfers", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseTransferQueryFilters" - }, { - "type" : "object", - "properties" : { - "currencies" : { - "description" : "Either ids or internal names of the currency", - "type" : "array", - "items" : { - "type" : "string" + } + }, + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } } - }, - "fromAccountTypes" : { - "description" : "Either ids or internal names of the origin account type", - "type" : "array", - "items" : { - "type" : "string" + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } } - }, - "toAccountTypes" : { - "description" : "Either ids or internal names of the destination account type", - "type" : "array", - "items" : { - "type" : "string" - } - } - } - } ] - }, - "TransferResult" : { - "description" : "Result from searching transfers", - "allOf" : [ { - "$ref" : "#/components/schemas/Transfer" - }, { - "type" : "object", - "properties" : { - "fromName" : { - "description" : "The custom name for the debited account. Only returned if a custom name was given when performing the payment.", - "type" : "string" - }, - "toName" : { - "description" : "The custom name for the credited account. Only returned if a custom name was given when performing the payment.", - "type" : "string" - } - } - } ] - }, - "TransferStatus" : { - "description" : "Reference to a status and its flow", - "allOf" : [ { - "$ref" : "#/components/schemas/InternalNamedEntity" - }, { - "type" : "object", - "properties" : { - "flow" : { - "description" : "The status flow", - "allOf" : [ { - "$ref" : "#/components/schemas/EntityReference" - } ] - } - } - } ] - }, - "TransferStatusFlow" : { - "description" : "A transfer status flow determines a status a transfer may have. For each flow the transfer participates (can be multiple) the transfer will have a status. The transition between states is also defined on the flow.", - "allOf" : [ { - "$ref" : "#/components/schemas/InternalNamedEntity" - }, { - "type" : "object", - "properties" : { - "statuses" : { - "description" : "All statuses this flow has", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/EntityReference" - } - } - } - } ] - }, - "TransferStatusFlowForTransferView" : { - "description" : "Contains other data for a transfer status flow when viewing a transfer.", - "allOf" : [ { - "$ref" : "#/components/schemas/InternalNamedEntity" - }, { - "type" : "object", - "properties" : { - "canManage" : { - "description" : "Can this status flow be managed by the authenticated user?", - "type" : "boolean" - }, - "log" : { - "description" : "A log of status changes for this flow", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransferStatusLog" - } - } - } - } ] - }, - "TransferStatusLog" : { - "description" : "Details of a change that took place in a transfer status.", - "allOf" : [ { - "$ref" : "#/components/schemas/Entity" - }, { - "type" : "object", - "properties" : { - "by" : { - "description" : "The user that performed the change", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "date" : { - "description" : "The date / time the action was performed", - "type" : "string", - "format" : "date-time" - }, - "status" : { - "description" : "The new status", - "allOf" : [ { - "$ref" : "#/components/schemas/EntityReference" - } ] - }, - "comments" : { - "description" : "Comments provided by the user which performed the change", - "type" : "string" - } - } - } ] - }, - "TransferType" : { - "description" : "Reference to a transfer type", - "allOf" : [ { - "$ref" : "#/components/schemas/InternalNamedEntity" - }, { - "type" : "object", - "properties" : { - "from" : { - "description" : "Reference to the source account type", - "allOf" : [ { - "$ref" : "#/components/schemas/EntityReference" - } ] - }, - "to" : { - "description" : "Reference to the destination account type", - "allOf" : [ { - "$ref" : "#/components/schemas/EntityReference" - } ] - } - } - } ] - }, - "TransferTypeWithCurrency" : { - "description" : "A transfer type with currency", - "allOf" : [ { - "$ref" : "#/components/schemas/TransferType" - }, { - "type" : "object", - "properties" : { - "currency" : { - "$ref" : "#/components/schemas/Currency" - } - } - } ] - }, - "TransferView" : { - "description" : "Details about a balance transfer between accounts", - "allOf" : [ { - "$ref" : "#/components/schemas/TransferDetailed" - }, { - "type" : "object", - "properties" : { - "transaction" : { - "description" : "If this balance transfer was originated from a transaction (like a payment or scheduled payment), contains the reference to this transaction. Only returned if this `TransferView` is not already in a `TransactionView`.", - "allOf" : [ { - "$ref" : "#/components/schemas/TransactionView" - } ] - }, - "statusFlows" : { - "description" : "List with each status this transfer has, with additional information, such as the flow and the log", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransferStatusFlowForTransferView" + } + } + } + } + }, + "/imported-file/{id}/abort": { + "parameters": [ + { + "$ref": "#/components/parameters/id" + } + ], + "post": { + "operationId": "abortImportedFile", + "summary": "Aborts the importing of a given file", + "description": "Attempts to abort the importing of the given file, returning a flag indicating whether the import was actually aborted.", + "tags": [ + "Imports" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "responses": { + "200": { + "description": "Returns a boolean flag indicating whether the imported file was actually aborted.", + "content": { + "application/json": { + "schema": { + "type": "boolean" + } } - }, - "canChargeback" : { - "description" : "Can the authenticated user chargeback this transfer?", - "type" : "boolean" - }, - "operations" : { - "description" : "The list of custom operations the logged user can run over this transfer", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Operation" + } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } + } + }, + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } + } + }, + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/imported-file/{id}/lines/data-for-search": { + "parameters": [ + { + "$ref": "#/components/parameters/id" + } + ], + "get": { + "operationId": "getImportedLinesDataForSearch", + "summary": "Searches for imported lines of a given file.", + "description": "Returns a list with matching imported file lines.", + "tags": [ + "Imports" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The imports which match the criteria", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ImportedLineDataForSearch" + } + } + } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } + } + }, + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } + } + }, + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/imported-file/{id}/lines": { + "parameters": [ + { + "$ref": "#/components/parameters/id" + } + ], + "get": { + "operationId": "searchImportedLines", + "summary": "Searches for imported lines in a given file.", + "description": "Returns a page of matching lines.", + "tags": [ + "Imports" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + }, + { + "name": "keywords", + "in": "query", + "required": false, + "description": "Keywords to search within the line values", + "schema": { + "type": "string" + } + }, + { + "name": "lineNumbers", + "in": "query", + "required": false, + "description": "The line numbers to include.", + "schema": { + "type": "array", + "items": { + "description": "", + "type": "integer" + } + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number (zero-based) of the search. The default value is zero.", + "schema": { + "type": "integer" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.", + "schema": { + "type": "integer" + } + }, + { + "name": "skipTotalCount", + "in": "query", + "required": false, + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit.", + "schema": { + "type": "boolean" + } + }, + { + "name": "statuses", + "in": "query", + "required": false, + "description": "The statuses to filter.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImportedLineStatusEnum" + } + } + } + ], + "responses": { + "200": { + "description": "The result page.", + "headers": { + "X-Total-Count": { + "schema": { + "type": "integer" + }, + "description": "The total number of results. It may be configured in Cyclos to skip the total count, which is useful on large databases, where the count itself may use a lot of resources from the database. If disabled, this header is not returned." + }, + "X-Page-Size": { + "schema": { + "type": "integer" + }, + "description": "The maximum number of results per page" + }, + "X-Current-Page": { + "schema": { + "type": "integer" + }, + "description": "The current page the results are in" + }, + "X-Has-Next-Page": { + "schema": { + "type": "boolean" + }, + "description": "Returns whether there is a next page. This is normally always returned, whether total count is enabled or not. If the total count is not returned, is the only way for clients to know whether more results are available or not." + } + }, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImportedLineResult" + } + } + } + } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } + } + }, + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } + } + }, + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/imported-file/{id}/skip": { + "parameters": [ + { + "$ref": "#/components/parameters/id" + } + ], + "post": { + "operationId": "skipImportedLines", + "summary": "Marks a set of lines to be skipped.", + "description": "Sets the specified lines of the given file as skipped on import. Only validated lines can be skipped.", + "tags": [ + "Imports" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "name": "lines", + "description": "The line ids to skip.", + "required": true, + "in": "query", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "204": { + "description": "The specified lines were marked to be skipped." + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } + } + }, + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } + } + }, + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } + } + }, + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/imported-file/{id}/include": { + "parameters": [ + { + "$ref": "#/components/parameters/id" + } + ], + "post": { + "operationId": "includeImportedLines", + "summary": "Marks a set of lines to be included.", + "description": "Sets the specified lines of the given file as included on import. Only validated lines can be skipped / included.", + "tags": [ + "Imports" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "name": "lines", + "description": "The line ids to include.", + "required": true, + "in": "query", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "204": { + "description": "The specified lines were marked to be included." + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } + } + }, + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } + } + }, + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } + } + }, + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/imported-line/{id}": { + "parameters": [ + { + "$ref": "#/components/parameters/id" + } + ], + "get": { + "operationId": "viewImportedLine", + "summary": "Returns details of an imported line.", + "description": "Returns details of an imported line.", + "tags": [ + "Imports" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The imported line details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ImportedLineView" + } + } + } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } + } + }, + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } + } + }, + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + }, + "put": { + "operationId": "updateImportedLine", + "summary": "Updates the values of an imported line.", + "description": "Updates the values of an imported line.", + "tags": [ + "Imports" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "responses": { + "204": { + "description": "The line was updated" + }, + "409": { + "description": "This operation expected an entity state, but it has resulted in a conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" + } + } + } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } + } + }, + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } + } + }, + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } + } + }, + "422": { + "description": "Input error. Either a validation error or the maximum allowed items was exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InputError" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "requestBody": { + "description": "The line to be edited.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ImportedLineEdit" + } + } + } + } + } + }, + "/imported-line/{id}/data-for-edit": { + "parameters": [ + { + "$ref": "#/components/parameters/id" + } + ], + "get": { + "operationId": "getImportedLineDataForEdit", + "summary": "Returns data for editing an imported line.", + "description": "Returns data for editing an imported line.", + "tags": [ + "Imports" + ], + "security": [ + { + "basic": [] + }, + { + "session": [] + }, + { + "accessClient": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "The data for editing an imported line.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ImportedLineDataForEdit" + } + } + } + }, + "401": { + "description": "Unauthorized access. Missing or invalid crendentials supplied for such operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } + } + }, + "403": { + "description": "Either permission was denied for such operation or an illegal action was attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } + } + }, + "404": { + "description": "An expected data was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "405": { + "description": "Some required service is unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnavailableError" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + } + }, + "components": { + "securitySchemes": { + "basic": { + "type": "http", + "scheme": "basic", + "description": "User and password, which are sent on every request (stateless). The user identification, commonly referred as principal, can be, according to the settings in Cyclos:\n\n- Login name;\n- E-mail;\n- Mobile phone;\n- Account number;\n- Custom field (fields configured as principal type in Cyclos);\n- Pin (see below for more details).\n\nThere is a configuration in Cyclos, under System > Configurations > Channels (tab) > Channel that specifies which identification methods (principal types) are allowed for that channel. There is also a setting for the default. When a specific principal type is not given, if there is a 'Default user identification method', that one is used. If there's no default, all possible principal types are attempted.\n\nTo specify the principal type, set the HTTP header `Principal-Type`, containing the principal type internal name. If there is a default set in the channel configuration, but still you want all types to be attempted, pass `*` in the `Principal-Type` header.\n\nIt is also possible to access with a device PIN. To do so, first activate a device PIN, which will result in both a PIN principal value (identifier) and a cryptographic salt. Then, to authenticate as PIN, set the `Principal-Type` header to `#` and send the `Authorization` header with value: `Basic base64(principal:salt+PIN)`." + }, + "session": { + "type": "apiKey", + "name": "Session-Token", + "in": "header", + "description": "A steteful access, using a session token as obtained from a call to `POST /auth/session`. That token is then passed in on every request. The POST request itself must be called using the `basic` authentication to set the user and password. The authenticated user can then be seen on Cyclos in the connected users functionality." + }, + "accessClient": { + "type": "apiKey", + "name": "Access-Client-Token", + "in": "header", + "description": "Access via an access client token, which is obtained when the client is activated. This token is passed in as a header on every request (stateless)." + }, + "oidc": { + "type": "openIdConnect", + "openIdConnectUrl": "http://root/.well-known/openid-configuration", + "description": "OAuth2 / OpenID Connect authentication. Clients must be previously registered in Cyclos. Then they request an authorization using the standard OAuth2 / OpenID Connect authorization endpoint at `http://root/api/oidc/authorize`. When the OpenID Connect standard scope `openid` is requested, the flow will follow the OpenID Connect specification, allowing `id_token`s to be issued. Otherwise, plain OAuth2 authorization will be granted. The obtained access token should be passed in the `Authorization: Bearer ` request header to access the API." + } + }, + "parameters": { + "page": { + "name": "page", + "required": false, + "in": "query", + "schema": { + "type": "integer" + }, + "description": "The page number (zero-based) of the search. The default value is zero." + }, + "pageSize": { + "name": "pageSize", + "required": false, + "in": "query", + "schema": { + "type": "integer" + }, + "description": "The maximum number of records that will be returned on the search. The default value is 40." + }, + "keywords": { + "name": "keywords", + "required": false, + "in": "query", + "schema": { + "type": "string" + }, + "description": "Textual search keywords. Sometimes, like in user search, the fields matched depends on what is configured on the products." + }, + "fields": { + "name": "fields", + "required": false, + "in": "query", + "explode": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": "Select which fields to include on returned data. On the beginning of this page is an explanation on how this parameter works." + }, + "customFields": { + "name": "customFields", + "required": false, + "in": "query", + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": "Custom field values. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by : (colon). For example, `customFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, profileFields=field1:valueA|valueB. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `customFields=rank:bronze|silver,birthDate:2000-01-01|2001-12-31` would match results whose custom field with internal name `rank` is either bronze or silver, and whose `birthDate` is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `customFields=birthDate:|2001-12-31`." + }, + "user": { + "name": "user", + "required": true, + "in": "path", + "x-dotInPath": true, + "schema": { + "type": "string" + }, + "description": "Can be one of:\n\n- a user identification value, such as id, username, e-mail, phone, etc.\n Id is always allowed, others depend on Cyclos configuration. Note that\n a valid numeric value is always considered as id. For example, when\n using another identification method that can be numeric only, prefix\\\n the value with a single quote (like in Excel spreadsheets);\n\n- `self` for the currently authenticated user." + }, + "userInQuery": { + "name": "user", + "required": false, + "in": "query", + "schema": { + "type": "string" + }, + "description": "Can be one of:\n\n- a user identification value, such as id, username, e-mail, phone, etc.\n Id is always allowed, others depend on Cyclos configuration. Note that\n a valid numeric value is always considered as id. For example, when\n using another identification method that can be numeric only, prefix\\\n the value with a single quote (like in Excel spreadsheets);\n\n- `self` for the currently authenticated user." + }, + "userNoSelf": { + "name": "user", + "required": true, + "in": "path", + "x-dotInPath": true, + "schema": { + "type": "string" + }, + "description": "A user identification value, such as id, username, e-mail, phone, etc. Id is always allowed, others depend on Cyclos configuration. Note that a valid numeric value is always considered as id. For example, when using another identification method that can be numeric only, prefix the value with a single quote (like in Excel spreadsheets), for example, `'1234567890`;" + }, + "owner": { + "name": "owner", + "required": true, + "in": "path", + "x-dotInPath": true, + "schema": { + "type": "string" + }, + "description": "Can be one of:\n\n- a user identification value, such as id, username, e-mail, phone, etc.\n Id is always allowed, others depend on Cyclos configuration. Note that\n a valid numeric value is always considered as id. For example, when\n using another identification method that can be numeric only, prefix\\\n the value with a single quote (like in Excel spreadsheets);\n\n- `self` for the currently authenticated user;\n- `system` for the system owner." + }, + "id": { + "name": "id", + "required": true, + "in": "path", + "schema": { + "type": "string" + }, + "description": "The object identification" + }, + "format": { + "name": "format", + "required": true, + "in": "path", + "description": "The format to export the data", + "schema": { + "type": "string" + } + }, + "order": { + "name": "order", + "required": true, + "in": "path", + "x-dotInPath": true, + "schema": { + "type": "string" + }, + "description": "Either the order id or number. If the number is solely comprised of numbers, it must be prefixed by a single quote." + }, + "ad": { + "name": "ad", + "required": true, + "in": "path", + "x-dotInPath": true, + "schema": { + "type": "string" + }, + "description": "Can be either the advertisement internal identifier or, in case of webshop advertisements, can be the product number (if the owner is the logged user) or a string in the form `productNumber@user`, with the user identifier as well. If the number is solely comprised of numbers, it must be prefixed by a single quote." + }, + "confirmationPassword": { + "name": "confirmationPassword", + "in": "header", + "schema": { + "type": "string" + }, + "required": false, + "description": "The credential used to confirm this action, if needed. The name is kept for historical reasons, and not necessarily means a password value, but any of the accepted credential types. The actual credential used for confirmation depends on the channel configuration, and can be one of the following:\n- A password: The channel configuration defines which password\n type is used. The value is the plain password value, unprefixed.\n- A trusted device confirmation: The value must be in fhe format\n `confirmation:`, and must use the id of\n a device confirmation which has been previously approved with a\n trusted device. Generally the page would subscribe itself to\n a push notification (see the `Push` tag in this API) when the\n device confirmation is approved, and immediately submit the form.\n- A TOTP, which is a numeric password generated by an authenticator app.\n This kind of confirmation is very secure and convenient, because the\n password itself isn't stored anywhere, and the user doesn't have to\n memorize another password. The value must be in the format `totp:123456`." + }, + "accountType": { + "name": "accountType", + "description": "The account type internal name or id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + "cyclosVersion": { + "name": "cyclosVersion", + "in": "query", + "schema": { + "type": "string" + }, + "required": false, + "description": "The last known Cyclos version. Sometimes, data to be cached depends on the version of the Cyclos application, and this helps controlling such cases" + }, + "headerIf": { + "name": "headerIf", + "in": "query", + "schema": { + "type": "string" + }, + "required": false, + "description": "Controls the header cache. If is a boolean value (`true` or `false`) will forcibly return or skip the content. Otherwise, it should be the content hash (SHA-256) returned in the corresponding data. In this case, the translated content (if any) or the content itself will be returned only when changed. When blank will always return it.\nAlso, the deprecated format `id|version|dataTranslationId|dataTranslationVersion` will be supported till Cyclos 4.17, in 4.18 the support will be removed. Please take into account this format will not detect changes in the content due to changes in the resolved variables (if any)." + }, + "footerIf": { + "name": "footerIf", + "in": "query", + "schema": { + "type": "string" + }, + "required": false, + "description": "Controls the footer cache. If is a boolean value (`true` or `false`) will forcibly return or skip the content. Otherwise, it should be the content hash (SHA-256) returned in the corresponding data. In this case, the translated content (if any) or the content itself will be returned only when changed. When blank will always return it.\nAlso, the deprecated format `id|version|dataTranslationId|dataTranslationVersion` will be supported till Cyclos 4.17, in 4.18 the support will be removed. Please take into account this format will not detect changes in the content due to changes in the resolved variables (if any)." + }, + "themeIf": { + "name": "themeIf", + "in": "query", + "schema": { + "type": "string" + }, + "required": false, + "description": "Controls the theme cache. If is a boolean value (`true` or `false`) will forcibly return or skip the content. Otherwise, it should be a string in the form `id|version`. In this case, the content will be returned only when changed. When blank will always return it." + }, + "themeByComponents": { + "name": "themeByComponents", + "in": "query", + "schema": { + "type": "boolean" + }, + "required": false, + "description": "Flag used to indicate how the theme must be returned (if returned): true means the theme components (base / advanced definitions and custom style) will be filled. Otherwise the final CSS (i. e the theme content). Only valid if the kind of the user interface is NOT `mobile`. For that kind the theme es always returned by its components." + } + }, + "schemas": { + "AccountKind": { + "description": "Indicates whether an account belongs to system or user.\nPossible values are:\n- `system`: System account, there is only one account per type in the system. Managed only by administrators\n- `user`: User account, there is one account of this type per user.", + "type": "string", + "enum": [ + "system", + "user" + ] + }, + "AdAddressResultEnum": { + "description": "Determines which address is returned on the search, if any. By default no addresses are returned. This option is useful for displaying results as locations on a map. In all cases only located addresses (those that have the geographical coordinates set) are returned. When returning all addresses, data related with multiple addresses is returned multiple times.\nPossible values are:\n- `all`: All addresses are returned.\n- `nearest`: The nearest address from the reference location is returned. Only usable if a reference coordinate (`latitude` and `longitude`)\n- `none`: Addresses are not returned.", + "type": "string", + "enum": [ + "all", + "nearest", + "none" + ] + }, + "AdCategoriesDisplayEnum": { + "description": "The possible views for simple or webshop advertisements categories.\nPossible values are:\n- `images`: A list including the categories with its corresponding image.\n- `simple`: A simplified list of categories.", + "type": "string", + "enum": [ + "images", + "simple" + ] + }, + "AdInitialSearchTypeEnum": { + "description": "Indicates how initial advertisement search is performed\nPossible values are:\n- `ads`: List advertisements first.\n- `categories`: List categories first.", + "type": "string", + "enum": [ + "ads", + "categories" + ] + }, + "AdKind": { + "description": "The possible kinds of an advertisement.\nPossible values are:\n- `simple`: A simple advertisement that can be viewed, but not directly bought\n- `webshop`: An advertisement that is part of an webshop. Can be bought, there is stock management, etc.", + "type": "string", + "enum": [ + "simple", + "webshop" + ] + }, + "AdOrderByEnum": { + "description": "Indicates how advertisements results are ordered.\nPossible values are:\n- `date`: Newest advertisements are returned first.\n- `distance`: Only useful when providing a location, will return nearer advertisements first.\n- `priceAsc`: Smaller prices are returned first. Advertisements without price are returned last.\n- `priceDesc`: Higher prices are returned first. Advertisements without price are returned last.\n- `random`: Without definite order\n- `relevance`: This is the default if keywords are used. Best matching advertisements come first.", + "type": "string", + "enum": [ + "date", + "distance", + "priceAsc", + "priceDesc", + "random", + "relevance" + ] + }, + "AdStatusEnum": { + "description": "The possible status for an advertisement.\nPossible values are:\n- `active`: The advertisement is published and can be seen by other users.\n- `disabled`: The advertisement is disabled because the owner no longer has access to the currency of the advertisement. It cannot be seen by other users.\n- `draft`: In draft status, only the owner can see and edit the advertisement. This status is only possible if the system is configured to require authorizations.\n- `expired`: The advertisement publication period has already expired, and cannot be seen by other users.\n- `hidden`: The advertisement is manually hidden from other users\n- `pending`: The advertisement is pending for an authorization and cannot be seen by other users. This status is only possible if the system is configured to require authorizations.\n- `scheduled`: The advertisement has a future publication period, and cannot be seen by other users.", + "type": "string", + "enum": [ + "active", + "disabled", + "draft", + "expired", + "hidden", + "pending", + "scheduled" + ] + }, + "AddressFieldEnum": { + "description": "The address fields that can be configured to be enabled or required.\nPossible values are:\n- `addressLine1`: The first line of the descriptive address\n- `addressLine2`: The second line of the descriptive address\n- `buildingNumber`: The numeric identifier for a land parcel, house, building or other\n- `city`: The city name\n- `complement`: The complement (like apartment number)\n- `country`: The country, represented as 2-letter, uppercase, ISO 3166-1 code\n- `neighborhood`: The neighborhood name\n- `poBox`: The post-office box, is an uniquely addressable box\n- `region`: The region or state\n- `street`: The street name\n- `zip`: A zip code that identifies a specific geographic (postal) delivery area", + "type": "string", + "enum": [ + "addressLine1", + "addressLine2", + "buildingNumber", + "city", + "complement", + "country", + "neighborhood", + "poBox", + "region", + "street", + "zip" + ] + }, + "AddressQueryFieldEnum": { + "description": "Fields which can be used when filtering by user address, by using the `address.` name.\nPossible values are:\n- `address`: Filters by any field in the street address: `addressLine1`, `addressLine2`, `street`, `buildingNumber` or `complement`\n- `city`: Filters by city name\n- `country`: Filters by country, represented as 2-letter, uppercase, ISO 3166-1 code (exact match)\n- `neighborhood`: Filters by neighborhood name\n- `poBox`: Filters by post-office box (exact match)\n- `region`: Filters by region or state\n- `zip`: Filters by zip (postal) code (exact match)", + "type": "string", + "enum": [ + "address", + "city", + "country", + "neighborhood", + "poBox", + "region", + "zip" + ] + }, + "AdminMenuEnum": { + "description": "Which administration menu should a data be displayed.\nPossible values are:\n- `contentManagement`: Content management\n- `reports`: Reports\n- `systemBanking`: System accounts\n- `systemManagement`: System management\n- `userManagement`: User management", + "type": "string", + "enum": [ + "contentManagement", + "reports", + "systemBanking", + "systemManagement", + "userManagement" + ] + }, + "AuthorizationActionEnum": { + "description": "Possible actions that could be confirmed with a device for a payment authorization.\nPossible values are:\n- `authorize`: Authorize the payment authorization\n- `cancel`: Cancel the payment authorization\n- `deny`: Deny the payment authorization", + "type": "string", + "enum": [ + "authorize", + "cancel", + "deny" + ] + }, + "AvailabilityEnum": { + "description": "Determines the availability of a data.\nPossible values are:\n- `disabled`: The data is disabled\n- `optional`: The data is enabled and optional\n- `required`: The data is enabled and required", + "type": "string", + "enum": [ + "disabled", + "optional", + "required" + ] + }, + "BadRequestErrorCode": { + "description": "Error codes for 400 Bad request HTTP status.\nPossible values are:\n- `general`: Bad request format\n- `json`: Error in the JSON format", + "type": "string", + "enum": [ + "general", + "json" + ] + }, + "BalanceLevelEnum": { + "description": "Contains the possible balance levels on the users with balances search.\nPossible values are:\n- `high`: High balance, above the medium balance range upper bound\n- `low`: Low balance, below the medium balance range lower bound\n- `medium`: Medium balance, between the lower and upper bounds of the medium balance range", + "type": "string", + "enum": [ + "high", + "low", + "medium" + ] + }, + "BasicProfileFieldEnum": { + "description": "The existing user basic profile fields.\nPossible values are:\n- `accountNumber`: Account number\n- `address`: Address\n- `email`: E-mail\n- `image`: Image\n- `name`: Full name\n- `phone`: Phone (either mobile or land-line)\n- `username`: Login name", + "type": "string", + "enum": [ + "accountNumber", + "address", + "email", + "image", + "name", + "phone", + "username" + ] + }, + "BrokeringActionEnum": { + "description": "An action over a user's brokers.\nPossible values are:\n- `add`: The broker was added\n- `remove`: The broker was removed\n- `setMain`: The broker was set as main", + "type": "string", + "enum": [ + "add", + "remove", + "setMain" + ] + }, + "BuyVoucherErrorCode": { + "description": "Possible errors when buying a voucher.\nPossible values are:\n- `maxAmountForPeriod`: The maximum allowed buy amount for a period (example, a month) has been exceeded\n- `maxOpenAmount`: The maximum open amount for this voucher type for the buyer user has been exceeded\n- `maxTotalOpenAmount`: The maximum total open amount for this voucher type, for all users, has been exceeded\n- `notAllowedForUser`: The user attempting to buy vouchers is not allowed to buy vouchers of this type\n- `payment`: There was an error when performing the payment\n- `unexpected`: An unexpected error has occurred. See the `exceptionType` and `exceptionMessage` fields for the internal information.", + "type": "string", + "enum": [ + "maxAmountForPeriod", + "maxOpenAmount", + "maxTotalOpenAmount", + "notAllowedForUser", + "payment", + "unexpected" + ] + }, + "CaptchaProviderEnum": { + "description": "Possible captcha providers.\nPossible values are:\n- `internal`: Internal CAPTCHA provider using images\n- `recaptchaV2`: reCAPTCHA v2", + "type": "string", + "enum": [ + "internal", + "recaptchaV2" + ] + }, + "ClientActionEnum": { + "description": "Possible actions that could be confirmed with a device for an access client.\nPossible values are:\n- `block`: Block the access client\n- `getActivationCode`: Get the activation code\n- `unassign`: Unassign the access client\n- `unblock`: Unblock the access client", + "type": "string", + "enum": [ + "block", + "getActivationCode", + "unassign", + "unblock" + ] + }, + "ClientStatusEnum": { + "description": "The status of an access client.\nPossible values are:\n- `active`: The access client is active, and can operate normally\n- `blocked`: The access client is blocked and cannot be used until it is unblocked\n- `removed`: The access client was removed, but had transactions, so couldn't be physically removed\n- `unassigned`: The access client is unassigned (disconnected) from an (remote) application", + "type": "string", + "enum": [ + "active", + "blocked", + "removed", + "unassigned" + ] + }, + "CodeVerificationStatusEnum": { + "description": "The status of a mobile phone verification challenge.\nPossible values are:\n- `codeNotSent`: Deprecated: Since 4.16 this code is never returned, but failed is returned instead.. There isn't a current code to be verified (for example the was never sent or the code was reset by max attempts reached)\n- `expired`: Deprecated: Since 4.16 this code is never returned, but failed is returned instead.. The code has expired and can't be used anymore.\n- `failed`: The code was wrong (it doesn't match the expected value)\n- `maxAttemptsReached`: The max attempts with an invalid code was reached.\n- `success`: The code was correct and accepted.", + "type": "string", + "x-deprecated-enum": [ + "codeNotSent|4.18|Since 4.16 this code is never returned, but failed is returned instead.", + "expired|4.18|Since 4.16 this code is never returned, but failed is returned instead." + ], + "enum": [ + "codeNotSent", + "expired", + "failed", + "maxAttemptsReached", + "success" + ] + }, + "ConflictErrorCode": { + "description": "Error codes for 409 Conflict entity HTTP status.\nPossible values are:\n- `constraintViolatedOnRemove`: An attempt to remove some entity has failed, probably because that entity is in use, that is, is being referenced by some other entity.\n- `staleEntity`: Failure in the optimistic lock. It means some entity was fetched for editing by 2 clients. Then they both saved it. The first one is successful, but the second one will fail. If you get this error, make sure the `version` field is being sent with the correct value, as fetched from the server.", + "type": "string", + "enum": [ + "constraintViolatedOnRemove", + "staleEntity" + ] + }, + "ContactOrderByEnum": { + "description": "Possible options for ordering the results of a contact list.\nPossible values are:\n- `alphabeticallyAsc`: Users are ordered by name (or whatever field is set to format users) in ascending order.\n- `alphabeticallyDesc`: Users are ordered by name (or whatever field is set to format users) in descending order.\n- `relevance`: This is the default if keywords are used. Best matching users come first.", + "type": "string", + "enum": [ + "alphabeticallyAsc", + "alphabeticallyDesc", + "relevance" + ] + }, + "CredentialTypeEnum": { + "description": "Types of credentials used to login or confirm an action\nPossible values are:\n- `device`: A trusted device which was used to scan a QR-code and the user approved the action\n- `password`: A password typed-in by the user.\n- `pin`: A device-specific PIN\n- `totp`: A TOTP (RFC 6238) generated by an authenticator app", + "type": "string", + "enum": [ + "device", + "password", + "pin", + "totp" + ] + }, + "CustomFieldControlEnum": { + "description": "The UI control (widget) type that should be used to render this field for edit. Most notably, the types that can have distinct controls are singleSelection, that could be rendered as a single selection widget or radio button group, and multi selection, which could be rendered as a multi selection widget or a checkbox group.\nPossible values are:\n- `checkbox`: A checkbox group\n- `entitySelection`: A widget to select a linked entity (for example, an auto-complete for users)\n- `multiSelection`: A multi-selection field\n- `radio`: A radio button group\n- `richEditor`: An HTML editor\n- `singleSelection`: A single-selection field\n- `text`: A single line text\n- `textarea`: A multi line text\n- `upload`: A widget to upload a file", + "type": "string", + "enum": [ + "checkbox", + "entitySelection", + "multiSelection", + "radio", + "richEditor", + "singleSelection", + "text", + "textarea", + "upload" + ] + }, + "CustomFieldKind": { + "description": "Determines the kind if a custom field.\nPossible values are:\n- `contact`: Contact fields.\n- `contactInfo`: Additional contact information fields.\n- `custom_operation`: Custom operation fields.\n- `custom_wizard`: Custom wizard fields.\n- `document`: Document fields.\n- `marketplace`: Advertisements fields.\n- `record`: Record fields.\n- `transaction`: Transaction fields.\n- `user`: User profile fields.\n- `voucher`: Voucher fields.", + "type": "string", + "enum": [ + "contact", + "contactInfo", + "custom_operation", + "custom_wizard", + "document", + "marketplace", + "record", + "transaction", + "user", + "voucher" + ] + }, + "CustomFieldSizeEnum": { + "description": "The size of the widget that should be rendered.\nPossible values are:\n- `full`: The widget should occupy 100% of the available area\n- `large`: A large widget\n- `medium`: A medium widget\n- `small`: A small widget\n- `tiny`: A very small widget", + "type": "string", + "enum": [ + "full", + "large", + "medium", + "small", + "tiny" + ] + }, + "CustomFieldTypeEnum": { + "description": "The data type for the custom field.\nPossible values are:\n- `boolean`: A boolean value\n- `date`: A date value\n- `decimal`: A decimal value\n- `dynamicMultiSelection`: Multiple selection based on options generated by a custom script\n- `dynamicSelection`: Single selection based on options generated by a custom script\n- `file`: Multiple binary files\n- `image`: Multiple images\n- `integer`: An integer value\n- `linkedEntity`: Another entity. Uses the `linkedEntityType` to define which kind of entity is it\n- `multiSelection`: Multiple enumerated values\n- `richText`: A multi line string formatted as HTML\n- `singleSelection`: A single enumerated value\n- `string`: A single line string\n- `text`: A multi line string\n- `url`: An URL", + "type": "string", + "enum": [ + "boolean", + "date", + "decimal", + "dynamicMultiSelection", + "dynamicSelection", + "file", + "image", + "integer", + "linkedEntity", + "multiSelection", + "richText", + "singleSelection", + "string", + "text", + "url" + ] + }, + "DateFormatEnum": { + "description": "The format for dates.\nPossible values are:\n- `dmyDash`: DD-MM-YYYY\n- `dmyPeriod`: DD.MM.YYYY\n- `dmySlash`: DD/MM/YYYY\n- `mdyDash`: MM-DD-YYYY\n- `mdyPeriod`: MM.DD.YYYY\n- `mdySlash`: MM/DD/YYYY\n- `ymdDash`: YYYY-MM-DD\n- `ymdPeriod`: YYYY.MM.DD\n- `ymdSlash`: YYYY/MM/DD", + "type": "string", + "enum": [ + "dmyDash", + "dmyPeriod", + "dmySlash", + "mdyDash", + "mdyPeriod", + "mdySlash", + "ymdDash", + "ymdPeriod", + "ymdSlash" + ] + }, + "DeliveryMethodChargeTypeEnum": { + "description": "How the price is determined on this delivery method.\nPossible values are:\n- `fixed`: The delivery method price will be fixed.\n- `negotiated`: The delivery method price will be negotiated between the seller and the buyer.", + "type": "string", + "enum": [ + "fixed", + "negotiated" + ] + }, + "DeliveryMethodTypeEnum": { + "description": "How the products are delivered.\nPossible values are:\n- `deliver`: The products are delivered to the buyer's address.\n- `pickup`: The products are delivered to the seller's pickup point", + "type": "string", + "enum": [ + "deliver", + "pickup" + ] + }, + "DeviceActionEnum": { + "description": "Possible actions that could be confirmed with a device for another device.\nPossible values are:\n- `activate`: Activate a device as trusted\n- `remove`: Remove the trusted device", + "type": "string", + "enum": [ + "activate", + "remove" + ] + }, + "DeviceActivationModeEnum": { + "description": "Contains useful information needed when a device is being activated as trusted.\nPossible values are:\n- `disabled`: The activation is not required but the user can not activate a device as trusted because it does not have any mediums to receive the activation code or the session is already trusted\n- `optional`: The activation is not required and the user can activate a device by code\n- `required`: The activation is required with an activation code\n- `requiredNoMediums`: The activation is required but the user can not activate a device as trusted because it does not have any mediums to receive the activation code\n- `requiredWithDevice`: The activation is required with an existing trusted device", + "type": "string", + "enum": [ + "disabled", + "optional", + "required", + "requiredNoMediums", + "requiredWithDevice" + ] + }, + "DeviceConfirmationStatusEnum": { + "description": "The possible status for a device confirmation.\nPossible values are:\n- `approved`: The confirmation was approved through a trusted device\n- `pending`: The confirmation is pending for approval through a trusted device\n- `rejected`: The confirmation was rejected through a trusted device", + "type": "string", + "enum": [ + "approved", + "pending", + "rejected" + ] + }, + "DeviceConfirmationTypeEnum": { + "description": "Contains all possible device confirmation types.\nPossible values are:\n- `acceptOrder`: A confirmation for accepting a pending order as buyer\n- `approveTicket`: A confirmation for approving a pending ticket as payer\n- `buyVouchers`: A confirmation for buying vouchers\n- `changeAccountLimits`: A confirmation for change the account limits of a user account\n- `chargeback`: A confirmation for transfer chargeback\n- `clientAction`: A confirmation for an action over an access client\n- `editProfile`: A confirmation for editing the profile of his own\n- `generatePassword`: A confirmation for generating a new password\n- `generateVouchers`: A confirmation for generating vouchers\n- `importPayments`: A confirmation for importin payments as admin\n- `importUserPayments`: A confirmation for batch payments as user\n- `importUserSendVouchers`: A confirmation for batch vouchers sending as user\n- `manageAddress`: A confirmation for managing an user address of his own\n- `manageAuthorization`: A confirmation for managing a pending payment authorization\n- `manageContactInfo`: A confirmation for managing an additional contact information of his own\n- `manageDevice`: A confirmation for managing a trusted device\n- `manageExternalPayment`: A confirmation for managing an external payment\n- `manageFailedOccurrence`: A confirmation for managing a recurring payment failed occurrence\n- `manageInstallment`: A confirmation for managing a scheduled payment installment\n- `managePaymentRequest`: A confirmation for managing a payment request\n- `managePhone`: A confirmation for managing a phone of his own\n- `manageRecord`: A confirmation for managing a record if the record type requires confirmation\n- `manageRecurringPayment`: A confirmation for managing a recurring payment\n- `manageScheduledPayment`: A confirmation for managing a scheduled payment\n- `manageVoucher`: A confirmation for managing a voucher\n- `performExternalPayment`: A confirmation for performing an external payment\n- `performPayment`: A confirmation for performing a payment\n- `personalizeNfc`: A confirmation for personalizing a NFC tag\n- `removeTotpSecret`: A confirmation for removing an authenticator app secret\n- `runOperation`: A confirmation for running a custom operation\n- `secondaryLogin`: A confirmation for the secondary login\n- `sendVoucher`: A confirmation for sending a voucher\n- `shoppingCartCheckout`: A confirmation for the cart checkout\n- `topUpVoucher`: A confirmation for a voucher top-up", + "type": "string", + "enum": [ + "acceptOrder", + "approveTicket", + "buyVouchers", + "changeAccountLimits", + "chargeback", + "clientAction", + "editProfile", + "generatePassword", + "generateVouchers", + "importPayments", + "importUserPayments", + "importUserSendVouchers", + "manageAddress", + "manageAuthorization", + "manageContactInfo", + "manageDevice", + "manageExternalPayment", + "manageFailedOccurrence", + "manageInstallment", + "managePaymentRequest", + "managePhone", + "manageRecord", + "manageRecurringPayment", + "manageScheduledPayment", + "manageVoucher", + "performExternalPayment", + "performPayment", + "personalizeNfc", + "removeTotpSecret", + "runOperation", + "secondaryLogin", + "sendVoucher", + "shoppingCartCheckout", + "topUpVoucher" + ] + }, + "DistanceUnitEnum": { + "description": "Determines the unit used to measure distances.\nPossible values are:\n- `kilometer`: Kilometer(s)\n- `mile`: Mile(s)", + "type": "string", + "enum": [ + "kilometer", + "mile" + ] + }, + "DocumentKind": { + "description": "The kind of a document.\nPossible values are:\n- `dynamic`: A shared dynamic document - the content is a HTML text obtained from a template and variables\n- `static`: A shared static document - the content is a downloaded file\n- `user`: An individual static document belonging to a specific user", + "type": "string", + "enum": [ + "dynamic", + "static", + "user" + ] + }, + "DocumentRangeEnum": { + "description": "The document range, either shared or individual.\nPossible values are:\n- `individual`: A document belonging to a specific user\n- `shared`: Shared documents. They have a category, and are the same documents for all users", + "type": "string", + "enum": [ + "individual", + "shared" + ] + }, + "EmailUnsubscribeKind": { + "description": "The type of e-mail which is being unsubscribed\nPossible values are:\n- `mailing`: An e-mail for a mailing list\n- `message`: An e-mail which forwards an internal message\n- `notification`: An e-mail which was generated by a notification", + "type": "string", + "enum": [ + "mailing", + "message", + "notification" + ] + }, + "ErrorKind": { + "description": "Error types associated to the HTTP Status 500.\nPossible values are:\n- `buyVoucher`: An error has occurred when buying a voucher\n- `forgottenPassword`: An error has occurred when changing a forgotten password.\n- `general`: An unexpected error has occurred\n- `initializeNfc`: An error has occurred when initializing a NFC token\n- `nested`: An error which has another internal error at a given property / index\n- `nfcAuth`: An error has occurred when making an external NFC authentication\n- `oidc`: An error for an OpenID Connect / OAuth 2 operation\n- `payment`: An error has occurred when making a payment\n- `personalizeNfc`: An error has occurred when personalizing a NFC token\n- `pos`: An error has occurred when receiving a payment on a POS operation\n- `redeemVoucher`: An error has occurred when redeeming a voucher\n- `shoppingCart`: An error has occurred when interacting with a shopping cart.\n- `shoppingCartCheckout`: An error has occurred when checking out a shopping cart.\n- `topUpVoucher`: An error has occurred on a voucher top-up", + "type": "string", + "enum": [ + "buyVoucher", + "forgottenPassword", + "general", + "initializeNfc", + "nested", + "nfcAuth", + "oidc", + "payment", + "personalizeNfc", + "pos", + "redeemVoucher", + "shoppingCart", + "shoppingCartCheckout", + "topUpVoucher" + ] + }, + "ExternalPaymentActionEnum": { + "description": "Possible actions that could be confirmed with a device for an external payment.\nPossible values are:\n- `cancel`: Cancel the external payment", + "type": "string", + "enum": [ + "cancel" + ] + }, + "ExternalPaymentStatusEnum": { + "description": "The status of an external payment.\nPossible values are:\n- `canceled`: The external payment was canceled\n- `expired`: The external payment has expired without the external user being registered\n- `failed`: The external payment processing has failed\n- `pending`: The external payment is pending processing\n- `processed`: The external payment has been processed", + "type": "string", + "enum": [ + "canceled", + "expired", + "failed", + "pending", + "processed" + ] + }, + "FailedOccurrenceActionEnum": { + "description": "Possible actions that could be confirmed with a device for a recurring payment failed occurrence.\nPossible values are:\n- `process`: Process the recurring payment failed occurrence", + "type": "string", + "enum": [ + "process" + ] + }, + "ForbiddenErrorCode": { + "description": "Error codes for 403 Forbidden HTTP status.\nPossible values are:\n- `blockedByTotp`: The user was blocked for exceeding the TOTP attempts.\n- `devicePinRemoved`: The device pin was removed by exceeding the allowed attempts.\n- `disabledPassword`: The password being used was disabled.\n- `expiredPassword`: The password being used has expired.\n- `illegalAction`: Attempt to perform an action that is not allowed on this context.\n- `inaccessibleChannel`: This channel cannot be accessed by the user.\n- `inaccessibleGroup`: An administrator logging in another user which is not of the managed groups. Should be handled generically, in case more group-specific login retrictions are added to Cyclos.\n- `inaccessibleNetwork`: A restricted global administrator is trying to login to a network they can't access.\n- `inaccessiblePrincipal`: The used identification method (principal type) cannot be used in this channel.\n- `indefinitelyBlocked`: The password was indefinitely blocked by exceeding the allowed attempts.\n- `invalidDeviceActivationCode`: The device activation code was no valid.\n- `invalidDeviceConfirmation`: The device confirmation being used is invalid (normally as a confirmation password).\n- `invalidPassword`: The password being used is invalid (normally the confirmation password).\n- `invalidTotp`: A given TOTP is invalid.\n- `loginConfirmation`: The user needs to confirm the login before proceeding.\n- `operatorWithPendingAgreements`: The operator cannot access because his owner member has pending agreements.\n- `otpInvalidated`: The OTP was invalidated.\n- `pendingAgreements`: There is at least one agreement which needs to be accepted in order to access the system.\n- `permissionDenied`: The operation was denied because a required permission was not granted.\n- `resetPassword`: The password being used was manually reset.\n- `temporarilyBlocked`: The password was temporarily blocked by exceeding the allowed attempts.", + "type": "string", + "enum": [ + "blockedByTotp", + "devicePinRemoved", + "disabledPassword", + "expiredPassword", + "illegalAction", + "inaccessibleChannel", + "inaccessibleGroup", + "inaccessibleNetwork", + "inaccessiblePrincipal", + "indefinitelyBlocked", + "invalidDeviceActivationCode", + "invalidDeviceConfirmation", + "invalidPassword", + "invalidTotp", + "loginConfirmation", + "operatorWithPendingAgreements", + "otpInvalidated", + "pendingAgreements", + "permissionDenied", + "resetPassword", + "temporarilyBlocked" + ] + }, + "ForgottenPasswordErrorCode": { + "description": "Application-specific error codes for a ForgottenPassword error.\nPossible values are:\n- `invalidSecurityAnswer`: if the answer for the security question was incorrect.\n- `unexpected`: An unexpected error has occurred.", + "type": "string", + "enum": [ + "invalidSecurityAnswer", + "unexpected" + ] + }, + "FrontendContentLayoutEnum": { + "description": "How a content page should be displayed in the modern frontend.\nPossible values are:\n- `card`: The content is shown in a card with regular padding\n- `cardTight`: The content is shown in a card with no padding\n- `full`: The content uses the full available space", + "type": "string", + "enum": [ + "card", + "cardTight", + "full" + ] + }, + "FrontendEnum": { + "description": "Indicates a Cyclos frontend.\nPossible values are:\n- `classic`: The classic web frontend\n- `new`: The new frontend", + "type": "string", + "enum": [ + "classic", + "new" + ] + }, + "FrontendLandingPageEnum": { + "description": "The possible pages to show on first access.\nPossible values are:\n- `home`: The home page\n- `login`: The login page", + "type": "string", + "enum": [ + "home", + "login" + ] + }, + "FrontendMenuEnum": { + "description": "The menu in which some content should be displayed.\nPossible values are:\n- `banking`: Banking operations\n- `brokering`: Brokering\n- `content`: Content\n- `dashboard`: Logged user's dashboard\n- `home`: Guest home page\n- `login`: Login page\n- `marketplace`: Marketplace\n- `operators`: Operators\n- `personal`: Personal\n- `publicDirectory`: Public user directory\n- `publicMarketplace`: Public advertisement search\n- `registration`: Public user registration\n- `users`: User directory", + "type": "string", + "enum": [ + "banking", + "brokering", + "content", + "dashboard", + "home", + "login", + "marketplace", + "operators", + "personal", + "publicDirectory", + "publicMarketplace", + "registration", + "users" + ] + }, + "FrontendPageTypeEnum": { + "description": "Determines the type of content of a content page in the modern frontend.\nPossible values are:\n- `content`: The page displays the content inline.\n- `iframe`: The page displays an inline frame embedding an external URL\n- `operation`: The page runs a custom operation of scope `menu`\n- `url`: The page should open an external URL\n- `wizard`: The page runs a wizard of scope `menu`", + "type": "string", + "enum": [ + "content", + "iframe", + "operation", + "url", + "wizard" + ] + }, + "FrontendScreenSizeEnum": { + "description": "Indicates a screen size for the modern frontend.\nPossible values are:\n- `desktop`: Desktop\n- `feature`: Feature phone\n- `mobile`: Smart phone\n- `tablet`: Tablet", + "type": "string", + "enum": [ + "desktop", + "feature", + "mobile", + "tablet" + ] + }, + "GeneralImportedFileContextEnum": { + "description": "Context to search for general imported files\nPossible values are:\n- `payments`: Regular payments\n- `system`: System imports", + "type": "string", + "enum": [ + "payments", + "system" + ] + }, + "GeneralImportedFileKind": { + "description": "Types of general imported file\nPossible values are:\n- `ads`: Advertisements\n- `generalReferences`: General references\n- `payments`: Payments\n- `records`: Records\n- `tokens`: Tokens\n- `transfers`: Transfers\n- `users`: Users", + "type": "string", + "enum": [ + "ads", + "generalReferences", + "payments", + "records", + "tokens", + "transfers", + "users" + ] + }, + "GroupKind": { + "description": "The possible kinds of group or group set.\nPossible values are:\n- `adminGroup`: An administrator group\n- `brokerGroup`: A broker group\n- `groupSet`: A group set\n- `memberGroup`: A member (regular user) group", + "type": "string", + "enum": [ + "adminGroup", + "brokerGroup", + "groupSet", + "memberGroup" + ] + }, + "IdentificationMethodEnum": { + "description": "The way an user is identified to either perform or receive a payment.\nPossible values are:\n- `autocomplete`: The client application should search for an user and pass in the id\n- `contacts`: The client application should access the contact list of the authenticated user and pass the id\n- `principalType`: The client application should pass in an identification (principal) of the user, such as login name, e-mail and so on", + "type": "string", + "enum": [ + "autocomplete", + "contacts", + "principalType" + ] + }, + "IdentityProviderCallbackStatusEnum": { + "description": "The status the result of a callback from an identity provider.\nPossible values are:\n- `denied`: The user has denied the request. Generally nothing should be done, as the popup will be automatically closed.\n- `error`: There was an error. The `errorMessage` property is likely to contain the error description, though it can be empty. If so, a generic error message should be displayed.\n- `linked`: The currently logged user was successfully linked to the provider.\n- `loginEmail`: Successful login. No user was previously linked to this provider account, but a user was matched by e-mail and automatically linked. The `sessionToken` is returned.\n- `loginLink`: Successful login with a user was previously linked to the provider.\n- `loginNoEmail`: Similar to `loginNoMatch`, except that the identity provider hasn't returned / disclosed the user's e-mail address.\n- `loginNoMatch`: No matching user, either linked or by e-mail. If on the next login the `requestId` value is passed in, a link will be automatically created, so the next time the login works directly. The `sessionToken` is returned.\n- `registrationData`: The profile data was read and the available data has been returned.\n- `registrationDone`: The user was directly registered and logged-in. The `sessionToken` is returned.\n- `wizard`: The wizard execution has transitioned to the next step, and the identity provider information was stored on the server.", + "type": "string", + "enum": [ + "denied", + "error", + "linked", + "loginEmail", + "loginLink", + "loginNoEmail", + "loginNoMatch", + "registrationData", + "registrationDone", + "wizard" + ] + }, + "IdentityProviderNotLinkReasonEnum": { + "description": "Possible reasons why the link between user and identity provider could not be created.\nPossible values are:\n- `globalUserNetworkIdpIgnored`: A login from a global administrator together with an identity provider request for an identity provider defined in a network.\n- `unsupportedPrincipalType`: The user identification method used in the login is not supported for linking. E.g trusted devices are not supported, it's quite strange situation because it means the user choose to login with an identity provider, then the user doesn't match and at the moment of perform the login to Cyclos he/her choose to login with a trusted device. The login with trusted device and with an identity provider, both offer the same kind of ease for a quick login, probably the user will choose to login with a trusted device from the beginning.\n- `userDisabled`: The user has explicitly disabled the identity provider in their settings.", + "type": "string", + "enum": [ + "globalUserNetworkIdpIgnored", + "unsupportedPrincipalType", + "userDisabled" + ] + }, + "ImageKind": { + "description": "Determines the kind of an image.\nPossible values are:\n- `contactInfo`: An image of an additional contact information\n- `customFieldValue`: An image used as custom field value\n- `identityProvider`: An external identity provider\n- `marketplace`: Advertisement images are associated with an advertisement, be it simple or for web shop.\n- `marketplaceCategory`: An image of an advertisement (simple or webshop)\n- `oidcClient`: An OpenID Connect client\n- `profile`: User profile images are those associated with the user profile. The first profile image is used to depict the user on search results.\n- `systemCustom`: System custom images are additional images an administrator that can be used on rich text contents.\n- `temp`: A temporary image which can upload for later associating with an entity being registered (for example, user or advertisement).\n- `userCustom`: User custom images are additional images that can be used on rich text contents.\n- `voucherCategory`: An image of a voucher category\n- `voucherTemplate`: An image of a voucher template\n- `voucherType`: An image of a voucher type", + "type": "string", + "enum": [ + "contactInfo", + "customFieldValue", + "identityProvider", + "marketplace", + "marketplaceCategory", + "oidcClient", + "profile", + "systemCustom", + "temp", + "userCustom", + "voucherCategory", + "voucherTemplate", + "voucherType" + ] + }, + "ImageSizeEnum": { + "description": "The possible sizes of images. The actual pixel size depends on the configuration in Cyclos.\nPossible values are:\n- `large`: Full image size\n- `medium`: Medium thumbnail\n- `small`: Small thumbnail\n- `tiny`: Tiny thumbnail", + "type": "string", + "enum": [ + "large", + "medium", + "small", + "tiny" + ] + }, + "ImportedFileKind": { + "description": "Type of imported file\nPossible values are:\n- `ads`: Advertisements\n- `generalReferences`: General references\n- `payments`: Payments imported by an administrator\n- `records`: Records\n- `tokens`: Tokens\n- `transfers`: Transfers\n- `userPayments`: Batch payments of a user\n- `userSendVouchers`: Batch vouchers sending of a user\n- `users`: Users", + "type": "string", + "enum": [ + "ads", + "generalReferences", + "payments", + "records", + "tokens", + "transfers", + "userPayments", + "userSendVouchers", + "users" + ] + }, + "ImportedFileStatusEnum": { + "description": "Possible status for an imported file\nPossible values are:\n- `aborted`: The file processing was aborted\n- `archived`: The file was archived, meaning all rows and embedded files were removed\n- `imported`: The valid and non-skipped rows were successfully imported\n- `importing`: The file is currently being imported, meaning the rows are being processed\n- `internalError`: Internal error while processing the file\n- `invalid`: The imported file is invalid\n- `readingCsv`: The CSV file is being parsed\n- `readingZip`: If the file was imported as a ZIP file, the ZIP is being read\n- `ready`: The rows were read the the file is ready for import", + "type": "string", + "enum": [ + "aborted", + "archived", + "imported", + "importing", + "internalError", + "invalid", + "readingCsv", + "readingZip", + "ready" + ] + }, + "ImportedLineStatusEnum": { + "description": "Possible status for an imported line.\nPossible values are:\n- `importError`: The line would be imported, but there was an error which prevented it.\n- `imported`: The line has been successfully imported.\n- `ready`: The line is ready to be imported.\n- `skipped`: The line has been marked as skipped to prevent it from being imported.\n- `validationError`: The line has validation errors.", + "type": "string", + "enum": [ + "importError", + "imported", + "ready", + "skipped", + "validationError" + ] + }, + "InitializeNfcErrorCode": { + "description": "Application-specific error codes for an initialize NFC error.\nPossible values are:\n- `tokenInUse`: The token specified for initialization is already in use (exists and it is active)\n- `unexpected`: An unexpected error has occurred. See the `exceptionType` and `exceptionMessage` fields for the internal information.", + "type": "string", + "enum": [ + "tokenInUse", + "unexpected" + ] + }, + "InputErrorCode": { + "description": "Error codes for 422 Unprocessable entity HTTP status. It means there was an error with the input sent to the operation.\nPossible values are:\n- `aggregated`: Represents an aggregation of other input errors\n- `dataConversion`: Some data conversion has failed. For example, when sending a date with an invalid format\n- `fileUploadSize`: An uploaded file size exceeds the maximum allowed\n- `maxItems`: There was an attempt to create an item, but the maximum number of allowed items was exceeded\n- `missingParameter`: Missing a required request parameter\n- `queryParse`: A full-text query keywords contained an invalid text\n- `validation`: One or more of the fields sent contains invalid values", + "type": "string", + "enum": [ + "aggregated", + "dataConversion", + "fileUploadSize", + "maxItems", + "missingParameter", + "queryParse", + "validation" + ] + }, + "InstallmentActionEnum": { + "description": "Possible actions that could be confirmed with a device for a scheduled payment installment.\nPossible values are:\n- `process`: Process the scheduled payment installment\n- `settle`: Settle the scheduled payment installment", + "type": "string", + "enum": [ + "process", + "settle" + ] + }, + "InstallmentStatusEnum": { + "description": "The status of a installment.\nPossible values are:\n- `blocked`: The installment is blocked, and won't be automatically processed on its due date\n- `canceled`: The installment was canceled\n- `failed`: The installment processing failed, for example, because there was no funds in the source account\n- `processed`: The installment was processed, generating a transfer\n- `scheduled`: The installment is scheduled for a future date\n- `settled`: The installment was marked as settled by the receiver", + "type": "string", + "enum": [ + "blocked", + "canceled", + "failed", + "processed", + "scheduled", + "settled" + ] + }, + "InvalidDeviceConfirmationEnum": { + "description": "The possible results for an invalid device confirmation.\nPossible values are:\n- `invalidConfirmation`: The confirmation being processed / checked was not found or not belongs to the authenticated user\n- `invalidDevice`: The trusted device used to approve / reject the confirmation was not found or is not associated to the authenticated user\n- `maxCheckAtemptsReached`: The maximum number of attempts to check for a processed (approved / rejected) device confirmation was reached. The logged user was blocked", + "type": "string", + "enum": [ + "invalidConfirmation", + "invalidDevice", + "maxCheckAtemptsReached" + ] + }, + "LinkedEntityTypeEnum": { + "description": "When the type is linkedEntity, indicates the entity type.\nPossible values are:\n- `advertisement`: An advertisement\n- `record`: A record (user or system)\n- `transaction`: A transaction (payment, scheduled payment, payment request, etc)\n- `transfer`: A transfer\n- `user`: An user", + "type": "string", + "enum": [ + "advertisement", + "record", + "transaction", + "transfer", + "user" + ] + }, + "LogoKind": { + "description": "The type of logo to request\nPossible values are:\n- `classic`: The logo used by the classic frontend\n- `classicShortcut`: The shortcut icon used by the classic frontend\n- `frontend`: The logo used by the new frontend\n- `maskable`: A maskable icon used when installing the new frontend on Android devices\n- `mobile`: The logo used by the mobile app\n- `pay`: The logo used by the ticket / easy invoice interface\n- `report`: The logo used on printed reports", + "type": "string", + "enum": [ + "classic", + "classicShortcut", + "frontend", + "maskable", + "mobile", + "pay", + "report" + ] + }, + "MapPreferenceEnum": { + "description": "How the map is initialized in the mobile.\nPossible values are:\n- `defaultMap`: Show the map using the zoom and gps location as set in the configuration\n- `filters`: Show the search filters first\n- `localMap`: Show the near map directly, using the users phone gps data. When the gps is disabled use the location from the configuration", + "type": "string", + "enum": [ + "defaultMap", + "filters", + "localMap" + ] + }, + "MaturityPolicyEnum": { + "description": "Indicates how a this payment type restricts payments based on the balance maturity.\nPossible values are:\n- `always`: The payment can always be performed, regardless its maturity\n- `history`: It the balance maturity ever reached zero in the past, that balance can be used on payment. If later on the maturity went above zero, that new balance cannot be used. Is normally used in conjunction with the maturity table, so the user can pick the balance from past maturity\n- `zero`: The payment can only be performed if the current maturity is zero", + "type": "string", + "enum": [ + "always", + "history", + "zero" + ] + }, + "MessageBoxEnum": { + "description": "Possible message boxes\nPossible values are:\n- `inbox`: The received messages\n- `sent`: The sent messages\n- `trash`: The trash messages", + "type": "string", + "enum": [ + "inbox", + "sent", + "trash" + ] + }, + "MessageDestinationEnum": { + "description": "The possible destinations to send messages to\nPossible values are:\n- `brokered`: A message sent to brokered users. Only for brokers.\n- `group`: A message sent to a group of users. Only for administrators.\n- `system`: A message sent to system. Only for members and brokers.\n- `user`: A message sent to a specific user.", + "type": "string", + "enum": [ + "brokered", + "group", + "system", + "user" + ] + }, + "MessageKind": { + "description": "The kind of a message\nPossible values are:\n- `incoming`: A message received\n- `outgoing`: A message sent", + "type": "string", + "enum": [ + "incoming", + "outgoing" + ] + }, + "MessageOwnerEnum": { + "description": "Define the possible owners of a message\nPossible values are:\n- `system`: The owner of the message is the system and there is not an associated user as the owner\n- `user`: The owner is the user who sent / received the message", + "type": "string", + "enum": [ + "system", + "user" + ] + }, + "MessageSourceEnum": { + "description": "The possible sources to receive messages from\nPossible values are:\n- `system`: A message from system. Only for members and brokers.\n- `user`: A message from a specific user.", + "type": "string", + "enum": [ + "system", + "user" + ] + }, + "MobileOperationEnum": { + "description": "The possible operations the mobile application can perform.\nPossible values are:\n- `acceptTicket`: Accepts a generated QR code for performing a payment\n- `activateNfcDevice`: Activate the phone as NFC device\n- `assignPos`: Assign an access client for POS mode\n- `boughtVouchers`: View bought vouchers\n- `buyVoucher`: Buy a voucher\n- `createTicket`: Generate a QR Code for receive payment\n- `deactivateNfcDevice`: Deactivate the phone as NFC device\n- `formatNfc`: Format NFC tags\n- `initializeNfc`: Initialize NFC tags\n- `makeSystemPayment`: Perform payments to system\n- `makeUserPayment`: Perform payments to other users\n- `manageContacts`: Manage own contacts\n- `manageOperators`: Manage own/user operators\n- `managePasswords`: Manage passwords\n- `mapDirectory`: View the user directory (map)\n- `paymentRequests`: Search and view payment requests\n- `personalizeNfc`: Personalize NFC tags\n- `personalizeNfcSelf`: Personalize NFC tags for the logged user or its operators\n- `purchases`: Search and view purchased webshops\n- `readNfc`: Read NFC tags\n- `receivePayment`: Receive payments from other users\n- `redeemVoucher`: Redeem vouchers\n- `registerUsersAsManager`: Register other users as user manager\n- `registerUsersAsMember`: Register other users as member or operator\n- `sendPaymentRequestToSystem`: Send payment requests to system\n- `sendPaymentRequestToUser`: Send payment requests to users\n- `unassignPos`: Unassign the current access client from POS mode\n- `usersSearch`: Search other users\n- `viewAccountInformation`: View own accounts\n- `viewAdvertisements`: Search and view advertisements and webshop\n- `viewRedeemed`: View redeemed vouchers\n- `viewUserProfile`: View the profile of other users", + "type": "string", + "enum": [ + "acceptTicket", + "activateNfcDevice", + "assignPos", + "boughtVouchers", + "buyVoucher", + "createTicket", + "deactivateNfcDevice", + "formatNfc", + "initializeNfc", + "makeSystemPayment", + "makeUserPayment", + "manageContacts", + "manageOperators", + "managePasswords", + "mapDirectory", + "paymentRequests", + "personalizeNfc", + "personalizeNfcSelf", + "purchases", + "readNfc", + "receivePayment", + "redeemVoucher", + "registerUsersAsManager", + "registerUsersAsMember", + "sendPaymentRequestToSystem", + "sendPaymentRequestToUser", + "unassignPos", + "usersSearch", + "viewAccountInformation", + "viewAdvertisements", + "viewRedeemed", + "viewUserProfile" + ] + }, + "NfcAuthErrorCode": { + "description": "Application-specific error codes for an NFC authentication error.\nPossible values are:\n- `pos`: A POS exception has happened when trying to make an external authenticate. See the `posError` field for more details.\n- `unexpected`: An unexpected error has occurred. See the `exceptionType` and `exceptionMessage` fields for the internal information.", + "type": "string", + "enum": [ + "pos", + "unexpected" + ] + }, + "NfcTagKeyEnum": { + "description": "Represent the different keys stored on NFC tags.\nPossible values are:\n- `appMaster`: The application master key. Not used for now (it could be used for application management).\n- `operational`: A key stored within the application that is used to guarantee the presence of the card in sensitive operations, such as receive payment (POS) or personalize the tag\n- `piccMaster`: The PICC master key, used to format the tag", + "type": "string", + "enum": [ + "appMaster", + "operational", + "piccMaster" + ] + }, + "NotificationEntityTypeEnum": { + "description": "The type of the entity referenced by the notification, if any.\nPossible values are:\n- `account`: The entity is an user account\n- `adQuestion`: The entity is an advertisement question\n- `errorLog`: The entity is an error log\n- `feedback`: The entity is a transaction feedback\n- `marketplace`: The entity is a `simple` or `webshop` advertisement\n- `network`: The entity is a network\n- `order`: The entity is an order\n- `passwordType`: The entity is a password type\n- `reference`: The entity is an user reference\n- `systemAlert`: The entity is a system alert\n- `token`: The entity is a token (user identification)\n- `transaction`: The entity is a transaction\n- `transfer`: The entity is a transfer\n- `user`: The entity is an user\n- `userAlert`: The entity is an user alert\n- `userImportedFile`: The entity is an user imported file\n- `voucher`: The entity is a voucher\n- `voucherTransaction`: The entity is a voucher transaction (redeem or top-up)\n- `voucherType`: The entity is a voucher type", + "type": "string", + "enum": [ + "account", + "adQuestion", + "errorLog", + "feedback", + "marketplace", + "network", + "order", + "passwordType", + "reference", + "systemAlert", + "token", + "transaction", + "transfer", + "user", + "userAlert", + "userImportedFile", + "voucher", + "voucherTransaction", + "voucherType" + ] + }, + "NotificationKind": { + "description": "Use NotificationTypeEnum instead.\n\n\nIndicates a kind of notification.\nPossible values are:\n- `accountAllNonSmsPerformedPayments`: A payment was performed\n- `accountAuthorizedPaymentCanceled`: The authorization process of a payment was canceled\n- `accountAuthorizedPaymentDenied`: A payment pending authorization was denied\n- `accountAuthorizedPaymentExpired`: The authorization process of a payment has expired\n- `accountAuthorizedPaymentSucceeded`: A payment pending authorization was processed\n- `accountBoughtVouchersAboutToExpire`: Deprecated: Voucher notifications are no longer only for bought. . One or more bought vouchers are about to expire\n- `accountBoughtVouchersExpirationDateChanged`: Deprecated: Voucher notifications are no longer only for bought.. The expiration date of a bought voucher was changed\n- `accountBoughtVouchersExpired`: Deprecated: Voucher notifications are no longer only for bought.. One or more bought vouchers have expired\n- `accountExternalPaymentExpired`: A performed external payment has expired\n- `accountExternalPaymentPerformedFailed`: A performed external payment has failed\n- `accountExternalPaymentReceivedFailed`: A received external payment has failed\n- `accountIncomingRecurringPaymentCanceled`: An incoming recurring payment was canceled\n- `accountIncomingRecurringPaymentFailed`: An incoming recurring payment processing has failed\n- `accountIncomingRecurringPaymentReceived`: A recurring payment was received\n- `accountIncomingScheduledPaymentCanceled`: An incoming scheduled payment processing has canceled\n- `accountIncomingScheduledPaymentFailed`: An incoming scheduled payment processing has failed\n- `accountIncomingScheduledPaymentReceived`: A scheduled payment was received\n- `accountLimitChange`: The account balance limit was changed by the administration\n- `accountOperatorAuthorizedPaymentApprovedStillPending`: A payment performed by an operator was approved, but still needs administration authorization\n- `accountOperatorAuthorizedPaymentCanceled`: A payment performed by an operator had the authorization process canceled\n- `accountOperatorAuthorizedPaymentDenied`: A payment performed by an operator was denied\n- `accountOperatorAuthorizedPaymentExpired`: A payment performed by an operator had the authorization process expired\n- `accountOperatorAuthorizedPaymentSucceeded`: A payment performed by an operator was processed\n- `accountOperatorPaymentAwaitingAuthorization`: A payment performed by an operator needs my authorization\n- `accountPaymentAwaitingAuthorization`: A payment is awaiting my authorization\n- `accountPaymentReceived`: A payment was received\n- `accountPaymentRequestCanceled`: A sent payment request was canceled\n- `accountPaymentRequestDenied`: A sent payment request was denied\n- `accountPaymentRequestExpirationDateChanged`: An incoming payment request had its expiration date changed\n- `accountPaymentRequestExpired`: A sent payment request has expired\n- `accountPaymentRequestProcessed`: A sent payment request was processed\n- `accountPaymentRequestReceived`: A payment was requested\n- `accountRecurringPaymentFailed`: The processing of a recurring payment has failed\n- `accountRecurringPaymentOccurrenceProcessed`: A recurring payment processing was processed\n- `accountScheduledPaymentFailed`: The processing of a scheduled payment has failed\n- `accountScheduledPaymentInstallmentProcessed`: A scheduled payment was processed\n- `accountScheduledPaymentRequestFailed`: A scheduled payment request has failed and was reopened\n- `accountSentPaymentRequestExpirationDateChanged`: A sent payment request had its expiration date changed\n- `accountSmsPerformedPayment`: A payment was performed by SMS\n- `accountTicketWebhookFailed`: The webhook processing for a ticket has failed\n- `accountVoucherAboutToExpire`: A voucher is about to expire\n- `accountVoucherAssigned`: A voucher was assigned\n- `accountVoucherExpirationDateChanged`: The expiration date of a voucher was changed\n- `accountVoucherExpired`: A voucher has expired\n- `accountVoucherPinBlocked`: The voucher PIN was blocked by exceeding invalid attempts\n- `accountVoucherRedeem`: A voucher was redeemed\n- `accountVoucherTopUp`: A voucher was topped-up\n- `adminAdPendingAuthorization`: A new advertisement was created, and it is pending administrator authorization\n- `adminApplicationError`: A new application error was generated\n- `adminExternalPaymentExpired`: An external payment has expired without the destination user being registered\n- `adminExternalPaymentPerformedFailed`: An external payment has failed processing\n- `adminGeneratedVouchersAboutToExpire`: One or more generated vouchers are about to expire\n- `adminGeneratedVouchersExpired`: One or more generated vouchers have expired\n- `adminNetworkCreated`: A new network has been created\n- `adminPaymentAwaitingAuthorization`: A payment is awaiting the administrator authorization\n- `adminPaymentPerformed`: A payment was performed\n- `adminSystemAlert`: A new system alert was generated\n- `adminUserAlert`: A new user alert was generated\n- `adminUserImportRegistration`: An import of users has finished processing\n- `adminUserRegistration`: A new user has been registered\n- `adminVoucherBuyingAboutToExpire`: Buying in a voucher type is about to expire\n- `brokeringAdPendingAuthorization`: A new advertisement from an assigned member needs authorization\n- `brokeringMemberAssigned`: A new member was unassigned from me as broker\n- `brokeringMemberUnassigned`: A new member was assigned to me as broker\n- `buyerAdInterestNotification`: A new advertisement was published, matching one of my advertisement interests\n- `buyerAdQuestionAnswered`: An advertisement question I've asked was answered\n- `buyerOrderCanceled`: A web-shop order was canceled\n- `buyerOrderPaymentCanceled`: The payment for a web-shop purchase had the authorization process canceled\n- `buyerOrderPaymentDenied`: The payment for a web-shop purchase was denied authorization\n- `buyerOrderPaymentExpired`: The payment for a web-shop purchase was expired without being authorized\n- `buyerOrderPending`: A web-shop order is pending my approval\n- `buyerOrderPendingAuthorization`: A web-shop order is pending authorization\n- `buyerOrderPendingDeliveryData`: A web-shop order needs me to fill its delivery information\n- `buyerOrderProcessedBySeller`: A web-shop order was processed by the seller\n- `buyerOrderRejectedBySeller`: A web-shop order was rejected by the seller\n- `buyerSalePending`: A web-shop order is pending seller's approval\n- `buyerSaleRejectedBySeller`: A web-shop sale order was rejected by the seller\n- `feedbackChanged`: A feedback for a sale was changed\n- `feedbackCreated`: A feedback for a sale was created\n- `feedbackExpirationReminder`: Reminder to supply feedback for a purchase\n- `feedbackOptional`: I can optionally supply feedback for a purchase\n- `feedbackReplyCreated`: A feedback for a purchase was replied\n- `feedbackRequired`: I have to supply feedback for a purchase\n- `personalBrokerAssigned`: A broker was assigned to the user\n- `personalBrokerUnassigned`: A broker was unassigned from the user\n- `personalMaxSmsPerMonthReached`: The user has reached the maximum number of monthly SMS messages\n- `personalNewToken`: A new token (card) was assigned\n- `personalNewTokenPendingActivation`: a new token (card) is pending activation\n- `personalPasswordStatusChanged`: The status of a password has changed\n- `personalTokenStatusChanged`: The status of a token has changed\n- `personalUserStatusChanged`: The user status has changed\n- `referenceChanged`: A personal reference was changed\n- `referenceCreated`: A new personal reference was created\n- `sellerAdAuthorized`: An advertisement was authorized by the administration\n- `sellerAdExpired`: An advertisement publication period has expired\n- `sellerAdLowStock`: A web-shop advertisement's stock quantity is low\n- `sellerAdOutOfStock`: A given web-shop advertisement is out of stock\n- `sellerAdQuestionCreated`: A question to an advertisement was created\n- `sellerAdRejected`: An advertisement was rejected by the administration\n- `sellerOrderCanceled`: A web-shop order was canceled\n- `sellerOrderCreated`: A web-shop order was created\n- `sellerOrderPaymentCanceled`: The payment for a web-shop order had the authorization process canceled\n- `sellerOrderPaymentDenied`: The payment for a web-shop order was denied authorization\n- `sellerOrderPaymentExpired`: The payment for a web-shop order was expired without being authorized\n- `sellerOrderPendingAuthorization`: A web-shop order is pending authorization\n- `sellerOrderPendingDeliveryData`: A web-shop order is pending delivery information\n- `sellerOrderProcessedByBuyer`: A web-shop order was fulfilled by the buyer\n- `sellerOrderRejectedByBuyer`: A web-shop order was rejected by the buyer\n- `sellerSaleProcessedByBuyer`: A web-shop sale order was fulfilled by the buyer", + "deprecated": true, + "x-remove-version": 4.17, + "type": "string", + "x-deprecated-enum": [ + "accountBoughtVouchersAboutToExpire|4.17|Voucher notifications are no longer only for bought.", + "accountBoughtVouchersExpirationDateChanged|4.17|Voucher notifications are no longer only for bought.", + "accountBoughtVouchersExpired|4.17|Voucher notifications are no longer only for bought." + ], + "enum": [ + "accountAllNonSmsPerformedPayments", + "accountAuthorizedPaymentCanceled", + "accountAuthorizedPaymentDenied", + "accountAuthorizedPaymentExpired", + "accountAuthorizedPaymentSucceeded", + "accountBoughtVouchersAboutToExpire", + "accountBoughtVouchersExpirationDateChanged", + "accountBoughtVouchersExpired", + "accountExternalPaymentExpired", + "accountExternalPaymentPerformedFailed", + "accountExternalPaymentReceivedFailed", + "accountIncomingRecurringPaymentCanceled", + "accountIncomingRecurringPaymentFailed", + "accountIncomingRecurringPaymentReceived", + "accountIncomingScheduledPaymentCanceled", + "accountIncomingScheduledPaymentFailed", + "accountIncomingScheduledPaymentReceived", + "accountLimitChange", + "accountOperatorAuthorizedPaymentApprovedStillPending", + "accountOperatorAuthorizedPaymentCanceled", + "accountOperatorAuthorizedPaymentDenied", + "accountOperatorAuthorizedPaymentExpired", + "accountOperatorAuthorizedPaymentSucceeded", + "accountOperatorPaymentAwaitingAuthorization", + "accountPaymentAwaitingAuthorization", + "accountPaymentReceived", + "accountPaymentRequestCanceled", + "accountPaymentRequestDenied", + "accountPaymentRequestExpirationDateChanged", + "accountPaymentRequestExpired", + "accountPaymentRequestProcessed", + "accountPaymentRequestReceived", + "accountRecurringPaymentFailed", + "accountRecurringPaymentOccurrenceProcessed", + "accountScheduledPaymentFailed", + "accountScheduledPaymentInstallmentProcessed", + "accountScheduledPaymentRequestFailed", + "accountSentPaymentRequestExpirationDateChanged", + "accountSmsPerformedPayment", + "accountTicketWebhookFailed", + "accountVoucherAboutToExpire", + "accountVoucherAssigned", + "accountVoucherExpirationDateChanged", + "accountVoucherExpired", + "accountVoucherPinBlocked", + "accountVoucherRedeem", + "accountVoucherTopUp", + "adminAdPendingAuthorization", + "adminApplicationError", + "adminExternalPaymentExpired", + "adminExternalPaymentPerformedFailed", + "adminGeneratedVouchersAboutToExpire", + "adminGeneratedVouchersExpired", + "adminNetworkCreated", + "adminPaymentAwaitingAuthorization", + "adminPaymentPerformed", + "adminSystemAlert", + "adminUserAlert", + "adminUserImportRegistration", + "adminUserRegistration", + "adminVoucherBuyingAboutToExpire", + "brokeringAdPendingAuthorization", + "brokeringMemberAssigned", + "brokeringMemberUnassigned", + "buyerAdInterestNotification", + "buyerAdQuestionAnswered", + "buyerOrderCanceled", + "buyerOrderPaymentCanceled", + "buyerOrderPaymentDenied", + "buyerOrderPaymentExpired", + "buyerOrderPending", + "buyerOrderPendingAuthorization", + "buyerOrderPendingDeliveryData", + "buyerOrderProcessedBySeller", + "buyerOrderRejectedBySeller", + "buyerSalePending", + "buyerSaleRejectedBySeller", + "feedbackChanged", + "feedbackCreated", + "feedbackExpirationReminder", + "feedbackOptional", + "feedbackReplyCreated", + "feedbackRequired", + "personalBrokerAssigned", + "personalBrokerUnassigned", + "personalMaxSmsPerMonthReached", + "personalNewToken", + "personalNewTokenPendingActivation", + "personalPasswordStatusChanged", + "personalTokenStatusChanged", + "personalUserStatusChanged", + "referenceChanged", + "referenceCreated", + "sellerAdAuthorized", + "sellerAdExpired", + "sellerAdLowStock", + "sellerAdOutOfStock", + "sellerAdQuestionCreated", + "sellerAdRejected", + "sellerOrderCanceled", + "sellerOrderCreated", + "sellerOrderPaymentCanceled", + "sellerOrderPaymentDenied", + "sellerOrderPaymentExpired", + "sellerOrderPendingAuthorization", + "sellerOrderPendingDeliveryData", + "sellerOrderProcessedByBuyer", + "sellerOrderRejectedByBuyer", + "sellerSaleProcessedByBuyer" + ] + }, + "NotificationLevelEnum": { + "description": "Defines the severity level of a notification shown to users.\nPossible values are:\n- `error`: An error message, when some operation went wrong\n- `information`: A general informative message\n- `warning`: A warning message, when special caution is required", + "type": "string", + "enum": [ + "error", + "information", + "warning" + ] + }, + "NotificationTypeEnum": { + "description": "The different notification types generated for for users / administrators.\nPossible values are:\n- `adAuthorized`: A notification generated if a notification created when an advertisement is authorized.\n- `adExpired`: A notification generated if a notification created when an advertisement expires.\n- `adInterestNotification`: A notification generated if a notification created by a new advertisement (Simple or Webshop).\n- `adPendingAuthorization`: A notification generated if an ad is pending by broker authorization.\n- `adPendingByAdminAuthorization`: An admin notification generated if an advertisement is pending for authorization.\n- `adQuestionAnswered`: A notification generated if a question answered to some AD (Simple or Webshop).\n- `adQuestionCreated`: A notification generated if a question created to some AD (Simple or Webshop).\n- `adRejected`: A notification generated if a notification created when an advertisement authorization is rejected.\n- `allNonSmsPerformedPayments`: A notification generated if a user performed a new payment through a channel that is not the SMS channel.\n- `applicationError`: An admin notification generated if an application error has occurred.\n- `articleOutOfStock`: A notification generated if a webshop product is out of stock.\n- `authorizedPaymentCanceled`: A notification generated if the authorization of a payment was canceled. This notification is to be sent to the payer.\n- `authorizedPaymentDenied`: A notification generated if the authorization of a payment was denied. This notification is to be sent to the payer.\n- `authorizedPaymentExpired`: A notification generated if the authorization of a payment has expired. This notification is to be sent to the payer.\n- `authorizedPaymentSucceeded`: A notification generated if the authorization of a payment succeeded (the payment went successfully through its final authorization and is now processed). This notification is to be sent to the payer.\n- `boughtVouchersAboutToExpire`: Deprecated: Voucher notifications are no longer only for bought.. A notification generated if a one or more bought vouchers are about to expire.\n- `boughtVouchersExpirationDateChanged`: Deprecated: Voucher notifications are no longer only for bought.. A notification generated if a bought voucher has new expiration date.\n- `boughtVouchersExpired`: Deprecated: Voucher notifications are no longer only for bought.. A notification generated if one or more bought vouchers have expired.\n- `brokerAssigned`: A notification generated if a broker has been assigned to a user.\n- `brokerUnassigned`: A notification generated if a broker has been unassigned from a user.\n- `externalPaymentExpired`: A notification generated if the external payment has reached the expiration date.\n- `externalPaymentPerformedFailed`: A notification generated if the performed external payment has failed processing.\n- `externalPaymentReceivedFailed`: A notification generated if the received external payment has failed processing.\n- `externalUserPaymentExpired`: An admin notification generated if an external payment has expired.\n- `externalUserPaymentPerformedFailed`: An admin notification generated if an external payment failed processing.\n- `feedbackChanged`: A notification generated if a transaction feedback was modified.\n- `feedbackCreated`: A notification generated if a transaction feedback was created.\n- `feedbackExpirationReminder`: A notification generated if a transaction feedback is about to expire.\n- `feedbackOptional`: A notification generated if a performed payment can have an optional feedback.\n- `feedbackReplyCreated`: A notification generated if a transaction feedback was replied.\n- `feedbackRequired`: A notification generated if a performed payment needs to be given a feedback.\n- `generatedVouchersAboutToExpire`: An admin notification generated if a voucher will expire in a few days.\n- `generatedVouchersExpired`: An admin notification generated if a voucher has expired.\n- `incomingRecurringPaymentCanceled`: A notification generated if a recurring payment to a user has been canceled (only if the recurring payment is shown to receiver).\n- `incomingRecurringPaymentFailed`: A notification generated if a recurring payment to a user has failed (only if the recurring payment is shown to receiver).\n- `incomingRecurringPaymentReceived`: A notification generated if a recurring payment to a user was received (only if the recurring payment is shown to receiver).\n- `incomingScheduledPaymentCanceled`: A notification generated if a scheduled payment to a user has been canceled (only if the scheduled payment is shown to receiver).\n- `incomingScheduledPaymentFailed`: A notification generated if a scheduled payment to a user has failed (only if the scheduled payment is shown to receiver).\n- `incomingScheduledPaymentReceived`: A notification generated if a scheduled payment to a user was received (only if the scheduled payment is shown to receiver).\n- `limitChange`: A notification generated if a limit (lower/upper) has changed on an account.\n- `lowStockQuantity`: A notification generated if a product with stock quantity under limit.\n- `maxSmsPerMonthReached`: A notification generated if the maximum number of SMS messages per month has been reached.\n- `memberAssigned`: A notification generated if an user has been assigned to a broker.\n- `memberUnassigned`: A notification generated if an user has been unassigned from a broker.\n- `networkCreated`: An admin notification generated if a network is created.\n- `newToken`: A notification generated if a token / card has been created.\n- `newTokenPendingActivation`: A notification generated if a token / card has been created, but needs to be activated before being used.\n- `operatorAuthorizedPaymentApprovedStillPending`: A notification generated if a payment performed by an operator with authorization type `operator` was approved, but there is at least one authorization level.\n- `operatorAuthorizedPaymentCanceled`: A notification generated if a payment performed by an operator with authorization type `operator` was canceled.\n- `operatorAuthorizedPaymentDenied`: A notification generated if a payment performed by an operator with authorization type `operator` was denied.\n- `operatorAuthorizedPaymentExpired`: A notification generated if a payment performed by an operator with authorization type `operator` has expired.\n- `operatorAuthorizedPaymentSucceeded`: A notification generated if a payment performed by an operator with authorization type `operator` was approved and there was no further authorization.\n- `operatorPaymentAwaitingAuthorization`: A notification generated if a payment performed by an operator with authorization type `operator` is pending by authorization.\n- `orderCanceledBuyer`: A notification generated if a pending order has been canceled.\n- `orderCanceledSeller`: A notification generated if a pending order has been canceled.\n- `orderCreated`: A notification generated if a new web shop order created from a shopping cart checkout.\n- `orderPaymentCanceledBuyer`: A notification generated if an order payment was canceled by authorizer.\n- `orderPaymentCanceledSeller`: A notification generated if an order payment was canceled by authorizer.\n- `orderPaymentDeniedBuyer`: A notification generated if an order payment was denied by authorizer.\n- `orderPaymentDeniedSeller`: A notification generated if an order payment was denied by authorizer.\n- `orderPaymentExpiredBuyer`: A notification generated if an order payment has automatically expired.\n- `orderPaymentExpiredSeller`: A notification generated if an order payment has automatically expired.\n- `orderPendingAuthorizationBuyer`: A notification generated if an order accepted by buyer/seller but the payment is pending for authorization.\n- `orderPendingAuthorizationSeller`: A notification generated if an order accepted by buyer/seller but the payment is pending for authorization.\n- `orderPendingBuyer`: A notification generated if an order pending buyer approval.\n- `orderPendingDeliveryDataBuyer`: A notification generated if an order buyer needs to fill in the delivery data.\n- `orderPendingDeliveryDataSeller`: A notification generated if an order seller needs to fill in the delivery data.\n- `orderRealizedBuyer`: A notification generated if an order accepted by buyer (sent to seller).\n- `orderRealizedSeller`: A notification generated if an order accepted by seller (sent to buyer).\n- `orderRejectedByBuyer`: A notification generated if an order rejected by buyer.\n- `orderRejectedBySeller`: A notification generated if an order rejected by seller.\n- `passwordStatusChanged`: A notification generated if a password status has changed.\n- `paymentAwaitingAdminAuthorization`: An admin notification generated if a payment is awaiting for authorization.\n- `paymentAwaitingAuthorization`: A notification generated if a user must authorize a pending payment.\n- `paymentPerformed`: An admin notification generated if a payment is performed.\n- `paymentPerformedChargedBack`: A notification generated if a payment performed from a user is charged back.\n- `paymentReceived`: A notification generated if a user received a new payment.\n- `paymentReceivedChargedBack`: A notification generated if a payment received by a user is charged back.\n- `paymentRequestCanceled`: A notification generated if a payment request was canceled.\n- `paymentRequestDenied`: A notification generated if a payment request was denied.\n- `paymentRequestExpirationDateChanged`: A notification generated if the payment request's expiration date has changed.\n- `paymentRequestExpired`: A notification generated if a payment request has expired.\n- `paymentRequestProcessed`: A notification generated if a payment request was processed.\n- `paymentRequestReceived`: A notification generated if a payment request was received.\n- `recurringPaymentFailed`: A notification generated if a recurring payment from a user has failed (probably because of lack of funds).\n- `recurringPaymentOccurrenceProcessed`: A notification generated if an occurrence of an outgoing recurring payment was processed.\n- `referenceChanged`: A notification generated if a reference was modified.\n- `referenceCreated`: A notification generated if a reference has been set.\n- `salePendingBuyer`: A notification generated if a sale pending buyer approval.\n- `saleRealizedBuyer`: A notification generated if a sale accepted by buyer (sent to seller).\n- `saleRejectedSeller`: A notification generated if a sale rejected by seller.\n- `scheduledPaymentFailed`: A notification generated if a scheduled payment from a user has failed (probably because of lack of funds).\n- `scheduledPaymentInstallmentProcessed`: A notification generated if a scheduled payment to a user has been processed.\n- `scheduledPaymentRequestFailed`: A notification generated if a payment request which was scheduled has failed processing (probably because of lack of funds), and is being reopened.\n- `sentPaymentRequestExpirationDateChanged`: A notification generated if the payment request's expiration date has changed. This notification is to be sent to the sender.\n- `smsPerformedPayment`: A notification generated if a user performed a new payment through SMS.\n- `systemAlert`: An admin notification generated if a system alert as occurred.\n- `ticketWebhookFailed`: A notification generated if the invocation of a webhook after (a successful) ticket approval has failed.\n- `tokenStatusChanged`: A notification generated if a token / card status has changed.\n- `userAlert`: An admin notification generated if a member alert as occurred.\n- `userImport`: An admin notification generated if a user import has been done.\n- `userRegistration`: An admin notification generated if a new user has been registered.\n- `userStatusChanged`: A notification generated if a user status has changed.\n- `voucherAboutToExpire`: A notification generated if a one or more bought vouchers are about to expire.\n- `voucherAssigned`: A notification generated when a voucher was assigned to the user.\n- `voucherBuyingAboutToExpire`: An admin notification generated if a voucher type allowing buy is about to expire.\n- `voucherExpirationDateChanged`: A notification generated if a bought voucher has new expiration date.\n- `voucherExpired`: A notification generated if one or more bought vouchers have expired.\n- `voucherPinBlocked`: A voucher PIN was blocked by exceeding invalid attempts.\n- `voucherRedeem`: A voucher was redeemed\n- `voucherTopUp`: A voucher was topped-up", + "type": "string", + "x-deprecated-enum": [ + "boughtVouchersAboutToExpire|4.17|Voucher notifications are no longer only for bought.", + "boughtVouchersExpirationDateChanged|4.17|Voucher notifications are no longer only for bought.", + "boughtVouchersExpired|4.17|Voucher notifications are no longer only for bought." + ], + "enum": [ + "adAuthorized", + "adExpired", + "adInterestNotification", + "adPendingAuthorization", + "adPendingByAdminAuthorization", + "adQuestionAnswered", + "adQuestionCreated", + "adRejected", + "allNonSmsPerformedPayments", + "applicationError", + "articleOutOfStock", + "authorizedPaymentCanceled", + "authorizedPaymentDenied", + "authorizedPaymentExpired", + "authorizedPaymentSucceeded", + "boughtVouchersAboutToExpire", + "boughtVouchersExpirationDateChanged", + "boughtVouchersExpired", + "brokerAssigned", + "brokerUnassigned", + "externalPaymentExpired", + "externalPaymentPerformedFailed", + "externalPaymentReceivedFailed", + "externalUserPaymentExpired", + "externalUserPaymentPerformedFailed", + "feedbackChanged", + "feedbackCreated", + "feedbackExpirationReminder", + "feedbackOptional", + "feedbackReplyCreated", + "feedbackRequired", + "generatedVouchersAboutToExpire", + "generatedVouchersExpired", + "incomingRecurringPaymentCanceled", + "incomingRecurringPaymentFailed", + "incomingRecurringPaymentReceived", + "incomingScheduledPaymentCanceled", + "incomingScheduledPaymentFailed", + "incomingScheduledPaymentReceived", + "limitChange", + "lowStockQuantity", + "maxSmsPerMonthReached", + "memberAssigned", + "memberUnassigned", + "networkCreated", + "newToken", + "newTokenPendingActivation", + "operatorAuthorizedPaymentApprovedStillPending", + "operatorAuthorizedPaymentCanceled", + "operatorAuthorizedPaymentDenied", + "operatorAuthorizedPaymentExpired", + "operatorAuthorizedPaymentSucceeded", + "operatorPaymentAwaitingAuthorization", + "orderCanceledBuyer", + "orderCanceledSeller", + "orderCreated", + "orderPaymentCanceledBuyer", + "orderPaymentCanceledSeller", + "orderPaymentDeniedBuyer", + "orderPaymentDeniedSeller", + "orderPaymentExpiredBuyer", + "orderPaymentExpiredSeller", + "orderPendingAuthorizationBuyer", + "orderPendingAuthorizationSeller", + "orderPendingBuyer", + "orderPendingDeliveryDataBuyer", + "orderPendingDeliveryDataSeller", + "orderRealizedBuyer", + "orderRealizedSeller", + "orderRejectedByBuyer", + "orderRejectedBySeller", + "passwordStatusChanged", + "paymentAwaitingAdminAuthorization", + "paymentAwaitingAuthorization", + "paymentPerformed", + "paymentPerformedChargedBack", + "paymentReceived", + "paymentReceivedChargedBack", + "paymentRequestCanceled", + "paymentRequestDenied", + "paymentRequestExpirationDateChanged", + "paymentRequestExpired", + "paymentRequestProcessed", + "paymentRequestReceived", + "recurringPaymentFailed", + "recurringPaymentOccurrenceProcessed", + "referenceChanged", + "referenceCreated", + "salePendingBuyer", + "saleRealizedBuyer", + "saleRejectedSeller", + "scheduledPaymentFailed", + "scheduledPaymentInstallmentProcessed", + "scheduledPaymentRequestFailed", + "sentPaymentRequestExpirationDateChanged", + "smsPerformedPayment", + "systemAlert", + "ticketWebhookFailed", + "tokenStatusChanged", + "userAlert", + "userImport", + "userRegistration", + "userStatusChanged", + "voucherAboutToExpire", + "voucherAssigned", + "voucherBuyingAboutToExpire", + "voucherExpirationDateChanged", + "voucherExpired", + "voucherPinBlocked", + "voucherRedeem", + "voucherTopUp" + ] + }, + "NumberFormatEnum": { + "description": "The format for numbers.\nPossible values are:\n- `commaAsDecimal`: 9.999,99\n- `periodAsDecimal`: 9,999.99", + "type": "string", + "enum": [ + "commaAsDecimal", + "periodAsDecimal" + ] + }, + "OperationResultTypeEnum": { + "description": "The kind of data a custom operation execution is expected to return.\nPossible values are:\n- `externalRedirect`: The main execution returns an URL for another service. Then a second execution is expected when this other service redirects the client back to Cyclos\n- `fileDownload`: Returns a file, which can be downloaded\n- `notification`: Returns a text to be displayed as a simple notification\n- `plainText`: Returns a plain text to be displayed in a page, and optionally printed\n- `resultPage`: Returns a page or list of results, which should be displayed in a table like any other search / list\n- `richText`: Returns an HTML formatted text to be displayed in a page, and optionally printed\n- `url`: The result should be an URL to which the client should be redirected to", + "type": "string", + "enum": [ + "externalRedirect", + "fileDownload", + "notification", + "plainText", + "resultPage", + "richText", + "url" + ] + }, + "OperationRowActionEnum": { + "description": "The action that should be performed when the user clicks a row in the results table.\nPossible values are:\n- `location`: Navigate to a standard Cyclos location\n- `operation`: Run an internal custom operation, which is set on the custom operation itself\n- `url`: Navigate to an arbitrary URL, which is set in the custom operation itself", + "type": "string", + "enum": [ + "location", + "operation", + "url" + ] + }, + "OperationScopeEnum": { + "description": "The scope determines where does a custom operation can be executed.\nPossible values are:\n- `advertisement`: A custom operation which is executed over an advertisement\n- `bulkAction`: A custom operation executed over a set of users (one at a time)\n- `contact`: A custom operation which is executed over a contact in a user's contact list\n- `contactInfo`: A custom operation which is executed over an additional contact information, which is part of the user profile\n- `internal`: A custom operation which is executed by another custom operation\n- `menu`: A custom operation which is visible in a custom menu item\n- `record`: A custom operation which is executed over a record\n- `system`: A general, system custom operation\n- `transfer`: A custom operation which is executed over a transfer\n- `user`: A custom operation over a single user", + "type": "string", + "enum": [ + "advertisement", + "bulkAction", + "contact", + "contactInfo", + "internal", + "menu", + "record", + "system", + "transfer", + "user" + ] + }, + "OperationShowFormEnum": { + "description": "Determines in which conditions the parameters form is shown.\nPossible values are:\n- `always`: Show form even if parameters are not missing\n- `missingAny`: Show form if any parameter (optional or required) is missing\n- `missingRequired`: Show form only if required parameters are missing", + "type": "string", + "enum": [ + "always", + "missingAny", + "missingRequired" + ] + }, + "OperatorGroupAccountAccessEnum": { + "description": "How an owner account can be accessed by operators.\nPossible values are:\n- `full`: The account is fully visible\n- `incoming`: All incoming and own payments are visible\n- `none`: The account is not visible\n- `outgoing`: All outgoing and own payments are visible\n- `own`: Only payments performed / received by the operators are visible", + "type": "string", + "enum": [ + "full", + "incoming", + "none", + "outgoing", + "own" + ] + }, + "OrderStatusEnum": { + "description": "The possible statuses for an order.\nPossible values are:\n- `completed`: The order was accepted by the seller and/or buyer and the related payment was done.\n- `disposed`: The order was marked as disposed because the seller and/or buyer were removed or they do not have any account in the order's currency.\n- `draft`: The order has been created by the seller, but has not yet been sent to the buyer for approval\n- `paymentCanceled`: The related payment was not done because was canceled after finish the authorization process.\n- `paymentDenied`: The related payment was not done because was denied.\n- `paymentExpired`: The related payment was not done because the pending authorization has expired.\n- `paymentPending`: The order was accepted by the seller and/or buyer and the related payment is waiting for authorization.\n- `pendingBuyer`: The order is pending by the buyer's action.\n- `pendingSeller`: The order is pending by the seller's action.\n- `rejectedByBuyer`: The order was rejected by the buyer.\n- `rejectedBySeller`: The order was rejected by the seller.\n- `shoppingCart`: The order is just a shopping cart, possibly temporary, as hasn't been checked out yet", + "type": "string", + "enum": [ + "completed", + "disposed", + "draft", + "paymentCanceled", + "paymentDenied", + "paymentExpired", + "paymentPending", + "pendingBuyer", + "pendingSeller", + "rejectedByBuyer", + "rejectedBySeller", + "shoppingCart" + ] + }, + "OutboundSmsStatusEnum": { + "description": "Statuses for an outbound SMS message sent to an user.\nPossible values are:\n- `gatewayUreachable`: Network problem, or gateway server down\n- `invalid`: The parameters for sending an SMS message were invalid\n- `maxMessagesReached`: The maximum SMS messages for the user (or guest) have been reached\n- `rejected`: The gateway has rejected the SMS message\n- `success`: The SMS message was successfully sent\n- `timeout`: Timeout while connecting or waiting for a gateway server reply\n- `unexpected`: An unexpected error has occurred", + "type": "string", + "enum": [ + "gatewayUreachable", + "invalid", + "maxMessagesReached", + "rejected", + "success", + "timeout", + "unexpected" + ] + }, + "PasswordActionEnum": { + "description": "An action over a user's password.\nPossible values are:\n- `activate`: A generated password was activated\n- `allow_activation`: Allow user to generate the password\n- `change`: Manually change a manual password, or generate a new generated password\n- `disable`: Disables a password, making it unusable until being enabled again\n- `enable`: Enables a disabled password\n- `reset`: Resets a generated password, making it go back to the pending state\n- `resetAndSend`: Resets a manual password to a generated value and send it to the user\n- `unblock`: Unblocks a blocked password", + "type": "string", + "enum": [ + "activate", + "allow_activation", + "change", + "disable", + "enable", + "reset", + "resetAndSend", + "unblock" + ] + }, + "PasswordInputMethodEnum": { + "description": "Determines how passwords should be visually entered by users.\nPossible values are:\n- `textBox`: A simple string should be requested\n- `virtualKeyboard`: A series of buttons should be presented to allow enter the password.", + "type": "string", + "enum": [ + "textBox", + "virtualKeyboard" + ] + }, + "PasswordModeEnum": { + "description": "Indicates how a password is handled.\nPossible values are:\n- `generated`: Passwords are always generated\n- `manual`: Passwords are manually typed by users\n- `otp`: One Time Passwords. are always generated and can be used only once\n- `script`: Passwords are not stored in Cyclos, but handed-over for a script to verify them. Is normally used to implement single-sign-on with other apps.", + "type": "string", + "enum": [ + "generated", + "manual", + "otp", + "script" + ] + }, + "PasswordStatusEnum": { + "description": "The password status.\nPossible values are:\n- `active`: The password is active and valid\n- `disabled`: The password has been manually disabled\n- `expired`: The password is expired\n- `indefinitelyBlocked`: The password is blocked by exceeding the maximum attempts until it is manually unblocked\n- `neverCreated`: The password has never been created for the user\n- `pending`: The password was manually allowed (by admins) for the user to generate it, but it was not yet generated (never used for manual passwords)\n- `reset`: The password has been reset (can be used for login but must then be changed)\n- `temporarilyBlocked`: The password is temporarily blocked by exceeding the maximum attempts", + "type": "string", + "enum": [ + "active", + "disabled", + "expired", + "indefinitelyBlocked", + "neverCreated", + "pending", + "reset", + "temporarilyBlocked" + ] + }, + "PaymentCreationTypeEnum": { + "description": "Indicates how a payment was created\nPossible values are:\n- `direct`: The payment was directly performed\n- `easyInvoice`: The payment was created via easy invoicing\n- `external`: The payment was generated by an external payment\n- `import`: The payment was imported via the Banking menu. Not to be confused with the transfers import from the System menu, which generates transactions with `kind` = `import` instead.\n- `order`: The payment was created by completing a webshop order (or cart checkout)\n- `pos`: The payment was received via a POS operation\n- `request`: The payment was created by accepting a payment request\n- `ticket`: The payment was created by accepting a ticket (or receiving a QR-code payment)\n- `voucherBuying`: The payment was performed to buy vouchers\n- `voucherRedeeming`: The payment was performed to redeem a voucher\n- `voucherRefunding`: The payment was performed to refund a bought voucher\n- `voucherTopUp`: The payment was performed to top-up a voucher", + "type": "string", + "enum": [ + "direct", + "easyInvoice", + "external", + "import", + "order", + "pos", + "request", + "ticket", + "voucherBuying", + "voucherRedeeming", + "voucherRefunding", + "voucherTopUp" + ] + }, + "PaymentErrorCode": { + "description": "Application-specific error codes for a payment error.\nPossible values are:\n- `dailyAmountExceeded`: The maximum amount allowed per day was exceeded.\n- `dailyPaymentsExceeded`: The maximum count of payments allowed per day was exceeded.\n- `destinationUpperLimitReached`: The upper balance limit of the destination account was exceeded.\n- `insufficientBalance`: The account selected for the payment does not have enough balance\n- `monthlyAmountExceeded`: The maximum amount allowed per month was exceeded.\n- `monthlyPaymentsExceeded`: The maximum count of payments allowed per month was exceeded.\n- `paymentAmountExceeded`: The maximum amount allowed in the payment type was exceeded.\n- `pos`: A POS exception has happened when performing this payment. See the `posError` field for more details.\n- `timeBetweenPaymentsNotMet`: The minimum time between payments was not met.\n- `unexpected`: An unexpected error has occurred. See the `exceptionType` and `exceptionMessage` fields for the internal information.\n- `weeklyAmountExceeded`: The maximum amount allowed per week was exceeded.\n- `weeklyPaymentsExceeded`: The maximum count of payments allowed per week was exceeded.\n- `yearlyAmountExceeded`: The maximum amount allowed per year was exceeded.", + "type": "string", + "enum": [ + "dailyAmountExceeded", + "dailyPaymentsExceeded", + "destinationUpperLimitReached", + "insufficientBalance", + "monthlyAmountExceeded", + "monthlyPaymentsExceeded", + "paymentAmountExceeded", + "pos", + "timeBetweenPaymentsNotMet", + "unexpected", + "weeklyAmountExceeded", + "weeklyPaymentsExceeded", + "yearlyAmountExceeded" + ] + }, + "PaymentRequestActionEnum": { + "description": "Possible actions that could be confirmed with a device for a payment request.\nPossible values are:\n- `accept`: Accept the payment request as the payer\n- `cancel`: Cancel the payment request as the payer\n- `changeExpiration`: Change the expiration date of the payment request as the payer\n- `deny`: Deny the payment request as the payer\n- `reschedule`: Reschedule the payment request as the payer", + "type": "string", + "enum": [ + "accept", + "cancel", + "changeExpiration", + "deny", + "reschedule" + ] + }, + "PaymentRequestSchedulingEnum": { + "description": "Determines how the generated payment of a payment request is scheduled. When not specified, the generated payment is processed directly.\nPossible values are:\n- `direct`: The generated payment won't be scheduled, but paid directly\n- `recurring`: The generated payment will be recurring\n- `scheduled`: The generated payment will be scheduled, once accepting, triggering a given number of installments", + "type": "string", + "enum": [ + "direct", + "recurring", + "scheduled" + ] + }, + "PaymentRequestStatusEnum": { + "description": "The status of a payment request.\nPossible values are:\n- `canceled`: The payment request was canceled\n- `denied`: The payment request was denied by the receiver\n- `expired`: The payment request has expired - the received did not respond until the expiration date\n- `open`: The payment request is open and can be accepted\n- `processed`: The payment request was processed, and either a direct or scheduled payment was created from it\n- `scheduled`: The payment request has been accepted, and scheduled for processing on a future date", + "type": "string", + "enum": [ + "canceled", + "denied", + "expired", + "open", + "processed", + "scheduled" + ] + }, + "PaymentSchedulingEnum": { + "description": "Determines how a payment is scheduled. When not specified, direct payments are performed.\nPossible values are:\n- `direct`: The payment won't be scheduled, but paid directly\n- `recurring`: The payment will be recurring, repeated either by a limited number of occurrences or until cancel\n- `scheduled`: The payment will be scheduled, either to a single future date or multiple installments", + "type": "string", + "enum": [ + "direct", + "recurring", + "scheduled" + ] + }, + "PersonalizeNfcErrorCode": { + "description": "Application-specific error codes for a personalize NFC error.\nPossible values are:\n- `tokenInUse`: The token specified for personalization is already in use (exists and it is active)\n- `unexpected`: An unexpected error has occurred. See the `exceptionType` and `exceptionMessage` fields for the internal information.", + "type": "string", + "enum": [ + "tokenInUse", + "unexpected" + ] + }, + "PhoneKind": { + "description": "Type of phone.\nPossible values are:\n- `landLine`: A landline phone\n- `mobile`: A mobile phone", + "type": "string", + "enum": [ + "landLine", + "mobile" + ] + }, + "PhysicalTokenTypeEnum": { + "description": "The possible physical type for tokens. Determines how applications interact with hardware in order to read the token value.\nPossible values are:\n- `barcode`: A 1d barcode printed on a card\n- `nfcTag`: A NFC tag, normally a DESFire NFC card\n- `other`: Other\n- `qrCode`: A QR-code\n- `swipe`: A swipe card", + "type": "string", + "enum": [ + "barcode", + "nfcTag", + "other", + "qrCode", + "swipe" + ] + }, + "PosErrorCode": { + "description": "Application-specific error codes for a POS operation error.\nPossible values are:\n- `payerInaccessiblePrincipal`: The specified payer cannot use the given identification method (principal type) in the POS channel.\n- `payerNotInChannel`: The specified payer user does not participate on the POS channel.\n- `payerNotOperative`: The specified payer has some restriction that renders he/she inoperative for POS operations. An example of such case is when the user has pending agreements.\n- `unexpected`: An unexpected error has occurred. See the `exceptionType` and `exceptionMessage` fields for the internal information.", + "type": "string", + "enum": [ + "payerInaccessiblePrincipal", + "payerNotInChannel", + "payerNotOperative", + "unexpected" + ] + }, + "PrincipalTypeKind": { + "description": "The kind of a principal type (user identification method).\nPossible values are:\n- `accessClient`: An access client token (remote application) identifies the user\n- `accountNumber`: An account number identifies the user\n- `customField`: A unique custom field identifies the user\n- `email`: The email identifies the user\n- `mobilePhone`: A mobile phone number identifies the user\n- `token`: A token identifies the user\n- `trustedDevice`: A trusted device identifies the user\n- `username`: The username identifies the user", + "type": "string", + "enum": [ + "accessClient", + "accountNumber", + "customField", + "email", + "mobilePhone", + "token", + "trustedDevice", + "username" + ] + }, + "ProductAssignmentActionEnum": { + "description": "A possible action regarding product assignment / unassignment.\nPossible values are:\n- `assign`: The product was assigned\n- `unassign`: The product was unassigned", + "type": "string", + "enum": [ + "assign", + "unassign" + ] + }, + "ProductKind": { + "description": "Kind of product.\nPossible values are:\n- `administrator`: An administrator product\n- `broker`: A broker\n- `member`: A member product", + "type": "string", + "enum": [ + "administrator", + "broker", + "member" + ] + }, + "PushNotificationEventKind": { + "description": "Kind of events that can be triggered on push notifications.\nPossible values are:\n- `deviceConfirmation`: A device confirmation was approved / rejected\n- `deviceConfirmationFeedback`: The result of an operation approved by a device confirmation\n- `identityProviderCallback`: An identity provider has returned profile data for the user\n- `loggedOut`: The current session has been invalidated\n- `newMessage`: New message on the user's inbox\n- `newNotification`: New received notification\n- `paymentAuthorization`: A payment authorization status has changed\n- `permissionsChanged`: The current session had its permissions changed by modifying the user products\n- `ticket`: A ticket status has changed", + "type": "string", + "enum": [ + "deviceConfirmation", + "deviceConfirmationFeedback", + "identityProviderCallback", + "loggedOut", + "newMessage", + "newNotification", + "paymentAuthorization", + "permissionsChanged", + "ticket" + ] + }, + "QuickAccessTypeEnum": { + "description": "An element shown in the quick access on the new frontend dashboard.\nPossible values are:\n- `account`: Account history\n- `adInterests`: Advertisement interests\n- `balancesOverview`: User balances overview\n- `brokeredUsers`: Registered users\n- `buyVoucher`: Buy voucher\n- `contacts`: View contacts\n- `createAd`: Create ad\n- `createWebshopAd`: Create webshop ad\n- `documents`: Documents\n- `editProfile`: Edit own profile\n- `externalPayments`: External payments\n- `help`: Show help\n- `inviteUser`: Invite user\n- `messages`: Messages\n- `myAds`: My ads\n- `myWebshop`: My webshop\n- `notifications`: Notifications\n- `operation`: Run custom operation\n- `passwords`: Manage own passwords\n- `payExternalUser`: Pay external user\n- `paySelf`: Transfer between own accounts\n- `paySystem`: Pay to a system account\n- `payUser`: Pay to a user\n- `paymentRequests`: Payment requests\n- `pendingUsers`: Pending users\n- `pos`: Receive payment (POS)\n- `purchases`: My purchases\n- `receiveQrPayment`: Receive QR-code payment\n- `record`: View records\n- `redeemVoucher`: Redeem voucher\n- `references`: View references\n- `registerUser`: Register user\n- `requestPaymentFromSystem`: Request payment from system\n- `requestPaymentFromUser`: Request payment from user\n- `sales`: My sales\n- `scheduledPayments`: Scheduled payments\n- `searchAds`: Search advertisements (marketplace)\n- `searchUsers`: Search users (user directory)\n- `sendMessage`: Send message\n- `sendVoucher`: Send voucher\n- `settings`: Settings\n- `switchFrontend`: Switch between frontends\n- `switchTheme`: Switch between light and dark themes\n- `token`: Token\n- `topUpVoucher`: Top-up voucher\n- `transactionFeedbacks`: Transaction feedbacks\n- `transfersOverview`: Transfers overview\n- `voucherTransactions`: Search voucher transactions\n- `vouchers`: Search vouchers\n- `wizard`: Run wizard", + "type": "string", + "enum": [ + "account", + "adInterests", + "balancesOverview", + "brokeredUsers", + "buyVoucher", + "contacts", + "createAd", + "createWebshopAd", + "documents", + "editProfile", + "externalPayments", + "help", + "inviteUser", + "messages", + "myAds", + "myWebshop", + "notifications", + "operation", + "passwords", + "payExternalUser", + "paySelf", + "paySystem", + "payUser", + "paymentRequests", + "pendingUsers", + "pos", + "purchases", + "receiveQrPayment", + "record", + "redeemVoucher", + "references", + "registerUser", + "requestPaymentFromSystem", + "requestPaymentFromUser", + "sales", + "scheduledPayments", + "searchAds", + "searchUsers", + "sendMessage", + "sendVoucher", + "settings", + "switchFrontend", + "switchTheme", + "token", + "topUpVoucher", + "transactionFeedbacks", + "transfersOverview", + "voucherTransactions", + "vouchers", + "wizard" + ] + }, + "ReceiptPartAlignEnum": { + "description": "The text alignment\nPossible values are:\n- `center`: The text is center-aligned\n- `left`: The text is left-aligned\n- `right`: The text is right-aligned", + "type": "string", + "enum": [ + "center", + "left", + "right" + ] + }, + "ReceiptPartSizeEnum": { + "description": "Either horizontal or vertical size of the font\nPossible values are:\n- `double`: Double size\n- `normal`: Normal size", + "type": "string", + "enum": [ + "double", + "normal" + ] + }, + "ReceiptPartStyleEnum": { + "description": "The font style\nPossible values are:\n- `bold`: Bold font\n- `normal`: Normal font\n- `underline`: Underline font", + "type": "string", + "enum": [ + "bold", + "normal", + "underline" + ] + }, + "RecordKind": { + "description": "The possible kinds of a record, which can either belong to system or to an user.\nPossible values are:\n- `system`: The record belongs to the system, and is unrelated to an user\n- `user`: The record belongs to a specific user", + "type": "string", + "enum": [ + "system", + "user" + ] + }, + "RecordLayoutEnum": { + "description": "The layout this record should be presented.\nPossible values are:\n- `list`: Should show a regular search filters / list\n- `single`: There should be a single record, with the form directly\n- `tiled`: Should show the record list with a form to quickly add a new", + "type": "string", + "enum": [ + "list", + "single", + "tiled" + ] + }, + "RecurringPaymentActionEnum": { + "description": "Possible actions that could be confirmed with a device for a recurring payment.\nPossible values are:\n- `block`: Block the recurring payment\n- `cancel`: Cancel the recurring payment\n- `modify`: Modifies the recurring payment like occurrences and scheduling\n- `unblock`: Unblock the recurring payment", + "type": "string", + "enum": [ + "block", + "cancel", + "modify", + "unblock" + ] + }, + "RecurringPaymentStatusEnum": { + "description": "The status of a recurring payment.\nPossible values are:\n- `blocked`: The recurring payment is blocked and won't be processed on due dates\n- `canceled`: The recurring payment was manually canceled\n- `closed`: The recurring payment is closed, as the last scheduled occurrence was processed\n- `open`: The recurring payment is open, as there are more future occurrences", + "type": "string", + "enum": [ + "blocked", + "canceled", + "closed", + "open" + ] + }, + "RedeemVoucherErrorCode": { + "description": "Possible errors when redeeming a voucher.\nPossible values are:\n- `insufficientBalance`: This voucher doesn't have enough balance for the attempted redeem\n- `notAllowedForUser`: This user cannot redeem this voucher\n- `notAllowedForVoucher`: This voucher cannot be redeemed\n- `notAllowedToday`: This voucher cannot be redeemed today\n- `notAllowedYet`: The redeem period for this voucher has not arrived yet\n- `payment`: There was an error when performing the payment\n- `unexpected`: An unexpected error has occurred. See the `exceptionType` and `exceptionMessage` fields for the internal information.\n- `userBlocked`: The user has been blocked by exceeding redeem tries", + "type": "string", + "enum": [ + "insufficientBalance", + "notAllowedForUser", + "notAllowedForVoucher", + "notAllowedToday", + "notAllowedYet", + "payment", + "unexpected", + "userBlocked" + ] + }, + "ReferenceDirectionEnum": { + "description": "The reference/payment feedback direction in relation to a given user/payment.\nPossible values are:\n- `given`: The reference/payment feedback was given by the given user\n- `received`: The reference/payment feedback was received by the given user", + "type": "string", + "enum": [ + "given", + "received" + ] + }, + "ReferenceLevelEnum": { + "description": "The reference level represents the satisfaction level.\nPossible values are:\n- `bad`: Unsatisfied\n- `good`: Satisfied\n- `neutral`: Neutral\n- `veryBad`: Very unsatisfied\n- `veryGood`: Very satisfied", + "type": "string", + "enum": [ + "bad", + "good", + "neutral", + "veryBad", + "veryGood" + ] + }, + "ResultTypeEnum": { + "description": "Result type for customizable results.\nPossible values are:\n- `list`: Results are a regular table, without thumbnail\n- `list_thumb`: Results are a list with thumbnail\n- `map`: Results are a map with address locations\n- `tiled`: Results are tiled boxes", + "type": "string", + "enum": [ + "list", + "list_thumb", + "map", + "tiled" + ] + }, + "RoleEnum": { + "description": "The main role the user has.\nPossible values are:\n- `administrator`: A user who can manage the system and other users.\n- `broker`: A user who can manage other users.\n- `member`: A regular user who can manage operators.\n- `operator`: A \"sub-user\" created by a member to manage his data.", + "type": "string", + "enum": [ + "administrator", + "broker", + "member", + "operator" + ] + }, + "RunOperationResultColumnTypeEnum": { + "description": "The data type for a custom operation column.\nPossible values are:\n- `boolean`: Each cell value is a boolean\n- `currencyAmount`: Each cell value is an object with 2 properties: amount (number represented as string) and currency (of type `Currency`)\n- `date`: Each cell value is a date represented as string\n- `number`: Each cell value is a number, but may be represented as string\n- `string`: Each cell value is a string", + "type": "string", + "enum": [ + "boolean", + "currencyAmount", + "date", + "number", + "string" + ] + }, + "ScheduledPaymentActionEnum": { + "description": "Possible actions that could be confirmed with a device for a scheduled payment.\nPossible values are:\n- `block`: Block the scheduled payment\n- `cancel`: Cancel the scheduled payment\n- `settle`: Settle the scheduled payment\n- `unblock`: Unblock the scheduled payment", + "type": "string", + "enum": [ + "block", + "cancel", + "settle", + "unblock" + ] + }, + "ScheduledPaymentStatusEnum": { + "description": "The status of a scheduled payment.\nPossible values are:\n- `blocked`: The scheduled payment is blocked - won't have any installment processed until being unblocked again\n- `canceled`: The scheduled payment, as well as all open installments were canceled\n- `closed`: The scheduled payment is closed\n- `open`: The scheduled payment has open installments", + "type": "string", + "enum": [ + "blocked", + "canceled", + "closed", + "open" + ] + }, + "SendMediumEnum": { + "description": "Mediums used to send information to the user (e.g: a confirmation code).\nPossible values are:\n- `email`: The user will receive an email with the information\n- `sms`: The user will receive a sms with the information (only if there is at least one phone enabled for sms)", + "type": "string", + "enum": [ + "email", + "sms" + ] + }, + "SessionSourceEnum": { + "description": "Indicates how a session was created. Can be modified in runtime.\nPossible values are:\n- `device`: The session was created from a trusted device without a password input.\n- `login`: A regular user / password login was performed to create the session.", + "type": "string", + "enum": [ + "device", + "login" + ] + }, + "ShoppingCartCheckoutErrorCode": { + "description": "Possible errors when checking out a shopping cart.\nPossible values are:\n- `insufficientBalance`: The origin account of the selected payment type used to make the amount reservation does not have enough balance.\n- `products`: There was an error related to the products contained in he shopping cart.\n- `unexpected`: An unexpected error has occurred. See the `exceptionType` and `exceptionMessage` fields for the internal information.", + "type": "string", + "enum": [ + "insufficientBalance", + "products", + "unexpected" + ] + }, + "ShoppingCartErrorCode": { + "description": "Possible errors when interacting with a shopping cart.\nPossible values are:\n- `canNotBuyFromSeller`: The authenticated user is not visible by the webshop's seller\n- `notEnoughStock`: There is not enough stock of the webshop ad to fulfill the requested quantity\n- `unexpected`: An unexpected error has occurred. See the `exceptionType` and `exceptionMessage` fields for the internal information.", + "type": "string", + "enum": [ + "canNotBuyFromSeller", + "notEnoughStock", + "unexpected" + ] + }, + "ShoppingCartItemAvailabilityEnum": { + "description": "The possible status of a webshop advertisement in relation to its availability.\nPossible values are:\n- `available`: The webshop advertisement is available and can be purchased\n- `outOfStock`: The webshop advertisement is now out of stock\n- `unavailable`: The webshop advertisement has been made unavailable and cannot be purchased anymore", + "type": "string", + "enum": [ + "available", + "outOfStock", + "unavailable" + ] + }, + "ShoppingCartItemQuantityAdjustmentEnum": { + "description": "The possible adjustments to a quantity-limited product added to shopping cart.\nPossible values are:\n- `max`: The quantity was reduced to honor the maximum allowed quantity\n- `min`: The quantity was raised to honor the minimum allowed quantity\n- `stock`: The quantity was reduced to the maximum available stock quantity", + "type": "string", + "enum": [ + "max", + "min", + "stock" + ] + }, + "SystemAlertTypeEnum": { + "description": "The type of system alert.\nPossible values are:\n- `accountBalanceFixed`: Accounts with inconsistent account balances were found and fixed\n- `accountFeeChargedNoFailures`: An account fee charge has finished without any failures\n- `accountFeeChargedWithFailures`: An account fee charge has finished with at least one failure\n- `applicationRestarted`: The application has been restarted, or started for the first time\n- `custom`: Custom alerts thrown by scripts\n- `customTranslationsInvalidated`: Custom translations were invalidated because the source (english) text has changed\n- `emailSendingFailed`: An E-mail couldn't be sent\n- `inconsistentBalanceBelowLimit`: A (limited) system account was found to have an inconsistent balance below the allowed limit\n- `inconsistentDbSchema`: Differences between the current database schema where found according to the expected schema\n- `maxBlockedUsersReached`: The max number of users blocked from the same IP has been reached\n- `maxGlobalSmsReached`: The groups under a certain configuration have run out of SMS messages\n- `maxIncorrectLoginAttempts`: Someone tried for a given number of tries to login with an invalid username\n- `smsSendingFailed`: An SMS couldn't be sent", + "type": "string", + "enum": [ + "accountBalanceFixed", + "accountFeeChargedNoFailures", + "accountFeeChargedWithFailures", + "applicationRestarted", + "custom", + "customTranslationsInvalidated", + "emailSendingFailed", + "inconsistentBalanceBelowLimit", + "inconsistentDbSchema", + "maxBlockedUsersReached", + "maxGlobalSmsReached", + "maxIncorrectLoginAttempts", + "smsSendingFailed" + ] + }, + "TempImageTargetEnum": { + "description": "The possible targets for a temporary image.\nPossible values are:\n- `advertisement`: The image will be used for an advertisement of a specific user\n- `contactInfo`: The image will be used for an additional contact information of a specific user\n- `customValue`: The image will be used for a value of a specific custom field\n- `userProfile`: The image will be used as a profile image for an existing user\n- `userRegistration`: The image will be used as a profile image for a newly registered user", + "type": "string", + "enum": [ + "advertisement", + "contactInfo", + "customValue", + "userProfile", + "userRegistration" + ] + }, + "ThemeImageKind": { + "description": "The type of theme image to request\nPossible values are:\n- `background`: A background image\n- `custom`: A custom theme image\n- `mapMarker`: A map marker\n- `mobile`: An image used by the mobile application", + "type": "string", + "enum": [ + "background", + "custom", + "mapMarker", + "mobile" + ] + }, + "TicketStatusEnum": { + "description": "The status of a ticket.\nPossible values are:\n- `approved`: The ticket was approved by the payer and is waiting to be processed by the receiver to generate the payment\n- `canceled`: The ticket was canceled by the receiver before being approved\n- `expired`: The ticket has expired without being approved by a payer or canceled by the receiver until the expiration date\n- `open`: The ticket was created, but not approved yet\n- `processed`: The ticket was approved and processed and the payment was generated", + "type": "string", + "enum": [ + "approved", + "canceled", + "expired", + "open", + "processed" + ] + }, + "TimeFieldEnum": { + "description": "Determines a time field, such as seconds, hours or months.\nPossible values are:\n- `days`: Day(s)\n- `hours`: Hour(s)\n- `millis`: Millisecond(s)\n- `minutes`: Minute(s)\n- `months`: Month(s)\n- `seconds`: Second(s)\n- `weeks`: Week(s)\n- `years`: Year(s)", + "type": "string", + "enum": [ + "days", + "hours", + "millis", + "minutes", + "months", + "seconds", + "weeks", + "years" + ] + }, + "TimeFormatEnum": { + "description": "The format for times.\nPossible values are:\n- `h12`: 12-hour with AM/PM indicator\n- `h24`: 24-hour", + "type": "string", + "enum": [ + "h12", + "h24" + ] + }, + "TokenStatusEnum": { + "description": "The possible statuses for a token.\nPossible values are:\n- `activationExpired`: The token has exceeded the activation deadline.\n- `active`: The token is active and can be used.\n- `blocked`: The token is blocked from being used.\n- `canceled`: The token is canceled and cannot be used.\n- `expired`: The token has exceeded the expiration date.\n- `pending`: The token has been assigned to an user, but it's still pending for activation.\n- `unassigned`: The token is not assigned to an user.", + "type": "string", + "enum": [ + "activationExpired", + "active", + "blocked", + "canceled", + "expired", + "pending", + "unassigned" + ] + }, + "TokenTypeEnum": { + "description": "The kind of a token principal type.\nPossible values are:\n- `barcode`: A barcode with the token\n- `nfcDevice`: A device (e.g. cell phone) with support for NFC\n- `nfcTag`: A NFC tag/card\n- `other`: Any other type containing a token\n- `qrcode`: A QR code containing a token\n- `swipe`: A swipe/magnetic card containing the token", + "type": "string", + "enum": [ + "barcode", + "nfcDevice", + "nfcTag", + "other", + "qrcode", + "swipe" + ] + }, + "TopUpVoucherErrorCode": { + "description": "Possible errors when topping-up a voucher.\nPossible values are:\n- `activationExpired`: The maximum activation time for the voucher has expired.\n- `alreadyActivated`: The voucher allows a single top-up and has already been activated.\n- `maxBalanceReached`: The voucher cannot be topped-up because the maximum allowed balance would be exceeded.\n- `notAllowedForVoucher`: This voucher cannot be topped-up.\n- `payment`: There was an error when performing the payment.\n- `unexpected`: An unexpected error has occurred. See the `exceptionType` and `exceptionMessage` fields for the internal information.", + "type": "string", + "enum": [ + "activationExpired", + "alreadyActivated", + "maxBalanceReached", + "notAllowedForVoucher", + "payment", + "unexpected" + ] + }, + "TotpStatusEnum": { + "description": "Indicates the status of the TOTP secret of a user\nPossible values are:\n- `active`: The TOTP secret is active.\n- `neverCreated`: The user has not started the TOTP activation (or has removed the previously active secret).\n- `pending`: The user has successfully verified his identity with a verification code sent by email / SMS, but hasn't yet confirmed the activation by entering a valid numeric sequence generated by the app.", + "type": "string", + "enum": [ + "active", + "neverCreated", + "pending" + ] + }, + "TransOrderByEnum": { + "description": "Contains the possible 'order by' values when searching for transfers / transactions.\nPossible values are:\n- `amountAsc`: The result is ordered by amount descendant\n- `amountDesc`: The result is ordered by amount descendant\n- `dateAsc`: The result is ordered by date ascendant\n- `dateDesc`: The result is ordered by date descendant", + "type": "string", + "enum": [ + "amountAsc", + "amountDesc", + "dateAsc", + "dateDesc" + ] + }, + "TransactionAuthorizationActionEnum": { + "description": "An action performed when a transaction was pending authorization.\nPossible values are:\n- `authorized`: The transaction was authorized\n- `canceled`: The authorization process was canceled by the payer/admin\n- `denied`: The transaction was denied (rejected)\n- `expired`: The authorization process has expired by system", + "type": "string", + "enum": [ + "authorized", + "canceled", + "denied", + "expired" + ] + }, + "TransactionAuthorizationStatusEnum": { + "description": "The status regarding authorization a transaction is in. If configured, transactions can require one or more levels of authorization in order to be processed. If a transaction has the this status null, it means it never went through the authorization process.\nPossible values are:\n- `authorized`: The transaction was fully authorized and is processed\n- `canceled`: The authorization submission was canceled by the submitter\n- `denied`: The authorization was denied\n- `expired`: The pending authorization has expired\n- `pending`: The transaction is pending authorization", + "type": "string", + "enum": [ + "authorized", + "canceled", + "denied", + "expired", + "pending" + ] + }, + "TransactionAuthorizationTypeEnum": { + "description": "Defines which kind of authorization a transaction is through. Only returned if the `kind` is either `payment`, `scheduledPayment` or `recurringPayment` and the transaction is pending for authorization.\nPossible values are:\n- `level`: A transaction is going through some authorization level\n- `operator`: An operator performed a payment that needs to be authorized by his member or other operators", + "type": "string", + "enum": [ + "level", + "operator" + ] + }, + "TransactionKind": { + "description": "The kind of a transaction.\nPossible values are:\n- `chargeback`: Deprecated: Chargebacks are now only handled at transfer level. Chargeback transactions no longer exist.. Chargeback of a given transfer\n- `externalPayment`: A payment to an external user\n- `import`: Deprecated: No longer used. Use `payment` instead.. An imported transaction\n- `order`: Deprecated: No longer used. Use `payment` instead. . Transaction generated by confirming an order\n- `payment`: A direct payment\n- `paymentRequest`: A request for another user to accept a payment\n- `recurringPayment`: A payment which is processed again periodically\n- `scheduledPayment`: A scheduled payment which is either a payment scheduled for a future date or has multiple installments\n- `ticket`: A payment whose the payer is unknown", + "type": "string", + "x-deprecated-enum": [ + "chargeback|4.18|Chargebacks are now only handled at transfer level. Chargeback transactions no longer exist.", + "import|4.18|No longer used. Use `payment` instead.", + "order|4.17|No longer used. Use `payment` instead." + ], + "enum": [ + "chargeback", + "externalPayment", + "import", + "order", + "payment", + "paymentRequest", + "recurringPayment", + "scheduledPayment", + "ticket" + ] + }, + "TransactionSubjectsEnum": { + "description": "Reference to none, one of (from or to) or both subjects of a transaction (or transfer).\nPossible values are:\n- `both`: Reference to both from and to subjects of the transaction\n- `from`: Reference to the transaction from\n- `none`: Reference to none of the transaction subjects\n- `to`: Reference to the transaction to", + "type": "string", + "enum": [ + "both", + "from", + "none", + "to" + ] + }, + "TransferDirectionEnum": { + "description": "Indicates whether from an account POV a transfer is a credit or debit.\nPossible values are:\n- `credit`: The transfer impacts the balance positively\n- `debit`: The transfer impacts the balance negatively", + "type": "string", + "enum": [ + "credit", + "debit" + ] + }, + "TransferKind": { + "description": "Indicates the reason the transfer was created.\nPossible values are:\n- `accountFee`: A transfer generated by an account fee charge\n- `balanceDisposal`: A transfer which either withdraws or credits funds of an account being disposed\n- `chargeback`: A transfer which is a chargeback of another transfer\n- `import`: An imported transfer\n- `initialCredit`: A transfer which is the initial credit for a newly created account\n- `installment`: A transfer generated when processing a scheduled / recurring payment installment / occurrence\n- `payment`: A transfer generated by a direct payment or accepting a webshop order\n- `transferFee`: A transfer generated by a transfer fee charge", + "type": "string", + "enum": [ + "accountFee", + "balanceDisposal", + "chargeback", + "import", + "initialCredit", + "installment", + "payment", + "transferFee" + ] + }, + "UiKind": { + "description": "Indicates the type of user interface.\nPossible values are:\n- `custom`: A custom front-end application. Has no headers, footers or theme\n- `main`: The main web user interface\n- `mobile`: The mobile application user interface\n- `pay`: The Ticket / Easy invoice confirmation application user interface", + "type": "string", + "enum": [ + "custom", + "main", + "mobile", + "pay" + ] + }, + "UnauthorizedErrorCode": { + "description": "Error codes for 401 Unauthorized HTTP status.\nPossible values are:\n- `blockedAccessClient`: The access client used for access is blocked\n- `invalidAccessClient`: The access client used for access is invalid\n- `invalidAccessToken`: The OAuth2 / OpenID Connect access token used for access is invalid\n- `invalidChannelUsage`: Attempt to login on a stateless-only channel, or use stateless in a stateful-only channel, or invoke as guest in a channel configuration which is only for users\n- `invalidNetwork`: Attempt to access a network that has been disabled, or a restricted global administrator is trying to login to a inaccessible network\n- `loggedOut`: The session token used for access is invalid\n- `login`: Either user identification (principal) or password are invalid. May have additional information, such as the user / password status\n- `missingAuthorization`: Attempt to access an operation as guest, but the operation requires authentication\n- `remoteAddressBlocked`: The IP address being used for access has been blocked by exceeding tries with invalid users\n- `unauthorizedAddress`: The user cannot access the system using an IP address that is not white-listed\n- `unauthorizedUrl`: The user's configuration demands access using a specific URL, and this access is being done using another one", + "type": "string", + "enum": [ + "blockedAccessClient", + "invalidAccessClient", + "invalidAccessToken", + "invalidChannelUsage", + "invalidNetwork", + "loggedOut", + "login", + "missingAuthorization", + "remoteAddressBlocked", + "unauthorizedAddress", + "unauthorizedUrl" + ] + }, + "UnavailableErrorCode": { + "description": "Error codes for 503 Service Unavailable entity HTTP status. It means that some required service couldn't be contacted\nPossible values are:\n- `emailSending`: An error has occurred trying to send the a required email\n- `smsSending`: An error has occurred trying to send a required SMS message", + "type": "string", + "enum": [ + "emailSending", + "smsSending" + ] + }, + "UserAddressResultEnum": { + "description": "Determines which address is returned on the search, if any. By default no addresses are returned. This option is useful for displaying results as locations on a map. In all cases only located addresses (those that have the geographical coordinates set) are returned. When returning all addresses, data related with multiple addresses is returned multiple times.\nPossible values are:\n- `all`: All addresses are returned.\n- `nearest`: The nearest address from the reference location is returned. Only usable if a reference coordinate (`latitude` and `longitude`)\n- `none`: Addresses are not returned.\n- `primary`: The primary (default) user address is returned", + "type": "string", + "enum": [ + "all", + "nearest", + "none", + "primary" + ] + }, + "UserAlertTypeEnum": { + "description": "The type of user alert.\nPossible values are:\n- `custom`: Custom alerts thrown by scripts\n- `givenVeryBadRefs`: A user has exceeded the maximum number of given very bad references\n- `inconsistentBalanceBelowLimit`: An inconsistent account balance was found and fixed, but the balance is below the credit limit\n- `insufficientBalanceForInitialCredit`: A user account's initial credit couldn't be granted because the source account lacked funds\n- `maxDeviceActivationAttemptsReached`: A user has reached the maximum number of attempts to activate a device by code\n- `maxDeviceConfirmationCheckAttemptsReached`: A user has reached the maximum number of attempts to check for a processed device confirmation\n- `maxTokenActivationAttemptsReached`: A user has reached the maximum number of attempts to activate a token\n- `maxTotpAttemptsReached`: A user has reached the maximum number of attempts to enter a secret generated by an authenticator app (TOTP)\n- `maxUserLocalizationAttemptsReached`: A user has reached the maximum number of attempts to find other users\n- `maxVoucherRedeemAttemptsReached`: A user has reached the maximum number of attempts to redeem a voucher\n- `moveUserAutomaticallyFailed`: A user couldn't be moved automatically to another group\n- `passwordDisabledByTries`: A user password has been disabled by exceeding the wrong attempts\n- `passwordTemporarilyBlocked`: A user password has been temporarily blocked by exceeding the wrong attempts\n- `receivedVeryBadRefs`: A user has exceeded the maximum number of received very bad references\n- `scheduledPaymentFailed`: An scheduled payment has failed", + "type": "string", + "enum": [ + "custom", + "givenVeryBadRefs", + "inconsistentBalanceBelowLimit", + "insufficientBalanceForInitialCredit", + "maxDeviceActivationAttemptsReached", + "maxDeviceConfirmationCheckAttemptsReached", + "maxTokenActivationAttemptsReached", + "maxTotpAttemptsReached", + "maxUserLocalizationAttemptsReached", + "maxVoucherRedeemAttemptsReached", + "moveUserAutomaticallyFailed", + "passwordDisabledByTries", + "passwordTemporarilyBlocked", + "receivedVeryBadRefs", + "scheduledPaymentFailed" + ] + }, + "UserIdentityProviderStatusEnum": { + "description": "The status of a link between a user and an identity provider.\nPossible values are:\n- `disabled`: The identity provider is disabled for the user, which means that the login with external provider will not work even if the user has the same e-mail address in the provider and in Cyclos.\n- `linked`: The identity provider is linked to the user\n- `notLinked`: The identity provider is not currently linked with the user", + "type": "string", + "enum": [ + "disabled", + "linked", + "notLinked" + ] + }, + "UserImageKind": { + "description": "Determines the kind of an user image.\nPossible values are:\n- `custom`: User custom images are additional images that can be used on rich text contents.\n- `profile`: User profile images are those associated with the user profile. The first profile image is used to depict the user on search results.", + "type": "string", + "enum": [ + "custom", + "profile" + ] + }, + "UserImportedFileContextEnum": { + "description": "Context to search for imported files of a specific user\nPossible values are:\n- `userPayments`: Batch payments\n- `userSendVouchers`: Batch vouchers sending", + "type": "string", + "enum": [ + "userPayments", + "userSendVouchers" + ] + }, + "UserImportedFileKind": { + "description": "Types of user imported file\nPossible values are:\n- `userPayments`: Batch payments\n- `userSendVouchers`: Batch vouchers sending", + "type": "string", + "enum": [ + "userPayments", + "userSendVouchers" + ] + }, + "UserMenuEnum": { + "description": "Which user menu should a data be displayed.\nPossible values are:\n- `banking`: Banking / accounts\n- `community`: Interaction with other users\n- `marketplace`: Marketplace / advertisements\n- `personal`: Personal data", + "type": "string", + "enum": [ + "banking", + "community", + "marketplace", + "personal" + ] + }, + "UserOrderByEnum": { + "description": "Possible options for ordering the results of an user search.\nPossible values are:\n- `alphabeticallyAsc`: Users are ordered by name (or whatever field is set to format users) in ascending order.\n- `alphabeticallyDesc`: Users are ordered by name (or whatever field is set to format users) in descending order.\n- `creationDate`: Newly registered users are returned first.\n- `distance`: Only useful when providing a location, will return nearer advertisements first.\n- `random`: Users will be randomly returned\n- `relevance`: This is the default if keywords are used. Best matching users come first.", + "type": "string", + "enum": [ + "alphabeticallyAsc", + "alphabeticallyDesc", + "creationDate", + "distance", + "random", + "relevance" + ] + }, + "UserProfileSectionEnum": { + "description": "Which user profile section should a data be displayed.\nPossible values are:\n- `banking`: Banking / accounts\n- `information`: Data / information\n- `management`: Management of user data\n- `marketplace`: Marketplace / advertisements", + "type": "string", + "enum": [ + "banking", + "information", + "management", + "marketplace" + ] + }, + "UserRegistrationStatusEnum": { + "description": "The status of the user after the registration.\nPossible values are:\n- `active`: The user is initially active\n- `emailValidation`: The user has received an e-mail, with a link to verify the e-mail address. Once verified, the registration will be complete\n- `inactive`: The user is initially inactive, and an administrator needs to manually activate the user", + "type": "string", + "enum": [ + "active", + "emailValidation", + "inactive" + ] + }, + "UserRelationshipEnum": { + "description": "How the authenticated user is related to a given user.\nPossible values are:\n- `administrator`: The authenticated user is an administrator that manages the given user\n- `broker`: The authenticated user is a broker of the given user\n- `brokered`: The authenticated user is a member managed by the given broker\n- `none`: There is no special relation between the authenticated user and the given user\n- `owner`: The given user is an operator of the authenticated user\n- `sameOwner`: Both the given user and the authenticated user are operators of the same owner\n- `self`: The given user is the authenticated user", + "type": "string", + "enum": [ + "administrator", + "broker", + "brokered", + "none", + "owner", + "sameOwner", + "self" + ] + }, + "UserStatusEnum": { + "description": "The possible statuses for an user.\nPossible values are:\n- `active`: The user is active and can use the system normally.\n- `blocked`: The user has been blocked from accessing the system. Other users still see him/her.\n- `disabled`: The user has been disabled - he/she cannot access the system and is invisible by other users.\n- `pending`: The user registration is pending a confirmation. Probably the user has received an e-mail with a link that must be followed to complete the activation. The user is invisible by other users.\n- `purged`: The user was permanently removed and had all his private data removed. Only transactions are kept for historical reasons.\n- `removed`: The user was permanently removed. It's profile is kept for historical purposes.", + "type": "string", + "enum": [ + "active", + "blocked", + "disabled", + "pending", + "purged", + "removed" + ] + }, + "UsersWithBalanceOrderByEnum": { + "description": "Contains the possible 'order by' values when searching for users with balances.\nPossible values are:\n- `alphabeticallyAsc`: Users are ordered by name (or whatever field is set to format users) in ascending order.\n- `alphabeticallyDesc`: Users are ordered by name (or whatever field is set to format users) in descending order.\n- `balanceAsc`: User are ordered by balance, lower balances first.\n- `balanceDesc`: User are ordered by balance, higher balances first.", + "type": "string", + "enum": [ + "alphabeticallyAsc", + "alphabeticallyDesc", + "balanceAsc", + "balanceDesc" + ] + }, + "VoucherActionEnum": { + "description": "Possible actions that could be confirmed with a device for a voucher.\nPossible values are:\n- `cancel`: Cancel the voucher\n- `changeExpiration`: Change the expiration date of a voucher\n- `changeNotificationSettings`: Change the voucher notification settings, including the e-mail the voucher was sent to\n- `changePin`: Change the voucher pin", + "type": "string", + "enum": [ + "cancel", + "changeExpiration", + "changeNotificationSettings", + "changePin" + ] + }, + "VoucherCancelActionEnum": { + "description": "Indicates what happens if a voucher is canceled, if it can be canceled.\nPossible values are:\n- `cancelAndChargeback`: A voucher with a single top-up and no redeems, when canceled, the top-up will be charged-back\n- `cancelAndRefund`: A single bought voucher is canceled and the amount is refunded\n- `cancelGenerated`: Cancels a single generated voucher\n- `cancelPendingPack`: Cancels more than one bought vouchers whose buy payment is pending authorization\n- `cancelPendingSingle`: Cancels a single bought vouchers whose buy payment is pending authorization", + "type": "string", + "enum": [ + "cancelAndChargeback", + "cancelAndRefund", + "cancelGenerated", + "cancelPendingPack", + "cancelPendingSingle" + ] + }, + "VoucherCreationTypeEnum": { + "description": "Indicates how a voucher was created.\nPossible values are:\n- `bought`: The voucher was bought by an user\n- `generated`: The voucher was generated by an administrator\n- `sent`: The voucher was bought by an user and sent to an external user", + "type": "string", + "enum": [ + "bought", + "generated", + "sent" + ] + }, + "VoucherGenerationAmountEnum": { + "description": "Indicates when the amount is set for generated vouchers\nPossible values are:\n- `activation`: Only if the generation status is inactive. The amount is set when the voucher is activated via a top-up. Only a single top-up is allowed.\n- `dynamic`: The voucher amount is dynamic, indicating it can be topped-up multiple times.\n- `generation`: The voucher amount is set when the voucher is generated.", + "type": "string", + "enum": [ + "activation", + "dynamic", + "generation" + ] + }, + "VoucherGenerationStatusEnum": { + "description": "Indicates the initial status on voucher generation\nPossible values are:\n- `active`: Vouchers are initially active, that means their amount is defined at generation time and they are backed by an amount reservation in the system account, unless it is configured to be an unlimited account. That's why it is advised to use a limited system account for vouchers.\n- `blocked`: Vouchers are initially blocked, with no backing units. Once the voucher is unblocked by a user, the corresponding reservation in the system account is done, and the voucher can then be redeemed.\n- `inactive`: Vouchers are initially inactive, with no backing units. The voucher needs to be topped-up in order to be used.", + "type": "string", + "enum": [ + "active", + "blocked", + "inactive" + ] + }, + "VoucherGiftEnum": { + "description": "Indicates if bought vouchers can be / are gift\nPossible values are:\n- `always`: Bought vouchers are always gift\n- `choose`: The user chooses whether vouchers are gift when buying\n- `never`: Bought vouchers are never gift", + "type": "string", + "enum": [ + "always", + "choose", + "never" + ] + }, + "VoucherOrderByEnum": { + "description": "The voucher search result order.\nPossible values are:\n- `creationDateAsc`: Order by creation date, ascending\n- `creationDateDesc`: Order by creation date, descending (default)\n- `expirationDateAsc`: Order by expiration date, ascending\n- `expirationDateDesc`: Order by expiration date, descending\n- `redeemDateAsc`: Deprecated: This value is no longer used in the vouchers search, only in the transactions search.. Order by redeem date, descending\n- `redeemDateDesc`: Deprecated: This value is no longer used in the vouchers search, only in the transactions search.. Order by redeem date, ascending", + "type": "string", + "x-deprecated-enum": [ + "redeemDateAsc|4.17|This value is no longer used in the vouchers search, only in the transactions search.", + "redeemDateDesc|4.17|This value is no longer used in the vouchers search, only in the transactions search." + ], + "enum": [ + "creationDateAsc", + "creationDateDesc", + "expirationDateAsc", + "expirationDateDesc", + "redeemDateAsc", + "redeemDateDesc" + ] + }, + "VoucherPinOnActivationEnum": { + "description": "Indicates how the voucher PIN is handled when an inactive voucher is activated\nPossible values are:\n- `input`: The PIN is entered in a pinpad / keyboard at the moment the voucher is activated.\n- `none`: The PIN is not handled - it should be delivered to users using other means\n- `send`: The PIN is sent either via e-mail or SMS message (if outbound SMS is enabled). When the voucher is being activated, either e-mail address or mobile phone number are required.", + "type": "string", + "enum": [ + "input", + "none", + "send" + ] + }, + "VoucherPinStatusForRedeemEnum": { + "description": "The voucher PIN status for redeeming.\nPossible values are:\n- `blocked`: The voucher PIN has been temporarily blocked by exceeding attempts.\n- `notUsed`: The voucher PIN is not used for redeems.\n- `required`: The voucher PIN is required for redeems.\n- `subsequent`: The voucher PIN is used only on subsequent redeems, not on the first one. As the current voucher never had a redeem, is not used.", + "type": "string", + "enum": [ + "blocked", + "notUsed", + "required", + "subsequent" + ] + }, + "VoucherRelationEnum": { + "description": "The ways a voucher is related to an user.\nPossible values are:\n- `bought`: A voucher the user has bought\n- `redeemed`: A voucher the user has redeemed", + "type": "string", + "enum": [ + "bought", + "redeemed" + ] + }, + "VoucherStatusEnum": { + "description": "The voucher status.\nPossible values are:\n- `activationExpired`: The voucher was not activated before the deadline.\n- `blocked`: The voucher was generated in blocked status.\n- `canceled`: The voucher was canceled, and cannot be further used.\n- `expired`: The voucher has expired without being redeemed.\n- `inactive`: The voucher was generated in an inactive status and needs to be activated (via top-up) before being redeemed.\n- `open`: The voucher has been generated active or bought, and is open.\n- `pending`: The voucher has been bought, and the corresponding payment is pending for authorization.\n- `redeemed`: The voucher had a fixed amount and was fully redeemed.", + "type": "string", + "enum": [ + "activationExpired", + "blocked", + "canceled", + "expired", + "inactive", + "open", + "pending", + "redeemed" + ] + }, + "VoucherTransactionKind": { + "description": "A kind of voucher transaction\nPossible values are:\n- `chargeback`: A voucher transaction was charged back\n- `redeem`: A voucher was redeemed, that means there was a payment from system to a user\n- `topUp`: A voucher was topped-up, that means there was a payment from a user to system", + "type": "string", + "enum": [ + "chargeback", + "redeem", + "topUp" + ] + }, + "WeekDayEnum": { + "description": "The days of the week.\nPossible values are:\n- `fri`: Friday\n- `mon`: Monday\n- `sat`: Saturday\n- `sun`: Sunday\n- `thu`: Thursday\n- `tue`: Tuesday\n- `wed`: Wednesday", + "type": "string", + "enum": [ + "fri", + "mon", + "sat", + "sun", + "thu", + "tue", + "wed" + ] + }, + "WizardActionEnum": { + "description": "Indicates which kind of action clients should take on the current step.\nPossible values are:\n- `alreadyExecuted`: The step was previously executed and cannot be executed again (probably an external redirect). Clients should show the user a message and the transition actions.\n- `externalRedirect`: The client should prepare the external redirect (`POST /wizard-executions/{key}/redirect`), which will return a URL. Then the user should be redirected to that URL.\n- `finish`: The client should finish the wizard (`POST /wizard-executions/{key}`)\n- `step`: The client should transition to a new step (`POST /wizard-executions/{key}[?transition={t}]`)", + "type": "string", + "enum": [ + "alreadyExecuted", + "externalRedirect", + "finish", + "step" + ] + }, + "WizardKind": { + "description": "Indicates the type of a custom wizard.\nPossible values are:\n- `menu`: The wizard is executed on a menu item, even by guests\n- `registration`: The wizard is used to register a user\n- `system`: The wizard is executed by admins\n- `user`: The wizard is executed over a user", + "type": "string", + "enum": [ + "menu", + "registration", + "system", + "user" + ] + }, + "WizardResultTypeEnum": { + "description": "Indicates how clients should handle the wizard result.\nPossible values are:\n- `plainText`: The `result` field is returned, and its content is plain text\n- `registration`: The `registrationResult` field is returned, just like a normal user registration would return\n- `richText`: The `result` field is returned, and its content is HTML", + "type": "string", + "enum": [ + "plainText", + "registration", + "richText" + ] + }, + "WizardStepFieldKind": { + "description": "Indicates the kind of field to be displayed in a wizard step.\nPossible values are:\n- `agreements`: The checks for agreements acceptance.\n- `basicProfileField`: A basic user profile field, except for accountNumber.\n- `captcha`: The CAPTCHA verification to prevent registrations by bots.\n- `customProfileField`: A custom user profile field.\n- `passwords`: The input for the password (or passwords).\n- `securityQuestion`: The input for the user's security question.\n- `wizardField`: A wizard custom field.", + "type": "string", + "enum": [ + "agreements", + "basicProfileField", + "captcha", + "customProfileField", + "passwords", + "securityQuestion", + "wizardField" + ] + }, + "WizardStepKind": { + "description": "Indicates the type of a custom wizard step.\nPossible values are:\n- `emailVerification`: Shows an email verification step. Only for registration wizard.\n- `formFields`: Shows custom wizard fields. In a registration wizard, shows any combination of profile fields, password, captcha, agreements, etc\n- `group`: In a registration wizard, shows the selection of the group the user will join\n- `identityProvider`: In a registration wizard, shows the available identity providers for a faster user registration\n- `phoneVerification`: Shows a mobile phone number verification step. Only for registration wizard.", + "type": "string", + "enum": [ + "emailVerification", + "formFields", + "group", + "identityProvider", + "phoneVerification" + ] + }, + "AcceptOrReschedulePaymentRequest": { + "description": "Parameters for accepting or rescheduling payment requests.", + "type": "object", + "properties": { + "comments": { + "description": "A comment the payer can set.", + "type": "string" + }, + "processDate": { + "description": "The date the payment request must be processed.", + "type": "string", + "format": "date-time" + } + } + }, + "AcceptOrderByBuyer": { + "description": "Parameters used to accept an order by the buyer.", + "allOf": [ + { + "$ref": "#/components/schemas/BaseOrderAction" + }, + { + "type": "object", + "properties": { + "paymentType": { + "description": "Either the internal name or id of the selected payment type (if any).", + "type": "string" + } + } + } + ] + }, + "AcceptOrderBySeller": { + "description": "Parameters used to accept an order by the seller.", + "allOf": [ + { + "$ref": "#/components/schemas/BaseOrderAction" + }, + { + "type": "object" + } + ] + }, + "AcceptedAgreement": { + "description": "Holds information about an accepted agreement", + "type": "object", + "properties": { + "date": { + "type": "string", + "format": "date-time", + "description": "The date the agreement was accepted" + }, + "acceptedVersion": { + "type": "integer", + "description": "The version of the agreement that was accepted" + } + } + }, + "Account": { + "description": "Contains basic data for an account", + "allOf": [ + { + "$ref": "#/components/schemas/Entity" + }, + { + "type": "object", + "properties": { + "number": { + "description": "The account number", + "type": "string" + }, + "type": { + "description": "Reference to the account type", + "allOf": [ + { + "$ref": "#/components/schemas/EntityReference" + } + ] + } + } + } + ] + }, + "AccountActivityStatus": { + "description": "Contains transactions activity information like received, paid and total", + "allOf": [ + { + "$ref": "#/components/schemas/AccountStatus" + }, + { + "type": "object", + "properties": { + "transactionsInPeriod": { + "description": "Indicates the transactions activity in the last 30 days", + "type": "integer" + }, + "transactionsAllTime": { + "description": "Indicates the transactions activity all time", + "type": "integer" + }, + "receivedInPeriod": { + "description": "Indicates the total received in last the last 30 days", + "type": "string", + "format": "number" + }, + "receivedAllTime": { + "description": "Indicates the total received all time", + "type": "string", + "format": "number" + }, + "paidInPeriod": { + "description": "Indicates the total paid in last the last 30 days", + "type": "string", + "format": "number" + }, + "paidAllTime": { + "description": "Indicates the total paid all time", + "type": "string", + "format": "number" + } + } + } + ] + }, + "AccountBalanceEntry": { + "description": "Contains the balance on a given date", + "type": "object", + "properties": { + "date": { + "description": "The balance date", + "type": "string", + "format": "date-time" + }, + "amount": { + "description": "The balance", + "type": "string", + "format": "number" + } + } + }, + "AccountBalanceHistoryResult": { + "description": "The result for an account balance history request", + "allOf": [ + { + "$ref": "#/components/schemas/Entity" + }, + { + "type": "object", + "properties": { + "account": { + "$ref": "#/components/schemas/AccountWithHistoryStatus" + }, + "interval": { + "description": "The actually used interval between data points. Specially useful when no interval is passed as parameter, and one is assumed.", + "allOf": [ + { + "$ref": "#/components/schemas/TimeInterval" + } + ] + }, + "balances": { + "description": "Each data point", + "type": "array", + "items": { + "$ref": "#/components/schemas/AccountBalanceEntry" + } + } + } + } + ] + }, + "AccountBalanceLimitsData": { + "description": "Data regarding the lower and upper limits of a user account.", + "allOf": [ + { + "$ref": "#/components/schemas/BaseAccountBalanceLimits" + }, + { + "type": "object", + "properties": { + "account": { + "$ref": "#/components/schemas/AccountWithCurrency" + }, + "user": { + "$ref": "#/components/schemas/User" + }, + "editable": { + "description": "Can the authenticated user manage the limits of this account?", + "type": "boolean" + }, + "defaultCreditLimit": { + "description": "The default credit limit from the user products.", + "type": "string", + "format": "number" + }, + "defaultUpperCreditLimit": { + "description": "The default upper credit limit from the user products.", + "type": "string", + "format": "number" + }, + "history": { + "description": "The history of balance limit changes.", + "type": "array", + "items": { + "$ref": "#/components/schemas/AccountBalanceLimitsLog" + } + }, + "confirmationPasswordInput": { + "description": "If a confirmation password is used, contains the definitions on how to request that password from the user. This confirmation password is required when performing sensible actions. Sometimes this is dynamic, for example, the confirmation might be configured to be used only once per session, or operations like payments may have a limit per day to be without confirmation (pinless).", + "allOf": [ + { + "$ref": "#/components/schemas/PasswordInput" + } + ] + } + } + } + ] + }, + "AccountBalanceLimitsLog": { + "description": "Log of a balance limits change", + "allOf": [ + { + "$ref": "#/components/schemas/BaseAccountBalanceLimits" + }, + { + "type": "object", + "properties": { + "by": { + "$ref": "#/components/schemas/User" + }, + "date": { + "description": "The date the limit change was performed", + "type": "string", + "format": "date-time" + }, + "comment": { + "description": "Comments supplied by the manager that performed the limit change.", + "type": "string" + } + } + } + ] + }, + "AccountBalanceLimitsQueryFilters": { + "description": "Parameters for searching account balance limits", + "allOf": [ + { + "$ref": "#/components/schemas/QueryFilters" + }, + { + "type": "object", + "properties": { + "currency": { + "description": "Either id or internal name of the currency", + "type": "string" + }, + "accountType": { + "description": "Either id or internal name of the account type", + "type": "string" + }, + "groups": { + "description": "Either the ids or internal names of user group", + "type": "array", + "items": { + "type": "string" + } + }, + "brokers": { + "description": "Either the ids or identification methods of users' broker", + "type": "array", + "items": { + "type": "string" + } + }, + "user": { + "description": "Either the id or identifier of the account owner", + "type": "string" + }, + "by": { + "description": "Either the id or identifier of the user that performed the change", + "type": "string" + }, + "customLimit": { + "description": "When set, returns only accounts that have a custom (if true) or have default (false) lower limit.", + "type": "boolean" + }, + "customLimitRange": { + "description": "The minimum / maximum customized limit. Is only used when `customLimit` is set to true. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "type": "array", + "items": { + "type": "string", + "format": "number" + } + }, + "customUpperLimit": { + "description": "When set, returns only accounts that have a custom (if true) or have default (false) upper limit.", + "type": "boolean" + }, + "customUpperLimitRange": { + "description": "The minimum / maximum customized upper limit. Is only used when `customUpperLimit` is set to true. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "type": "array", + "items": { + "type": "string", + "format": "number" + } + } + } + } + ] + }, + "AccountBalanceLimitsResult": { + "description": "Result for the list of user account balance limits", + "allOf": [ + { + "$ref": "#/components/schemas/BaseAccountBalanceLimits" + }, + { + "type": "object", + "properties": { + "account": { + "$ref": "#/components/schemas/AccountWithCurrency" + } + } + } + ] + }, + "AccountHistoryQueryFilters": { + "description": "Parameters for searching an account's history", + "allOf": [ + { + "$ref": "#/components/schemas/BaseTransferQueryFilters" + }, + { + "type": "object", + "properties": { + "direction": { + "$ref": "#/components/schemas/TransferDirectionEnum" + }, + "description": { + "description": "The description to search for.", + "type": "string" + } + } + } + ] + }, + "AccountHistoryResult": { + "description": "Represents a balance transfer between accounts, as viewed from the point-of-view account of a a specific account. This means that credits will have a positive amount, while debits will be negative.", + "allOf": [ + { + "$ref": "#/components/schemas/TransResult" + }, + { + "type": "object", + "properties": { + "relatedAccount": { + "description": "The account that either received / sent the balance", + "allOf": [ + { + "$ref": "#/components/schemas/AccountWithOwner" + } + ] + }, + "relatedName": { + "description": "Contains an optional custom from / to name, which can be set when the transaction is performed.", + "type": "string" + }, + "transaction": { + "description": "If this balance transfer was originated from a transaction (like a payment or scheduled payment), contains the a simple reference to this transaction.\nWARNING: The only fields that will be filled-in are `id`, `transactionNumber` and `kind`.", + "allOf": [ + { + "$ref": "#/components/schemas/Transaction" + } + ] + }, + "statuses": { + "description": "contains the current status internal name or id, keyed by the flow internal name or id", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + ] + }, + "AccountHistoryStatus": { + "description": "Contains instant status information, as inherited from `AccountStatus`, plus status that depend on an account history query parameters", + "allOf": [ + { + "$ref": "#/components/schemas/AccountStatus" + }, + { + "type": "object", + "properties": { + "beginDate": { + "description": "The reference begin date", + "type": "string", + "format": "date-time" + }, + "balanceAtBegin": { + "description": "The raw balance at the beginning of the informed period", + "type": "string", + "format": "number" + }, + "endDate": { + "description": "The reference end date", + "type": "string", + "format": "date-time" + }, + "balanceAtEnd": { + "description": "The raw balance at the end of the informed period", + "type": "string", + "format": "number" + }, + "incoming": { + "description": "The summary of incoming transfers", + "allOf": [ + { + "$ref": "#/components/schemas/AmountSummary" + } + ] + }, + "outgoing": { + "description": "The summary of outgoing transfers", + "allOf": [ + { + "$ref": "#/components/schemas/AmountSummary" + } + ] + }, + "netInflow": { + "description": "The raw difference between incoming and outgoing transfers in the informed period", + "type": "string", + "format": "number" + } + } + } + ] + }, + "AccountNotificationSettings": { + "description": "Settings regarding notifications for a given account", + "type": "object", + "properties": { + "paymentAmount": { + "description": "The minimum / maximum amount for payment notifications to be sent", + "allOf": [ + { + "$ref": "#/components/schemas/DecimalRange" + } + ] + } + } + }, + "AccountNotificationSettingsView": { + "description": "Settings regarding notifications for a given account", + "allOf": [ + { + "$ref": "#/components/schemas/AccountNotificationSettings" + }, + { + "type": "object", + "properties": { + "accountType": { + "$ref": "#/components/schemas/AccountType" + } + } + } + ] + }, + "AccountPaymentLimitsData": { + "description": "Data regarding the payment, daily, weekly, monthly and yearly amount limits of a user account.", + "allOf": [ + { + "$ref": "#/components/schemas/BaseAccountPaymentLimits" + }, + { + "type": "object", + "properties": { + "account": { + "$ref": "#/components/schemas/AccountWithCurrency" + }, + "user": { + "$ref": "#/components/schemas/User" + }, + "editable": { + "description": "Can the authenticated user manage the payment limits of this account?", + "type": "boolean" + }, + "productAmountLimit": { + "description": "The payment amount limit from the user products.", + "type": "string", + "format": "number" + }, + "productAmountPerDayLimit": { + "description": "The payment amount per day limit from the user products.", + "type": "string", + "format": "number" + }, + "productAmountPerWeekLimit": { + "description": "The payment amount per week limit from the user products.", + "type": "string", + "format": "number" + }, + "productAmountPerMonthLimit": { + "description": "The payment amount per month limit from the user products.", + "type": "string", + "format": "number" + }, + "productAmountPerYearLimit": { + "description": "The payment amount per year limit from the user products.", + "type": "string", + "format": "number" + }, + "history": { + "description": "The history of payment limits changes.", + "type": "array", + "items": { + "$ref": "#/components/schemas/AccountPaymentLimitsLog" + } + }, + "confirmationPasswordInput": { + "description": "If a confirmation password is used, contains the definitions on how to request that password from the user. This confirmation password is required when performing sensible actions. Sometimes this is dynamic, for example, the confirmation might be configured to be used only once per session, or operations like payments may have a limit per day to be without confirmation (pinless).", + "allOf": [ + { + "$ref": "#/components/schemas/PasswordInput" + } + ] + } + } + } + ] + }, + "AccountPaymentLimitsLog": { + "description": "Log of a payment limits change", + "allOf": [ + { + "$ref": "#/components/schemas/BaseAccountPaymentLimits" + }, + { + "type": "object", + "properties": { + "by": { + "$ref": "#/components/schemas/User" + }, + "date": { + "description": "The date the limit change was performed", + "type": "string", + "format": "date-time" + }, + "comment": { + "description": "Comments supplied by the manager that performed the limit change.", + "type": "string" + } + } + } + ] + }, + "AccountPaymentLimitsQueryFilters": { + "description": "Parameters for searching account payment limits", + "allOf": [ + { + "$ref": "#/components/schemas/QueryFilters" + }, + { + "type": "object", + "properties": { + "currency": { + "description": "Either id or internal name of the currency", + "type": "string" + }, + "accountType": { + "description": "Either id or internal name of the account type", + "type": "string" + }, + "groups": { + "description": "Either the ids or internal names of user group", + "type": "array", + "items": { + "type": "string" + } + }, + "brokers": { + "description": "Either the ids or identification methods of users' broker", + "type": "array", + "items": { + "type": "string" + } + }, + "user": { + "description": "Either the id or identifier of the account owner", + "type": "string" + }, + "by": { + "description": "Either the id or identifier of the user that performed the change", + "type": "string" + }, + "customAmountLimit": { + "description": "When set, returns only accounts that have a custom (if true) or have default (false) payment amount limit.", + "type": "boolean" + }, + "customAmountLimitRange": { + "description": "The minimum / maximum customized payment amount limit. Is only used when `customAmountLimit` is set to true. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "type": "array", + "items": { + "type": "string", + "format": "number" + } + }, + "customAmountPerDayLimit": { + "description": "When set, returns only accounts that have a custom (if true) or have default (false) payment amount per day limit.", + "type": "boolean" + }, + "customAmountPerDayLimitRange": { + "description": "The minimum / maximum customized payment amount per day limit. Is only used when `customAmountPerDayLimit` is set to true. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "type": "array", + "items": { + "type": "string", + "format": "number" + } + }, + "customAmountPerWeekLimit": { + "description": "When set, returns only accounts that have a custom (if true) or have default (false) payment amount per week limit.", + "type": "boolean" + }, + "customAmountPerWeekLimitRange": { + "description": "The minimum / maximum customized payment amount per week limit. Is only used when `customAmountPerWeekLimit` is set to true. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "type": "array", + "items": { + "type": "string", + "format": "number" + } + }, + "customAmountPerMonthLimit": { + "description": "When set, returns only accounts that have a custom (if true) or have default (false) payment amount per month limit.", + "type": "boolean" + }, + "customAmountPerMonthLimitRange": { + "description": "The minimum / maximum customized payment amount per month limit. Is only used when `customAmountPerMonthLimit` is set to true. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "type": "array", + "items": { + "type": "string", + "format": "number" + } + }, + "customAmountPerYearLimit": { + "description": "When set, returns only accounts that have a custom (if true) or have default (false) payment amount per year limit.", + "type": "boolean" + }, + "customAmountPerYearLimitRange": { + "description": "The minimum / maximum customized payment amount per year limit. Is only used when `customAmountPerYearLimit` is set to true. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "type": "array", + "items": { + "type": "string", + "format": "number" + } + } + } + } + ] + }, + "AccountPaymentLimitsResult": { + "description": "Result for the list of user account payment limits", + "allOf": [ + { + "$ref": "#/components/schemas/BaseAccountPaymentLimits" + }, + { + "type": "object", + "properties": { + "account": { + "$ref": "#/components/schemas/AccountWithCurrency" + } + } + } + ] + }, + "AccountPermissions": { + "description": "Permissions over an account", + "type": "object", + "properties": { + "account": { + "$ref": "#/components/schemas/AccountWithCurrency" + }, + "visible": { + "description": "Whether the account also is visible for the logged user or, if false means it is only accessible. A non visible account still is operative, i.e the user could make/receive payments from/to it (i.e is accessible) but can not make a transfers history search for it.", + "type": "boolean" + }, + "viewStatus": { + "description": "Indicates whether the logged user can see the account status for this account. Some restricted operators can view the account history, but not the account status (balance and so on).", + "type": "boolean" + }, + "systemPayments": { + "description": "Payment types allowed to be performed to system accounts.", + "type": "array", + "items": { + "$ref": "#/components/schemas/RelatedTransferType" + } + }, + "userPayments": { + "description": "Payment types allowed to be performed to other users", + "type": "array", + "items": { + "$ref": "#/components/schemas/RelatedTransferType" + } + }, + "selfPayments": { + "description": "Payment types allowed to be performed to other self accounts. Only returned for user accounts.", + "type": "array", + "items": { + "$ref": "#/components/schemas/RelatedTransferType" + } + }, + "posPayments": { + "description": "Payment types allowed to be used on POS (receive payments from other users). Only returned for user accounts.", + "type": "array", + "items": { + "$ref": "#/components/schemas/RelatedTransferType" + } + } + } + }, + "AccountStatus": { + "description": "Status information for an account", + "type": "object", + "properties": { + "balance": { + "description": "The raw account balance", + "type": "string", + "format": "number" + }, + "creditLimit": { + "description": "The maximum negative balance an account may get", + "type": "string", + "format": "number" + }, + "upperCreditLimit": { + "description": "The maximum positive balance an account may get", + "type": "string", + "format": "number" + }, + "reservedAmount": { + "description": "The reserved amount is part of the raw balance, but cannot be used for payments because of some other events, like payments pending authorization, confirmed webshop orders, scheduled payments (when configured to reserve the total amount) and so on.", + "type": "string", + "format": "number" + }, + "availableBalance": { + "description": "The available balance to be used, taking into account the raw balance, credit limit and reserved amount", + "type": "string", + "format": "number" + }, + "negativeSince": { + "description": "If the account is negative, contains the date since it became so", + "type": "string", + "format": "date-time" + }, + "aRate": { + "description": "The balance aging counter", + "type": "string", + "format": "number" + }, + "dRate": { + "description": "The balance maturity", + "type": "string", + "format": "number" + }, + "rateBalanceCorrection": { + "type": "string", + "format": "number" + }, + "virtualRatedBalance": { + "type": "string", + "format": "number" + } + } + }, + "AccountType": { + "description": "A reference for the account type, together with its currency", + "allOf": [ + { + "$ref": "#/components/schemas/InternalNamedEntity" + }, + { + "type": "object", + "properties": { + "currency": { + "$ref": "#/components/schemas/Currency" + } + } + } + ] + }, + "AccountTypeWithDefaultMediumBalanceRange": { + "description": "A reference for the account type, together with its currency and its default medium balance range", + "allOf": [ + { + "$ref": "#/components/schemas/AccountType" + }, + { + "type": "object", + "properties": { + "defaultMediumBalanceRange": { + "description": "The minimum and maximum default medium balance range specified in the account type. If it is present, both values are not null.", + "allOf": [ + { + "$ref": "#/components/schemas/IntegerRange" + } + ] + } + } + } + ] + }, + "AccountWithCurrency": { + "description": "Contains account data, plus currency reference", + "allOf": [ + { + "$ref": "#/components/schemas/Account" + }, + { + "type": "object", + "properties": { + "currency": { + "$ref": "#/components/schemas/Currency" + } + } + } + ] + }, + "AccountWithHistoryStatus": { + "description": "Account data plus account history status information", + "allOf": [ + { + "$ref": "#/components/schemas/AccountWithOwnerAndCurrency" + }, + { + "type": "object", + "properties": { + "status": { + "$ref": "#/components/schemas/AccountHistoryStatus" + } + } + } + ] + }, + "AccountWithOwner": { + "description": "Contains account data, plus account owner reference", + "allOf": [ + { + "$ref": "#/components/schemas/Account" + }, + { + "type": "object", + "properties": { + "user": { + "description": "Only returned if `kind` is `user`. Is a reference to the owner user.", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "kind": { + "$ref": "#/components/schemas/AccountKind" + } + } + } + ] + }, + "AccountWithOwnerAndCurrency": { + "description": "Contains account data, plus owner and currency reference", + "allOf": [ + { + "$ref": "#/components/schemas/AccountWithOwner" + }, + { + "type": "object", + "properties": { + "currency": { + "$ref": "#/components/schemas/Currency" + } + } + } + ] + }, + "AccountWithStatus": { + "description": "Account data plus status information", + "allOf": [ + { + "$ref": "#/components/schemas/AccountWithCurrency" + }, + { + "type": "object", + "properties": { + "status": { + "$ref": "#/components/schemas/AccountActivityStatus" + } + } + } + ] + }, + "ActivateClientResult": { + "description": "Data about an access client activation", + "type": "object", + "properties": { + "token": { + "description": "The generated access client token. It should be passed using the `Access-Client-Token` header. If a prefix was informed on activation, it will not be returned, here, but should be sent prepending the returned token", + "type": "string" + }, + "accessClient": { + "description": "A reference to the activated access client", + "allOf": [ + { + "$ref": "#/components/schemas/EntityReference" + } + ] + }, + "accessClientType": { + "description": "A reference to the access client type", + "allOf": [ + { + "$ref": "#/components/schemas/EntityReference" + } + ] + } + } + }, + "ActivateGiftVoucher": { + "description": "Parameters for activating a gift voucher with PIN", + "type": "object", + "properties": { + "pin": { + "$ref": "#/components/schemas/SimpleChangeVoucherPin" + }, + "notification": { + "$ref": "#/components/schemas/ChangeVoucherNotificationSettings" + } + } + }, + "ActivationRequest": { + "description": "Parameters for requesting a device activation without using a code.", + "type": "object", + "properties": { + "userAgentId": { + "description": "A stable client-side generated id, which will be used to identify the device that is being activated. It will be used to verify if the user has been registered from this device.", + "type": "string" + }, + "name": { + "type": "string", + "description": "The device name. This name must be unique per user, in case it already exist then a suffix will be added in the form `_i` with `i`\n being a number. E.g if a device with name 'my_device' already exist\n then the final name will be 'my_device_1'.\n It's ignored if authenticated with a PIN or if a valid `pinId` was given." + }, + "pinId": { + "type": "string", + "description": "Only if the device for which the activation is requested for already has a defined pin, then it must be specified here. This is necessary to get in sync when a device is activated after a pin was already defined." + } + } + }, + "Ad": { + "description": "Basic information common for advertisements and webshops", + "allOf": [ + { + "$ref": "#/components/schemas/NamedEntity" + }, + { + "type": "object", + "properties": { + "image": { + "description": "The primary advertisement image", + "allOf": [ + { + "$ref": "#/components/schemas/Image" + } + ] + }, + "kind": { + "$ref": "#/components/schemas/AdKind" + } + } + } + ] + }, + "AdBasicData": { + "description": "Contains data shared by both AdDataForNew and AdDataForEdit", + "type": "object", + "properties": { + "customFields": { + "description": "The possible editable advertisement custom fields", + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldDetailed" + } + }, + "requiresAuthorization": { + "description": "Indicates whether advertisements require an authorization from the administration in order to be published for other users to see", + "type": "boolean" + }, + "canCreateNew": { + "description": "Indicates whether the user can create a new advertisement (if not reached max setting)", + "type": "boolean" + }, + "maxCategoriesPerAd": { + "description": "Indicates if user can select single or multiples categories per advertisement", + "type": "integer" + }, + "maxImages": { + "description": "Indicates the maximum amount of images the user can upload for an advertisement", + "type": "integer" + }, + "categories": { + "description": "The advertisement categories each with its children, forming a tree", + "type": "array", + "items": { + "$ref": "#/components/schemas/AdCategoryWithChildren" + } + }, + "addresses": { + "description": "The public addresses of the advertisement owner, so specific ones can be linked to the advertisement.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Address" + } + }, + "currencies": { + "description": "The currencies the authenticated user may use to specify the advertisement price", + "type": "array", + "items": { + "$ref": "#/components/schemas/Currency" + } + }, + "kind": { + "description": "The advertisement kind this data is related to.", + "allOf": [ + { + "$ref": "#/components/schemas/AdKind" + } + ] + }, + "user": { + "description": "The user which owns the advertisement", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "webshopSettings": { + "$ref": "#/components/schemas/WebshopSettings" + }, + "deliveryMethods": { + "description": "The available delivery methods. Only for webshops.", + "type": "array", + "items": { + "$ref": "#/components/schemas/DeliveryMethod" + } + } + } + }, + "AdCategoryWithChildren": { + "description": "An advertisement category, together with its children", + "allOf": [ + { + "$ref": "#/components/schemas/InternalNamedEntity" + }, + { + "type": "object", + "properties": { + "image": { + "$ref": "#/components/schemas/Image" + }, + "svgIcon": { + "description": "The name of the SVG icon. The content of the icon can be obtained with `GET /images/svg-icons/{name}.svg`", + "type": "string" + }, + "svgIconColor": { + "description": "The color to display the icon", + "type": "string" + }, + "children": { + "description": "The child categories", + "type": "array", + "items": { + "$ref": "#/components/schemas/AdCategoryWithChildren" + } + } + } + } + ] + }, + "AdCategoryWithParent": { + "description": "An advertisement category, together with its parent", + "allOf": [ + { + "$ref": "#/components/schemas/InternalNamedEntity" + }, + { + "type": "object", + "properties": { + "parent": { + "$ref": "#/components/schemas/AdCategoryWithParent" + } + } + } + ] + }, + "AdDataForEdit": { + "description": "Contains data for editing a new advertisement", + "allOf": [ + { + "$ref": "#/components/schemas/AdBasicData" + }, + { + "type": "object", + "properties": { + "status": { + "$ref": "#/components/schemas/AdStatusEnum" + }, + "canEdit": { + "type": "boolean", + "description": "Indicates whether the current ad can be edited by the currently authenticated used." + }, + "canRemove": { + "type": "boolean", + "description": "Indicates whether the current ad can be removed by the currently authenticated used." + }, + "creationDate": { + "description": "The creation date the advertisement was created", + "type": "string", + "format": "date-time" + }, + "advertisement": { + "description": "The advertisement that is being edited", + "allOf": [ + { + "$ref": "#/components/schemas/AdEdit" + } + ] + }, + "binaryValues": { + "description": "Holds the current values for file / image custom fields as lists of `StoredFile`s / `Image`s.", + "allOf": [ + { + "$ref": "#/components/schemas/CustomFieldBinaryValues" + } + ] + } + } + } + ] + }, + "AdDataForNew": { + "description": "Contains data for creating a new advertisement", + "allOf": [ + { + "$ref": "#/components/schemas/AdBasicData" + }, + { + "type": "object", + "properties": { + "advertisement": { + "description": "The advertisement that is being created", + "allOf": [ + { + "$ref": "#/components/schemas/AdNew" + } + ] + } + } + } + ] + }, + "AdDataForSearch": { + "description": "Data for a general search of advertisements", + "allOf": [ + { + "$ref": "#/components/schemas/BaseAdDataForSearch" + }, + { + "type": "object", + "properties": { + "groups": { + "description": "The groups the authenticated user can use to filter users. Admins can always filter by groups, while users depend on a permission, which can be to only view group sets, only groups or none.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Group" + } + }, + "hidePrice": { + "description": "Indicates whether show or not the advertisements price to guests", + "type": "boolean" + }, + "hideOwner": { + "description": "Indicates whether show or not the advertisements owner to guests", + "type": "boolean" + }, + "query": { + "description": "Default query filters to search advertisements", + "allOf": [ + { + "$ref": "#/components/schemas/AdQueryFilters" + } + ] + }, + "resultType": { + "description": "Indicates the type for customizable results like tiles, list, etc", + "allOf": [ + { + "$ref": "#/components/schemas/ResultTypeEnum" + } + ] + }, + "adInitialSearchType": { + "description": "Indicates which initial search is performed, either by displaying ads or displaying categories", + "allOf": [ + { + "$ref": "#/components/schemas/AdInitialSearchTypeEnum" + } + ] + } + } + } + ] + }, + "AdDetailed": { + "x-abstract": true, + "description": "Contains data which is common for `AdResult` and `AdView`", + "allOf": [ + { + "$ref": "#/components/schemas/BaseAdDetailed" + }, + { + "type": "object", + "properties": { + "description": { + "description": "The advertisement description content, formatted as HTML", + "type": "string" + }, + "user": { + "description": "The user which owns this ad", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "publicationPeriod": { + "$ref": "#/components/schemas/DatePeriod" + }, + "stockQuantity": { + "description": "The stock disponibility. Only if `unlimitedStock` is false and the 'Stock type' was not marked as 'Not available' (through the web interface).", + "type": "string", + "format": "number" + }, + "unlimitedStock": { + "description": "If true then it means there is always disponibility of the webshop ad.", + "type": "boolean" + }, + "maxAllowedInCart": { + "description": "The maximum quantity that can be specified in the shopping cart.", + "type": "string", + "format": "number" + }, + "minAllowedInCart": { + "description": "The minimum quantity that can be specified in the shopping cart.", + "type": "string", + "format": "number" + }, + "promotionalPrice": { + "description": "The promotional price, to be applied on the promotional period is active", + "type": "string", + "format": "number" + } + } + } + ] + }, + "AdEdit": { + "description": "Parameters for editing an existing advertisement", + "allOf": [ + { + "$ref": "#/components/schemas/AdManage" + }, + { + "type": "object", + "properties": { + "version": { + "type": "integer", + "description": "The version stamp for the current object, used for optimistic locking. When saving, the same version as previously received needs to be passed back. If no one else has saved the object, the version will match and the object will be updated. However, if someone other has saved the object, the version will no longer match, and an error will be raised. This is used to prevent multiple users (or processes) from updating the same object and unwilingly overridding the property values, leading to data loss." + } + } + } + ] + }, + "AdInterest": { + "description": "Reference to an advertisement interest", + "allOf": [ + { + "$ref": "#/components/schemas/NamedEntity" + }, + { + "type": "object", + "properties": { + "adUser": { + "description": "Owner of advertisements", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "category": { + "description": "The advertisements category.", + "allOf": [ + { + "$ref": "#/components/schemas/AdCategoryWithParent" + } + ] + }, + "keywords": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Set of keywords to match advertisements." + } + } + } + ] + }, + "AdInterestBasicData": { + "description": "Contains data shared by both AdInterestDataForNew and AdInterestDataForEdit", + "type": "object", + "properties": { + "user": { + "description": "Reference to the owner of the advertisement interest", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "categories": { + "description": "Contains the list of possible categories for the advertisement interest", + "type": "array", + "items": { + "$ref": "#/components/schemas/AdCategoryWithChildren" + } + }, + "currencies": { + "description": "Contains the list of possible currencies for the advertisement interest", + "type": "array", + "items": { + "$ref": "#/components/schemas/Currency" + } + } + } + }, + "AdInterestDataForEdit": { + "description": "Contains data for editing an exinsting advertisement interest", + "allOf": [ + { + "$ref": "#/components/schemas/AdInterestBasicData" + }, + { + "type": "object", + "properties": { + "canEdit": { + "description": "Can the authenticated user edit this advertisement interest?", + "type": "boolean" + }, + "canRemove": { + "description": "Can the authenticated user remove this advertisement interest?", + "type": "boolean" + }, + "adInterest": { + "description": "The advertisement interest populated with the current fields. This value can be modified and sent back on `PUT /marketplace-interest/{id}`.", + "allOf": [ + { + "$ref": "#/components/schemas/AdInterestEdit" + } + ] + } + } + } + ] + }, + "AdInterestDataForNew": { + "description": "Contains data for creating a new advertisement interest", + "allOf": [ + { + "$ref": "#/components/schemas/AdInterestBasicData" + }, + { + "type": "object", + "properties": { + "adInterest": { + "description": "The advertisement interest populated with the default fields. This value can be modified and sent back on `POST /{user}/marketplace-interest`.", + "allOf": [ + { + "$ref": "#/components/schemas/AdInterestNew" + } + ] + } + } + } + ] + }, + "AdInterestEdit": { + "description": "Fields for modifying an advertisement interest.", + "allOf": [ + { + "$ref": "#/components/schemas/AdInterestManage" + }, + { + "type": "object", + "properties": { + "version": { + "type": "integer", + "description": "The version stamp for the current object, used for optimistic locking. When saving, the same version as previously received needs to be passed back. If no one else has saved the object, the version will match and the object will be updated. However, if someone other has saved the object, the version will no longer match, and an error will be raised. This is used to prevent multiple users (or processes) from updating the same object and unwilingly overridding the property values, leading to data loss." + } + } + } + ] + }, + "AdInterestManage": { + "description": "Common fields for either creating or editing an advertisement interest", + "type": "object", + "x-abstract": true, + "properties": { + "name": { + "description": "The name identifying this advertisement interest.", + "type": "string" + }, + "kind": { + "description": "The kind of advertisements.", + "allOf": [ + { + "$ref": "#/components/schemas/AdKind" + } + ] + }, + "category": { + "description": "Either internal name or id of the advertisements category.", + "type": "string" + }, + "keywords": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A set of keywords to match advertisements." + }, + "currency": { + "description": "Either internal name or id of the currency for price range.", + "type": "string" + }, + "minPrice": { + "description": "Minimum price for advertisements.", + "type": "string", + "format": "number" + }, + "maxPrice": { + "description": "Maximum price for advertisements.", + "type": "string", + "format": "number" + }, + "user": { + "description": "Either internal id or other accepted identification (username, e-mail, etc) for the user to watch advertisements", + "type": "string" + } + } + }, + "AdInterestNew": { + "description": "Fields for a new advertisement interest.", + "allOf": [ + { + "$ref": "#/components/schemas/AdInterestManage" + } + ] + }, + "AdInterestView": { + "description": "Details of an advertisement interest", + "allOf": [ + { + "$ref": "#/components/schemas/AdInterest" + }, + { + "type": "object", + "properties": { + "kind": { + "description": "The kind of advertisements.", + "allOf": [ + { + "$ref": "#/components/schemas/AdKind" + } + ] + }, + "currency": { + "description": "Currency for the price range.", + "allOf": [ + { + "$ref": "#/components/schemas/Currency" + } + ] + }, + "minPrice": { + "description": "Minimum price for advertisements.", + "type": "string", + "format": "number" + }, + "maxPrice": { + "description": "Maximum price for advertisements.", + "type": "string", + "format": "number" + }, + "user": { + "description": "Owner of this advertisement interest", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "canEdit": { + "description": "Can the authenticated user edit this advertisement interest?", + "type": "boolean" + }, + "canRemove": { + "description": "Can the authenticated user remove this advertisement interest?", + "type": "boolean" + } + } + } + ] + }, + "AdManage": { + "description": "Common fields for either creating or editing a simple or webshop advertisement", + "type": "object", + "x-abstract": true, + "properties": { + "name": { + "description": "The advertisement title", + "type": "string" + }, + "description": { + "description": "The advertisement description content, formatted as HTML", + "type": "string" + }, + "publicationPeriod": { + "$ref": "#/components/schemas/DatePeriod" + }, + "categories": { + "description": "Either internal name or id of categories this advertisement belongs to. In most cases an advertisement will have a single category, but this depends on the Cyclos configuration.", + "type": "array", + "items": { + "type": "string" + } + }, + "currency": { + "description": "Either internal name or id of the advertisement's price currency", + "type": "string" + }, + "price": { + "description": "The regular price", + "type": "string", + "format": "number" + }, + "promotionalPrice": { + "description": "The promotional price, if any", + "type": "string", + "format": "number" + }, + "promotionalPeriod": { + "description": "The promotional period, the one when `promotionalPrice` is valid", + "allOf": [ + { + "$ref": "#/components/schemas/DatePeriod" + } + ] + }, + "customValues": { + "type": "object", + "description": "Holds the custom field values, keyed by field internal name or id. The format of the value depends on the custom field type. Example: `{..., \"customValues\": {\"gender\": \"male\", \"birthDate\": \"1980-10-27\"}}`", + "additionalProperties": { + "type": "string" + } + }, + "addresses": { + "description": "Ids of the public addresses (belonging to the advertisement owner) this advertisement is available at.", + "type": "array", + "items": { + "type": "string" + } + }, + "unlimitedStock": { + "description": "Whether the stock is unlimited or not. If true then it means there is always disponibility of the webshop and the `stockQuantity` and `minStockQuantityToNotify` are meaningless.", + "type": "boolean" + }, + "stockQuantity": { + "description": "The quantity in stock (if `unlimitedStock` is false). Only for webshop.", + "type": "string", + "format": "number" + }, + "minStockQuantityToNotify": { + "description": "Reached this minimum limit a notification will be sent to the user indicating there is low stock for this webshop. Only for webshop.", + "type": "string", + "format": "number" + }, + "minAllowedInCart": { + "description": "Minimum quantity allowed in a shopping cart. Only for webshop.", + "type": "string", + "format": "number" + }, + "maxAllowedInCart": { + "description": "Maximum quantity allowed in a shopping cart. Only for webshop.", + "type": "string", + "format": "number" + }, + "allowDecimalQuantity": { + "description": "Whether a decimal quantity of this webshop can be added to the shopping cart or not.", + "type": "boolean" + }, + "productNumber": { + "description": "The unique number assigned to this webshop. Required if it's not marked as generated in the user webshop settings. Only for webshop.", + "type": "string" + }, + "deliveryMethods": { + "description": "Ids of delivery method (belonging to the advertisement owner) this advertisement has allowed.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "AdNew": { + "description": "Parameters for creating a new advertisement", + "allOf": [ + { + "$ref": "#/components/schemas/AdManage" + }, + { + "type": "object", + "properties": { + "submitForAuthorization": { + "description": "Only useful when authorization is required (`AdDataForNew`/`AdDataForEdit`.`requiresAuthorization` flag is `true`). Indicates whether the advertisement will be initially submitted for authorization (status = `pending`) or kept in the `draft` status.", + "type": "boolean" + }, + "hidden": { + "description": "Only useful when authorization is not required (`AdDataForNew`/`AdDataForEdit`.`requiresAuthorization` flag is `false`). Indicates whether the initial status for the advertisement should be `hidden` (when `true`) or `active` (when `false`).", + "type": "boolean" + }, + "images": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The ids of previously uploaded user temporary images to be initially used as advertisement images" + }, + "kind": { + "description": "The advertisement kind to be created. Currently only `simple` advertisements can be managed through this API. The default is `simple`.", + "allOf": [ + { + "$ref": "#/components/schemas/AdKind" + } + ] + } + } + } + ] + }, + "AdQueryFilters": { + "description": "Definitions for a general advertisements search", + "allOf": [ + { + "$ref": "#/components/schemas/BasicAdQueryFilters" + }, + { + "type": "object", + "properties": { + "user": { + "type": "string", + "description": "Either id or an identification, such as login name, e-mail, etc, for the advertisement owner. The allowed identification methods are those the authenticated user can use on keywords search." + }, + "brokers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Either ids or an identifications, such as login name, e-mail, etc, for the brokers of the advertisement owner. Can only be used when searching with a broker himself or admin." + }, + "groups": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Array of either id or internal names of user groups the advertisement owner must belong to" + }, + "returnEditable": { + "type": "boolean", + "description": "Whether to return the editable property. Passing `true` will impact the performance a bit, as for each returned advertisement some statuses and permissions need to be checked." + } + } + } + ] + }, + "AdQuestion": { + "description": "A question asked for an advertisement.", + "allOf": [ + { + "$ref": "#/components/schemas/Entity" + }, + { + "type": "object", + "properties": { + "question": { + "description": "The question text.", + "type": "string" + }, + "questionDate": { + "description": "The question date and time.", + "type": "string", + "format": "date-time" + }, + "answer": { + "description": "The answer for the question (if any).", + "type": "string" + }, + "answerDate": { + "description": "The answer date and time (if any).", + "type": "string", + "format": "date-time" + }, + "user": { + "description": "The user which asked the question", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + } + } + } + ] + }, + "AdQuestionQueryFilters": { + "description": "Definitions for unanswered questions search", + "allOf": [ + { + "$ref": "#/components/schemas/QueryFilters" + }, + { + "type": "object", + "properties": { + "kind": { + "description": "When kind is not specified it will assume simple or webshop based on user permissions", + "allOf": [ + { + "$ref": "#/components/schemas/AdKind" + } + ] + } + } + } + ] + }, + "AdQuestionResult": { + "description": "Data returned from question search", + "allOf": [ + { + "$ref": "#/components/schemas/AdQuestion" + }, + { + "type": "object", + "properties": { + "advertisement": { + "description": "The advertisement of the question.", + "allOf": [ + { + "$ref": "#/components/schemas/AdWithUser" + } + ] + } + } + } + ] + }, + "AdQuestionView": { + "description": "A question asked for an advertisement.", + "allOf": [ + { + "$ref": "#/components/schemas/AdQuestionResult" + }, + { + "type": "object" + } + ] + }, + "AdResult": { + "description": "Contains data returned when searching for advertisements", + "allOf": [ + { + "$ref": "#/components/schemas/AdDetailed" + }, + { + "type": "object", + "properties": { + "address": { + "description": "Address to be placed on map. Is only returned when the search result type is `map`.", + "allOf": [ + { + "$ref": "#/components/schemas/Address" + } + ] + }, + "distance": { + "description": "Only returned when there is a base location to calculate the distance from. The unit (kilometers or miles) depends on configuration.", + "type": "number", + "format": "double" + }, + "categories": { + "description": "Either internal name or id of categories this advertisement belongs to. In most cases an advertisement will have a single category, but this depends on the Cyclos configuration.", + "type": "array", + "items": { + "type": "string" + } + }, + "currency": { + "description": "Either internal name or id of the advertisement's price currency", + "type": "string" + }, + "editable": { + "description": "Indicates if the advertisement can be edited according to the logged user's permissions and advertisement status.", + "type": "boolean" + }, + "canAddToCart": { + "description": "Indicates if the advertisement can be added to the cart.", + "type": "boolean" + }, + "favoriteForViewer": { + "description": "Indicates if the advertisement was already marked as favorite for the user viewing it. For administrators and guest this flag is always false.", + "type": "boolean" + } + } + } + ] + }, + "AdView": { + "description": "Detailed information when viewing an advertisement", + "allOf": [ + { + "$ref": "#/components/schemas/AdDetailed" + }, + { + "type": "object", + "properties": { + "categories": { + "description": "Either internal name or id of categories this advertisement belongs to. In most cases an advertisement will have a single category, but this depends on the Cyclos configuration.", + "type": "array", + "items": { + "$ref": "#/components/schemas/AdCategoryWithParent" + } + }, + "customValues": { + "description": "The list of custom field values this advertisement has", + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldValue" + } + }, + "currency": { + "$ref": "#/components/schemas/Currency" + }, + "promotionalPeriod": { + "description": "The promotional period, the one when `promotionalPrice` is valid", + "allOf": [ + { + "$ref": "#/components/schemas/DatePeriod" + } + ] + }, + "promotionalPeriodActive": { + "description": "Indicates whether the promotional period is active at the moment this data is returned", + "type": "boolean" + }, + "canEdit": { + "description": "Indicates if the authenticated user can edit this advertisement", + "type": "boolean" + }, + "canRemove": { + "description": "Indicates if the authenticated user can remove this advertisement. The owner of the ad with manage permissions can remove the advertisement regardless the ad status.", + "type": "boolean" + }, + "canBuy": { + "description": "Indicates if the authenticated user can buy this webshop ad.", + "type": "boolean" + }, + "canAsk": { + "description": "Indicates if the authenticated user can ask questions about this advertisement.", + "type": "boolean" + }, + "canHide": { + "description": "Indicates if the authenticated user can hide this advertisement.", + "type": "boolean" + }, + "canUnhide": { + "description": "Indicates if the authenticated user can unhide this advertisement.", + "type": "boolean" + }, + "canSetAsDraft": { + "description": "Indicates if the authenticated user can set as draft an already authorized (published) advertisement.", + "type": "boolean" + }, + "canRequestAuthorization": { + "description": "Indicates if the authenticated user can request for authorization for this advertisement.", + "type": "boolean" + }, + "canApprove": { + "description": "Indicates if the authenticated user can authorize this advertisement (user managers only).", + "type": "boolean" + }, + "canReject": { + "description": "Indicates if the authenticated user can reject this advertisement (user managers only).", + "type": "boolean" + }, + "canSetAsFavorite": { + "description": "Indicates if the authenticated user can set this ad as favorite", + "type": "boolean" + }, + "favorite": { + "description": "Indicates if the authenticated user set this ad as favorite", + "type": "boolean" + }, + "questionsEnabled": { + "description": "Indicates if this ad is in favorites for the current user", + "type": "boolean" + }, + "lastAuthorizationComments": { + "description": "The last comments set by a manager when rejecting or set as draft this advertisement. Only send if the advertisement requires authorization and the authenticated user can view the comments.", + "type": "string" + }, + "additionalImages": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Image" + }, + "description": "Holds the images other than the primary image, which is returned in the `image` field" + }, + "userAddresses": { + "description": "The addresses (belonging to the advertisement's owner) where this advertisement is available.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Address" + } + }, + "adAddresses": { + "description": "The custom addresses where this advertisement is available.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Address" + } + }, + "questions": { + "description": "The list of questions this advertisement has.", + "type": "array", + "items": { + "$ref": "#/components/schemas/AdQuestion" + } + }, + "allowDecimal": { + "description": "if true then this webshop ad can be ordered specifying the quantity as a decimal number.", + "type": "boolean" + }, + "deliveryMethods": { + "description": "The available delivery methods for this webshop ad.", + "type": "array", + "items": { + "$ref": "#/components/schemas/DeliveryMethod" + } + }, + "operations": { + "description": "List of runnable custom operations.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Operation" + } + }, + "hidePrice": { + "description": "Indicates whether show or not this advertisement price to guests", + "type": "boolean" + }, + "hideOwner": { + "description": "Indicates whether show or not this advertisement owner to guests", + "type": "boolean" + }, + "exportFormats": { + "description": "The formats which the advertisement can be exported", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExportFormat" + } + } + } + } + ] + }, + "AdWithUser": { + "description": "An advertisement with information about its owner", + "allOf": [ + { + "$ref": "#/components/schemas/Ad" + }, + { + "type": "object", + "properties": { + "user": { + "description": "The user who owns this advertisement", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + } + } + } + ] + }, + "Address": { + "description": "An address reference. The actually used fields depend on the user configuration", + "x-implements": "IAddress", + "allOf": [ + { + "$ref": "#/components/schemas/NamedEntity" + }, + { + "type": "object", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the descriptive address" + }, + "addressLine2": { + "type": "string", + "description": "The second line of the descriptive address" + }, + "street": { + "type": "string", + "description": "The street name" + }, + "buildingNumber": { + "type": "string", + "description": "The numeric identifier for a land parcel, house, building or other" + }, + "complement": { + "type": "string", + "description": "The complement (like apartment number)" + }, + "zip": { + "type": "string", + "description": "A zip code that identifies a specific geographic (postal) delivery area" + }, + "poBox": { + "type": "string", + "description": "The post-office box, is an uniquely addressable box" + }, + "neighborhood": { + "type": "string", + "description": "The neighborhood name" + }, + "city": { + "type": "string", + "description": "The city name" + }, + "region": { + "type": "string", + "description": "The region or state" + }, + "country": { + "type": "string", + "description": "The country, represented as 2-letter, uppercase, ISO 3166-1 code" + }, + "location": { + "description": "The geolocation of the current address", + "allOf": [ + { + "$ref": "#/components/schemas/GeographicalCoordinate" + } + ] + }, + "contactInfo": { + "$ref": "#/components/schemas/AddressContactInfo" + } + } + } + ] + }, + "AddressBasicData": { + "description": "Contains data shared by both AddressDataForNew and AddressDataForEdit", + "allOf": [ + { + "$ref": "#/components/schemas/AddressConfiguration" + }, + { + "type": "object", + "properties": { + "enablePrivacy": { + "description": "Indicates whether privacy can be used for this address", + "type": "boolean" + }, + "managePrivacy": { + "type": "boolean", + "description": "Can the authenticated user manage the privacy of this address?" + }, + "contactInfoEnabled": { + "type": "boolean", + "description": "Can the address have additional contact information fields?" + }, + "contactInfoFields": { + "description": "The additional contact information custom fields. Only returned if `contactInfoEnabled` is true.", + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldDetailed" + } + }, + "phoneConfiguration": { + "description": "Configuration for settings contact phone numbers. Only returned if `contactInfoEnabled` is true.", + "allOf": [ + { + "$ref": "#/components/schemas/PhoneConfiguration" + } + ] + }, + "user": { + "description": "The user which owns the address.", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "confirmationPasswordInput": { + "description": "If a confirmation password is used, contains the definitions on how to request that password from the user. This confirmation password is required when performing sensible actions. Sometimes this is dynamic, for example, the confirmation might be configured to be used only once per session, or operations like payments may have a limit per day to be without confirmation (pinless).", + "allOf": [ + { + "$ref": "#/components/schemas/PasswordInput" + } + ] + } + } + } + ] + }, + "AddressConfiguration": { + "description": "Contains configuration information related to addresses", + "type": "object", + "properties": { + "useMap": { + "description": "Indicates whether maps are enabled in Cyclos", + "type": "boolean" + }, + "enabledFields": { + "description": "Contains the address fields that are enabled in Cyclos", + "type": "array", + "items": { + "$ref": "#/components/schemas/AddressFieldEnum" + } + }, + "requiredFields": { + "description": "Contains the address fields that are required in Cyclos", + "type": "array", + "items": { + "$ref": "#/components/schemas/AddressFieldEnum" + } + } + } + }, + "AddressConfigurationForUserProfile": { + "description": "Contains extended address configuration used on user registration", + "allOf": [ + { + "$ref": "#/components/schemas/AddressConfiguration" + }, + { + "type": "object", + "properties": { + "address": { + "description": "Contains the default values for a new address", + "allOf": [ + { + "$ref": "#/components/schemas/AddressNew" + } + ] + }, + "edit": { + "type": "boolean", + "description": "Can edit addresses?" + }, + "managePrivacy": { + "type": "boolean", + "description": "Can manage the privacy of addresses?" + }, + "maxAddresses": { + "type": "integer", + "description": "The maximum number of addresses the user can own" + }, + "availability": { + "$ref": "#/components/schemas/AvailabilityEnum" + }, + "contactInfoEnabled": { + "type": "boolean", + "description": "Is contact information, such as email, phones and custom values, enabled for addresses of this user?" + }, + "contactInfoFields": { + "description": "The contact information custom fields for the address. Only sent if `contactInfoEnabled` is true and there are available custom fields.", + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldDetailed" + } + }, + "phoneConfiguration": { + "description": "The phone configuration to set contact phones for the address. Only sent if `contactInfoEnabled` is true.", + "allOf": [ + { + "$ref": "#/components/schemas/PhoneConfiguration" + } + ] + } + } + } + ] + }, + "AddressContactInfo": { + "description": "Contact information for an address", + "x-implements": "IContactInfo, INormalizedPhones", + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "The e-mail for this additional contact information" + }, + "mobilePhone": { + "type": "string", + "description": "The formatted mobile phone for this additional contact information" + }, + "landLinePhone": { + "type": "string", + "description": "The formatted landline phone for this additional contact information" + }, + "landLineExtension": { + "type": "string", + "description": "The landline phone extension for this additional contact information" + }, + "normalizedMobilePhone": { + "type": "string", + "description": "The mobile phone, normalized to the E.164 format" + }, + "normalizedLandLinePhone": { + "type": "string", + "description": "The land-line phone, normalized to the E.164 format" + }, + "customValues": { + "description": "The list of custom field values on this additional contact information", + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldValue" + } + } + } + }, + "AddressContactInfoManage": { + "description": "Common fields for either creating or editing an additional contact information", + "type": "object", + "x-implements": "IContactInfo", + "properties": { + "email": { + "type": "string", + "description": "The e-mail for this additional contact information" + }, + "mobilePhone": { + "type": "string", + "description": "The formatted mobile phone for this additional contact information" + }, + "landLinePhone": { + "type": "string", + "description": "The formatted landline phone for this additional contact information" + }, + "landLineExtension": { + "type": "string", + "description": "The landline phone extension for this additional contact information" + }, + "customValues": { + "type": "object", + "description": "Holds the custom field values, keyed by field internal name or id. The format of the value depends on the custom field type. Example: `{..., \"customValues\": {\"gender\": \"male\", \"birthDate\": \"1980-10-27\"}}`", + "additionalProperties": { + "type": "string" + } + } + } + }, + "AddressDataForEdit": { + "description": "Contains data for editing an existing address", + "allOf": [ + { + "$ref": "#/components/schemas/AddressBasicData" + }, + { + "type": "object", + "properties": { + "address": { + "description": "The address that is being edited. This value can be modified and sent back on `PUT /addresses/{id}`.", + "allOf": [ + { + "$ref": "#/components/schemas/AddressEdit" + } + ] + }, + "canEdit": { + "type": "boolean", + "description": "Can the authenticated user edit this address?" + }, + "canRemove": { + "type": "boolean", + "description": "Can the authenticated user remove this address?" + } + } + } + ] + }, + "AddressDataForNew": { + "description": "Contains data for creating a new address", + "allOf": [ + { + "$ref": "#/components/schemas/AddressBasicData" + }, + { + "type": "object", + "properties": { + "address": { + "description": "The address populated with the default fields. This value can be modified and sent back on `POST /{user}/addresses`.", + "allOf": [ + { + "$ref": "#/components/schemas/AddressNew" + } + ] + } + } + } + ] + }, + "AddressEdit": { + "description": "Fields for editing an address. The actually used and required fields depend on the user configuration.", + "allOf": [ + { + "$ref": "#/components/schemas/AddressManage" + }, + { + "type": "object", + "properties": { + "version": { + "type": "integer", + "description": "The version stamp for the current object, used for optimistic locking. When saving, the same version as previously received needs to be passed back. If no one else has saved the object, the version will match and the object will be updated. However, if someone other has saved the object, the version will no longer match, and an error will be raised. This is used to prevent multiple users (or processes) from updating the same object and unwilingly overridding the property values, leading to data loss." + } + } + } + ] + }, + "AddressEditWithId": { + "description": "Parameters for editing an existing address", + "allOf": [ + { + "$ref": "#/components/schemas/AddressEdit" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The internal entity identifier" + } + } + } + ] + }, + "AddressManage": { + "description": "Common fields for either creating or editing an address", + "type": "object", + "x-implements": "IAddress", + "x-abstract": true, + "properties": { + "name": { + "type": "string", + "description": "The address name" + }, + "addressLine1": { + "type": "string", + "description": "The first line of the descriptive address" + }, + "addressLine2": { + "type": "string", + "description": "The second line of the descriptive address" + }, + "street": { + "type": "string", + "description": "The street name" + }, + "buildingNumber": { + "type": "string", + "description": "The numeric identifier for a land parcel, house, building or other" + }, + "complement": { + "type": "string", + "description": "The complement (like apartment number)" + }, + "zip": { + "type": "string", + "description": "A zip code that identifies a specific geographic (postal) delivery area" + }, + "poBox": { + "type": "string", + "description": "The post-office box, is an uniquely addressable box" + }, + "neighborhood": { + "type": "string", + "description": "The neighborhood name" + }, + "city": { + "type": "string", + "description": "The city name" + }, + "region": { + "type": "string", + "description": "The region or state" + }, + "country": { + "type": "string", + "description": "The country, represented as 2-letter, uppercase, ISO 3166-1 code" + }, + "location": { + "description": "The geolocation of the current address", + "allOf": [ + { + "$ref": "#/components/schemas/GeographicalCoordinate" + } + ] + }, + "defaultAddress": { + "type": "boolean", + "description": "Indicates whether this is the default address for the user" + }, + "hidden": { + "type": "boolean", + "description": "Whether this address should be hidden for other users" + }, + "contactInfo": { + "$ref": "#/components/schemas/AddressContactInfoManage" + } + } + }, + "AddressNew": { + "description": "Fields for a new address. The actually used and required fields depend on the user configuration.", + "allOf": [ + { + "$ref": "#/components/schemas/AddressManage" + } + ] + }, + "AddressResult": { + "description": "Information of an address as returned on list", + "allOf": [ + { + "$ref": "#/components/schemas/Address" + }, + { + "type": "object", + "properties": { + "defaultAddress": { + "type": "boolean", + "description": "Indicates whether this is the default address for the user" + }, + "hidden": { + "description": "Indicates whether this address is hidden for other users. It always returns false if the authenticated user doesn't manage the owner of this address.", + "type": "boolean" + }, + "contactInfo": { + "description": "If enabled, contains additional contact information for the address", + "allOf": [ + { + "$ref": "#/components/schemas/AddressContactInfo" + } + ] + } + } + } + ] + }, + "AddressView": { + "description": "Detailed information when viewing an address", + "allOf": [ + { + "$ref": "#/components/schemas/AddressResult" + }, + { + "type": "object", + "properties": { + "user": { + "description": "The user which owns this address", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "canEdit": { + "description": "Can the authenticated user edit / remove this address?", + "type": "boolean" + }, + "enablePrivacy": { + "description": "Indicates whether address privacy can be used for this user", + "type": "boolean" + } + } + } + ] + }, + "Agreement": { + "description": "An agreement the user must accept in order to use the system", + "allOf": [ + { + "$ref": "#/components/schemas/InternalNamedEntity" + }, + { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether accepting this agreement is required for using the system." + } + } + } + ] + }, + "AgreementContent": { + "description": "Contains the full content of an agreement", + "type": "object", + "properties": { + "agreement": { + "$ref": "#/components/schemas/Agreement" + }, + "content": { + "type": "string", + "description": "The HTML formatted content of the agreement" + }, + "contentVersion": { + "type": "integer", + "description": "The version of the text for this agreement. When the text changes, the version is incremented." + }, + "lastVersion": { + "type": "integer", + "description": "The current (last) version of the text for this agreement." + } + } + }, + "AgreementLog": { + "description": "Contains an entry for an agreement that was either accepted or rejected", + "allOf": [ + { + "$ref": "#/components/schemas/Entity" + }, + { + "type": "object", + "properties": { + "agreement": { + "$ref": "#/components/schemas/Agreement" + }, + "date": { + "type": "string", + "format": "date-time", + "description": "The date the agreement was accepted" + }, + "acceptedVersion": { + "type": "integer", + "description": "The version of the agreement that was accepted" + }, + "accepted": { + "type": "boolean", + "description": "For required agreements this will always be `true`. For optional agreements, a log is generated both when the agreement was accepted or changed to no longer accepted." + }, + "remoteAddress": { + "type": "string", + "description": "The IP address of the request that accepted the agreement. Not returned for the user himself, only for managers." + } + } + } + ] + }, + "AgreementsPermissions": { + "description": "Permissions regarding the user agreements", + "type": "object", + "properties": { + "view": { + "description": "Can the authenticated user view the agreement log?", + "type": "boolean" + } + } + }, + "Alert": { + "description": "Common alert data", + "allOf": [ + { + "$ref": "#/components/schemas/Entity" + }, + { + "type": "object", + "properties": { + "date": { + "description": "The alert date", + "type": "string", + "format": "date-time" + }, + "text": { + "description": "The alert text", + "type": "string" + } + } + } + ] + }, + "AlertsPermissions": { + "description": "Permissions related to user alerts", + "type": "object", + "properties": { + "view": { + "description": "Whether the logged user can view user alerts or not", + "type": "boolean" + } + } + }, + "AmountSummary": { + "description": "Contains summarized statistics over amounts", + "type": "object", + "properties": { + "count": { + "description": "The number of entries", + "type": "integer" + }, + "sum": { + "description": "The amount sum", + "type": "string", + "format": "number" + }, + "average": { + "description": "The amount average", + "type": "string", + "format": "number" + } + } + }, + "AssignVoucher": { + "description": "Parameters for assigning a voucher to a user", + "type": "object", + "properties": { + "user": { + "description": "An identification (id, login name, e-mail, ... depending on the configuration) of the user to which the voucher will be assigned to.", + "type": "string" + } + } + }, + "Auth": { + "description": "Contains information for the currently authenticated user", + "allOf": [ + { + "$ref": "#/components/schemas/BaseAuth" + }, + { + "type": "object", + "properties": { + "pinInput": { + "description": "Returned when a PIN can be defined. Contains the information for defining it.", + "allOf": [ + { + "$ref": "#/components/schemas/PinInput" + } + ] + }, + "configuration": { + "description": "The current configuration version", + "allOf": [ + { + "$ref": "#/components/schemas/VersionedEntity" + } + ] + } + } + } + ] + }, + "BadRequestError": { + "description": "Error returned when the request format / body is not in the expected format", + "type": "object", + "properties": { + "message": { + "description": "A (technical) message explaining the problem", + "type": "string" + }, + "line": { + "description": "The request body line that shows the problem", + "type": "integer" + }, + "column": { + "description": "The request body column that shows the problem", + "type": "integer" + }, + "code": { + "$ref": "#/components/schemas/BadRequestErrorCode" + } + } + }, + "BankingPermissions": { + "description": "Permissions for banking", + "type": "object", + "properties": { + "accounts": { + "description": "Permissions over each owned account", + "type": "array", + "items": { + "$ref": "#/components/schemas/AccountPermissions" + } + }, + "accountVisibilitySettings": { + "description": "Can the authenticated member set his own account visibility?", + "type": "boolean" + }, + "payments": { + "description": "Payments permissions", + "allOf": [ + { + "$ref": "#/components/schemas/PaymentsPermissions" + } + ] + }, + "authorizations": { + "description": "Transaction authorization permissions", + "allOf": [ + { + "$ref": "#/components/schemas/TransactionAuthorizationsPermissions" + } + ] + }, + "scheduledPayments": { + "description": "Scheduled payments permissions", + "allOf": [ + { + "$ref": "#/components/schemas/ScheduledPaymentsPermissions" + } + ] + }, + "externalPayments": { + "description": "External payments permissions", + "allOf": [ + { + "$ref": "#/components/schemas/ExternalPaymentsPermissions" + } + ] + }, + "paymentRequests": { + "description": "Payment requests permissions", + "allOf": [ + { + "$ref": "#/components/schemas/PaymentRequestsPermissions" + } + ] + }, + "tickets": { + "description": "Tickets permissions", + "allOf": [ + { + "$ref": "#/components/schemas/TicketsPermissions" + } + ] + }, + "searchUsersWithBalances": { + "description": "Can the authenticated admin / broker search managed users together with their account balances?", + "type": "boolean" + }, + "searchGeneralTransfers": { + "description": "Can the authenticated admin / broker perform a general transfers search (all visible transfers, regardless of the user / account)?", + "type": "boolean" + }, + "searchGeneralAuthorizedPayments": { + "description": "Can the authenticated admin / broker perform a general transaction search for authorizations?", + "type": "boolean" + }, + "searchGeneralScheduledPayments": { + "description": "Can the authenticated admin / broker perform a general scheduled payments / installments search?", + "type": "boolean" + }, + "searchGeneralExternalPayments": { + "description": "Can the authenticated admin / broker perform a general external payments search?", + "type": "boolean" + }, + "searchGeneralPaymentRequests": { + "description": "Can the authenticated admin / broker perform a general payment requests search?", + "type": "boolean" + }, + "searchGeneralBalanceLimits": { + "description": "Can the authenticated admin / broker perform a general account balance limit search, for all visible accounts?", + "type": "boolean" + }, + "searchGeneralPaymentLimits": { + "description": "Can the authenticated admin / broker perform a general account payment limit search, for all visible accounts?", + "type": "boolean" + } + } + }, + "BaseAccountBalanceLimits": { + "x-abstract": true, + "description": "Basic data regarding the lower and upper limits of a user account.", + "type": "object", + "properties": { + "creditLimit": { + "description": "The lower (negative) credit limit.", + "type": "string", + "format": "number" + }, + "customCreditLimit": { + "description": "Indicates whether the credit limit is customized for this account or if it is the default value.", + "type": "boolean" + }, + "upperCreditLimit": { + "description": "The upper (positive) credit limit. When this value is `null` the account has no upper limit (is unlimited).", + "type": "string", + "format": "number" + }, + "customUpperCreditLimit": { + "description": "Indicates whether the upper credit limit is customized for this account or if it is the default value.", + "type": "boolean" + } + } + }, + "BaseAccountPaymentLimits": { + "x-abstract": true, + "description": "Basic data regarding the payment, daily, weekly, monthly and yearly amount limits of a user account.", + "type": "object", + "properties": { + "amountLimit": { + "description": "The payment amount limit. When this value is `null` the account has no payment amount limit (is unlimited).", + "type": "string", + "format": "number" + }, + "customAmountLimit": { + "description": "Indicates whether the `amountLimit` is customized for this account or if it is from the product.", + "type": "boolean" + }, + "amountPerDayLimit": { + "description": "The payment amount per day limit. When this value is `null` the account has no payment amount per day limit (is unlimited).", + "type": "string", + "format": "number" + }, + "customAmountPerDayLimit": { + "description": "Indicates whether the `amountPerDayLimit` is customized for this account or if it is from the product.", + "type": "boolean" + }, + "amountPerWeekLimit": { + "description": "The payment amount per week limit. When this value is `null` the account has no payment amount per week limit (is unlimited).", + "type": "string", + "format": "number" + }, + "customAmountPerWeekLimit": { + "description": "Indicates whether the `amountPerWeekLimit` is customized for this account or if it is from the product.", + "type": "boolean" + }, + "amountPerMonthLimit": { + "description": "The payment amount per month limit. When this value is `null` the account has no payment amount per month limit (is unlimited).", + "type": "string", + "format": "number" + }, + "customAmountPerMonthLimit": { + "description": "Indicates whether the `amountPerMonthLimit` is customized for this account or if it is from the product.", + "type": "boolean" + }, + "amountPerYearLimit": { + "description": "The payment amount per year limit. When this value is `null` the account has no payment amount per year limit (is unlimited).", + "type": "string", + "format": "number" + }, + "customAmountPerYearLimit": { + "description": "Indicates whether the `amountPerYearLimit` is customized for this account or if it is from the product.", + "type": "boolean" + } + } + }, + "BaseAdDataForSearch": { + "description": "Common definitions for searching advertisements", + "x-abstract": true, + "type": "object", + "properties": { + "categories": { + "description": "The advertisement categories each with its children, forming a tree", + "type": "array", + "items": { + "$ref": "#/components/schemas/AdCategoryWithChildren" + } + }, + "customFields": { + "description": "The list of custom fields that are either to be used as search filter (if its internal name is present on either `fieldsInBasicSearch` or `fieldsInAdvancedSearch`) and / or in the result list (if its internal name is present on `fieldsInList`).", + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldDetailed" + } + }, + "fieldsInBasicSearch": { + "description": "The internal names of the custom fields that should be used as search filters in the basic section (separated fields, not keywords)", + "type": "array", + "items": { + "type": "string" + } + }, + "fieldsInAdvancedSearch": { + "description": "The internal names of the custom fields that should be used as search filters in the advanced section (separated fields, not keywords)", + "type": "array", + "items": { + "type": "string" + } + }, + "fieldsInList": { + "description": "The internal names of the custom fields that will be returned together with each advertisement, and should be shown in the result list. This feature is planned, but not yet available.", + "type": "array", + "items": { + "type": "string" + } + }, + "basicProfileFields": { + "description": "The list of basic user profile fields that can be used as search filters. Only returned if searching user advertisements.", + "type": "array", + "items": { + "$ref": "#/components/schemas/BasicProfileFieldInput" + } + }, + "customProfileFields": { + "description": "The list of custom user profile fields that can be used as search filters. Only returned if searching user advertisements.", + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldDetailed" + } + }, + "currencies": { + "description": "The currencies the authenticated user may use to filter by price", + "type": "array", + "items": { + "$ref": "#/components/schemas/Currency" + } + }, + "searchByDistanceData": { + "$ref": "#/components/schemas/SearchByDistanceData" + }, + "categoriesDisplay": { + "description": "The category view configured for the logged user.", + "allOf": [ + { + "$ref": "#/components/schemas/AdCategoriesDisplayEnum" + } + ] + }, + "visibleKinds": { + "description": "The advertisement kinds that can be searched by the authenticated user", + "type": "array", + "items": { + "$ref": "#/components/schemas/AdKind" + } + }, + "addressFieldsInSearch": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AddressQueryFieldEnum" + } + } + } + }, + "BaseAdDetailed": { + "description": "Contains shared information of an ad.", + "allOf": [ + { + "$ref": "#/components/schemas/Ad" + }, + { + "type": "object", + "properties": { + "status": { + "$ref": "#/components/schemas/AdStatusEnum" + }, + "price": { + "description": "The regular price.", + "type": "string", + "format": "number" + }, + "productNumber": { + "description": "The product number according to the webshop settings.", + "type": "string" + } + } + } + ] + }, + "BaseAuth": { + "description": "Contains relevant information for the authenticated user and his granted permissions.", + "type": "object", + "x-abstract": true, + "properties": { + "user": { + "description": "The authenticated user, if any.", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "language": { + "description": "The current language version", + "allOf": [ + { + "$ref": "#/components/schemas/VersionedEntity" + } + ] + }, + "global": { + "description": "Indicates whether this user belongs to global mode. Only returned if there is an authenticated user.", + "type": "boolean" + }, + "systemAdministrator": { + "description": "Indicates whether this user is a system administrator, that is, either belongs to the global system administrators group or to the network system administrators group. Only returned if `role` is `administrator`.", + "type": "boolean" + }, + "aliasOperator": { + "description": "Indicates whether this user is an operator which is an alias of his owner member, that is, has all member permissions, and is not restricted to an operator group. Only returned if `role` is `operator`.", + "type": "boolean" + }, + "permissions": { + "description": "The granted permissions for the authenticated user or guest", + "allOf": [ + { + "$ref": "#/components/schemas/Permissions" + } + ] + }, + "sessionToken": { + "description": "A token that must be passed in on the Session-Token header on subsequent requests instead of the login name and password. Only returned if using a session authentication.", + "type": "string" + }, + "trustedSession": { + "description": "Whether the current session is a trusted one or not. If trusted then no confirmation password (if any) will be required for subsequent requests in the same session. Only returned if using a session authentication.", + "type": "boolean" + }, + "accessClient": { + "description": "Only returned when authenticated as access client, contains information about it", + "allOf": [ + { + "$ref": "#/components/schemas/EntityReference" + } + ] + }, + "principalType": { + "description": "Returns a reference to the principal type used for authentication. May be some of the built-in types (login name, e-mail, mobile phone or account number), a profile field, a token type or an access client type", + "allOf": [ + { + "$ref": "#/components/schemas/EntityReference" + } + ] + }, + "principal": { + "description": "The principal (user identification) used on authentication. Can be the value of the login name, e-mail, account number, custom field or token used on authentication or at the moment of login. Is not returned when the authentication was performed via access client.", + "type": "string" + }, + "passwordType": { + "description": "Returns a reference to the password type used on this channel.", + "allOf": [ + { + "$ref": "#/components/schemas/PasswordType" + } + ] + }, + "expiredPassword": { + "description": "Returns whether the current access password is expired. If so, the user will have to change the password, or all other actions will be denied.", + "type": "boolean" + }, + "pendingAgreements": { + "description": "Returns whether the current user has some agreements pending accept. If so, a call to `GET /agreements/pending` should be performed to get the content of the pending agreements, and then a `POST /agreements/pending{id_or_internal_name}` to accept each agreement.", + "type": "boolean" + }, + "everAcceptedAgreements": { + "description": "Returns whether the current user has ever accepted any agreement. This is always false for operators, as operators themselves don't accept agreements. However, their owner members do.", + "type": "boolean" + }, + "loginConfirmation": { + "description": "When returned, a login confirmation is required, and contains data for the user to enter his confirmation credentials. Maybe the user don't have any active credential types to confirm the login, in that case, they should activate one before proceeding.", + "allOf": [ + { + "$ref": "#/components/schemas/PasswordInput" + } + ] + }, + "totpEnabled": { + "description": "Indicates whether an authenticator app (TOTP) is enabled for the user. The user himself may have or not an active TOTP.", + "type": "boolean" + }, + "unauthorizedAddress": { + "description": "Returns whether the current guest session is not authorized from the client IP address. This is returned for guests, rather than enforced, because it could be too early to enforce it. For example, even the language to display an error message is returned from a server call. If we would deny it, clients could not even know which message to show.", + "type": "boolean" + }, + "allowPin": { + "description": "Returns whether the configuration for the current channel has device PIN enabled.", + "type": "boolean" + }, + "role": { + "description": "The main user role. Only returned if there is an authenticated user.", + "allOf": [ + { + "$ref": "#/components/schemas/RoleEnum" + } + ] + }, + "secondaryPasswordType": { + "allOf": [ + { + "$ref": "#/components/schemas/PasswordType" + } + ], + "deprecated": true, + "x-remove-version": 4.18, + "description": "Use `loginConfirmation.passwordType`" + }, + "expiredSecondaryPassword": { + "type": "boolean", + "deprecated": true, + "x-remove-version": 4.18, + "description": "Use `loginConfirmation.passwordStatus in [expired, reset]`" + }, + "pendingSecondaryPassword": { + "type": "boolean", + "deprecated": true, + "x-remove-version": 4.18, + "description": "Use `loginConfirmation != null`" + } + } + }, + "BaseCustomFieldValue": { + "x-abstract": true, + "description": "Holds detailed information about a custom field value. The actual value should be read from a property depending on the field type:\n\n\n- If the type is either `string`,\n `text`,\n `richText` or\n `url`, the property is on `stringValue`;\n\n\n- If the type is `integer`, the property is\n `integerValue`; - If the type is `decimal`,\n the property is `decimalValue`;\n\n\n- If the type is `date`, the property is\n `dateValue`; - If the type\nis `boolean`, the property is `booleanValue`;\n\n- If the type is either `singleSelection` or\n `multiSelection`, the property is\n `possibleValues`;\n\n\n- If the type is `dynamicSelection`, the\n property is `dynamicValue`;\n\n\n- If the type is `dynamicMultiSelection`, the\n property is `dynamicValues`;\n\n\n- If the type is `file`, the property is\n `fileValues`;\n\n\n- If the type is `image`, the property is\n `imageValues`;\n\n\n- Finally, if the type is `linkedEntity`, it\n depends on the value of the field's `linkedEntityType`:\n\n\n - If the entity type is `user`, the property\n is `userValue`;\n\n\n - If the entity type is `record`, the\n property is `recordValue`;\n\n\n - If the entity type is `transaction`, the\n property is `transactionValue`;\n\n\n - If the entity type is `transfer`, the\n property is `transferValue`;\n\n\n - If the entity type is `advertisement`, the\n property is `adValue`.", + "allOf": [ + { + "$ref": "#/components/schemas/Entity" + }, + { + "type": "object", + "properties": { + "stringValue": { + "description": "The field value if the field type is either `string`, `text`, `richText` or `url`.", + "type": "string" + }, + "dateValue": { + "description": "The field value if the field type is `date`.", + "type": "string", + "format": "date-time" + }, + "booleanValue": { + "description": "The field value if the field type is `boolean`.", + "type": "boolean" + }, + "integerValue": { + "description": "The field value if the field type is `integer`.", + "type": "integer" + }, + "decimalValue": { + "description": "The field value if the field type is `decimal`.", + "type": "string", + "format": "number" + }, + "enumeratedValues": { + "description": "The field value if the field type is either `singleSelection` or `multiSelection`. For single selection will either be an empty array or an array with a single element.", + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldPossibleValue" + } + }, + "dynamicValue": { + "deprecated": true, + "x-remove-version": 4.17, + "description": "Get the first element in `dynamicValues` for type `dynamicSelection`.\n\n\nThe field value if the field type is `dynamicSelection`.", + "allOf": [ + { + "$ref": "#/components/schemas/CustomFieldDynamicValue" + } + ] + }, + "dynamicValues": { + "description": "The field value if the field type is either `dynamicSelection` or `dynamicMultiSelection`. For single selection, will either be an empty array or an array with a single element.", + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldDynamicValue" + } + }, + "fileValues": { + "description": "The field value if the field type is `file`", + "type": "array", + "items": { + "$ref": "#/components/schemas/StoredFile" + } + }, + "imageValues": { + "description": "The field value if the field type is `image`", + "type": "array", + "items": { + "$ref": "#/components/schemas/Image" + } + }, + "adValue": { + "description": "The field value if the field type is `linkedEntity` and the linked entity type is `advertisement`. If the currently set record is not accessible by the logged user, only the `name` field is sent, which contains the advertisement title.", + "allOf": [ + { + "$ref": "#/components/schemas/Ad" + } + ] + }, + "transactionValue": { + "description": "The field value if the field type is `linkedEntity` and the linked entity type is `transaction`. If the currently set transaction is not accessible by the logged user, only the `display` field is sent.", + "allOf": [ + { + "$ref": "#/components/schemas/Transaction" + } + ] + }, + "transferValue": { + "description": "The field value if the field type is `linkedEntity` and the linked entity type is `transfer`. If the currently set transfer is not accessible by the logged user, only the `display` field is sent.", + "allOf": [ + { + "$ref": "#/components/schemas/Transfer" + } + ] + }, + "recordValue": { + "description": "The field value if the field type is `linkedEntity` and the linked entity type is `record`. If the currently set record is not accessible by the logged user, only the `display` field is sent.", + "allOf": [ + { + "$ref": "#/components/schemas/Record" + } + ] + }, + "userValue": { + "description": "The field value if the field type is `linkedEntity` and the linked entity type is `user`. If the currently set user is not accessible by the logged user, only `display` field is sent.", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + } + } + } + ] + }, + "BaseInstallmentDataForSearch": { + "x-abstract": true, + "description": "Contains common data used to search installments for a given owner", + "type": "object", + "properties": { + "archivingDate": { + "description": "If not null, it means that data archiving is enabled, and is the lower bound date of the retention period", + "type": "string", + "format": "date-time" + }, + "exportFormats": { + "description": "The formats which the search results can be exported.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExportFormat" + } + }, + "groups": { + "description": "Groups that can be used to filter entries, so that only transfers from or to users of those groups are returned on search. Is only returned if the authenticated user is an administrator.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Group" + } + }, + "accountTypes": { + "description": "Visible account types from the given owner", + "type": "array", + "items": { + "$ref": "#/components/schemas/AccountType" + } + }, + "canViewAuthorized": { + "description": "Can the authenticated user view authorized transactions of this owner?", + "type": "boolean" + }, + "visibleKinds": { + "description": "Contains the transaction kinds the authenticated user can view over this owner. Only kinds that allow installments are returned.", + "type": "array", + "items": { + "$ref": "#/components/schemas/TransactionKind" + } + }, + "customFieldsInSearch": { + "deprecated": true, + "x-remove-version": 4.18, + "description": "Use `fieldsInBasicSearch` instead.\n\n\nDetailed references for custom fields that are set to be used as search filters", + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldDetailed" + } + }, + "customFieldsInList": { + "deprecated": true, + "x-remove-version": 4.18, + "description": "Use `fieldsInList` instead.\n\n\nSimple references for custom fields that are set to be used on the search result list", + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldDetailed" + } + }, + "customFields": { + "description": "The list of custom fields that can be used as search filters if the internal names are present in the `fieldsInBasicSearch` property.", + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldDetailed" + } + }, + "fieldsInBasicSearch": { + "description": "The internal names of the custom fields that should be used as search filters in the basic section (separated fields, not keywords)", + "type": "array", + "items": { + "type": "string" + } + }, + "fieldsInList": { + "description": "The internal names of the contact custom fields that will be returned together with each record, and should be shown in the result list", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "BaseInstallmentQueryFilters": { + "x-abstract": true, + "description": "Base query filters for installments", + "allOf": [ + { + "$ref": "#/components/schemas/BaseTransactionOrInstallmentQueryFilters" + }, + { + "type": "object", + "properties": { + "statuses": { + "description": "Possible statuses for installments.", + "type": "array", + "items": { + "$ref": "#/components/schemas/InstallmentStatusEnum" + } + } + } + } + ] + }, + "BaseInstallmentResult": { + "description": "Base fields for an installment result", + "allOf": [ + { + "$ref": "#/components/schemas/Entity" + }, + { + "type": "object", + "properties": { + "status": { + "description": "The installment status.", + "allOf": [ + { + "$ref": "#/components/schemas/InstallmentStatusEnum" + } + ] + }, + "number": { + "description": "The installment number", + "type": "integer" + }, + "totalInstallments": { + "description": "The total number of installments in the transaction. Only not returned if the installment belongs to a recurring payment with an unbound number of occurrences (until cancel).", + "type": "integer" + }, + "dueDate": { + "description": "The installment due date", + "type": "string", + "format": "date-time" + }, + "amount": { + "description": "The installment amount.", + "type": "string", + "format": "number" + }, + "transferTransactionNumber": { + "description": "When processed, is the transaction number of the generated transfer.", + "type": "string" + }, + "transferDate": { + "description": "When processed, is the date of the generated transfer.", + "type": "string", + "format": "date-time" + }, + "transferId": { + "description": "When processed, is the id of the generated transfer.", + "type": "string" + } + } + } + ] + }, + "BaseNfcError": { + "description": "Base Error when work with a NFC card", + "x-abstract": true, + "allOf": [ + { + "$ref": "#/components/schemas/Error" + }, + { + "type": "object", + "properties": { + "token": { + "$ref": "#/components/schemas/TokenDetailed" + } + } + } + ] + }, + "BaseNotificationSettings": { + "description": "Contains common data among `NotificationSettingsView` and `NotificationSettingsDataForEdit`.", + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/User" + }, + "role": { + "$ref": "#/components/schemas/RoleEnum" + }, + "canEdit": { + "description": "Indicates whether the logged user can edit the notitification settings of this user.", + "type": "boolean" + }, + "emailAllowed": { + "description": "Indicates whether e-mail notifications are allowed", + "type": "boolean" + }, + "smsAllowed": { + "description": "Indicates whether SMS notifications are allowed", + "type": "boolean" + }, + "maxSmsPerMonth": { + "description": "The maximum number of allowed SMS messages per month", + "type": "integer" + }, + "smsCountThisMonth": { + "description": "The number of SMS messages already sent this month", + "type": "integer" + }, + "forwardMessagesAllowed": { + "description": "Indicates whether it can be configured to forward received internal messages to the user's e-mail. Only applicable for users (members / brokers), not administrators.", + "type": "boolean" + }, + "emailMailingsAllowed": { + "description": "Indicates whether email mailings are allowed to be configured by users. Only applicable for users (members / brokers), not administrators.", + "type": "boolean" + }, + "smsMailingsAllowed": { + "description": "Indicates whether sms mailings are allowed to be configured by users. Only applicable for users (members / brokers), not administrators.", + "type": "boolean" + }, + "appMailingsAllowed": { + "description": "Indicates whether FCM mobile notification mailings are allowed to be configured by users. Only applicable for users (members / brokers), not administrators.", + "type": "boolean" + } + } + }, + "BaseOrder": { + "description": "Contains basic data shared by other related models.", + "allOf": [ + { + "$ref": "#/components/schemas/Entity" + } + ] + }, + "BaseOrderAction": { + "description": "Commont data for order actions.", + "type": "object", + "properties": { + "remarks": { + "description": "Optional comments by the authenticated user.", + "type": "string" + } + } + }, + "BaseOrderItem": { + "description": "An item containing a quantity.", + "allOf": [ + { + "$ref": "#/components/schemas/Entity" + }, + { + "type": "object", + "properties": { + "price": { + "description": "The regular price.", + "type": "string", + "format": "number" + }, + "quantity": { + "description": "It represents how much of the product was ordered. It could be a decimal number only if it's allowed by the product (i.e the webshop ad).", + "type": "string", + "format": "number" + }, + "product": { + "$ref": "#/components/schemas/WebshopAd" + } + } + } + ] + }, + "BaseRecordDataForSearch": { + "description": "Common definitions for searching records", + "x-abstract": true, + "allOf": [ + { + "$ref": "#/components/schemas/RecordBasePermissions" + }, + { + "type": "object", + "properties": { + "customFields": { + "description": "The list of record fields that are either to be used as search filter (if its internal name is present on `fieldsInSearch`) and / or in the result list (if its internal name is present on `fieldsInList`)", + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldDetailed" + } + }, + "fieldsInSearch": { + "description": "The internal names of the record fields that should be used as search filters (separated fields, not keywords)", + "type": "array", + "items": { + "type": "string" + } + }, + "fieldsInList": { + "description": "The internal names of the record fields that will be returned together with each record, and should be shown in the result list", + "type": "array", + "items": { + "type": "string" + } + }, + "hideDateOnList": { + "description": "Whether the date column should be hidden on result list.", + "type": "boolean" + }, + "exportFormats": { + "description": "The formats which the data can be exported", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExportFormat" + } + } + } + } + ] + }, + "BaseReferenceDataForSearch": { + "description": "Configuration data for searching references", + "type": "object", + "x-abstract": true, + "properties": { + "manage": { + "description": "Can the authenticated user manage returned references/payment feedbacks? Only for managers (admins, brokers)", + "type": "boolean" + }, + "user": { + "$ref": "#/components/schemas/User" + }, + "directions": { + "description": "The possible directions for searching references", + "type": "array", + "items": { + "$ref": "#/components/schemas/ReferenceDirectionEnum" + } + } + } + }, + "BaseReferenceQueryFilters": { + "description": "Common query filters for references and payment feedbacks", + "allOf": [ + { + "$ref": "#/components/schemas/QueryFilters" + }, + { + "type": "object", + "properties": { + "period": { + "description": "The minimum / maximum reference date", + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "levels": { + "description": "The levels to filter", + "type": "array", + "items": { + "$ref": "#/components/schemas/ReferenceLevelEnum" + } + }, + "direction": { + "$ref": "#/components/schemas/ReferenceDirectionEnum" + }, + "relatedUser": { + "description": "The user that either gave or received the reference to the user specified in the path or the other user involved in the payment feedback. Should be either the id or some other allowed identification (login name, email, etc).", + "type": "string" + } + } + } + ] + }, + "BaseSendMessage": { + "description": "Contains basic data for a message send / reply", + "type": "object", + "properties": { + "subject": { + "description": "The subject for the reply", + "type": "string" + }, + "body": { + "description": "The body for the reply", + "type": "string" + } + } + }, + "BaseShoppingCart": { + "description": "Contains basic data shared by other shopping cart related models.", + "allOf": [ + { + "$ref": "#/components/schemas/BaseOrder" + }, + { + "type": "object", + "properties": { + "currency": { + "$ref": "#/components/schemas/Currency" + }, + "seller": { + "$ref": "#/components/schemas/User" + }, + "insufficientBalance": { + "type": "boolean", + "description": "Flag in `true` if there isn't any account in that currency with enough available balance to be able to fulfill the order from the shopping cart." + } + } + } + ] + }, + "BaseTransDataForSearch": { + "description": "Contains basic information used to search for transfers / transactions", + "x-abstract": true, + "type": "object", + "properties": { + "transferFilters": { + "description": "References for transfer filters, which can be used to filter entries by transfer type", + "type": "array", + "items": { + "$ref": "#/components/schemas/TransferFilter" + } + }, + "channels": { + "description": "References for channels which can be used to filter entries by transfers generated on a specific channel. Is only returned if the authenticated user is an administrator.", + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityReference" + } + }, + "groups": { + "description": "Groups that can be used to filter entries, so that only transfers from or to users of those groups are returned on search. Is only returned if the authenticated user is an administrator.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Group" + } + }, + "preselectedPeriods": { + "description": "Contains the pre-selected period filter ranges according to the Cyclos configuration", + "type": "array", + "items": { + "$ref": "#/components/schemas/PreselectedPeriod" + } + }, + "archivingDate": { + "description": "If not null, it means that data archiving is enabled, and is the lower bound date of the retention period", + "type": "string", + "format": "date-time" + }, + "exportFormats": { + "description": "The formats which the search results can be exported.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExportFormat" + } + }, + "customFieldsInSearch": { + "deprecated": true, + "x-remove-version": 4.18, + "description": "Use `fieldsInBasicSearch` instead.\n\n\nDetailed references for custom fields that are set to be used as search filters", + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldDetailed" + } + }, + "customFieldsInList": { + "deprecated": true, + "x-remove-version": 4.18, + "description": "Use `fieldsInList` instead.\n\n\nSimple references for custom fields that are set to be used on the search result list", + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldDetailed" + } + }, + "customFields": { + "description": "The list of custom fields that can be used as search filters if the internal names are present in the `fieldsInBasicSearch` property.", + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldDetailed" + } + }, + "fieldsInBasicSearch": { + "description": "The internal names of the custom fields that should be used as search filters in the basic section (separated fields, not keywords)", + "type": "array", + "items": { + "type": "string" + } + }, + "fieldsInList": { + "description": "The internal names of the contact custom fields that will be returned together with each record, and should be shown in the result list", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "BaseTransQueryFilters": { + "description": "Base definitions for searching either transactions or transfers", + "x-abstract": true, + "allOf": [ + { + "$ref": "#/components/schemas/QueryFilters" + }, + { + "type": "object", + "properties": { + "datePeriod": { + "description": "The minimum / maximum transfer date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "transferFilters": { + "description": "Reference to the transfer filters, which filters transfers by type. May be either the internal id or qualified transfer filter internal name, in the format `accountType.transferFilter`.", + "type": "array", + "items": { + "type": "string" + } + }, + "transferTypes": { + "description": "Reference to the transfer types for filter. May be either the internal id or qualified transfer type internal name, in the format `accountType.transferType`.", + "type": "array", + "items": { + "type": "string" + } + }, + "transactionNumber": { + "description": "The transaction number of the matching transfer", + "type": "string" + }, + "user": { + "description": "Reference a user that should have either received / performed the transfer.", + "type": "string" + }, + "groups": { + "description": "Reference to the user group used to perform / receive the transfer. Only taken into account if authenticated as administrator.", + "type": "array", + "items": { + "type": "string" + } + }, + "by": { + "description": "Reference to the user that was authenticated when the transfer was performed. Is only taken into account if authenticated as administrator.", + "type": "string" + }, + "brokers": { + "description": "Reference to the broker of users involved in transfers. Is only taken into account if authenticated as administrator.", + "type": "array", + "items": { + "type": "string" + } + }, + "channels": { + "description": "Reference to the channel used to perform / receive the transfer. Only taken into account if authenticated as administrator.", + "type": "array", + "items": { + "type": "string" + } + }, + "excludedIds": { + "description": "List of transfers ids to be excluded from the result.", + "type": "array", + "items": { + "type": "string" + } + }, + "accessClients": { + "description": "References to access clients (id or token) used to perform / receive the transfer.", + "type": "array", + "items": { + "type": "string" + } + }, + "includeGeneratedByAccessClient": { + "description": "Flag indicating whether to include or not the generated transfer. Only valid if there is at least one access client specified. For example if a `ticket` or `paymentRequest` was processed then a new transfer will be generated.", + "type": "boolean" + }, + "fromCurrentAccessClient": { + "description": "Flag indicating whether to include only transfers by the current access client.", + "type": "boolean" + }, + "amountRange": { + "description": "The minimum / maximum amount. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "type": "array", + "items": { + "type": "string", + "format": "number" + } + }, + "orderBy": { + "$ref": "#/components/schemas/TransOrderByEnum" + }, + "customFields": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Transaction custom field values used as filters. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by : (colon). For example, `customFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, customFields=field1:valueA|valueB. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `customFields=rank:bronze|silver,documentDate:2000-01-01|2001-12-31` would match results whose custom field with internal name `rank` is either `bronze` or `silver`, and whose `documentDate` is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `customFields=documentDate:|2001-12-31`.\nA note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `customFields=dynamic:a|b|c`. However, it is also possible to perform a partial-match search using the dynamic value label. In this case a single value, prefixed or enclosed by single quotes should be used. For example: `customFields=dynamic:'business` or `customFields=dynamic:'business'`." + } + } + } + ] + }, + "BaseTransactionDataForSearch": { + "description": "Contains data used to search transactions, either as an owner point of view or as overview.", + "allOf": [ + { + "$ref": "#/components/schemas/BaseTransDataForSearch" + }, + { + "type": "object", + "properties": { + "accountTypes": { + "description": "Visible account types from the given owner", + "type": "array", + "items": { + "$ref": "#/components/schemas/AccountType" + } + }, + "authorizationRoles": { + "description": "Visible authorization roles which can be used for filter. Only returned for admins.", + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityReference" + } + }, + "canViewAuthorized": { + "description": "Can the authenticated user view authorized transactions of this owner?", + "type": "boolean" + }, + "visibleKinds": { + "description": "Contains the transaction kinds the authenticated user can view over this owner.", + "type": "array", + "items": { + "$ref": "#/components/schemas/TransactionKind" + } + } + } + } + ] + }, + "BaseTransactionOrInstallmentQueryFilters": { + "description": "Base query filters for either transactions or installments", + "allOf": [ + { + "$ref": "#/components/schemas/BaseTransQueryFilters" + }, + { + "type": "object", + "properties": { + "kinds": { + "description": "The kinds of transactions to include", + "type": "array", + "items": { + "$ref": "#/components/schemas/TransactionKind" + } + }, + "creationTypes": { + "description": "Include only payments created as one of these. This filter only applies to the following kinds: `payment`, `scheduledPayment` and `recurringPayment`. It doesn't affect other kinds of returned transactions. If you only want payments to be returned, set these in the `kinds` filter.", + "type": "array", + "items": { + "$ref": "#/components/schemas/PaymentCreationTypeEnum" + } + }, + "authorized": { + "description": "When set, will only return transactions that went through the authorization process (if true) or that never went through it (when false). In either case, only kinds that can go through authorization are returned (`payment`, `order`, `recurringPayment` or `scheduledPayment`).", + "type": "boolean" + }, + "authorizationStatuses": { + "description": "Authorization statuses used as search criteria. When set, only kinds that can go through authorization are returned (`payment`, `order`, `recurringPayment` or `scheduledPayment`).", + "type": "array", + "items": { + "$ref": "#/components/schemas/TransactionAuthorizationStatusEnum" + } + }, + "authorizationPerformedBy": { + "description": "Id or other identifier (login name, email, etc) of the user that performed an authorization action (authorize, deny or cancel).", + "type": "string" + } + } + } + ] + }, + "BaseTransactionQueryFilters": { + "description": "Base query filters for transactions", + "allOf": [ + { + "$ref": "#/components/schemas/BaseTransactionOrInstallmentQueryFilters" + }, + { + "type": "object", + "properties": { + "authorizationRoles": { + "description": "Either internal names or ids of authorization roles. To match, transactions must be pending authorization in a level which can be authorized by any of the given roles.", + "type": "array", + "items": { + "type": "string" + } + }, + "ticketStatuses": { + "description": "Statuses used as search criteria applied only to transactions of kind `ticket`.", + "type": "array", + "items": { + "$ref": "#/components/schemas/TicketStatusEnum" + } + }, + "ticketExpiration": { + "description": "The minimum / maximum date for ticket expiration. Only affects tickets. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "recurringPaymentStatuses": { + "description": "Statuses used as search criteria applied only to transactions of kind `recurringPayment`. If this filter is not empty then pending recurring payments will be excluded from the result. Pending recurring payments does not have a status.", + "type": "array", + "items": { + "$ref": "#/components/schemas/RecurringPaymentStatusEnum" + } + }, + "scheduledPaymentStatuses": { + "description": "Statuses used as search criteria applied only to transactions of kind `scheduledPayment`. If this filter is not empty then pending scheduled payments will be excluded from the result. Pending scheduled payments does not have a status.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduledPaymentStatusEnum" + } + }, + "paymentRequestStatuses": { + "description": "Statuses used as search criteria applied only to transactions of kind `paymentRequest`.", + "type": "array", + "items": { + "$ref": "#/components/schemas/PaymentRequestStatusEnum" + } + }, + "paymentRequestExpiration": { + "description": "The minimum / maximum date for payment request expiration. Only affects payment requests. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "externalPaymentStatuses": { + "description": "Statuses used as search criteria applied only to transactions of kind `externalPayment`.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExternalPaymentStatusEnum" + } + }, + "externalPaymentExpiration": { + "description": "The minimum / maximum date for external payment expiration. Only affects external payments. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + ] + }, + "BaseTransactionResult": { + "description": "Base fields for transaction result", + "allOf": [ + { + "$ref": "#/components/schemas/TransResult" + }, + { + "type": "object", + "properties": { + "kind": { + "description": "The transaction kind. For example, if the front end has distinct views for a regular payment, scheduled payment and so on, this information is useful to determine the actual view.", + "allOf": [ + { + "$ref": "#/components/schemas/TransactionKind" + } + ] + }, + "creationType": { + "description": "Indicates how this payment was created. Only returned if `kind` is either `payment`, `scheduledPayment` or `recurringPayment`.", + "allOf": [ + { + "$ref": "#/components/schemas/PaymentCreationTypeEnum" + } + ] + }, + "authorizationStatus": { + "description": "Indicates the authorization status for this payment. Only returned if `kind` is either `payment`, `scheduledPayment` or `recurringPayment`.", + "allOf": [ + { + "$ref": "#/components/schemas/TransactionAuthorizationStatusEnum" + } + ] + }, + "currency": { + "description": "Either internal name or id of the transaction currency.", + "type": "string" + }, + "expirationDate": { + "description": "Only returned if the `kind` is either `paymentRequest`, `externalPayment` or `ticket`. The deadline for the payment to be processed. In case of `externalPayment` if no user is registered with either e-mail or mobile phone matching, it is canceled. The same is done in case of `ticket` if it is not accepted by any user.", + "type": "string", + "format": "date-time" + }, + "scheduledPaymentStatus": { + "description": "The scheduled payment status. Only returned if `kind` is `scheduledPayment`.", + "allOf": [ + { + "$ref": "#/components/schemas/ScheduledPaymentStatusEnum" + } + ] + }, + "installmentCount": { + "description": "The total number of installments. Only returned if `kind` is `scheduledPayment`.", + "type": "integer" + }, + "processedInstallments": { + "description": "The number of processed installments. Only returned if `kind` is `scheduledPayment`.", + "type": "integer" + }, + "firstInstallment": { + "description": "A reference to the first installment of this scheduled payment. Only returned if `kind` is `scheduledPayment`.", + "allOf": [ + { + "$ref": "#/components/schemas/Installment" + } + ] + }, + "firstOpenInstallment": { + "description": "A reference to the first installment which is still open. Only returned if `kind` is `scheduledPayment`.", + "allOf": [ + { + "$ref": "#/components/schemas/Installment" + } + ] + }, + "recurringPaymentStatus": { + "description": "The recurring payment status. Only returned if `kind` is `recurringPayment`.", + "allOf": [ + { + "$ref": "#/components/schemas/RecurringPaymentStatusEnum" + } + ] + }, + "occurrencesCount": { + "description": "The total number of occurrences to process. When null will be processed until manually canceled. Only returned if `kind` is `recurringPayment`.", + "type": "integer" + }, + "nextOccurrenceDate": { + "description": "When the next recurring payment occurrence will be processed. Only returned if `kind` is `recurringPayment`.", + "type": "string", + "format": "date-time" + }, + "lastOccurrenceNumber": { + "description": "The number of the last processed occurrence", + "type": "integer" + }, + "externalPaymentStatus": { + "description": "The external payment status. Only returned if `kind` is `externalPayment`.", + "allOf": [ + { + "$ref": "#/components/schemas/ExternalPaymentStatusEnum" + } + ] + }, + "toPrincipalType": { + "description": "The principal type an external payment was sent to. Only returned if `kind` is `externalPayment`.", + "allOf": [ + { + "$ref": "#/components/schemas/PrincipalType" + } + ] + }, + "toPrincipalValue": { + "description": "The principal to which an external payment was sent to. Only returned if `kind` is `externalPayment`.", + "type": "string" + }, + "paymentRequestStatus": { + "description": "The payment request status. Only returned if `kind` is `paymentRequest`.", + "allOf": [ + { + "$ref": "#/components/schemas/PaymentRequestStatusEnum" + } + ] + }, + "ticketStatus": { + "description": "The ticket status. Only returned if `kind` is `ticket`.", + "allOf": [ + { + "$ref": "#/components/schemas/TicketStatusEnum" + } + ] + } + } + } + ] + }, + "BaseTransferDataForSearch": { + "description": "Contains basic information used to search for transfers", + "x-abstract": true, + "allOf": [ + { + "$ref": "#/components/schemas/BaseTransDataForSearch" + }, + { + "type": "object", + "properties": { + "transferStatusFlows": { + "description": "References to the allowed transfer status flows for this account", + "type": "array", + "items": { + "$ref": "#/components/schemas/TransferStatusFlow" + } + } + } + } + ] + }, + "BaseTransferQueryFilters": { + "description": "Base definitions for searching transfers", + "x-abstract": true, + "allOf": [ + { + "$ref": "#/components/schemas/BaseTransQueryFilters" + }, + { + "type": "object", + "properties": { + "chargedBack": { + "description": "When set to either `true` will only return transfers that were charged-back. When set to `false`, will only return transfers that were not charged-back. When left blank will not filter by this creterion.", + "type": "boolean" + }, + "statuses": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Transfer statuses used as search criteria. Each array element should be either the identifier or the status qualified internal name, composed by flow internal name, a dot, and the status internal name. For example, `loan.open` would be a valid internal name." + }, + "kinds": { + "description": "The kind of transfers to return", + "type": "array", + "items": { + "$ref": "#/components/schemas/TransferKind" + } + } + } + } + ] + }, + "BaseUserDataForSearch": { + "description": "Contains basic data used to search users in distinct contexts", + "x-abstract": true, + "type": "object", + "properties": { + "allowKeywords": { + "description": "Indicates whether using keywords is allowed", + "type": "boolean" + }, + "canViewImages": { + "description": "Indicates whether user images are visible in this search", + "type": "boolean" + }, + "fieldsInSearch": { + "deprecated": true, + "x-remove-version": 4.17, + "description": "Use `fieldsInBasicSearch` and `fieldsInAdvancedSearch` instead.\n\n\nThe internal names of either basic or custom profile fields which can be used as search filters (separated fields, not keywords).", + "type": "array", + "items": { + "type": "string" + } + }, + "basicFields": { + "description": "The list of basic profile fields that can be used either as search filters (if the internal names are present in the `fieldsInSearch` property) or on the result list (if the internal names are present in the `fieldsInList` property).", + "type": "array", + "items": { + "$ref": "#/components/schemas/BasicProfileFieldInput" + } + }, + "customFields": { + "description": "The list of custom profile fields that can be used either as search filters (if the internal names are present in the `fieldsInSearch` property) or on the result list (if the internal names are present in the `fieldsInList` property)", + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldDetailed" + } + }, + "products": { + "description": "The list of products which admins can use to filter users.", + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityReference" + } + }, + "agreements": { + "description": "The list of agreements that can be used to filter users that have either accepted or not accepted specific agreements. Only returned for admins / brokers that can see the user agreement log.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Agreement" + } + }, + "groups": { + "description": "The groups the authenticated user can use to filter users. Admins can always filter by groups, while users depend on a permission, which can be to only view group sets, only groups or none.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Group" + } + }, + "searchByDistanceData": { + "$ref": "#/components/schemas/SearchByDistanceData" + }, + "addressFieldsInSearch": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AddressQueryFieldEnum" + } + }, + "exportFormats": { + "description": "The formats which the search results can be exported.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExportFormat" + } + }, + "fieldsInBasicSearch": { + "description": "The internal names of the profile fields that should be used as search filters in the basic section (separated fields, not keywords)", + "type": "array", + "items": { + "type": "string" + } + }, + "fieldsInAdvancedSearch": { + "description": "The internal names of the profile fields that should be used as search filters in the advanced section (separated fields, not keywords)", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "BaseVoucherBuyingPreview": { + "description": "Common fields for a voucher buying or sending preview", + "type": "object", + "properties": { + "user": { + "description": "The user over which the operation is being previewed.", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "type": { + "description": "The voucher type.", + "allOf": [ + { + "$ref": "#/components/schemas/VoucherTypeDetailed" + } + ] + }, + "paymentPreview": { + "description": "Preview of the payment to be generated if the voucher is bought / sent.", + "allOf": [ + { + "$ref": "#/components/schemas/PaymentPreview" + } + ] + }, + "confirmationPasswordInput": { + "description": "If a confirmation password is used, contains the definitions on how to request that password from the user. This confirmation password is required when performing sensible actions. Sometimes this is dynamic, for example, the confirmation might be configured to be used only once per session, or operations like payments may have a limit per day to be without confirmation (pinless).", + "allOf": [ + { + "$ref": "#/components/schemas/PasswordInput" + } + ] + } + } + }, + "BaseVouchersDataForSearch": { + "description": "Base parameters used for searching vouchers", + "type": "object", + "properties": { + "mask": { + "description": "The input mask for voucher tokens. Optional.", + "type": "string" + }, + "types": { + "description": "The voucher types that can be used for searching", + "type": "array", + "items": { + "$ref": "#/components/schemas/VoucherType" + } + } + } + }, + "BaseVouchersQueryFilters": { + "description": "Common definitions for searching vouchers", + "allOf": [ + { + "$ref": "#/components/schemas/QueryFilters" + }, + { + "type": "object", + "properties": { + "amountRange": { + "description": "The minimum / maximum voucher amount", + "type": "array", + "items": { + "type": "string", + "format": "number" + } + }, + "creationPeriod": { + "description": "The minimum / maximum voucher creation date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "expirationPeriod": { + "description": "The minimum / maximum voucher expiration date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "token": { + "description": "The voucher token (with or without mask)", + "type": "string" + }, + "types": { + "description": "The ids or internal names of voucher types", + "type": "array", + "items": { + "type": "string" + } + }, + "statuses": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VoucherStatusEnum" + } + }, + "creationType": { + "$ref": "#/components/schemas/VoucherCreationTypeEnum" + }, + "orderBy": { + "$ref": "#/components/schemas/VoucherOrderByEnum" + } + } + } + ] + }, + "BasicAdQueryFilters": { + "description": "Basic definitions for a advertisements search", + "x-abstract": true, + "allOf": [ + { + "$ref": "#/components/schemas/FullTextWithDistanceQueryFilters" + }, + { + "type": "object", + "properties": { + "customFields": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Advertisement custom field values used as filters. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by : (colon). For example, `customFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, customFields=field1:valueA|valueB. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `customFields=tradeType:offer|search,extraDate:2000-01-01|2001-12-31` would match results whose custom field with internal name `tradeType` is either `offer` or `search`, and whose `extraDate` is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `customFields=extraDate:|2001-12-31`.\nA note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `customFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `customFields=dynamic:'business`." + }, + "category": { + "type": "string", + "description": "Either id or internal name of a category" + }, + "currency": { + "type": "string", + "description": "Either id or internal name of a currency for the price" + }, + "priceRange": { + "description": "The minumum / maximum price. Used only if a currency is specified. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "type": "array", + "items": { + "type": "string", + "format": "number" + } + }, + "productNumber": { + "type": "string", + "description": "Textual search for a product number for webshop only." + }, + "hasImages": { + "type": "boolean", + "description": "When set to `true` only advertisements with images are returned" + }, + "publicationPeriod": { + "description": "The minimum / maximum publication date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "expirationPeriod": { + "description": "The minimum / maximum expiration date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "favoriteFor": { + "type": "string", + "description": "Either id or an identification, such as login name, e-mail, etc, for the advertisement owner. The allowed identification methods are those the authenticated user can use on keywords search." + }, + "kind": { + "$ref": "#/components/schemas/AdKind" + }, + "statuses": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AdStatusEnum" + } + }, + "orderBy": { + "$ref": "#/components/schemas/AdOrderByEnum" + }, + "addressResult": { + "$ref": "#/components/schemas/AdAddressResultEnum" + } + } + } + ] + }, + "BasicFullProfileEditResult": { + "description": "Result of saving the full profile at once", + "type": "object", + "properties": { + "createdLandLinePhones": { + "description": "Identifiers of created land-line phones", + "type": "array", + "items": { + "type": "string" + } + }, + "createdMobilePhones": { + "description": "Identifiers of created mobile phones", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "BasicOperatorQueryFilters": { + "description": "Basic definitions for operators search filters", + "x-abstract": true, + "allOf": [ + { + "$ref": "#/components/schemas/QueryFilters" + }, + { + "type": "object", + "properties": { + "creationPeriod": { + "description": "The minimum / maximum user creation date. Only taken into account if searching as administrator or managing broker. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "statuses": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserStatusEnum" + } + } + } + } + ] + }, + "BasicProfileFieldInput": { + "description": "Definitions to input a basic profile field", + "type": "object", + "properties": { + "mask": { + "description": "If this field has a mask used for input, contains this mask. Currently only the account number can (optionally) have one.", + "type": "string" + }, + "example": { + "description": "If this field has an example value, holds that example", + "type": "string" + }, + "field": { + "description": "The basic field this refers to", + "allOf": [ + { + "$ref": "#/components/schemas/BasicProfileFieldEnum" + } + ] + } + } + }, + "BasicUserDataForNew": { + "description": "Contains basic data to register either a user or operator", + "allOf": [ + { + "$ref": "#/components/schemas/UserBasicData" + }, + { + "type": "object", + "properties": { + "allowSetSendActivationEmail": { + "description": "Whether the current user is allowed to skip the activateion e-mail", + "type": "boolean" + }, + "generatedUsername": { + "description": "Indicates whether the login name is generated", + "type": "boolean" + }, + "phoneConfiguration": { + "$ref": "#/components/schemas/PhoneConfigurationForUserProfile" + }, + "passwordTypes": { + "description": "The password types that should be registered together with the user", + "type": "array", + "items": { + "$ref": "#/components/schemas/PasswordTypeRegistration" + } + } + } + } + ] + }, + "BasicUserManage": { + "description": "Contains the common fields for either creating or modifying a user / operator", + "type": "object", + "x-implements": "IUser", + "x-abstract": true, + "properties": { + "name": { + "type": "string", + "description": "The user's full name" + }, + "username": { + "type": "string", + "description": "The user's login name" + }, + "email": { + "type": "string", + "description": "The user's e-mail" + }, + "customValues": { + "type": "object", + "description": "Holds the custom field values, keyed by field internal name or id. The format of the value depends on the custom field type. In order to lookup the custom fields, use either the `GET /users/data-for-new` (when creating) or `GET /users/{user}/data-for-edit` (when modifying) a user, and lookup each field by either internal name. Example: `{..., \"customValues\": {\"gender\": \"male\", \"birthDate\": \"1980-10-27\"}}`", + "additionalProperties": { + "type": "string" + } + } + } + }, + "BasicUserQueryFilters": { + "description": "Base definitions for user search filters", + "x-abstract": true, + "allOf": [ + { + "$ref": "#/components/schemas/FullTextWithDistanceQueryFilters" + }, + { + "type": "object", + "properties": { + "ignoreProfileFieldsInList": { + "type": "boolean", + "description": "When set to `true`, instead of returning users with corresponding profile fields set on list, will return them with `display`." + }, + "usersToExclude": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Indicated the users to be excluded from the result" + }, + "usersToInclude": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Indicated the users to be included in the result. Any other user not present in this list will be excluded from the result." + }, + "includeGlobal": { + "type": "boolean", + "description": "Indicates whether global administrators should be returned when searching users in a network. Only usable by global administrators." + }, + "invitedBy": { + "type": "string", + "description": "The user that has invited the returned users. Only used when searching as a manager (admin / broker)." + }, + "activationPeriod": { + "description": "The minimum / maximum user activation date. Only taken into account if searching as administrator or managing broker. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "creationPeriod": { + "description": "The minimum / maximum user creation date. Only taken into account if searching as administrator or managing broker. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "lastLoginPeriod": { + "description": "The minimum / maximum user last login date. Only taken into account if searching as administrator or managing broker. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "groups": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Either id or internal names of groups / group sets" + }, + "products": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Either id or internal names of products the users should have assigned. Ignored if the authenticated user isn't an administrator." + }, + "productsIndividuallyAssigned": { + "type": "boolean", + "description": "When set to `true`, the list specifid in `products` will only match users with those products assigned individually, not via group or group set. When set to `false` (default), the products will match any level (individual, group or group set)." + }, + "brokers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Either id or a principal (login name, e-mail, etc) for brokers" + }, + "mainBrokerOnly": { + "type": "boolean", + "description": "When set to `true`, will match only users that have the brokers as set in the `brokers` parameter as main broker." + }, + "hasBroker": { + "type": "boolean", + "description": "When set to `true`, will match only users that have at least one broker. When set to `false`, will will match only users without brokers. Ignored if the logged user isn't an admin." + }, + "acceptedAgreements": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Either id or internal names of agreements the user must have accepted. Ignored if the logged user isn't an admin or broker with permission to view the user agreement log." + }, + "notAcceptedAgreements": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Either id or internal names of agreements the user must not have accepted. Ignored if the logged user isn't an admin or broker with permission to view the user agreement log." + }, + "includeGroup": { + "type": "boolean", + "description": "When set to `true` and the logged user has permission to view user groups, will return the `group` property on users." + }, + "includeGroupSet": { + "type": "boolean", + "description": "When set to `true` and the logged user has permission to view user group sets, will return the `groupSet` property on users." + }, + "addressResult": { + "$ref": "#/components/schemas/UserAddressResultEnum" + }, + "statuses": { + "description": "The possible status of the user. If no status is given, `active` and `blocked` users are returned.", + "type": "array", + "items": { + "$ref": "#/components/schemas/UserStatusEnum" + } + } + } + } + ] + }, + "BrokerDataForAdd": { + "description": "Data for adding a new broker to a user.", + "type": "object", + "properties": { + "user": { + "description": "The user", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "brokers": { + "description": "The current user's brokers", + "type": "array", + "items": { + "$ref": "#/components/schemas/User" + } + }, + "brokerGroups": { + "description": "The broker groups that can be used when searching for the new broker", + "type": "array", + "items": { + "$ref": "#/components/schemas/Group" + } + } + } + }, + "BrokerView": { + "description": "Contains data about a brokerage relationship", + "type": "object", + "properties": { + "mainBroker": { + "type": "boolean", + "description": "Indicates whether this broker is the main or not." + }, + "since": { + "type": "string", + "format": "date-time", + "description": "Indicates when the brokerage relationship began." + }, + "broker": { + "description": "The broker user.", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + } + } + }, + "Brokering": { + "description": "A brokering relationship with a specific broker", + "type": "object", + "properties": { + "broker": { + "description": "The broker user", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "main": { + "description": "Indicates if this is the user's main broker", + "type": "boolean" + }, + "since": { + "description": "The date the brokering relation started", + "type": "string", + "format": "date-time" + } + } + }, + "BrokeringLog": { + "type": "object", + "properties": { + "broker": { + "description": "The broker", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "by": { + "description": "The user that performed the action", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "action": { + "$ref": "#/components/schemas/BrokeringActionEnum" + }, + "date": { + "description": "The action date", + "type": "string", + "format": "date-time" + } + } + }, + "BrokeringView": { + "description": "Details of a brokering relationship", + "allOf": [ + { + "$ref": "#/components/schemas/Brokering" + }, + { + "type": "object", + "properties": { + "user": { + "description": "The user", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + } + } + } + ] + }, + "BuyVoucher": { + "description": "Parameters for buying vouchers", + "allOf": [ + { + "$ref": "#/components/schemas/CreateVoucher" + }, + { + "type": "object", + "properties": { + "gift": { + "description": "Indicates whether the bought voucher(s) is(are) gift. Only used the the voucher type is configured to allow choosing whether bought vouchers are gift. Otherwise, the type defines it. The main difference between gift or not is that for gift vouchers the buyer cannot see where the voucher was used, which must be done for privacy's sake.", + "type": "boolean" + }, + "paymentCustomValues": { + "type": "object", + "description": "Holds the payment custom field values, keyed by field internal name or id. The format of the value depends on the custom field type.", + "additionalProperties": { + "type": "string" + } + }, + "customValues": { + "deprecated": true, + "x-remove-version": 4.17, + "type": "object", + "description": "Use `paymentCustomValues` instead.\n\n\nHolds the payment custom field values, keyed by field internal name or id. The format of the value depends on the custom field type.", + "additionalProperties": { + "type": "string" + } + } + } + } + ] + }, + "BuyVoucherError": { + "description": "Error when buying a voucher", + "allOf": [ + { + "$ref": "#/components/schemas/Error" + }, + { + "type": "object", + "properties": { + "currency": { + "description": "Currency reference. Only if `code` is `maxAmountForPeriod` or `maxTotalOpenAmount`", + "allOf": [ + { + "$ref": "#/components/schemas/Currency" + } + ] + }, + "amountLeftForBuying": { + "description": "Indicates the maximum amount the user can buy this time without exceeding the maximum. Only if `code` is `maxAmountForPeriod`.", + "type": "string", + "format": "number" + }, + "dateAllowedAgain": { + "description": "Indicates the date this user will be able to buy vouchers again for this type. Only if `code` is `maxAmountForPeriod`.", + "type": "string", + "format": "date-time" + }, + "currentOpenAmount": { + "description": "Indicates the current total amount that is open. Only if `code` is `maxOpenAmount` or `maxTotalOpenAmount`.", + "type": "string", + "format": "number" + }, + "maxOpenAmount": { + "description": "Indicates the maximum total open amount. Only if `code` is `maxOpenAmount` or `maxTotalOpenAmount`.", + "type": "string", + "format": "number" + }, + "paymentError": { + "description": "The `PaymentError` generated when the voucher payment was being created. Only if `code` is `payment`.", + "allOf": [ + { + "$ref": "#/components/schemas/PaymentError" + } + ] + }, + "code": { + "$ref": "#/components/schemas/BuyVoucherErrorCode" + } + } + } + ] + }, + "CaptchaInput": { + "description": "Contains all information for a CAPTCHA entry. Cyclos currently supports both internally generated CAPTCHA images and reCAPTCHA v2.", + "type": "object", + "properties": { + "provider": { + "description": "The CAPTCHA provider. Each client must implement each of the desired target integrations. For internal CAPTCHAs, see the documentation of the operations under `Captcha`. For others, please, consult the corresponding documentation.", + "allOf": [ + { + "$ref": "#/components/schemas/CaptchaProviderEnum" + } + ] + }, + "textLength": { + "description": "Indicates the expected text length for captcha responses. Only returned when `provider` is `internal`.", + "type": "integer" + }, + "recaptchaKey": { + "description": "The reCAPTCHA site key that should be used by clients to generate the CAPTCHA challenges. Only returned when `provider` is `recaptchaV2`.", + "type": "string" + } + } + }, + "CaptchaResponse": { + "description": "Data sent to the server containing the response of a user to a captcha challenge", + "type": "object", + "properties": { + "challenge": { + "type": "string", + "description": "The captcha challenge identifier" + }, + "response": { + "type": "string", + "description": "The captcha response, as informed by the user" + } + } + }, + "ChangeForgottenPassword": { + "description": "The parameters for confirming a forgotten password reset", + "type": "object", + "properties": { + "user": { + "description": "The user identification for password change", + "type": "string" + }, + "code": { + "description": "The verification code which was sent to the user", + "type": "string" + }, + "securityAnswer": { + "description": "When a security question is asked, this is the answer, and is required.", + "type": "string" + }, + "newPassword": { + "description": "The new password value. Required when the password is manual.", + "type": "string" + }, + "checkConfirmation": { + "type": "boolean", + "description": "Depending on the client, if a confirm password field is shown to users, it might be useful to check the confirmation password value on the server. This way, if there are other validation exceptions, they are all shown together. In this case, this field should be set to `true` and the `confirmationValue` should be passed in with the user input. However, in cases where clients just want to register a user with a password non interactively (like in a bulk registration), passing the password value twice is not desirable. In such cases, this field can be left empty (or set to `false`), and the `newPasswordConfirmation` will be ignored." + }, + "newPasswordConfirmation": { + "type": "string", + "description": "The new password confirmation value. Is ignored unless `checkConfirmation` is set to `true`." + }, + "sendMedium": { + "description": "Only used for generated passwords. Is the send medium to which to send the password. Normally is the same as the one to which the verification code was sent.", + "allOf": [ + { + "$ref": "#/components/schemas/SendMediumEnum" + } + ] + } + } + }, + "ChangeGroupMembershipParams": { + "description": "Parameters for changing a user / operator group", + "type": "object", + "properties": { + "group": { + "description": "The new group id or internal name", + "type": "string" + }, + "comment": { + "description": "Comments for this group change", + "type": "string" + } + } + }, + "ChangePassword": { + "description": "Contains fields used as parameters when changing a user's password", + "type": "object", + "properties": { + "oldPassword": { + "description": "The current password value. Required when the user is changing his own password. Not used when admins / brokers are changing the password of a user they manage.", + "type": "string" + }, + "newPassword": { + "description": "The new password value. Required.", + "type": "string" + }, + "checkConfirmation": { + "type": "boolean", + "description": "Depending on the client, if a confirm password field is shown to users, it might be useful to check the confirmation password value on the server. This way, if there are other validation exceptions, they are all shown together. In this case, this field should be set to `true` and the `confirmationValue` should be passed in with the user input. However, in cases where clients just want to register a user with a password non interactively (like in a bulk registration), passing the password value twice is not desirable. In such cases, this field can be left empty (or set to `false`), and the `newPasswordConfirmation` will be ignored." + }, + "newPasswordConfirmation": { + "type": "string", + "description": "The new password confirmation value. Is ignored unless `checkConfirmation` is set to `true`." + }, + "forceChange": { + "description": "Indicates whether the new password needs to be changed on the next login. Only used when admins / brokers are changing the password of a user they manage.", + "type": "boolean" + } + } + }, + "ChangePaymentRequestExpirationDate": { + "description": "Parameters for changing the payment request expiration date.", + "type": "object", + "properties": { + "comments": { + "description": "A comment the payee can set.", + "type": "string" + }, + "newExpirationDate": { + "description": "The new payment request expiration date.", + "type": "string", + "format": "date-time" + } + } + }, + "ChangeUserStatusParams": { + "description": "Parameters for changing a user status", + "type": "object", + "properties": { + "status": { + "$ref": "#/components/schemas/UserStatusEnum" + }, + "comment": { + "description": "Comments for this status change", + "type": "string" + } + } + }, + "ChangeVoucherExpirationDate": { + "description": "Parameters for changing the voucher expiration date.", + "type": "object", + "properties": { + "comments": { + "description": "A comment that can be set.", + "type": "string" + }, + "newExpirationDate": { + "description": "The new voucher expiration date.", + "type": "string", + "format": "date-time" + } + } + }, + "ChangeVoucherNotificationSettings": { + "description": "Parameters for changing voucher notification settings", + "type": "object", + "properties": { + "email": { + "description": "The new email.", + "type": "string" + }, + "mobilePhone": { + "description": "The new mobile phone number.", + "type": "string" + }, + "enableNotifications": { + "description": "Whether the notifications are enabled or not.", + "type": "boolean" + } + } + }, + "ChangeVoucherPin": { + "description": "Parameters for changing the voucher pin", + "allOf": [ + { + "$ref": "#/components/schemas/SimpleChangeVoucherPin" + }, + { + "type": "object", + "properties": { + "oldPin": { + "description": "The old pin. Will be required / used if the `VoucherView.requireOldPinForChange` flag is true.", + "type": "string" + } + } + } + ] + }, + "ClientView": { + "description": "Details on an access client", + "allOf": [ + { + "$ref": "#/components/schemas/NamedEntity" + }, + { + "type": "object", + "properties": { + "activationDate": { + "description": "The date the client was activated", + "type": "string", + "format": "date-time" + }, + "confirmationPasswordInput": { + "description": "If a confirmation password is used, contains the definitions on how to request that password from the user. This confirmation password is required when performing sensible actions. Sometimes this is dynamic, for example, the confirmation might be configured to be used only once per session, or operations like payments may have a limit per day to be without confirmation (pinless).", + "allOf": [ + { + "$ref": "#/components/schemas/PasswordInput" + } + ] + }, + "canGetActivationCode": { + "description": "Can the authenticated user get the activation code, to later activate (assign) this client?", + "type": "boolean" + }, + "canUnassign": { + "description": "Can the authenticated user unassign this client?", + "type": "boolean" + }, + "canBlock": { + "description": "Can the authenticated user block this client?", + "type": "boolean" + }, + "canUnblock": { + "description": "Can the authenticated user unblock this client?", + "type": "boolean" + }, + "status": { + "$ref": "#/components/schemas/ClientStatusEnum" + }, + "user": { + "description": "The user which owns this access client", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + } + } + } + ] + }, + "ConflictError": { + "description": "Error returned when there was a conflict with some expected status vs the actual database status", + "type": "object", + "properties": { + "code": { + "$ref": "#/components/schemas/ConflictErrorCode" + } + } + }, + "Contact": { + "description": "A contact is a relation between 2 users: the contact owner and the contact user. It can also contain custom fields.", + "allOf": [ + { + "$ref": "#/components/schemas/Entity" + }, + { + "type": "object", + "properties": { + "contact": { + "description": "The contact user (not the contact owner)", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + } + } + } + ] + }, + "ContactBasicData": { + "description": "Contains data shared by both ContactDataForNew and ContactDataForEdit", + "type": "object", + "properties": { + "customFields": { + "description": "The contact custom fields. For contact creation it will contains only the editable fields. Otherwise the visible ones.", + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldDetailed" + } + }, + "contactUser": { + "description": "The contact user details", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "user": { + "description": "The user which owns the contact", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + } + } + }, + "ContactDataForEdit": { + "description": "Contains data for editing an existing contact", + "allOf": [ + { + "$ref": "#/components/schemas/ContactBasicData" + }, + { + "type": "object", + "properties": { + "editableFields": { + "description": "The internal names of custom fields that can be edited", + "type": "array", + "items": { + "type": "string" + } + }, + "contact": { + "description": "The contact that is being edited. This value can be modified and sent back to `PUT /contact/{id}`", + "allOf": [ + { + "$ref": "#/components/schemas/ContactEdit" + } + ] + }, + "binaryValues": { + "description": "Holds the current values for file / image custom fields as lists of `StoredFile`s / `Image`s.", + "allOf": [ + { + "$ref": "#/components/schemas/CustomFieldBinaryValues" + } + ] + } + } + } + ] + }, + "ContactDataForNew": { + "description": "Contains data for creating a new contact", + "allOf": [ + { + "$ref": "#/components/schemas/ContactBasicData" + }, + { + "type": "object", + "properties": { + "contact": { + "description": "The contact populated with the default fields. This value can be modified and sent back to `POST /{owner}/contacts/{contactUser}`.", + "allOf": [ + { + "$ref": "#/components/schemas/ContactNew" + } + ] + } + } + } + ] + }, + "ContactEdit": { + "description": "Parameters for editing an existing contact", + "allOf": [ + { + "$ref": "#/components/schemas/ContactManage" + }, + { + "type": "object", + "properties": { + "version": { + "type": "integer", + "description": "The version stamp for the current object, used for optimistic locking. When saving, the same version as previously received needs to be passed back. If no one else has saved the object, the version will match and the object will be updated. However, if someone other has saved the object, the version will no longer match, and an error will be raised. This is used to prevent multiple users (or processes) from updating the same object and unwilingly overridding the property values, leading to data loss." + } + } + } + ] + }, + "ContactInfo": { + "description": "An additional contact information reference", + "x-implements": "IContactInfo, INormalizedPhones", + "allOf": [ + { + "$ref": "#/components/schemas/NamedEntity" + }, + { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "The e-mail for this additional contact information" + }, + "mobilePhone": { + "type": "string", + "description": "The formatted mobile phone for this additional contact information" + }, + "landLinePhone": { + "type": "string", + "description": "The formatted landline phone for this additional contact information" + }, + "landLineExtension": { + "type": "string", + "description": "The landline phone extension for this additional contact information" + }, + "normalizedMobilePhone": { + "type": "string", + "description": "The mobile phone, normalized to the E.164 format" + }, + "normalizedLandLinePhone": { + "type": "string", + "description": "The land-line phone, normalized to the E.164 format" + }, + "address": { + "$ref": "#/components/schemas/Address" + }, + "image": { + "$ref": "#/components/schemas/Image" + } + } + } + ] + }, + "ContactInfoBasicData": { + "description": "Contains data shared by both ContactInfoDataForNew and ContactInfoDataForEdit", + "type": "object", + "properties": { + "customFields": { + "description": "The additional contact information custom fields", + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldDetailed" + } + }, + "addresses": { + "description": "The available user addresses, which can be referenced by id", + "type": "array", + "items": { + "$ref": "#/components/schemas/Address" + } + }, + "phoneConfiguration": { + "$ref": "#/components/schemas/PhoneConfiguration" + }, + "user": { + "description": "The user which owns the contact info", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "confirmationPasswordInput": { + "description": "If a confirmation password is used, contains the definitions on how to request that password from the user. This confirmation password is required when performing sensible actions. Sometimes this is dynamic, for example, the confirmation might be configured to be used only once per session, or operations like payments may have a limit per day to be without confirmation (pinless).", + "allOf": [ + { + "$ref": "#/components/schemas/PasswordInput" + } + ] + } + } + }, + "ContactInfoBinaryValuesForUserProfile": { + "description": "Holds the current additional contact image and binary field values", + "allOf": [ + { + "$ref": "#/components/schemas/CustomFieldBinaryValues" + }, + { + "type": "object", + "properties": { + "image": { + "$ref": "#/components/schemas/Image" + } + } + } + ] + }, + "ContactInfoConfigurationForUserProfile": { + "description": "User additional contacts data sent when editing the full profile", + "type": "object", + "properties": { + "contactInfo": { + "description": "Contains the default values for a new additional contact", + "allOf": [ + { + "$ref": "#/components/schemas/ContactInfoNew" + } + ] + }, + "customFields": { + "description": "The custom fields for additional contact informations", + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldDetailed" + } + }, + "edit": { + "type": "boolean", + "description": "Can the authenticated user edit additional contacts?" + }, + "managePrivacy": { + "type": "boolean", + "description": "Can the authenticated user manage the privacy of additional contacts?" + }, + "maxContactInfos": { + "type": "integer", + "description": "The maximum number of additional contacts the user can own" + }, + "availability": { + "$ref": "#/components/schemas/AvailabilityEnum" + } + } + }, + "ContactInfoDataForEdit": { + "description": "Contains data for editing an existing additional contact information", + "allOf": [ + { + "$ref": "#/components/schemas/ContactInfoBasicData" + }, + { + "type": "object", + "properties": { + "contactInfo": { + "description": "The additional contact information that is being edited. This value can be modified and sent back on `PUT /contactInfos/{id}`.", + "allOf": [ + { + "$ref": "#/components/schemas/ContactInfoEdit" + } + ] + }, + "canEdit": { + "type": "boolean", + "description": "Indicates whether the current contact info can be edited by the currently authenticated used." + }, + "canRemove": { + "type": "boolean", + "description": "Indicates whether the current contact info can be removed by the currently authenticated used." + }, + "image": { + "$ref": "#/components/schemas/Image" + }, + "binaryValues": { + "description": "Holds the current values for file / image custom fields as lists of `StoredFile`s / `Image`s.", + "allOf": [ + { + "$ref": "#/components/schemas/CustomFieldBinaryValues" + } + ] + } + } + } + ] + }, + "ContactInfoDataForNew": { + "description": "Contains data for creating a new additional contact information", + "allOf": [ + { + "$ref": "#/components/schemas/ContactInfoBasicData" + }, + { + "type": "object", + "properties": { + "contactInfo": { + "description": "The additional contact information populated with the default fields. This value can be modified and sent back on `POST /{user}/contactInfos`.", + "allOf": [ + { + "$ref": "#/components/schemas/ContactInfoNew" + } + ] + } + } + } + ] + }, + "ContactInfoDetailed": { + "description": "Contains extra details of an additional contact information", + "allOf": [ + { + "$ref": "#/components/schemas/ContactInfo" + }, + { + "type": "object", + "properties": { + "customValues": { + "description": "The list of custom field values on this additional contact information", + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldValue" + } + }, + "operations": { + "description": "The list of custom operations the logged user can run over this additional contact information", + "type": "array", + "items": { + "$ref": "#/components/schemas/Operation" + } + } + } + } + ] + }, + "ContactInfoEdit": { + "description": "Fields for editing an additional contact information", + "allOf": [ + { + "$ref": "#/components/schemas/ContactInfoManage" + }, + { + "type": "object", + "properties": { + "version": { + "type": "integer", + "description": "The version stamp for the current object, used for optimistic locking. When saving, the same version as previously received needs to be passed back. If no one else has saved the object, the version will match and the object will be updated. However, if someone other has saved the object, the version will no longer match, and an error will be raised. This is used to prevent multiple users (or processes) from updating the same object and unwilingly overridding the property values, leading to data loss." + } + } + } + ] + }, + "ContactInfoEditWithId": { + "description": "Parameters for editing an existing additional contact", + "allOf": [ + { + "$ref": "#/components/schemas/ContactInfoEdit" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The internal entity identifier" + } + } + } + ] + }, + "ContactInfoManage": { + "description": "Common fields for either creating or editing an additional contact information", + "type": "object", + "x-implements": "IContactInfo", + "x-abstract": true, + "properties": { + "name": { + "type": "string", + "description": "The address name" + }, + "email": { + "type": "string", + "description": "The e-mail for this additional contact information" + }, + "mobilePhone": { + "type": "string", + "description": "The formatted mobile phone for this additional contact information" + }, + "landLinePhone": { + "type": "string", + "description": "The formatted landline phone for this additional contact information" + }, + "landLineExtension": { + "type": "string", + "description": "The landline phone extension for this additional contact information" + }, + "image": { + "type": "string", + "description": "The identifier of either an uploaded temporary image, or an existing additional contact image." + }, + "address": { + "type": "string", + "description": "The identifier for the user address to be used as address of this additional contact information" + }, + "hidden": { + "type": "boolean", + "description": "Whether this additional contact information should be hidden for other users" + }, + "customValues": { + "type": "object", + "description": "Holds the custom field values, keyed by field internal name or id. The format of the value depends on the custom field type. Example: `{..., \"customValues\": {\"gender\": \"male\", \"birthDate\": \"1980-10-27\"}}`", + "additionalProperties": { + "type": "string" + } + } + } + }, + "ContactInfoNew": { + "description": "Fields for a new additional contact information", + "allOf": [ + { + "$ref": "#/components/schemas/ContactInfoManage" + } + ] + }, + "ContactInfoResult": { + "description": "An additional contact information as a result item", + "allOf": [ + { + "$ref": "#/components/schemas/ContactInfo" + }, + { + "type": "object", + "properties": { + "hidden": { + "type": "boolean", + "description": "Indicates whether this additional contact information is hidden for other users." + }, + "customValues": { + "type": "object", + "description": "Holds the values for custom fields, keyed by field internal name or id. The format of the value depends on the custom field type. Example: `{..., \"customValues\": {\"gender\": \"male\", \"birthDate\": \"1980-10-27\"}}`", + "additionalProperties": { + "type": "string" + } + } + } + } + ] + }, + "ContactInfoView": { + "description": "Contains details of an additional contact information", + "allOf": [ + { + "$ref": "#/components/schemas/ContactInfoDetailed" + }, + { + "type": "object", + "properties": { + "user": { + "description": "The user which owns this additional contact information", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "canEdit": { + "type": "boolean", + "description": "Indicates whether the logged user can remove / edit this additional contact information" + }, + "hidden": { + "type": "boolean", + "description": "Indicates whether this additional contact information should be hidden for other users" + } + } + } + ] + }, + "ContactListDataForSearch": { + "description": "Data for searching an user's contact list", + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/User" + }, + "allowKeywords": { + "description": "Indicates whether using keywords is allowed", + "type": "boolean" + }, + "customFields": { + "description": "The list of contact custom fields that are either to be used as search filter (if its internal name is present on `fieldsInSearch`) and / or in the result list (if its internal name is present on `fieldsInList`)", + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldDetailed" + } + }, + "fieldsInSearch": { + "description": "The internal names of the contact custom fields that should be used as search filters (separated fields, not keywords)", + "type": "array", + "items": { + "type": "string" + } + }, + "fieldsInList": { + "description": "The internal names of the contact custom fields that will be returned together with each record, and should be shown in the result list", + "type": "array", + "items": { + "type": "string" + } + }, + "query": { + "description": "Default query filters for searching records", + "allOf": [ + { + "$ref": "#/components/schemas/ContactListQueryFilters" + } + ] + }, + "hasVisibleFields": { + "description": "This flag can be used to know whether selecting a contact in the contact list should show direclty the user profile or a contact details page to show additional custom fields.", + "type": "boolean" + }, + "hasEditableFields": { + "description": "This flag can be used to know whether the contact should be added directly to the user's contact list or a page should be shown for the user to fill in the contact custom fields.", + "type": "boolean" + }, + "addressFieldsInSearch": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AddressQueryFieldEnum" + } + } + } + }, + "ContactListQueryFilters": { + "description": "Search filters for an user's contact list", + "allOf": [ + { + "$ref": "#/components/schemas/QueryFilters" + }, + { + "type": "object", + "properties": { + "keywords": { + "type": "string", + "description": "Textual search keywords. Sometimes, like in user search, the fields matched depends on what is configured on the products." + }, + "customFields": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Concat custom field values used as filters. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by : (colon). For example, `customFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, customFields=field1:valueA|valueB. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `customFields=tradeType:offer|search,extraDate:2000-01-01|2001-12-31` would match results whose custom field with internal name `tradeType` is either `offer` or `search`, and whose `extraDate` is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `customValues=extraDate:|2001-12-31`." + }, + "orderBy": { + "$ref": "#/components/schemas/ContactOrderByEnum" + }, + "usersToExclude": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Indicated the users to be excluded from the result" + } + } + } + ] + }, + "ContactManage": { + "description": "Common fields for either creating or editing a contact", + "type": "object", + "x-abstract": true, + "properties": { + "customValues": { + "type": "object", + "description": "Holds the custom field values, keyed by field internal name or id. The format of the value depends on the custom field type. Example: `{..., \"customValues\": {\"gender\": \"male\", \"birthDate\": \"1980-10-27\"}}`", + "additionalProperties": { + "type": "string" + } + } + } + }, + "ContactNew": { + "description": "Parameters for creating a new contact", + "allOf": [ + { + "$ref": "#/components/schemas/ContactManage" + }, + { + "type": "object", + "properties": { + "contact": { + "description": "The user which is the contact of a given owner. Can be either the id or another identifier, such as login name or e-mail, depending on the Cyclos configuration.", + "type": "string" + } + } + } + ] + }, + "ContactResult": { + "description": "Contains data returned when searching for an user's contact list", + "allOf": [ + { + "$ref": "#/components/schemas/Contact" + }, + { + "type": "object", + "properties": { + "customValues": { + "type": "object", + "description": "Holds the values for contact custom fields which are set to be returned on list, keyed by field internal name", + "additionalProperties": { + "type": "string" + } + } + } + } + ] + }, + "ContactView": { + "description": "Detailed information when viewing a contact", + "allOf": [ + { + "$ref": "#/components/schemas/Contact" + }, + { + "type": "object", + "properties": { + "user": { + "description": "The user which owns this contact", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "customValues": { + "description": "The list of custom field values this contact has", + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldValue" + } + }, + "canEdit": { + "description": "Can the authenticated user edit this contact?", + "type": "boolean" + }, + "operations": { + "description": "List of runnable custom operations.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Operation" + } + } + } + } + ] + }, + "ContactsPermissions": { + "description": "Permissions over contacts", + "type": "object", + "properties": { + "enable": { + "description": "Permission to own a contact list.", + "type": "boolean" + }, + "hasVisibleFields": { + "description": "Permission to view contacts custom fields.", + "type": "boolean" + }, + "hasEditableFields": { + "description": "Permission to manage contacts custom fields.", + "type": "boolean" + } + } + }, + "ContactsQueryFilters": { + "description": "Search filters for users that are contacts, not contacts themselves", + "allOf": [ + { + "$ref": "#/components/schemas/FullTextQueryFilters" + }, + { + "type": "object", + "properties": { + "ignoreProfileFieldsInList": { + "type": "boolean", + "description": "When set to `true`, instead of returning users with corresponding profile fields set on list, will return them with `display`." + }, + "includeGroup": { + "type": "boolean", + "description": "When set to `true` and the logged user has permission to view user groups, will return the `group` property on users." + }, + "includeGroupSet": { + "type": "boolean", + "description": "When set to `true` and the logged user has permission to view user group sets, will return the `groupSet` property on users." + } + } + } + ] + }, + "Country": { + "description": "Represents a country, with a code and display name", + "type": "object", + "properties": { + "code": { + "description": "The 2-letter, `ISO 3166-1 alpha-2` code", + "type": "string" + }, + "name": { + "description": "The display name (in the user's language)", + "type": "string" + } + } + }, + "CreateClientParams": { + "description": "Paremeters for client creation", + "type": "object", + "properties": { + "code": { + "description": "Required. The activation code. Must match the activation code that was sent through [POST] `/clients/send-activaction-code` for the authenticated user.", + "type": "string" + }, + "name": { + "description": "Optional. The name for the client. If not given, then the name will be generated server-side using the UserAgent's device name. In any case, if the name already exists it will be suffixed with '_1', '_2' and so on.", + "type": "string" + }, + "prefix": { + "description": "Optional. A prefix to be added to the generated access client token. Can be used to increase the size of the generated token, and to increase the security on clients that have to store the token. This can be accomplished by using some sort of client application hash or identifier, which should be stable. The prefix is not returned by this method. When later passing in the full token, the prefix should prepend the returned token without any separator.", + "type": "string" + } + } + }, + "CreateDeviceConfirmation": { + "description": "Contains data for create a pending device confirmation.", + "type": "object", + "properties": { + "from": { + "type": "string", + "description": "The payment account owner. Can be one of:\n\n- a user identification value, such as id, username, e-mail, phone, etc.\n Id is always allowed, others depend on Cyclos configuration. Note that\n a valid numeric value is always considered as id. For example, when\n using another identification method that can be numeric only, prefix\n the value with a single quote (like in Excel spreadsheets);\n\n- `self` for the currently authenticated user;\n- `system` for the owner of system accounts.\n\nRequired only if type is `performPayment` or `performExternalPayment`." + }, + "to": { + "type": "string", + "description": "Same as `from` but for the receiver. Required only if type is `performPayment`." + }, + "toPrincipal": { + "type": "string", + "description": "The receiver of the external payment (email or mobile number). Required only if type is `performExternalPayment`." + }, + "paymentType": { + "type": "string", + "description": "The payment type id or qualified internal name (in the form `fromAccountType.paymentType`). Required only if type is `performPayment`, `performExternalPayment`, `shoppingCartCheckout` or `importUserPayments`." + }, + "amount": { + "type": "string", + "format": "number", + "description": "The amount involved in the confirmation, its meaning depends on the type. Required only if type is `performPayment`, `performExternalPayment`, `shoppingCartCheckout`, `generateVouchers` or `buyVouchers`." + }, + "transaction": { + "type": "string", + "description": "Either the id or number of the transaction (or ticket number if type is `approveTicket`). Required only if type is `manageAuthorization`, `manageExternalPayment`, `manageScheduledPayment`, `manageRecurringPayment`, `managePaymentRequest` or `approveTicket`." + }, + "transfer": { + "type": "string", + "description": "Either the id or number of the transfer. Required only if type is `chargeback`." + }, + "account": { + "type": "string", + "description": "Either the id or number of the user account. Required only if type is `changeAccountLimits`." + }, + "installment": { + "type": "string", + "description": "The id of a scheduled payment installment. Required only if type is `manageInstallment`." + }, + "failedOccurrence": { + "type": "string", + "description": "The id of a recurring payment failed occurrence. Required only if type is `manageFailedOccurrence`." + }, + "client": { + "type": "string", + "description": "The access client id or token. Required only if type is `clientAction`." + }, + "name": { + "type": "string", + "description": "The entity's name for which this confirmation is created for. Required only if type is either `manageAddress`, `managePhone` or `manageContactInfo`." + }, + "type": { + "$ref": "#/components/schemas/DeviceConfirmationTypeEnum" + }, + "externalPaymentAction": { + "description": "The action being applied to the external payment. Required only if type is `manageExternalPayment`.", + "allOf": [ + { + "$ref": "#/components/schemas/ExternalPaymentActionEnum" + } + ] + }, + "scheduledPaymentAction": { + "description": "The action being applied to the scheduled payment. Required only if type is `manageScheduledPayment`.", + "allOf": [ + { + "$ref": "#/components/schemas/ScheduledPaymentActionEnum" + } + ] + }, + "recurringPaymentAction": { + "description": "The action being applied to the recurring payment. Required only if type is `manageRecurringPayment`.", + "allOf": [ + { + "$ref": "#/components/schemas/RecurringPaymentActionEnum" + } + ] + }, + "installmentAction": { + "description": "The action being applied to the scheduled payment installment. Required only if type is `manageInstallment`.", + "allOf": [ + { + "$ref": "#/components/schemas/InstallmentActionEnum" + } + ] + }, + "failedOccurrenceAction": { + "description": "The action being applied to the recurring payment failed occurrence. Required only if type is `manageFailedOccurrence`.", + "allOf": [ + { + "$ref": "#/components/schemas/FailedOccurrenceActionEnum" + } + ] + }, + "authorizationAction": { + "description": "The action being applied to the payment authorization. Required only if type is `manageAuthorization`.", + "allOf": [ + { + "$ref": "#/components/schemas/AuthorizationActionEnum" + } + ] + }, + "paymentRequestAction": { + "description": "The action being applied to the payment request. Required only if type is `managePaymentRequest`.", + "allOf": [ + { + "$ref": "#/components/schemas/PaymentRequestActionEnum" + } + ] + }, + "clientAction": { + "description": "The action being applied to the access client. Required only if type is `clientAction`.", + "allOf": [ + { + "$ref": "#/components/schemas/ClientActionEnum" + } + ] + }, + "operation": { + "type": "string", + "description": "Either the id or internal name of the custom operation being executed. Required only if type is `runOperation`." + }, + "passwordType": { + "type": "string", + "description": "Either the id or internal name of the password type being e generatated. Required only if type is `generatePassword`." + }, + "seller": { + "type": "string", + "description": "The order seller. Can be one a user identification value, such as id, username, e-mail, phone, etc. Id is always allowed, others depend on Cyclos configuration. Note that a valid numeric value is always considered as id. For example, when using another identification method that can be numeric only, prefix the value with a single quote (like in Excel spreadsheets); Required only if type is `shoppingCartCheckout`." + }, + "order": { + "type": "string", + "description": "Either the id or number of an webshop order. Required only if type is `acceptOrder`." + }, + "recordType": { + "type": "string", + "description": "Either the id or internal name of a record type. Required only if type is `manageRecord`." + }, + "voucher": { + "type": "string", + "description": "The voucher id or token. Required only if type is `manageVoucher`." + }, + "voucherAction": { + "description": "The action being applied to the voucher. Required only if type is `manageVoucher`.", + "allOf": [ + { + "$ref": "#/components/schemas/VoucherActionEnum" + } + ] + }, + "voucherType": { + "type": "string", + "description": "Either the id or internal name of a voucher type. Required only if type is `generateVouchers`, `buyVouchers`, `sendVoucher` or `importUserSendVouchers`." + }, + "numberOfVouchers": { + "type": "integer", + "description": "The number of vouchers to be generated. Required only if type is `generateVouchers` or `buyVouchers`." + }, + "email": { + "type": "string", + "description": "The e-mail to which the voucher will be sent. Required only if type is `sendVoucher`." + }, + "deviceId": { + "type": "string", + "description": "The id of a device. Required only if type is `manageDevice`." + }, + "deviceAction": { + "description": "The action being applied to the device. Required only if type is `manageDevice`.", + "allOf": [ + { + "$ref": "#/components/schemas/DeviceActionEnum" + } + ] + } + } + }, + "CreateDevicePin": { + "description": "Contains data for create a new PIN or modify an existing one for the authenticated user.", + "type": "object", + "properties": { + "name": { + "description": "The device pin's name. This name will be shown when listing the pins of a user to identify the device for which this pin was defined. It's ignored if already authenticated with a PIN or if a valid `deviceId` was given.", + "type": "string" + }, + "pin": { + "description": "The PIN value", + "type": "string" + }, + "pinConfirmation": { + "description": "The PIN confirmation value. Is ignored unless `checkConfirmation` is set to `true`.", + "type": "string" + }, + "checkConfirmation": { + "description": "Depending on the client, if a confirm pin field is shown to users, it might be useful to check the confirmation pin value on the server. This way, if there are other validation exceptions, they are all shown together. In this case, this flag should be set to `true` and the `pinConfirmation` should be passed in with the user input. Otherwise, if a confirm field is not shown then this flag can be left empty (or set to `false`), and the `pinConfirmation` will be ignored.", + "type": "boolean" + }, + "currentPin": { + "description": "The current PIN value. The action must be confirmed with at least the current pin or the current login password but not both.", + "type": "string" + }, + "currentPassword": { + "description": "The current login password. The action must be confirmed with at least the current login password or the current pin but not both.", + "type": "string" + }, + "pinLocator": { + "description": "The principal or id of the device PIN. Only required if the pin is not being created. In case the login was performed using a pin or the session is already associated to a pin this locator will be ignored and the associated pin will be modified.", + "type": "string" + }, + "pinCreationToken": { + "description": "In case of pin creation the action must be confirmed with at least the current login password or this token. This token was obtained from `GET /auth/session` after a succesfull login (only returned if the login was not performed using a pin). In case the login was performed using a pin or the session is already associated to a pin this token will be ignored and the `currentPin` or `currentPassword` must be given to validate the action.", + "type": "string" + }, + "deviceId": { + "description": "Trusted device identification. If given then the `name` will be ignored and the pin's name will be copied from the device's name. This is necessary to get in sync when a pin is defined for an already trusted device.", + "type": "string" + } + } + }, + "CreateDevicePinResult": { + "description": "Contains data about the created PIN.", + "type": "object", + "properties": { + "pin": { + "$ref": "#/components/schemas/DevicePinView" + }, + "principal": { + "description": "The (randomly generated) unique principal that must be stored in the device and must be sent when the user choose to login with PIN.", + "type": "string" + }, + "salt": { + "description": "The (randomly generated) unique salt that must be stored in the device and must be prepended to the entered PIN value before send when the user choose to login with PIN.", + "type": "string" + } + } + }, + "CreateVoucher": { + "description": "Parameters for create vouchers", + "type": "object", + "properties": { + "count": { + "description": "The number of vouchers to create. Defaults to 1.", + "type": "integer" + }, + "amount": { + "description": "The amount per voucher. Required, except when is a generation of vouchers using a voucher type that specifies the generated vouchers amount to always be dynamic, that is, depends on top-ups.", + "type": "string", + "format": "number" + }, + "type": { + "description": "Required voucher type `id` or `internalName`.", + "type": "string" + }, + "voucherCustomValues": { + "type": "object", + "description": "Holds the custom field values, keyed by field internal name or id. The format of the value depends on the custom field type. Example: `{..., \"customValues\": {\"gender\": \"male\", \"birthDate\": \"1980-10-27\"}}`", + "additionalProperties": { + "type": "string" + } + } + } + }, + "Currency": { + "description": "Reference to a currency", + "allOf": [ + { + "$ref": "#/components/schemas/InternalNamedEntity" + }, + { + "type": "object", + "properties": { + "symbol": { + "description": "The currency symbol", + "type": "string" + }, + "prefix": { + "description": "The currency prefix when formatting numbers", + "type": "string" + }, + "suffix": { + "description": "The currency suffix when formatting numbers", + "type": "string" + }, + "transactionNumberPattern": { + "description": "If transaction number is enabled for this currency, contains the pattern which is expected, in case of rendering a field for users to type in a transaction number", + "type": "string" + }, + "decimalDigits": { + "description": "The number of decimal digits used by this currency", + "type": "integer" + } + } + } + ] + }, + "CurrencyAmountSummary": { + "description": "Contains summarized statistics over amounts of a currency", + "allOf": [ + { + "$ref": "#/components/schemas/AmountSummary" + }, + { + "type": "object", + "properties": { + "currency": { + "$ref": "#/components/schemas/Currency" + } + } + } + ] + }, + "CustomField": { + "description": "Contains reference to a custom field", + "allOf": [ + { + "$ref": "#/components/schemas/InternalNamedEntity" + }, + { + "type": "object", + "properties": { + "decimalDigits": { + "type": "integer", + "description": "The number of decimal digits. Only available if `type` is `decimal`." + }, + "type": { + "$ref": "#/components/schemas/CustomFieldTypeEnum" + }, + "linkedEntityType": { + "$ref": "#/components/schemas/LinkedEntityTypeEnum" + }, + "control": { + "$ref": "#/components/schemas/CustomFieldControlEnum" + }, + "kind": { + "$ref": "#/components/schemas/CustomFieldKind" + } + } + } + ] + }, + "CustomFieldBinaryValues": { + "description": "Holds the values for uploaded files / images which are used as custom field values", + "type": "object", + "properties": { + "fileValues": { + "description": "The values for custom fields of type `file`", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StoredFile" + } + } + }, + "imageValues": { + "description": "The values for custom fields of type `image`", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Image" + } + } + } + } + }, + "CustomFieldDetailed": { + "description": "Contains all information needed to render a widget for a custom field value", + "allOf": [ + { + "$ref": "#/components/schemas/CustomField" + }, + { + "type": "object", + "properties": { + "informationText": { + "description": "Additional text that can be shown to the user as a hint of this field", + "type": "string" + }, + "pattern": { + "description": "The (optional) mask to be applied to string values", + "type": "string" + }, + "required": { + "description": "Indicates whether this field is required", + "type": "boolean" + }, + "size": { + "description": "The suggested size for the rendered widget", + "allOf": [ + { + "$ref": "#/components/schemas/CustomFieldSizeEnum" + } + ] + }, + "allSelectedLabel": { + "description": "The label to be shown when all values are selected for a multi selection field.", + "type": "string" + }, + "defaultValue": { + "description": "The value that should be suggested as default. For multi selection will be a comma-separated string with possible values ids or internal names.", + "type": "string" + }, + "possibleValueCategories": { + "description": "Only applicable when the custom field is enumerated (single or multi select). Contains the possible value categories.", + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityReference" + } + }, + "hasValuesList": { + "description": "Returns whether this custom field has a list of possible values, according to its type.", + "type": "boolean" + }, + "possibleValues": { + "description": "Only applicable when the custom field is enumerated (single or multi selection). Contains the possible values for selection. Each value may or may not have a category. When they have, it will be a string pointing to the internal name (if available) or id of the possible value category, which can be looked up in the categories property.", + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldPossibleValue" + } + }, + "dynamicValues": { + "description": "Only applicable when the custom field is dynamic selection. Contains the script-generated possible values.", + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldDynamicValue" + } + }, + "stringValues": { + "description": "Only applicable when the custom field type is `string` and `hasValuesList` is `true`. Contains the possible string values.", + "type": "array", + "items": { + "type": "string" + } + }, + "dateValues": { + "description": "Only applicable when the custom field type is `date` and `hasValuesList` is `true`. Contains the possible date values.", + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "integerValues": { + "description": "Only applicable when the custom field type is `integer` and `hasValuesList` is `true`. Contains the possible integer values.", + "type": "array", + "items": { + "type": "integer" + } + }, + "decimalValues": { + "description": "Only applicable when the custom field type is `decimal` and `hasValuesList` is `true`. Contains the possible decimal values.", + "type": "array", + "items": { + "type": "string", + "format": "number" + } + }, + "adValues": { + "description": "Only applicable when the custom field is linked entity of type `advertisement` and `hasValuesList` is `true`. Contains the possible advertisements.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Ad" + } + }, + "transactionValues": { + "description": "Only applicable when the custom field is linked entity of type `transaction` and `hasValuesList` is `true`. Contains the possible transactions.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Transaction" + } + }, + "transferValues": { + "description": "Only applicable when the custom field is linked entity of type `transfer` and `hasValuesList` is `true`. Contains the possible transfers.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Transfer" + } + }, + "recordValues": { + "description": "Only applicable when the custom field is linked entity of type `record` and `hasValuesList` is `true`. Contains the possible records.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + }, + "userValues": { + "description": "Only applicable when the custom field is linked entity of type `user` and `hasValuesList` is `true`. Contains the possible users.", + "type": "array", + "items": { + "$ref": "#/components/schemas/User" + } + }, + "maxFiles": { + "description": "Only applicable when the custom field type is `file` or `image`. The maximun files that can be uploaded.", + "type": "integer" + }, + "mimeTypes": { + "description": "The allowed mime types for binary custom fields. Only applicable when the custom field type is either `file` or `image`.", + "type": "array", + "items": { + "type": "string" + } + }, + "showQrCodeScan": { + "description": "Only applicable when the custom field type is `string`. Indicates whether this field should support QR-code scan.", + "type": "boolean" + }, + "automaticallyProcessAfterScan": { + "description": "Only applicable when the custom field type is `string` and the `allowQRCodeScan` is true. Indicates whether the form where is used this field should submit automatically after a successful QR-code scan.", + "type": "boolean" + } + } + } + ] + }, + "CustomFieldDynamicValue": { + "description": "Represents a single possible value of a dynamic custom field", + "type": "object", + "properties": { + "value": { + "description": "The internal value", + "type": "string" + }, + "label": { + "description": "The display label", + "type": "string" + }, + "defaultValue": { + "description": "The value that should be suggested as default.", + "type": "boolean" + } + } + }, + "CustomFieldPossibleValue": { + "description": "Represents a single possible value of an enumerated (single or multi selection) custom field", + "allOf": [ + { + "$ref": "#/components/schemas/Entity" + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "The display value" + }, + "default": { + "type": "boolean", + "description": "Indicates if this possible value is the default one." + }, + "internalName": { + "type": "string", + "description": "The entity internal name, which can be seen as an extra identifier" + }, + "category": { + "description": "The internal name (if available) or id of the possible value category. Optional, and never used if custom field type is dynamic selection.", + "allOf": [ + { + "$ref": "#/components/schemas/EntityReference" + } + ] + } + } + } + ] + }, + "CustomFieldValue": { + "description": "See the description on `BaseCustomFieldValue`", + "allOf": [ + { + "$ref": "#/components/schemas/BaseCustomFieldValue" + }, + { + "type": "object", + "properties": { + "field": { + "description": "The custom field reference", + "allOf": [ + { + "$ref": "#/components/schemas/CustomField" + } + ] + } + } + } + ] + }, + "DataForAccountHistory": { + "description": "Contains data used to search the history of a given account", + "allOf": [ + { + "$ref": "#/components/schemas/BaseTransferDataForSearch" + }, + { + "type": "object", + "properties": { + "account": { + "$ref": "#/components/schemas/AccountWithOwnerAndCurrency" + }, + "accessClients": { + "description": "References for access clients which can be used to filter entries by transfers generated by a specific access client", + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityReference" + } + }, + "operators": { + "description": "References for operators, which can be used to filter entries by transfers performed or received by that specific operator", + "type": "array", + "items": { + "$ref": "#/components/schemas/User" + } + }, + "transactionNumberMask": { + "description": "If a transaction number is used for this account, is a pattern that represent it.", + "type": "string" + }, + "canFilterByDirection": { + "description": "Whether the current user can use the direction filter by direction. In some cases, such as restricted operators that can only see incoming or outgoing payments, this flag will be `false`.", + "type": "boolean" + }, + "showDescriptionInFilters": { + "description": "Whether to show the description as filter or not", + "type": "boolean" + }, + "showDescriptionInList": { + "description": "Whether to show the description in the result list or not", + "type": "boolean" + }, + "query": { + "description": "Default query filters for the account history", + "allOf": [ + { + "$ref": "#/components/schemas/AccountHistoryQueryFilters" + } + ] + } + } + } + ] + }, + "DataForBalanceLimitsSearch": { + "description": "Configuration data for searching a account balance limits.", + "type": "object", + "properties": { + "groups": { + "description": "The groups the authenticated user can use to filter.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Group" + } + }, + "accountTypes": { + "description": "The account types that can be used to filter.", + "type": "array", + "items": { + "$ref": "#/components/schemas/AccountType" + } + }, + "exportFormats": { + "description": "The formats which the search results can be exported.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExportFormat" + } + } + } + }, + "DataForChangeForgottenPassword": { + "description": "Definitions for a user to confirm a forgotten password request, after the verification code was successfully verified.", + "type": "object", + "properties": { + "user": { + "description": "The user which is having the password changed", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "passwordType": { + "description": "The password type which is being changed", + "allOf": [ + { + "$ref": "#/components/schemas/PasswordTypeDetailed" + } + ] + }, + "securityQuestion": { + "description": "If configured in Cyclos will be the security question that needs to be answered in order to complete the forgotten password reset request. If required and the user hasn't set the security answher, the user won't be able to use the forgot password functionality.", + "type": "string" + }, + "principals": { + "description": "The list of user identifications (principals) which can be used in the current channel", + "type": "array", + "items": { + "$ref": "#/components/schemas/UserRegistrationPrincipal" + } + } + } + }, + "DataForClientActivation": { + "description": "Data for activate a new access client", + "type": "object", + "properties": { + "types": { + "description": "The list of enabled access client types for the authenticated user.", + "type": "array", + "items": { + "$ref": "#/components/schemas/UserClientTypePermissions" + } + }, + "dataForSendingOtp": { + "description": "Data for sending an OTP to verify the identity of the authenticated user via a verification code before activating the access client.", + "allOf": [ + { + "$ref": "#/components/schemas/DataForSendingOtp" + } + ] + } + } + }, + "DataForDeviceConfirmationApproval": { + "description": "Contains data for approve / reject device confirmations", + "type": "object", + "properties": { + "allowGuest": { + "description": "Whether the user must be authenticated or not to approve / reject", + "type": "boolean" + } + } + }, + "DataForDynamicDocument": { + "description": "Contains the data for processing a dynamic document for a given user", + "type": "object", + "properties": { + "document": { + "description": "The document which is being processed", + "allOf": [ + { + "$ref": "#/components/schemas/Document" + } + ] + }, + "user": { + "description": "The user for which the document is being processed", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "formFields": { + "description": "The document form fields to be filled in", + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldDetailed" + } + } + } + }, + "DataForEasyInvoice": { + "description": "Contains data for an easy invoice. When called as guest, a subset of the fields are returned.", + "type": "object", + "properties": { + "to": { + "description": "The destination user details. Is only returned if called with a logged user or if the user's group is visible to guests accoerding to the current configuration.", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "amount": { + "description": "The easy invoice amount", + "type": "string", + "format": "number" + }, + "currency": { + "$ref": "#/components/schemas/Currency" + }, + "paymentTypeData": { + "description": "Contains the detailed data for the selected (or first) payment type. Only returned if there is a logged user. The custom fields will only contain those without a fixed value.", + "allOf": [ + { + "$ref": "#/components/schemas/TransactionTypeData" + } + ] + }, + "deviceConfirmationAvailability": { + "description": "Only returned if there is not a logged user. Whether the confirmation with a trusted device is not used, optional or required.", + "allOf": [ + { + "$ref": "#/components/schemas/AvailabilityEnum" + } + ] + }, + "paymentTypes": { + "description": "Only returned if there is a logged user, and a specific payment type was not informed. Contains the allowed payment types to the given user.", + "type": "array", + "items": { + "$ref": "#/components/schemas/TransferTypeWithCurrency" + } + }, + "customValues": { + "description": "The list of custom field values with a fixed value, as requested.", + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldValue" + } + } + } + }, + "DataForEditFullProfile": { + "description": "Contains data for editing the full profile of a user", + "type": "object", + "properties": { + "userConfiguration": { + "$ref": "#/components/schemas/UserDataForEdit" + }, + "user": { + "$ref": "#/components/schemas/UserEdit" + }, + "phoneConfiguration": { + "$ref": "#/components/schemas/PhoneConfigurationForUserProfile" + }, + "landLinePhones": { + "description": "The existing land-line phones that can be modified and posted back", + "type": "array", + "items": { + "$ref": "#/components/schemas/PhoneEditWithId" + } + }, + "mobilePhones": { + "description": "The existing mobile phones that can be modified and posted back", + "type": "array", + "items": { + "$ref": "#/components/schemas/PhoneEditWithId" + } + }, + "addressConfiguration": { + "$ref": "#/components/schemas/AddressConfigurationForUserProfile" + }, + "addresses": { + "description": "The existing addresses that can be modified and posted back", + "type": "array", + "items": { + "$ref": "#/components/schemas/AddressEditWithId" + } + }, + "addressBinaryValues": { + "description": "Values for images and binary custom fields for address contact infos, keyed by address id.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/CustomFieldBinaryValues" + } + }, + "contactInfoConfiguration": { + "$ref": "#/components/schemas/ContactInfoConfigurationForUserProfile" + }, + "contactInfos": { + "description": "The existing additional contacts that can be modified and posted back", + "type": "array", + "items": { + "$ref": "#/components/schemas/ContactInfoEditWithId" + } + }, + "contactInfoBinaryValues": { + "description": "Values for images and binary custom fields for additional contacts, keyed by contact info id.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ContactInfoBinaryValuesForUserProfile" + } + }, + "imageConfiguration": { + "$ref": "#/components/schemas/ImageConfigurationForUserProfile" + }, + "images": { + "description": "All current user images", + "type": "array", + "items": { + "$ref": "#/components/schemas/Image" + } + }, + "confirmationPasswordInput": { + "description": "If a confirmation password is used, contains the definitions on how to request that password from the user. This confirmation password is required when performing sensible actions. Sometimes this is dynamic, for example, the confirmation might be configured to be used only once per session, or operations like payments may have a limit per day to be without confirmation (pinless).", + "allOf": [ + { + "$ref": "#/components/schemas/PasswordInput" + } + ] + } + } + }, + "DataForEmailUnsubscribe": { + "description": "Contains data for unsubscribing from a given e-mail type.", + "type": "object", + "properties": { + "user": { + "description": "The user that received the e-mail", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "email": { + "description": "The e-mail address to which the key was sent", + "type": "string" + }, + "kind": { + "description": "The e-mail kind", + "allOf": [ + { + "$ref": "#/components/schemas/EmailUnsubscribeKind" + } + ] + }, + "applicationName": { + "description": "The name of the Cyclos application", + "type": "string" + }, + "shortcutIcon": { + "description": "The shortcut icon", + "allOf": [ + { + "$ref": "#/components/schemas/Image" + } + ] + }, + "applicationLogo": { + "description": "The application logo", + "allOf": [ + { + "$ref": "#/components/schemas/Image" + } + ] + }, + "locale": { + "description": "The Cyclos locale", + "type": "string" + }, + "country": { + "description": "The Cyclos country code", + "type": "string" + }, + "resourceCacheKey": { + "description": "The key used for URL cache", + "type": "string" + }, + "rootUrl": { + "description": "The root URL for Cyclos", + "type": "string" + }, + "notificationSettingsUrl": { + "description": "The URL for changing the Cyclos notification settings", + "type": "string" + }, + "homeUrl": { + "description": "The URL for the user home", + "type": "string" + } + } + }, + "DataForFrontend": { + "description": "Contains data used by the new frontend", + "type": "object", + "properties": { + "frontend": { + "description": "Which Cyclos frontend should be used for the logged user", + "allOf": [ + { + "$ref": "#/components/schemas/FrontendEnum" + } + ] + }, + "hasHomePage": { + "description": "Is the guest home page used?", + "type": "boolean" + }, + "logoUrl": { + "description": "The application logo image URL", + "type": "string" + }, + "icons": { + "description": "The icons to use as page shortcut icon", + "type": "array", + "items": { + "$ref": "#/components/schemas/FrontendIcon" + } + }, + "svgIconNames": { + "description": "The names of SVF icons used by entities, such as pages, records, advertisement categories, operations and wizards.", + "type": "array", + "items": { + "type": "string" + } + }, + "mapMarkerUrl": { + "description": "The maps pin icon URL", + "type": "string" + }, + "altMapMarkerUrl": { + "description": "The alternative maps pin icon URL", + "type": "string" + }, + "externalLoginUrl": { + "description": "The URL to redirect users for logging in", + "type": "string" + }, + "afterLogoutUrl": { + "description": "The URL to redirect users after logging out", + "type": "string" + }, + "locales": { + "description": "Contains the available translation locales", + "type": "array", + "items": { + "type": "string" + } + }, + "title": { + "description": "The title for tablets and desktops", + "type": "string" + }, + "mobileTitle": { + "description": "The title for mobiles", + "type": "string" + }, + "mobileMenuTitle": { + "description": "The title for the sidenav menu in mobiles / tablets", + "type": "string" + }, + "menuBar": { + "description": "Should the desktop show a separated menu bar?", + "type": "boolean" + }, + "mobileLandingPage": { + "description": "The landing page for mobiles", + "allOf": [ + { + "$ref": "#/components/schemas/FrontendLandingPageEnum" + } + ] + }, + "dataForUi": { + "$ref": "#/components/schemas/DataForUi" + }, + "pages": { + "description": "The content pages to show", + "type": "array", + "items": { + "$ref": "#/components/schemas/FrontendPage" + } + }, + "banners": { + "description": "The banners to show", + "type": "array", + "items": { + "$ref": "#/components/schemas/FrontendBanner" + } + }, + "allowFrontendSwitching": { + "description": "Is the logged user allowed to switch between frontends?", + "type": "boolean" + }, + "voucherBuyingMenu": { + "description": "The menu for the voucher buying section", + "allOf": [ + { + "$ref": "#/components/schemas/UserMenuEnum" + } + ] + }, + "topUpEnabled": { + "description": "Indicates whether there is a voucher configuration supporting top-up which is visible for the authenticated user, this means the top-up feature was configured in the system.", + "type": "boolean" + }, + "canManageQuickAccess": { + "description": "Can the logged user manage their quick access items?", + "type": "boolean" + }, + "development": { + "description": "Is Cyclos running in development mode?", + "type": "boolean" + }, + "footer": { + "description": "The content of the footer, if any", + "type": "string" + } + } + }, + "DataForFrontendHome": { + "description": "Data for the home / dashboard in the new frontend", + "type": "object", + "properties": { + "content": { + "description": "Either the guest home content or the content in the dashboard", + "allOf": [ + { + "$ref": "#/components/schemas/FrontendHomeContent" + } + ] + }, + "fullWidthContent": { + "description": "Should the guest home content be displayed full width in large screens?", + "type": "boolean" + }, + "quickAccess": { + "description": "Contains the quick access items that should be displayed.", + "type": "array", + "items": { + "$ref": "#/components/schemas/QuickAccess" + } + }, + "mergeAccounts": { + "description": "Should multiple accounts be merged in the same card?", + "type": "boolean" + }, + "accounts": { + "description": "The accounts to show in the dashboard", + "type": "array", + "items": { + "$ref": "#/components/schemas/FrontendDashboardAccount" + } + }, + "showLatestUsers": { + "description": "Should the latest users be displayed?", + "type": "boolean" + }, + "latestUsers": { + "description": "If displayed, is the list of the latest users.", + "type": "array", + "items": { + "$ref": "#/components/schemas/UserResult" + } + }, + "showLatestAds": { + "description": "Should the latest advertisements be displayed?", + "type": "boolean" + }, + "latestAds": { + "description": "If displayed, is the list of the latest advertisements.", + "type": "array", + "items": { + "$ref": "#/components/schemas/AdResult" + } + }, + "passwordsNeedingAttention": { + "description": "The passwords that need an attention from the user, such as expired, reset and pending.", + "type": "array", + "items": { + "$ref": "#/components/schemas/PasswordStatusAndType" + } + }, + "pendingSecurityQuestion": { + "description": "Indicates whether the security question should be set", + "type": "boolean" + }, + "pendingTotp": { + "description": "Indicates whether the TOTP secret should be set", + "type": "boolean" + } + } + }, + "DataForLogin": { + "description": "Contains data useful for a login form, as well as forgot password", + "type": "object", + "properties": { + "accessPasswordType": { + "description": "The password type used for login access", + "allOf": [ + { + "$ref": "#/components/schemas/EntityReference" + } + ] + }, + "principalTypes": { + "description": "The identification methods accepted for login", + "type": "array", + "items": { + "$ref": "#/components/schemas/PrincipalTypeInput" + } + }, + "defaultPrincipalType": { + "description": "The internal name of the identification method that is marked as default for the current channel configuration. This is optional, and if there is no default, all possible identification methods will be attempted for login.", + "type": "string" + }, + "extraForgotPasswordPrincipalTypes": { + "description": "The additional identification methods also accepted for the forgotten password request.", + "type": "array", + "items": { + "$ref": "#/components/schemas/PrincipalTypeInput" + } + }, + "loginPasswordInput": { + "description": "Contains data for the password used on login", + "allOf": [ + { + "$ref": "#/components/schemas/PasswordInput" + } + ] + }, + "pinActive": { + "description": "Whether the given pin, when requesting the data, can be used for login. Only if a `pinId` was given when requesting the data, and the `loginPasswordInput.pinAvailability` is not `disabled`.", + "type": "boolean" + }, + "deviceConfirmation": { + "description": "The pending device confirmation used to confirm a trusted session. Only returned if a trusted device identification was given when requesting the data and it exists and is active.", + "allOf": [ + { + "$ref": "#/components/schemas/DeviceConfirmationView" + } + ] + }, + "identityProviders": { + "description": "The identity providers available for login", + "type": "array", + "items": { + "$ref": "#/components/schemas/IdentityProvider" + } + }, + "forgotPasswordCaptchaInput": { + "description": "If the forgot password request requires a captcha, contains information on how to input it. Otherwise will be null.", + "allOf": [ + { + "$ref": "#/components/schemas/CaptchaInput" + } + ] + }, + "forgotPasswordMediums": { + "description": "If the forgot password request is enabled, returns the mediums the user can choose to receive the confirmation key or code. If nothing is returned, forgot password is not enabled.", + "type": "array", + "items": { + "$ref": "#/components/schemas/SendMediumEnum" + } + }, + "verificationCodeSeconds": { + "description": "The number of seconds a verification code may be requested again.", + "type": "integer" + }, + "forgotPasswordCaptchaProvider": { + "deprecated": true, + "x-remove-version": 4.17, + "description": "Use `forgotPasswordCaptchaInput.provider` instead.", + "allOf": [ + { + "$ref": "#/components/schemas/CaptchaProviderEnum" + } + ] + } + } + }, + "DataForMobileGuest": { + "description": "Contains definitions for the data for UI for guests", + "allOf": [ + { + "$ref": "#/components/schemas/MobileBaseData" + }, + { + "type": "object", + "properties": { + "allowQuickPayment": { + "description": "Enables a quick payment action by showing the option to scan a QR code at login page.", + "type": "boolean" + }, + "dataForLogin": { + "$ref": "#/components/schemas/DataForLogin" + }, + "dataForDeviceConfirmationApproval": { + "description": "Data for confirmation approval. Only sent if a device id was given when getting the guest data and it was not removed.", + "allOf": [ + { + "$ref": "#/components/schemas/DataForDeviceConfirmationApproval" + } + ] + }, + "groupsForRegistration": { + "description": "The list of groups the authenticated user can use to perform a new user registration", + "type": "array", + "items": { + "$ref": "#/components/schemas/GroupForRegistration" + } + }, + "header": { + "$ref": "#/components/schemas/TranslatableUIElementWithContent" + }, + "footer": { + "$ref": "#/components/schemas/TranslatableUIElementWithContent" + }, + "welcomePage": { + "$ref": "#/components/schemas/TranslatableUIElementWithContent" + }, + "mediumScreenRegistrationWizard": { + "description": "Wizard which should be used for registration instead of the regular registration form, for clients with medium screens (tablets). When all `largeScreenRegistrationWizard`, `mediumScreenRegistrationWizard` and `smallScreenRegistrationWizard` are set, the regular registration form is disabled, as well as the `POST /users` operation for guests.", + "allOf": [ + { + "$ref": "#/components/schemas/Wizard" + } + ] + }, + "smallScreenRegistrationWizard": { + "description": "Wizard which should be used for registration instead of the regular registration form, for clients with small screens (phones). When all `largeScreenRegistrationWizard`, `mediumScreenRegistrationWizard` and `smallScreenRegistrationWizard` are set, the regular registration form is disabled, as well as the `POST /users` operation for guests.", + "allOf": [ + { + "$ref": "#/components/schemas/Wizard" + } + ] + }, + "welcomePageEnabled": { + "description": "Indicates whether there is a welcome page available.", + "type": "boolean" + } + } + } + ] + }, + "DataForMobileUser": { + "description": "Contains definitions for the data for UI for users", + "allOf": [ + { + "$ref": "#/components/schemas/MobileBaseData" + }, + { + "type": "object", + "properties": { + "autoCompleteResults": { + "description": "Number of search results for user autocomplete component", + "type": "integer" + }, + "hideUsersSearchMenu": { + "description": "Indicates if the user search menu should be hidden.", + "type": "boolean" + }, + "auth": { + "$ref": "#/components/schemas/Auth" + }, + "nameOfUser": { + "description": "The name of the current user (if any)", + "type": "string" + }, + "mobileHelp": { + "description": "The help content for mobile mode", + "allOf": [ + { + "$ref": "#/components/schemas/TranslatableUIElementWithContent" + } + ] + }, + "posHelp": { + "description": "The help content for mobile mode", + "allOf": [ + { + "$ref": "#/components/schemas/TranslatableUIElementWithContent" + } + ] + }, + "homePage": { + "description": "The home content for mobile/pos mode", + "allOf": [ + { + "$ref": "#/components/schemas/TranslatableUIElementWithContent" + } + ] + }, + "pages": { + "description": "The visible mobile pages", + "type": "array", + "items": { + "$ref": "#/components/schemas/MobilePage" + } + }, + "operations": { + "description": "The custom operations the user can run", + "type": "array", + "items": { + "$ref": "#/components/schemas/Operation" + } + }, + "canReceiveFromNfcTag": { + "description": "Indicates whether there is at least one NFC tag the user can use to receive payments", + "type": "boolean" + }, + "deviceActivationMode": { + "description": "Contains information needed when the authenticated user wants to activate a device as trusted.", + "allOf": [ + { + "$ref": "#/components/schemas/DeviceActivationModeEnum" + } + ] + }, + "personalizeOtherUsers": { + "description": "Indicates if the current user can personalize NFC tags for other users (as member)", + "type": "boolean" + }, + "mobileCameraOnPayment": { + "description": "Indicates whether the scan QR code option should be displayed for payments", + "type": "boolean" + }, + "principalsAllowingQRCode": { + "description": "Indicates the possible principals which are allowed to be used in QR code generation", + "type": "array", + "items": { + "$ref": "#/components/schemas/Principal" + } + }, + "scanQr": { + "description": "Indicates whether the scan QR code option (global) should be displayed by checking if the user can approve a ticket, or has a QR/Barcode for make payments, or has an easy invoice channel enabled", + "type": "boolean" + }, + "enableBluetoothPrinter": { + "description": "Whether the bluetooth printer is enabled or not", + "type": "boolean" + }, + "topUpEnabled": { + "description": "Indicates whether there is a voucher configuration supporting top-up which is visible for the authenticated user, this means the top-up feature was configured in the system.", + "type": "boolean" + }, + "shoppingCartWebShopCount": { + "description": "The total number of webshop ads present in the shopping cart", + "type": "integer" + }, + "messagesStatus": { + "description": "Status of user new messages", + "allOf": [ + { + "$ref": "#/components/schemas/MessagesStatus" + } + ] + }, + "notificationsStatus": { + "description": "Status of user notifications, like new received or unread notifications", + "allOf": [ + { + "$ref": "#/components/schemas/NotificationsStatus" + } + ] + }, + "allowedOperations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MobileOperationEnum" + } + }, + "wizards": { + "description": "The wizard operations the user can run", + "type": "array", + "items": { + "$ref": "#/components/schemas/Wizard" + } + }, + "mapPreference": { + "$ref": "#/components/schemas/MapPreferenceEnum" + }, + "pinPrompt": { + "description": "How many times the user is prompted to set a PIN after login", + "type": "integer" + }, + "trustedDevicePrompt": { + "description": "How many times the user is prompted to set as Trusted Device after login", + "type": "integer" + }, + "homePageEnabled": { + "description": "Indicates whether there is a custom home page available and it's configured for the current mode (App / POS).", + "type": "boolean" + }, + "hideQuickActions": { + "description": "Indicates whether the quick actions (e.g: Scan QR - Notifications - Messages - Shopping Cart) are hidden in the top bar and displayed in the side navigation bar.", + "type": "boolean" + }, + "reloadHomePage": { + "description": "Indicates whether the custom home page must be reloaded each time before render it.", + "type": "boolean" + } + } + } + ] + }, + "DataForPaymentLimitsSearch": { + "description": "Configuration data for searching a account payment limits.", + "type": "object", + "properties": { + "groups": { + "description": "The groups the authenticated user can use to filter.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Group" + } + }, + "accountTypes": { + "description": "The account types that can be used to filter.", + "type": "array", + "items": { + "$ref": "#/components/schemas/AccountType" + } + }, + "exportFormats": { + "description": "The formats which the search results can be exported.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExportFormat" + } + } + } + }, + "DataForSendInvitation": { + "description": "Information for sending invitation e-mails to external users.", + "type": "object", + "properties": { + "maxRecipients": { + "description": "Indicates the maximum number of e-mail addresses the user can send invitations in a single request.", + "type": "integer" + }, + "subject": { + "description": "The subject which will be used in sent e-mails.", + "type": "string" + }, + "body": { + "description": "The body which will be used in sent e-mails.", + "type": "string" + }, + "send": { + "description": "Parameters which can be filled-in and posted back to `POST /invite`.", + "allOf": [ + { + "$ref": "#/components/schemas/SendInvitation" + } + ] + } + } + }, + "DataForSendingOtp": { + "description": "Contains data used to send an OTP (verification code).", + "type": "object", + "properties": { + "mediums": { + "description": "The available mediums for the user to receive the OTP. an activation code.", + "type": "array", + "items": { + "$ref": "#/components/schemas/SendMediumEnum" + } + }, + "email": { + "description": "The email to send the code if the selected medium is `email`.", + "type": "string" + }, + "phones": { + "description": "The available mobile phones to send the code. Verified and unverified phones will be included in this list. After a successful activation if the phone was not yet verified then it will automatically be marked as verified.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Phone" + } + }, + "verificationCodeSeconds": { + "description": "The number of seconds an OTP may be sent again.", + "type": "integer" + } + } + }, + "DataForSetSecurityAnswer": { + "description": "Data for setting the security answer.", + "type": "object", + "properties": { + "securityQuestions": { + "description": "The possible security questions.", + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityReference" + } + } + } + }, + "DataForTransaction": { + "description": "Contains basic configuration data used when performing a transaction. The path that returns it will normally receive the main transaction owner (system or user), plus 2 other optional parameters: - The other subject (system or user) that will either receive or perform\n the payment.\n- The payment type. There are 3 possibilities when returning: - When the other subject wasn't selected. In this case, will contain very\n few information, mostly the accounts.\n- The other subject is selected, but not a payment type. If so, the\n payment types will be returned, but not information on how to pick\n the subject user, or the accounts.\n- Both other subject and payment type are selected: In this case\n only the payment type data will be returned", + "type": "object", + "properties": { + "accounts": { + "description": "Only returned when the payment type is not selected. Contains the possible accounts which can be used either as source (when performing the payment) or destination (when receiving the payment, on POS).", + "type": "array", + "items": { + "$ref": "#/components/schemas/AccountWithStatus" + } + }, + "fromKind": { + "description": "Indicates the account kind that will perform the payment", + "allOf": [ + { + "$ref": "#/components/schemas/AccountKind" + } + ] + }, + "fromUser": { + "description": "Only returned if `fromKind` is `user`. Is the payer user.", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "toKind": { + "description": "Indicates the account kind that will receive the payment", + "allOf": [ + { + "$ref": "#/components/schemas/AccountKind" + } + ] + }, + "toUser": { + "description": "Only returned if `toKind` is `user`. Is the payee user.", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "paymentTypeData": { + "description": "Contains the detailed data for the selected (or first) payment type", + "allOf": [ + { + "$ref": "#/components/schemas/TransactionTypeData" + } + ] + }, + "paymentTypes": { + "description": "Only returned when the payment type is not selected. Contains the allowed payment types for a payment between the selected from and to owners.", + "type": "array", + "items": { + "$ref": "#/components/schemas/TransferTypeWithCurrency" + } + }, + "allowScanQrCode": { + "description": "Only returned when no subject is selected.Indicates if the QR-code scanning is allowed.", + "type": "boolean" + }, + "allowAutocomplete": { + "description": "Only returned when no subject is selected. Indicates whether the payee can be obtaining by freely searching users", + "type": "boolean" + }, + "allowContacts": { + "description": "Only returned when no subject is selected. Indicates whether the payee can be obtaining from the contact list", + "type": "boolean" + }, + "allowedUsers": { + "description": "If the authorized user is a restricted operator, it may be that the owner user has defined exactly to which users the operator can pay. If this is the case, this will be the list with such users.", + "type": "array", + "items": { + "$ref": "#/components/schemas/User" + } + }, + "principalTypes": { + "description": "Only returned when no subject is selected. The possible principal types that can be used to locate the payee", + "type": "array", + "items": { + "$ref": "#/components/schemas/PrincipalTypeInput" + } + }, + "defaultPrincipalType": { + "description": "Only returned when no subject is selected. If the `defaultIdMethod` is `principalType`, contains the internal name or id of the principal type that should be the default. If there is a default, the user should be provided with the option to choose which principal type he's using. If there is no default, all possible principal types will be attempted. In this case, the UI will normally not show the option for which principal type should be used.", + "type": "string" + }, + "defaultIdMethod": { + "description": "Only returned when no subject is selected. The default option for the identification method when performing a payment.", + "allOf": [ + { + "$ref": "#/components/schemas/IdentificationMethodEnum" + } + ] + } + } + }, + "DataForUi": { + "description": "Contains data to display an alternative user interface", + "type": "object", + "properties": { + "cyclosVersion": { + "description": "The version of the Cyclos server. It will of the form x.y[.z]", + "type": "string" + }, + "cyclosRevision": { + "description": "The git revision hash of the Cyclos compilation.", + "type": "string" + }, + "licenseKey": { + "description": "The Cyclos license key.", + "type": "string" + }, + "licensee": { + "description": "The organization to which this Cyclos instance is licensed to.", + "type": "string" + }, + "currentClientTime": { + "description": "The current time in the the user's time zone.", + "type": "string", + "format": "date-time" + }, + "auth": { + "description": "The logged user authentication. Not returned for guests.", + "allOf": [ + { + "$ref": "#/components/schemas/Auth" + } + ] + }, + "dataForLogin": { + "description": "The data used for logging the user in. Not returned for logged users.", + "allOf": [ + { + "$ref": "#/components/schemas/DataForLogin" + } + ] + }, + "publicRegistrationGroups": { + "description": "Groups that can be used for a public registration. Not returned for logged users. Also, not returned when a registration wizard is required.", + "type": "array", + "items": { + "$ref": "#/components/schemas/GroupForRegistration" + } + }, + "largeScreenRegistrationWizard": { + "description": "Wizard which should be used for registration instead of the regular registration form, for clients with large screens (desktops). When all `largeScreenRegistrationWizard`, `mediumScreenRegistrationWizard` and `smallScreenRegistrationWizard` are set, the regular registration form is disabled, as well as the `POST /users` operation for guests.", + "allOf": [ + { + "$ref": "#/components/schemas/Wizard" + } + ] + }, + "mediumScreenRegistrationWizard": { + "description": "Wizard which should be used for registration instead of the regular registration form, for clients with medium screens (tablets). When all `largeScreenRegistrationWizard`, `mediumScreenRegistrationWizard` and `smallScreenRegistrationWizard` are set, the regular registration form is disabled, as well as the `POST /users` operation for guests.", + "allOf": [ + { + "$ref": "#/components/schemas/Wizard" + } + ] + }, + "smallScreenRegistrationWizard": { + "description": "Wizard which should be used for registration instead of the regular registration form, for clients with small screens (phones). When all `largeScreenRegistrationWizard`, `mediumScreenRegistrationWizard` and `smallScreenRegistrationWizard` are set, the regular registration form is disabled, as well as the `POST /users` operation for guests.", + "allOf": [ + { + "$ref": "#/components/schemas/Wizard" + } + ] + }, + "mapData": { + "description": "Configuration data for map usage. Is null when maps are not used.", + "allOf": [ + { + "$ref": "#/components/schemas/MapData" + } + ] + }, + "decimalSeparator": { + "description": "The character used to specify the decimal point", + "type": "string" + }, + "groupingSeparator": { + "description": "The character used to separate thousands.", + "type": "string" + }, + "dateFormat": { + "description": "The pattern string used to format dates.\nThe following are the letters used in each supported pattern:\n* dd: The day of the month;\n* MM: The month ranging from 1 to 12;\n* yyyy: The full year number.", + "type": "string" + }, + "timeFormat": { + "description": "The pattern string used to format time.\nThe following are the letters used in each supported pattern:\n* hh: The hour of the morning or afternoon (12-hour clock);\n* HH: The hour of the day (24-hour clock);\n* mm: The minute within the hour;\n* a: Marker to idicate whether the hour (hh) is before or after noon.", + "type": "string" + }, + "timeZoneId": { + "description": "The time zone ID set in the configuration (e.g `Europe/Amsterdam`)", + "type": "string" + }, + "distanceUnit": { + "$ref": "#/components/schemas/DistanceUnitEnum" + }, + "rootUrl": { + "description": "The main URL set in the configuration", + "type": "string" + }, + "apiUrl": { + "description": "The public API URL for this Cyclos instance", + "type": "string" + }, + "country": { + "description": "The ISO 3166-1 alpha-2 country code, as set in the configuration", + "type": "string" + }, + "maxImageWidth": { + "description": "Maximum width (in pixels) for uploaded images", + "type": "integer" + }, + "maxImageHeight": { + "description": "Maximum height (in pixels) for uploaded images", + "type": "integer" + }, + "maxUploadSize": { + "description": "Maximum size (in bytes) for uploaded files", + "type": "integer" + }, + "jpegQuality": { + "description": "Quality for JPEG image types (higher means better quality)", + "type": "integer" + }, + "language": { + "description": "The language set in the configuration", + "allOf": [ + { + "$ref": "#/components/schemas/Language" + } + ] + }, + "allowedLocales": { + "description": "The locales the user can select, for example to change the language.", + "type": "array", + "items": { + "$ref": "#/components/schemas/UserLocale" + } + }, + "currentLocale": { + "description": "The locale which is currently in use.", + "allOf": [ + { + "$ref": "#/components/schemas/UserLocale" + } + ] + }, + "defaultLocale": { + "description": "The default locale.", + "allOf": [ + { + "$ref": "#/components/schemas/UserLocale" + } + ] + }, + "resourceCacheKey": { + "description": "A new key is generated after each server restart", + "type": "string" + }, + "appleStoreUrl": { + "description": "The mobile app url in the Apple store.", + "type": "string" + }, + "playStoreUrl": { + "description": "The mobile app url in the Play store.", + "type": "string" + }, + "hideUserSearchInMenu": { + "description": "Whether the search users action must be shown or not in the menu. If the user doesn't have permission to search other users (`permissions.users.search`) then this flag will be `true`. Otherwise it depends on the configuration", + "type": "boolean" + }, + "deviceActivationMode": { + "description": "Contains information needed when the authenticated user wants to activate a device as trusted.", + "allOf": [ + { + "$ref": "#/components/schemas/DeviceActivationModeEnum" + } + ] + }, + "theme": { + "deprecated": true, + "x-remove-version": 4.18, + "description": "This was intended for internal use only and is no longer used.\n\n\nThe theme content (i.e the CSS or its components according). Only returned when changed or if the corresponding `themeIf` parameter was not specified.\nThe returned theme will be the following according to the UI kind:\n\n- `main`: If there is a logged user then the theme for\n users associated to the configuration. Otherwise the theme for guests;\n\n- `mobile`: only returned for guest;\n- `pay`: The theme defined for the ticket / easy\n invoice confirmation application interface (it's the same for logged\n users and guests).", + "allOf": [ + { + "$ref": "#/components/schemas/ThemeUIElement" + } + ] + }, + "header": { + "deprecated": true, + "x-remove-version": 4.18, + "description": "This was intended for internal use only and is no longer used.\n\n\nThe header content. Only returned when changed or if the corresponding `headerIf` parameter was not specified. For all cases the content returned will be the same for logged users an for guests.\n\nThe returned header will be the following according to the UI kind:\n\n- `main`: The header configured for the main web interface;\n- `mobile`: The header configured for the mobile application. Only returned for guests;\n- `pay`: The header defined for the ticket / easy invoice confirmation interface.", + "allOf": [ + { + "$ref": "#/components/schemas/TranslatableUIElementWithContent" + } + ] + }, + "footer": { + "deprecated": true, + "x-remove-version": 4.18, + "description": "This was intended for internal use only and is no longer used.\n\n\nThe footer content. Only returned when changed or if the corresponding `footerIf` parameter was not specified. For all cases the content returned will be the same for logged users an for guests.\n\nThe returned footer will be the following according to the UI kind:\n\n- `main`: The footer configured for the main web interface;\n- `mobile`: The footer configured for the mobile application. Only returned for guests;\n- `pay`: The footer defined for the ticket / easy invoice confirmation interface.", + "allOf": [ + { + "$ref": "#/components/schemas/TranslatableUIElementWithContent" + } + ] + }, + "shoppingCartWebShopCount": { + "description": "The total number of webshop ads present in the shopping cart. Not returned for guests.", + "type": "integer" + }, + "applicationName": { + "description": "The configured name of the application", + "type": "string" + }, + "applicationUsername": { + "description": "An username used by the application to be displayed for example in system messages or accounts", + "type": "string" + } + } + }, + "DataForUserAccountVisibility": { + "description": "Contains data regarding the account visibility for a given user", + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/User" + }, + "canManage": { + "description": "Indicates whether the logged user can manage the account visibility of this user", + "type": "boolean" + }, + "accounts": { + "description": "If the authenticated user can change the user / operator to a new group, contains the list of groups that can be assigned.", + "type": "array", + "items": { + "$ref": "#/components/schemas/UserAccountVisibility" + } + } + } + }, + "DataForUserBalancesSearch": { + "description": "Data used for a user search together with account balances", + "allOf": [ + { + "$ref": "#/components/schemas/BaseUserDataForSearch" + }, + { + "type": "object", + "properties": { + "accountTypes": { + "description": "The available account types for the search", + "type": "array", + "items": { + "$ref": "#/components/schemas/AccountTypeWithDefaultMediumBalanceRange" + } + }, + "query": { + "description": "Default query parameters", + "allOf": [ + { + "$ref": "#/components/schemas/UsersWithBalanceQueryFilters" + } + ] + } + } + } + ] + }, + "DataForUserPasswords": { + "description": "Contains the data used to manage passwords of a user", + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/User" + }, + "passwords": { + "description": "The status and possible actions for each password", + "type": "array", + "items": { + "$ref": "#/components/schemas/PasswordStatusAndActions" + } + }, + "dataForSetSecurityAnswer": { + "description": "If the security answer is enabled in the configuration and the user has no security answer yet, contains data for setting it. Is not returned if not used or if the user already has an answer.", + "allOf": [ + { + "$ref": "#/components/schemas/DataForSetSecurityAnswer" + } + ] + }, + "totpSecret": { + "description": "If the user has TOTP enabled, contains information about the user TOTP secret.", + "allOf": [ + { + "$ref": "#/components/schemas/TotpSecretData" + } + ] + }, + "sendMediums": { + "description": "The possible mediums for the reset and send password action", + "type": "array", + "items": { + "$ref": "#/components/schemas/SendMediumEnum" + } + }, + "confirmationPasswordInput": { + "description": "If a confirmation password is used, contains the definitions on how to request that password from the user. This confirmation password is required when performing sensible actions. Sometimes this is dynamic, for example, the confirmation might be configured to be used only once per session, or operations like payments may have a limit per day to be without confirmation (pinless).", + "allOf": [ + { + "$ref": "#/components/schemas/PasswordInput" + } + ] + } + } + }, + "DataForUserQuickAccess": { + "description": "Information for managing a user quick access.", + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/User" + }, + "quickAccess": { + "description": "The items", + "type": "array", + "items": { + "$ref": "#/components/schemas/UserQuickAccessView" + } + }, + "canEdit": { + "description": "Is the quick access editable?", + "type": "boolean" + } + } + }, + "DataForVoucherInfo": { + "description": "Contains data the voucher information page.", + "type": "object", + "properties": { + "dataForUi": { + "$ref": "#/components/schemas/DataForUi" + }, + "shortcutIcon": { + "description": "The shortcut icon", + "allOf": [ + { + "$ref": "#/components/schemas/Image" + } + ] + }, + "applicationLogo": { + "description": "The application logo", + "allOf": [ + { + "$ref": "#/components/schemas/Image" + } + ] + }, + "locale": { + "description": "The Cyclos locale", + "type": "string" + }, + "resourceCacheKey": { + "description": "The key used for URL cache", + "type": "string" + }, + "mask": { + "description": "The token mask. Only returned when all possible voucher configurations share the same mask.", + "type": "string" + } + } + }, + "DatePeriod": { + "description": "A period comprised of a begin and an end date", + "type": "object", + "properties": { + "begin": { + "description": "The period begin date, if any. Generally a period without a begin date can be seen as since all time.", + "type": "string", + "format": "date-time" + }, + "end": { + "description": "The period end date, if any. Generally a period without an end date can be seen as without a limit.", + "type": "string", + "format": "date-time" + } + } + }, + "DecimalRange": { + "description": "Represents a range of minimum / maximum decimal values (both optional). In general if both values are null the entire range is returned as null.", + "type": "object", + "properties": { + "min": { + "description": "The minimum value", + "type": "string", + "format": "number" + }, + "max": { + "description": "The maximum value", + "type": "string", + "format": "number" + } + } + }, + "DeliveryMethod": { + "description": "Reference to a webshop delivery method", + "allOf": [ + { + "$ref": "#/components/schemas/NamedEntity" + }, + { + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "A description on how this delivery method works." + }, + "enabled": { + "type": "boolean", + "description": "Whether this delivery method is enabled for new sales." + }, + "chargeType": { + "$ref": "#/components/schemas/DeliveryMethodChargeTypeEnum" + }, + "deliveryType": { + "$ref": "#/components/schemas/DeliveryMethodTypeEnum" + }, + "minDeliveryTime": { + "description": "The minimum time interval expected for the products to be delivered.", + "allOf": [ + { + "$ref": "#/components/schemas/TimeInterval" + } + ] + }, + "maxDeliveryTime": { + "description": "The maximum time interval expected for the products to be delivered.", + "allOf": [ + { + "$ref": "#/components/schemas/TimeInterval" + } + ] + }, + "chargeAmount": { + "description": "The amount to be charged. Only makes sense if `chargeType` is `fixed`.", + "type": "string", + "format": "number" + }, + "chargeCurrency": { + "description": "The delivery price currency. Only makes sense if `chargeType` is `fixed`.", + "allOf": [ + { + "$ref": "#/components/schemas/Currency" + } + ] + }, + "address": { + "description": "The seller's pickup point address. Only makes sense if `deliveryType` is `pickup`.", + "allOf": [ + { + "$ref": "#/components/schemas/Address" + } + ] + } + } + } + ] + }, + "DeliveryMethodBasicData": { + "description": "Contains data shared by both DeliveryMethodDataForNew and DeliveryMethodDataForEdit", + "type": "object", + "properties": { + "user": { + "description": "Reference to the owner of the delivery method", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "currencies": { + "description": "Contains the list of possible currencies for the delivery method", + "type": "array", + "items": { + "$ref": "#/components/schemas/Currency" + } + }, + "addresses": { + "description": "Contains the list of possible seller addresses for pickup point delivery type", + "type": "array", + "items": { + "$ref": "#/components/schemas/Address" + } + } + } + }, + "DeliveryMethodDataForEdit": { + "description": "Contains data for editing an exinsting webshop delivery method", + "allOf": [ + { + "$ref": "#/components/schemas/DeliveryMethodBasicData" + }, + { + "type": "object", + "properties": { + "canEdit": { + "type": "boolean", + "description": "Can the authenticated user edit this delivery method?" + }, + "canRemove": { + "type": "boolean", + "description": "Can the authenticated user remove this delivery method?" + }, + "deliveryMethod": { + "description": "The delivery method populated with the current fields. This value can be modified and sent back on `PUT /delivery-methods/{id}`.", + "allOf": [ + { + "$ref": "#/components/schemas/DeliveryMethodEdit" + } + ] + } + } + } + ] + }, + "DeliveryMethodDataForNew": { + "description": "Contains data for creating a new webshop delivery method", + "allOf": [ + { + "$ref": "#/components/schemas/DeliveryMethodBasicData" + }, + { + "type": "object", + "properties": { + "deliveryMethod": { + "description": "The delivery method populated with the default fields. This value can be modified and sent back on `POST /{user}/delivery-methods`.", + "allOf": [ + { + "$ref": "#/components/schemas/DeliveryMethodNew" + } + ] + } + } + } + ] + }, + "DeliveryMethodEdit": { + "description": "Fields for modifying a webshop delivery method.", + "allOf": [ + { + "$ref": "#/components/schemas/DeliveryMethodManage" + }, + { + "type": "object", + "properties": { + "version": { + "type": "integer", + "description": "The version stamp for the current object, used for optimistic locking. When saving, the same version as previously received needs to be passed back. If no one else has saved the object, the version will match and the object will be updated. However, if someone other has saved the object, the version will no longer match, and an error will be raised. This is used to prevent multiple users (or processes) from updating the same object and unwilingly overridding the property values, leading to data loss." + } + } + } + ] + }, + "DeliveryMethodManage": { + "description": "Common fields for either creating or editing a delivery method", + "type": "object", + "x-abstract": true, + "properties": { + "enabled": { + "type": "boolean", + "description": "Whether this delivery method is enabled for new sales." + }, + "name": { + "type": "string", + "description": "The visible name for this delivery method." + }, + "description": { + "type": "string", + "description": "A description on how this delivery method works." + }, + "chargeType": { + "$ref": "#/components/schemas/DeliveryMethodChargeTypeEnum" + }, + "deliveryType": { + "$ref": "#/components/schemas/DeliveryMethodTypeEnum" + }, + "minDeliveryTime": { + "description": "The minimum time interval expected for the products to be delivered.", + "allOf": [ + { + "$ref": "#/components/schemas/TimeInterval" + } + ] + }, + "maxDeliveryTime": { + "description": "The maximum time interval expected for the products to be delivered.", + "allOf": [ + { + "$ref": "#/components/schemas/TimeInterval" + } + ] + }, + "chargeAmount": { + "type": "string", + "format": "number", + "description": "The delivery price. Only makes sense if `chargeType` is `fixed`." + }, + "chargeCurrency": { + "type": "string", + "description": "Either id or internal name of the price currency." + }, + "address": { + "type": "string", + "description": "Either id or internal name of the seller delivery address." + } + } + }, + "DeliveryMethodNew": { + "description": "Fields for a new webshop delivery method.", + "allOf": [ + { + "$ref": "#/components/schemas/DeliveryMethodManage" + } + ] + }, + "DeliveryMethodView": { + "description": "Details of a webshop delivery method", + "allOf": [ + { + "$ref": "#/components/schemas/DeliveryMethod" + }, + { + "type": "object", + "properties": { + "canEdit": { + "description": "Can the authenticated user edit this delivery method?", + "type": "boolean" + }, + "canRemove": { + "description": "Can the authenticated user remove this delivery method?", + "type": "boolean" + }, + "user": { + "description": "The user which owns this delivery method", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + } + } + } + ] + }, + "Device": { + "description": "A device reference", + "allOf": [ + { + "$ref": "#/components/schemas/NamedEntity" + }, + { + "type": "object", + "properties": { + "active": { + "type": "boolean", + "description": "Whether this device is active or not." + }, + "date": { + "type": "string", + "format": "date-time", + "description": "When the device is not active it represents the creation date. Otherwise, the activation date." + } + } + } + ] + }, + "DeviceActivation": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The device activation code. Only required if the activation must be confirmed with code." + }, + "deviceId": { + "type": "string", + "description": "Trusted device identification. Only required if the activation must be confirmed with another trusted device." + }, + "deviceConfirmationId": { + "type": "string", + "description": "The approved device confirmation identification used to validate the activation. Only required if the activation must be confirmed with another trusted device." + } + } + }, + "DeviceActivationInfo": { + "description": "Contains an activation result if the device was automatically activated or the data for sending an OTP in case a code is required. At least one is not null but not both.", + "type": "object", + "properties": { + "activationResult": { + "$ref": "#/components/schemas/DeviceActivationResult" + }, + "dataForSendingOtp": { + "$ref": "#/components/schemas/DataForSendingOtp" + } + } + }, + "DeviceActivationResult": { + "type": "object", + "properties": { + "device": { + "$ref": "#/components/schemas/Device" + }, + "key": { + "type": "string", + "description": "The secret key that must be stored in the trusted device. This key in conjunction with the device identifier will be required to confirm operations in other channels." + } + } + }, + "DeviceConfirmationActionParams": { + "description": "Contains data to perform a confirmation action (e.g approve / reject)", + "type": "object", + "properties": { + "deviceId": { + "type": "string", + "description": "The id of the device used to perform the confirmation action." + }, + "hmac": { + "type": "string", + "description": "The HMAC-SHA256 calculated for the QR code using the secret key stored in the device." + } + } + }, + "DeviceConfirmationFeedbackPush": { + "description": "The result of the action accepted by a device confirmation", + "type": "object", + "properties": { + "deviceConfirmation": { + "$ref": "#/components/schemas/DeviceConfirmationView" + }, + "successful": { + "description": "True if the operation approved by the device confirmation has finished successfully.", + "type": "boolean" + } + } + }, + "DeviceConfirmationView": { + "description": "Detailed information when viewing a device confirmation", + "allOf": [ + { + "$ref": "#/components/schemas/Entity" + }, + { + "type": "object", + "properties": { + "qrContent": { + "type": "string", + "description": "The QR content for this confirmation. The content is a URL of the form: cyclos://confirmation?id=confirmation_id&description=i18n_confirmation_type&fields=Label1:Value1|Label2:Value2..." + }, + "type": { + "description": "The type of the device confirmation.", + "allOf": [ + { + "$ref": "#/components/schemas/DeviceConfirmationTypeEnum" + } + ] + }, + "status": { + "description": "The status of the device confirmation.", + "allOf": [ + { + "$ref": "#/components/schemas/DeviceConfirmationStatusEnum" + } + ] + } + } + } + ] + }, + "DeviceDataForEdit": { + "description": "Contains data for editing an existing device", + "type": "object", + "properties": { + "device": { + "description": "The device that is being edited. This value can be modified and sent back on `PUT /devices/{id}`.", + "allOf": [ + { + "$ref": "#/components/schemas/DeviceEdit" + } + ] + }, + "canEdit": { + "type": "boolean", + "description": "Whether the authenticated user can edit this device or not." + } + } + }, + "DeviceEdit": { + "description": "Fields for device edition.", + "type": "object", + "properties": { + "version": { + "type": "integer", + "description": "The version stamp for the current object, used for optimistic locking. When saving, the same version as previously received needs to be passed back. If no one else has saved the object, the version will match and the object will be updated. However, if someone other has saved the object, the version will no longer match, and an error will be raised. This is used to prevent multiple users (or processes) from updating the same object and unwilingly overridding the property values, leading to data loss." + }, + "name": { + "type": "string", + "description": "The new device name. It must be unique per user." + } + } + }, + "DevicePin": { + "description": "A device PIN reference", + "allOf": [ + { + "$ref": "#/components/schemas/NamedEntity" + }, + { + "type": "object", + "properties": { + "date": { + "description": "The last modification date or creation (if it was never modified).", + "type": "string", + "format": "date-time" + } + } + } + ] + }, + "DevicePinDataForEdit": { + "description": "Contains data for editing an existing device PIN", + "type": "object", + "properties": { + "pin": { + "description": "The device PIN that which name is being edited. The name can be modified and sent back on `PUT /device-pins/{key}`.", + "allOf": [ + { + "$ref": "#/components/schemas/DevicePinEdit" + } + ] + }, + "canEdit": { + "type": "boolean", + "description": "Whether the authenticated user can edit this device PIN or not." + } + } + }, + "DevicePinEdit": { + "description": "Fields for device PIN edition.", + "type": "object", + "properties": { + "version": { + "type": "integer", + "description": "The version stamp for the current object, used for optimistic locking. When saving, the same version as previously received needs to be passed back. If no one else has saved the object, the version will match and the object will be updated. However, if someone other has saved the object, the version will no longer match, and an error will be raised. This is used to prevent multiple users (or processes) from updating the same object and unwilingly overridding the property values, leading to data loss." + }, + "name": { + "type": "string", + "description": "The new device PIN name. It must be unique per user." + } + } + }, + "DevicePinRemoveParams": { + "description": "Parameters for remove an existing device PIN.", + "type": "object", + "properties": { + "currentPin": { + "description": "The current PIN value. If a password is required according to `GET /device-pins/{key}` (i.e the `passwordInput` is not null) then the remove action must be confirmed with at least the current pin or the current login password but not both.", + "type": "string" + }, + "currentPassword": { + "description": "The current login password. If a password is required according to `GET /device-pins/{key}` (i.e the `passwordInput` is not null) then the remove action must be confirmed with at least the current login password or the current pin but not both.", + "type": "string" + } + } + }, + "DevicePinView": { + "description": "Contains details about a device PIN", + "allOf": [ + { + "$ref": "#/components/schemas/DevicePin" + }, + { + "type": "object", + "properties": { + "user": { + "description": "The user associated to the PIN.", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "principalType": { + "$ref": "#/components/schemas/PrincipalType" + }, + "passwordInput": { + "description": "Only used for changing the value of an existing PIN or for remove it. If not null then it must be used to ask for the current login password / pin. In case of only name edition though the operation `PUT /device-pins/{key}` it can be ignored.", + "allOf": [ + { + "$ref": "#/components/schemas/PasswordInput" + } + ] + } + } + } + ] + }, + "Document": { + "description": "Reference to a document", + "allOf": [ + { + "$ref": "#/components/schemas/InternalNamedEntity" + }, + { + "type": "object", + "properties": { + "kind": { + "description": "The document kind", + "allOf": [ + { + "$ref": "#/components/schemas/DocumentKind" + } + ] + }, + "description": { + "description": "The document description.", + "type": "string" + }, + "category": { + "description": "The document category. Only if `kind` is either `static` or `dynamic`.", + "allOf": [ + { + "$ref": "#/components/schemas/EntityReference" + } + ] + }, + "file": { + "description": "The document file description. Only if `kind` is either `static` or `user`.", + "allOf": [ + { + "$ref": "#/components/schemas/StoredFile" + } + ] + } + } + } + ] + }, + "DocumentBasicData": { + "description": "Contains data shared by both DocumentDataForNew and DocumentDataForEdit", + "type": "object", + "x-abstract": true, + "properties": { + "kind": { + "$ref": "#/components/schemas/DocumentKind" + }, + "categories": { + "description": "The possible document categories. Only returned if `kind` is `static`.", + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityReference" + } + }, + "user": { + "description": "The document owner user. Only returned if `kind` is `user`.", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + } + } + }, + "DocumentDataForEdit": { + "description": "Fields for editing a document", + "allOf": [ + { + "$ref": "#/components/schemas/DocumentBasicData" + }, + { + "type": "object", + "properties": { + "file": { + "description": "The current document file", + "allOf": [ + { + "$ref": "#/components/schemas/StoredFile" + } + ] + }, + "downloadUrlTemplate": { + "description": "The URL template where the document can be downloaded Only used if the document `kind` is `static`.", + "type": "string" + }, + "document": { + "description": "The document that is being edited. This value can be modified and sent back to `PUT /documents/{id}`.", + "allOf": [ + { + "$ref": "#/components/schemas/DocumentEdit" + } + ] + } + } + } + ] + }, + "DocumentDataForNew": { + "description": "Fields for creating a new document", + "allOf": [ + { + "$ref": "#/components/schemas/DocumentBasicData" + }, + { + "type": "object", + "properties": { + "document": { + "description": "The document that is being created. This value can be modified and sent back to either `POST /documents` (shared) or `POST /{user}/documents`.", + "allOf": [ + { + "$ref": "#/components/schemas/DocumentNew" + } + ] + } + } + } + ] + }, + "DocumentDataForSearch": { + "description": "Configuration data for searching documents", + "type": "object", + "properties": { + "categories": { + "description": "Visible document categories", + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityReference" + } + }, + "manageCategories": { + "description": "Either internal names of ids of categories the logged user can manage", + "type": "array", + "items": { + "type": "string" + } + }, + "canManageIndividual": { + "description": "Indicates whether the logged user can manage individual documents of managed users", + "type": "boolean" + }, + "user": { + "description": "The document's owner. Only returned if searching documents of a specfific user.", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "query": { + "$ref": "#/components/schemas/DocumentQueryFilters" + } + } + }, + "DocumentEdit": { + "description": "Fields for editing a document", + "allOf": [ + { + "$ref": "#/components/schemas/DocumentManage" + }, + { + "type": "object", + "properties": { + "version": { + "type": "integer", + "description": "The version stamp for the current object, used for optimistic locking. When saving, the same version as previously received needs to be passed back. If no one else has saved the object, the version will match and the object will be updated. However, if someone other has saved the object, the version will no longer match, and an error will be raised. This is used to prevent multiple users (or processes) from updating the same object and unwilingly overridding the property values, leading to data loss." + } + } + } + ] + }, + "DocumentManage": { + "description": "Common fields for either creating or editing a document", + "type": "object", + "x-abstract": true, + "properties": { + "name": { + "description": "The document name", + "type": "string" + }, + "internalName": { + "description": "The document internal name", + "type": "string" + }, + "description": { + "description": "The document description", + "type": "string" + }, + "enabled": { + "description": "Whether the document is enabled", + "type": "boolean" + }, + "category": { + "description": "The shared document category internal name or id. Only used if the document `kind` is either `static` or `dynamic`.", + "type": "string" + }, + "publiclyAccessible": { + "description": "Is this document visible to everyone? Only used if the document `kind` is `static`.", + "type": "boolean" + }, + "userVisible": { + "description": "Is this document visible by the owner user? Only used if the document `kind` is `user`.", + "type": "boolean" + }, + "brokerVisible": { + "description": "Is this document visible by the user's broker(s)? Only used if the document `kind` is `user`.", + "type": "boolean" + }, + "brokerManageable": { + "description": "Can this document be managed by the user's broker(s)? Only used if the document `kind` is `user`.", + "type": "boolean" + } + } + }, + "DocumentNew": { + "description": "Fields for creating a new individual document", + "allOf": [ + { + "$ref": "#/components/schemas/DocumentManage" + }, + { + "type": "object" + } + ] + }, + "DocumentQueryFilters": { + "description": "Filters used when searching documents", + "allOf": [ + { + "$ref": "#/components/schemas/QueryFilters" + }, + { + "type": "object", + "properties": { + "range": { + "description": "The range for returned documents. When not specified, defaults to `shared`.", + "allOf": [ + { + "$ref": "#/components/schemas/DocumentRangeEnum" + } + ] + }, + "categories": { + "description": "The shared document categories", + "type": "array", + "items": { + "type": "string" + } + }, + "enabled": { + "description": "Only used if the logged user can manage documents. When set, filters documents by their `enabled` status, either `true` or `false`.", + "type": "boolean" + }, + "groups": { + "description": "Either the ids or internal names of individual document owners' group", + "type": "array", + "items": { + "type": "string" + } + }, + "brokers": { + "description": "Either the ids or identification methods of individual document owners' brokers", + "type": "array", + "items": { + "type": "string" + } + }, + "user": { + "description": "Either the id or identifier of the document owner", + "type": "string" + }, + "keywords": { + "description": "Used to filter documents containing that keywords in the the name or description (case insensitive)", + "type": "string" + } + } + } + ] + }, + "DocumentResult": { + "description": "Result from a document search", + "allOf": [ + { + "$ref": "#/components/schemas/Document" + }, + { + "type": "object", + "properties": { + "user": { + "description": "The document owner. Only if `kind` is `user`.", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "brokerManageable": { + "description": "Indicates whether the document owner brokers can manage this document. Only if `kind` is `user`.", + "type": "boolean" + } + } + } + ] + }, + "DocumentView": { + "description": "Details of a document", + "allOf": [ + { + "$ref": "#/components/schemas/Document" + }, + { + "type": "object", + "properties": { + "description": { + "description": "The document description.", + "type": "string" + }, + "enabled": { + "description": "Whether the document is enabled or not.", + "type": "boolean" + }, + "category": { + "description": "The document category, if a shared document", + "allOf": [ + { + "$ref": "#/components/schemas/EntityReference" + } + ] + }, + "user": { + "description": "The document owner. Only if `kind` is `user`.", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "publiclyAccessible": { + "description": "Is this document visible for everyone? Only used if the document `kind` is `static`.", + "type": "boolean" + }, + "downloadUrl": { + "description": "The URL where the file can be downloaded Only used if the document `kind` is `static`.", + "type": "string" + }, + "userVisible": { + "description": "Is this document visible by the owner user? Only used if the document `kind` is `user`.", + "type": "boolean" + }, + "brokerVisible": { + "description": "Is this document visible by the user's broker(s)? Only used if the document `kind` is `user`.", + "type": "boolean" + }, + "brokerManageable": { + "description": "Can this document be managed by the user's broker(s)? Only used if the document `kind` is `user`.", + "type": "boolean" + } + } + } + ] + }, + "DocumentsPermissions": { + "description": "Permissions over documents", + "type": "object", + "properties": { + "viewShared": { + "description": "Permissions over each visible document category (shared docs)", + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityReference" + } + }, + "viewIndividual": { + "description": "Whether the authenticated uses can view individual documents", + "type": "boolean" + } + } + }, + "Entity": { + "description": "Basic definition of a persistent entity", + "x-abstract": true, + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The internal entity identifier" + } + } + }, + "EntityReference": { + "description": "Represents an entity that is being referenced from another one, without caring about the type of the referenced entity.", + "x-final": true, + "allOf": [ + { + "$ref": "#/components/schemas/InternalNamedEntity" + }, + { + "type": "object" + } + ] + }, + "Error": { + "description": "An error that happened during the request processing", + "type": "object", + "properties": { + "exceptionType": { + "description": "The server exception class name. Not intended to be shown to final users. Only for logging purposes.", + "type": "string" + }, + "exceptionMessage": { + "description": "The server exception message. Not intended to be shown to final users. Only for logging purposes.", + "type": "string" + }, + "kind": { + "$ref": "#/components/schemas/ErrorKind" + } + }, + "required": [ + "exceptionType" + ] + }, + "ExportFormat": { + "description": "Contains a reference to an export format", + "allOf": [ + { + "$ref": "#/components/schemas/InternalNamedEntity" + }, + { + "type": "object", + "properties": { + "contentType": { + "type": "string", + "description": "Indicates the content type (mime type) for the generated content." + }, + "binary": { + "type": "boolean", + "description": "Indicates whether the content generated by this format is binary (true) or textual (false)" + }, + "encoding": { + "type": "string", + "description": "Indicates the character encoding for the textual content. Only returned `binary` is false." + } + } + } + ] + }, + "ExternalPaymentPermissions": { + "description": "Permissions the user has over an external payment", + "type": "object", + "properties": { + "cancel": { + "description": "Can cancel the external payment?", + "type": "boolean" + } + } + }, + "ExternalPaymentPreview": { + "description": "Parameters for previewing an external payment", + "allOf": [ + { + "$ref": "#/components/schemas/TransactionPreview" + }, + { + "type": "object", + "properties": { + "toPrincipalType": { + "description": "A reference to the external payment principal type", + "allOf": [ + { + "$ref": "#/components/schemas/PrincipalType" + } + ] + }, + "mainAmount": { + "description": "This reflects the new transaction amount. Depending on the configured fees, it could happen that the fee amount is deducted from transaction amount. If no fees deduct, it will be the same as transaction amount. E.g: payment from A to B by 100 units with two fees: 10 units deducted from payment amount and other of 15 not deducted. Then the `totalAmount` will be 115, 90 for the `mainAmount`, 10 for the first fee and 15 for the other fee.", + "type": "string", + "format": "number" + }, + "fees": { + "description": "Only returned for direct payments. Contains the fees that would be paid by the payer if the external payment is confirmed.", + "type": "array", + "items": { + "$ref": "#/components/schemas/TransferFeePreview" + } + }, + "payment": { + "description": "Depending on the configuration, some script might alter the payment object, for example, filling in custom fields. This object can be used to show the actual data to the user, and to be posted again to the `POST /{owner}/external-payments/` path.", + "allOf": [ + { + "$ref": "#/components/schemas/PerformExternalPayment" + } + ] + } + } + } + ] + }, + "ExternalPaymentsPermissions": { + "description": "Permissions over own external payments", + "type": "object", + "properties": { + "view": { + "description": "Can view external payments?", + "type": "boolean" + }, + "perform": { + "description": "Can perform an external payments?", + "type": "boolean" + }, + "cancel": { + "description": "Can cancel an external payments?", + "type": "boolean" + } + } + }, + "FieldSection": { + "description": "Details for a section of fields", + "allOf": [ + { + "$ref": "#/components/schemas/InternalNamedEntity" + }, + { + "type": "object", + "properties": { + "informationText": { + "description": "An informative text that should be shown in the form. The text is formatted in HTML.", + "type": "string" + } + } + } + ] + }, + "ForbiddenError": { + "description": "Error returned when a HTTP status code 403 occurs", + "type": "object", + "properties": { + "passwordType": { + "description": "The password type of the failed password. Only sent if `code` is one of:\n\n* `invalidPassword` * `expiredPassword` * `temporarilyBlocked` * `indefinitelyBlocked`", + "allOf": [ + { + "$ref": "#/components/schemas/EntityReference" + } + ] + }, + "maxDeviceActivationReached": { + "description": "The maximum attemps for a device activation was reached. The authenticated user is blocked. Only sent if `code` is `invalidDeviceActivationCode`", + "type": "boolean" + }, + "code": { + "$ref": "#/components/schemas/ForbiddenErrorCode" + }, + "invalidDeviceConfirmation": { + "description": "The result associated to an invalid device confrmation. Only sent if `code` is `invalidDeviceConfirmation`", + "allOf": [ + { + "$ref": "#/components/schemas/InvalidDeviceConfirmationEnum" + } + ] + }, + "loginConfirmation": { + "description": "When returned, a login confirmation is required. Only sent if `code` is `loginConfirmation`.", + "allOf": [ + { + "$ref": "#/components/schemas/PasswordInput" + } + ] + } + } + }, + "ForgottenPasswordError": { + "description": "Error when changing a forgotten password", + "allOf": [ + { + "$ref": "#/components/schemas/Error" + }, + { + "type": "object", + "properties": { + "keyInvalidated": { + "description": "Flag indicating if the key received on the forgotten password reset request was invalidated because the maximum tries was reached. Only if code is `invalidSecurityAnswer`.", + "type": "boolean" + }, + "code": { + "$ref": "#/components/schemas/ForgottenPasswordErrorCode" + } + } + } + ] + }, + "ForgottenPasswordRequest": { + "description": "Definitions to request a the forgotten user identification or password change.", + "type": "object", + "properties": { + "user": { + "description": "An identification method for the user. Allows the same identification methods (principal types) as the login, plus e-mail and mobile phone (if they are used as identification methods).", + "type": "string" + }, + "sendMedium": { + "description": "Which medium to send the code which is required for proceeding with the operation", + "allOf": [ + { + "$ref": "#/components/schemas/SendMediumEnum" + } + ] + }, + "captcha": { + "description": "The captcha response required when something is returned in `DataForLogin.forgotPasswordCaptchaProvider`.", + "allOf": [ + { + "$ref": "#/components/schemas/CaptchaResponse" + } + ] + } + } + }, + "ForgottenPasswordResponse": { + "description": "Result of a request to change a forgotten password", + "type": "object", + "properties": { + "sendMedium": { + "description": "The medium to which the verification code was sent", + "allOf": [ + { + "$ref": "#/components/schemas/SendMediumEnum" + } + ] + }, + "sentTo": { + "description": "Either a single element array with the e-mail address or the mobile phone number to which the verification code was sent. If not exactly the value used to identify the user, the values will be masked, for example: `joh*******@email.com` or `(**) *****-*123`.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "FrontendBanner": { + "description": "A banner displayed in the new frontend.", + "allOf": [ + { + "$ref": "#/components/schemas/Entity" + }, + { + "type": "object", + "properties": { + "content": { + "description": "The banner content, in HTML format.", + "type": "string" + }, + "url": { + "description": "If set, is a URL to which the user should be redirected when clicking the banner.", + "type": "string" + }, + "newWindow": { + "description": "Only returned if `url` has a value. Indicates whether the link should be opened in another browser tab / window (true) or in the same (false).", + "type": "boolean" + }, + "menus": { + "description": "In which menus should this banner be displayed?", + "type": "array", + "items": { + "$ref": "#/components/schemas/FrontendMenuEnum" + } + }, + "themed": { + "description": "Whether banner background, border and padding should be applied.", + "type": "boolean" + } + } + } + ] + }, + "FrontendDashboardAccount": { + "description": "Account information displayed on the dashboard", + "type": "object", + "properties": { + "account": { + "$ref": "#/components/schemas/AccountWithCurrency" + }, + "balance": { + "description": "The current balance", + "type": "string", + "format": "number" + }, + "balanceHistory": { + "description": "The balance at each data point", + "type": "array", + "items": { + "$ref": "#/components/schemas/AccountBalanceEntry" + } + }, + "lastTransfers": { + "description": "The last transfers to show for this account. Only returned if not merging accounts", + "type": "array", + "items": { + "$ref": "#/components/schemas/AccountHistoryResult" + } + } + } + }, + "FrontendHomeContent": { + "description": "The home page displayed for guests", + "type": "object", + "properties": { + "layout": { + "description": "How this content page is presented", + "allOf": [ + { + "$ref": "#/components/schemas/FrontendContentLayoutEnum" + } + ] + }, + "title": { + "description": "The home page title, used when `layout` is a card", + "type": "string" + }, + "content": { + "description": "The HTML content", + "type": "string" + } + } + }, + "FrontendIcon": { + "description": "Represents an icon metadata for the page", + "type": "object", + "properties": { + "rel": { + "description": "The type of relation for the HTML link tag", + "type": "string" + }, + "width": { + "description": "The icon width", + "type": "integer" + }, + "height": { + "description": "The icon height", + "type": "integer" + }, + "url": { + "description": "The icon URL", + "type": "string" + } + } + }, + "FrontendPage": { + "description": "A customized page displayed in the new frontend", + "allOf": [ + { + "$ref": "#/components/schemas/InternalNamedEntity" + }, + { + "type": "object", + "properties": { + "title": { + "description": "The page title", + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/FrontendPageTypeEnum" + }, + "menu": { + "$ref": "#/components/schemas/FrontendMenuEnum" + }, + "layout": { + "$ref": "#/components/schemas/FrontendContentLayoutEnum" + }, + "svgIcon": { + "description": "The name of the SVG icon. The content of the icon can be obtained with `GET /images/svg-icons/{name}.svg`", + "type": "string" + }, + "url": { + "description": "The URL to use in the iframe. Only returned if `type` is either `url` or `iframe`.", + "type": "string" + }, + "operation": { + "description": "The custom operation to run. Only returned if `type` is `operation`.", + "allOf": [ + { + "$ref": "#/components/schemas/Operation" + } + ] + }, + "wizard": { + "description": "The custom wizard to run. Only returned if `type` is `wizard`.", + "allOf": [ + { + "$ref": "#/components/schemas/Wizard" + } + ] + } + } + } + ] + }, + "FrontendPageWithContent": { + "description": "A customized page displayed in the new frontend, together with its content", + "allOf": [ + { + "$ref": "#/components/schemas/FrontendPage" + }, + { + "type": "object", + "properties": { + "content": { + "description": "The HTML content of the page", + "type": "string" + } + } + } + ] + }, + "FrontendSettings": { + "description": "The settings of a user regarding the frontend", + "type": "object", + "properties": { + "frontend": { + "$ref": "#/components/schemas/FrontendEnum" + } + } + }, + "FullProfileEdit": { + "description": "Data sent to the server to edit the full profile at once", + "type": "object", + "properties": { + "user": { + "description": "The basic fields. If null, the fields are not modified", + "allOf": [ + { + "$ref": "#/components/schemas/UserEdit" + } + ] + }, + "createLandLinePhones": { + "description": "Land-line phones to be created. If not sent / empty, no land-line phones are created.", + "type": "array", + "items": { + "$ref": "#/components/schemas/PhoneNew" + } + }, + "createMobilePhones": { + "description": "Mobile phones to be created. If not sent / empty, no mobile phones are created.", + "type": "array", + "items": { + "$ref": "#/components/schemas/PhoneNew" + } + }, + "modifyLandLinePhones": { + "description": "Land-line phones to be modified. If not sent / empty, no land-line phones are modified", + "type": "array", + "items": { + "$ref": "#/components/schemas/PhoneEditWithId" + } + }, + "modifyMobilePhones": { + "description": "Mobile phones to be modified. If not sent / empty, no mobile phones are modified.", + "type": "array", + "items": { + "$ref": "#/components/schemas/PhoneEditWithId" + } + }, + "removePhones": { + "description": "Phones (both land-line and mobile) to be removed. If not sent / empty, no phones are removed.", + "type": "array", + "items": { + "type": "string" + } + }, + "createAddresses": { + "description": "Addresses to be created. If not sent / empty, no addresses are created.", + "type": "array", + "items": { + "$ref": "#/components/schemas/AddressNew" + } + }, + "modifyAddresses": { + "description": "Addresses to be modified. If not sent / empty, no addresses are modified.", + "type": "array", + "items": { + "$ref": "#/components/schemas/AddressEditWithId" + } + }, + "removeAddresses": { + "description": "Addresses to be removed. If not sent / empty, no addresses are removed.", + "type": "array", + "items": { + "type": "string" + } + }, + "createContactInfos": { + "description": "Additional contacts to be created. If not sent / empty, no additional contacts are created.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ContactInfoNew" + } + }, + "modifyContactInfos": { + "description": "Additional contacts to be modified. If not sent / empty, no additional contacts are modified.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ContactInfoEditWithId" + } + }, + "removeContactInfos": { + "description": "Additional contacts to be removed. If not sent / empty, no additional contacts are removed.", + "type": "array", + "items": { + "type": "string" + } + }, + "addImages": { + "description": "Identifiers of previously uploaded temporary images to be added as profile images. If not sent / empty, no images are added.", + "type": "array", + "items": { + "type": "string" + } + }, + "removeImages": { + "description": "Identifiers of existing profile images to be removed. If not sent / empty, no images are removed.", + "type": "array", + "items": { + "type": "string" + } + }, + "reorderImages": { + "description": "Identifiers of either existing or added profile images in the order they should be listed.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "FullProfileEditResult": { + "description": "Result of saving the full profile at once", + "allOf": [ + { + "$ref": "#/components/schemas/BasicFullProfileEditResult" + }, + { + "type": "object", + "properties": { + "createdAddresses": { + "description": "Identifiers of created addresses", + "type": "array", + "items": { + "type": "string" + } + }, + "createdContactInfos": { + "description": "Identifiers of created additional contacts", + "type": "array", + "items": { + "type": "string" + } + }, + "createdImages": { + "description": "Identifiers of created profile images", + "type": "array", + "items": { + "type": "string" + } + } + } + } + ] + }, + "FullTextQueryFilters": { + "description": "Base definitions for search filters which have keywords and user profile fields", + "x-abstract": true, + "allOf": [ + { + "$ref": "#/components/schemas/QueryFilters" + }, + { + "type": "object", + "properties": { + "keywords": { + "type": "string", + "description": "Textual search keywords. Sometimes, like in user search, the fields matched depends on what is configured on the products." + }, + "profileFields": { + "type": "array", + "items": { + "type": "string" + }, + "description": "User profile fields, both basic (full name, login name, phone, e-mail, etc) and custom fields, that are used for search. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by `:` (colon). For example, `profileFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, `profileFields=field1:valueA|valueB`. The accepted fields depend on the products the authenticated user has. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `profileFields=rank:bronze|silver,birthDate:2000-01-01|2001-12-31` would match results whose custom field with internal name 'rank' is either bronze or silver, and whose 'birthDate' is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `profileFields=birthDate:|2001-12-31`.\n\nThe basic profile fields have one of the following identifiers:\n\n- `name` or `fullName`: Full name;\n- `username`, `loginName` or `login`: Login name;\n- `email`: E-mail;\n- `phone`: Phone;\n- `accountNumber`, `account`: Account number;\n- `image`: Image (accepts a boolean value, indicating that either\n it is required that users either have images or not).\n\n\nIf address is an allowed profile field for search, specific address fields may be searched. The allowed ones are normally returned as the `addressFieldsInSearch` field in the corresponding result from a data-for-search request.\nThe specific address fields are:\n\n- `address`: Searches on any address field (not a specific field);\n- `address.address`: Searches on the fields that represent the\n street address, which are `addressLine1`,\n `addressLine2`,\n `street`,\n `buildingNumber` and\n `complement`.\n Note that normally only a subset of them should be enabled in the\n configuration (either line 1 / 2 or street + number + complement);\n\n- `address.zip`: Searches for matching zip (postal) code;\n- `address.poBox`: Searches for matching postal box;\n- `address.neighborhood`: Searches by neighborhood;\n- `address.city`: Searches by city;\n- `address.region`: Searches by region (or state);\n- `address.country`: Searches by ISO 3166-1 alpha-2 country code.\nA note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `profileFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `profileFields=dynamic:'business`." + } + } + } + ] + }, + "FullTextWithDistanceQueryFilters": { + "description": "Base definitions for full-text search filters which also can search by distance", + "x-abstract": true, + "allOf": [ + { + "$ref": "#/components/schemas/FullTextQueryFilters" + }, + { + "type": "object", + "properties": { + "latitude": { + "description": "The reference latitude for distance searches", + "type": "number", + "format": "double" + }, + "longitude": { + "description": "The reference longitude for distance searches", + "type": "number", + "format": "double" + }, + "maxDistance": { + "description": "Maximum straight-line distance between the informed location and the resulting address. Is measured either in kilometers or miles, depending on the configuration. Only accepted if both `longitude` and `latitude` parameters are passed with the actual reference position.", + "type": "number", + "format": "double" + } + } + } + ] + }, + "GeneralAccountBalanceLimitsResult": { + "description": "Result for the list of a general search of account balance limits", + "allOf": [ + { + "$ref": "#/components/schemas/AccountBalanceLimitsResult" + }, + { + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/User" + } + } + } + ] + }, + "GeneralAccountPaymentLimitsResult": { + "description": "Result for the list of a general search of account payment limits", + "allOf": [ + { + "$ref": "#/components/schemas/AccountPaymentLimitsResult" + }, + { + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/User" + } + } + } + ] + }, + "GeneralOperatorsDataForSearch": { + "type": "object", + "properties": { + "userGroups": { + "description": "The groups the authenticated user can use to filter users. Admins can always filter by groups, while users depend on a permission, which can be to only view group sets, only groups or none.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Group" + } + }, + "query": { + "description": "Default query filters to search operators", + "allOf": [ + { + "$ref": "#/components/schemas/GeneralOperatorsQueryFilters" + } + ] + } + } + }, + "GeneralOperatorsQueryFilters": { + "description": "Definitions for general operators search filters", + "allOf": [ + { + "$ref": "#/components/schemas/BasicOperatorQueryFilters" + }, + { + "type": "object", + "properties": { + "userGroups": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Either id or internal names of user groups / group sets" + }, + "broker": { + "type": "string", + "description": "Either id or a principal (login name, e-mail, etc) of the user broker" + } + } + } + ] + }, + "GeneralRecordsDataForSearch": { + "description": "Data for searching records of a type, from any user", + "allOf": [ + { + "$ref": "#/components/schemas/BaseRecordDataForSearch" + }, + { + "type": "object", + "properties": { + "userStatuses": { + "description": "The possible statuses of the record's owner", + "type": "array", + "items": { + "$ref": "#/components/schemas/UserStatusEnum" + } + }, + "groups": { + "description": "The groups the authenticated user can use to filter user records", + "type": "array", + "items": { + "$ref": "#/components/schemas/Group" + } + }, + "basicProfileFields": { + "description": "The list of basic user profile fields that can be used as search filters. Only returned if searching user records.", + "type": "array", + "items": { + "$ref": "#/components/schemas/BasicProfileFieldInput" + } + }, + "customProfileFields": { + "description": "The list of custom user profile fields that can be used as search filters. Only returned if searching user records.", + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldDetailed" + } + }, + "addressFieldsInSearch": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AddressQueryFieldEnum" + } + }, + "query": { + "description": "Default query filters for searching records", + "allOf": [ + { + "$ref": "#/components/schemas/GeneralRecordsQueryFilters" + } + ] + } + } + } + ] + }, + "GeneralRecordsQueryFilters": { + "description": "Query filters for searching records of a type, regardless the user", + "allOf": [ + { + "$ref": "#/components/schemas/RecordQueryFilters" + }, + { + "type": "object", + "properties": { + "brokers": { + "description": "Either the ids or identification methods of record owners' brokers", + "type": "array", + "items": { + "type": "string" + } + }, + "groups": { + "description": "Either the ids or internal names of record owners' groups", + "type": "array", + "items": { + "type": "string" + } + }, + "userStatuses": { + "description": "The possible statuses of the record's owner", + "type": "array", + "items": { + "$ref": "#/components/schemas/UserStatusEnum" + } + }, + "user": { + "description": "Either the id or identifier of the record owner", + "type": "string" + } + } + } + ] + }, + "GeneralVouchersDataForSearch": { + "description": "Contains configuration data for a general vouchers search", + "allOf": [ + { + "$ref": "#/components/schemas/BaseVouchersDataForSearch" + }, + { + "type": "object", + "properties": { + "canGenerate": { + "description": "Can the authenticated user generate vouchers?", + "type": "boolean" + }, + "userGroups": { + "description": "Visible user groups for the authenticated user", + "type": "array", + "items": { + "$ref": "#/components/schemas/Group" + } + }, + "exportFormats": { + "description": "The formats which the search results can be exported.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExportFormat" + } + }, + "query": { + "$ref": "#/components/schemas/VouchersQueryFilters" + }, + "customFields": { + "description": "The list of custom fields that can be used as search filters if the internal names are present in the `fieldsInBasicSearch` property.", + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldDetailed" + } + }, + "fieldsInBasicSearch": { + "description": "The internal names of the custom fields that should be used as search filters in the basic section (separated fields, not keywords)", + "type": "array", + "items": { + "type": "string" + } + } + } + } + ] + }, + "GenerateVoucher": { + "description": "Parameters for generate vouchers", + "allOf": [ + { + "$ref": "#/components/schemas/CreateVoucher" + }, + { + "type": "object", + "properties": { + "inactive": { + "description": "When set to true, the generated vouchers will be in the `inactive` status.", + "type": "boolean" + }, + "user": { + "description": "The vouchers owner. If not given, the vouchers are generated without owner. Ignored if `inactive` is true.", + "type": "string" + } + } + } + ] + }, + "GeographicalCoordinate": { + "description": "A geographical coordinate with latitude and longitude", + "type": "object", + "properties": { + "latitude": { + "type": "number", + "format": "double", + "description": "The latitude" + }, + "longitude": { + "type": "number", + "format": "double", + "description": "The longitude" + } + } + }, + "Group": { + "description": "Contains data of a group", + "allOf": [ + { + "$ref": "#/components/schemas/InternalNamedEntity" + }, + { + "type": "object", + "properties": { + "groupSet": { + "description": "The internal name or id of the group set of this group. Only makes sense if is a user or broker group. Administrator groups or group sets cannot have a group set.", + "type": "string" + }, + "kind": { + "$ref": "#/components/schemas/GroupKind" + } + } + } + ] + }, + "GroupForRegistration": { + "description": "Contains data for a possible group for user registration", + "allOf": [ + { + "$ref": "#/components/schemas/InternalNamedEntity" + }, + { + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "The description set on the group to be displayed to the user" + } + } + } + ] + }, + "GroupMembershipData": { + "description": "Contains the current user / operator group, as well as other information", + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/User" + }, + "status": { + "$ref": "#/components/schemas/UserStatusEnum" + }, + "group": { + "$ref": "#/components/schemas/Group" + }, + "groupSets": { + "description": "List of group sets which can be referenced on groups on either `possibleNewGroups` or `history.group`. Not sent for operators.", + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityReference" + } + }, + "possibleNewGroups": { + "description": "If the authenticated user can change the user / operator to a new group, contains the list of groups that can be assigned.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Group" + } + }, + "history": { + "description": "Contains the history entries for all group changes", + "type": "array", + "items": { + "$ref": "#/components/schemas/GroupMembershipLog" + } + } + } + }, + "GroupMembershipLog": { + "description": "Information regarding a specific group membership change", + "type": "object", + "properties": { + "by": { + "$ref": "#/components/schemas/User" + }, + "group": { + "$ref": "#/components/schemas/Group" + }, + "period": { + "description": "The begin and end date the for this group. The current group has no end date.", + "allOf": [ + { + "$ref": "#/components/schemas/DatePeriod" + } + ] + }, + "comment": { + "description": "Comments supplied by the manager that performed the group change", + "type": "string" + } + } + }, + "HttpRequestData": { + "description": "Contains data of an HTTP request", + "type": "object", + "properties": { + "method": { + "type": "string", + "description": "The HTTP method" + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "The HTTP request headers" + }, + "parameters": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "The HTTP request query parameters" + }, + "body": { + "type": "string", + "description": "The HTTP request body" + } + } + }, + "IAddress": { + "description": "Interface containing the common address properties", + "type": "object", + "x-interface": true, + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the descriptive address" + }, + "addressLine2": { + "type": "string", + "description": "The second line of the descriptive address" + }, + "street": { + "type": "string", + "description": "The street name" + }, + "buildingNumber": { + "type": "string", + "description": "The numeric identifier for a land parcel, house, building or other" + }, + "complement": { + "type": "string", + "description": "The complement (like apartment number)" + }, + "zip": { + "type": "string", + "description": "A zip code that identifies a specific geographic (postal) delivery area" + }, + "poBox": { + "type": "string", + "description": "The post-office box, is an uniquely addressable box" + }, + "neighborhood": { + "type": "string", + "description": "The neighborhood name" + }, + "city": { + "type": "string", + "description": "The city name" + }, + "region": { + "type": "string", + "description": "The region or state" + }, + "country": { + "type": "string", + "description": "The country, represented as 2-letter, uppercase, ISO 3166-1 code" + }, + "location": { + "description": "The geolocation of the current address", + "allOf": [ + { + "$ref": "#/components/schemas/GeographicalCoordinate" + } + ] + } + } + }, + "IBasicUserNew": { + "description": "Interface containing the common properties to register a user / operator", + "x-interface": true, + "type": "object", + "properties": { + "mobilePhones": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PhoneNew" + }, + "description": "Mobile phones to be registered together with the user" + }, + "landLinePhones": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PhoneNew" + }, + "description": "Land-line phones to be registered together with the user" + }, + "passwords": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PasswordRegistration" + }, + "description": "The initial passwords of the user" + }, + "skipActivationEmail": { + "type": "boolean", + "description": "When set to true, the activation e-mail is not sent to the registered user. Can only be used when an administrator / broker is registering a user, and ignored on public registrations (the e-mail is always sent on public registrations)." + } + } + }, + "IContactInfo": { + "description": "Interface containing the common contact info properties", + "type": "object", + "x-interface": true, + "properties": { + "email": { + "type": "string", + "description": "The e-mail for this additional contact information" + }, + "mobilePhone": { + "type": "string", + "description": "The formatted mobile phone for this additional contact information" + }, + "landLinePhone": { + "type": "string", + "description": "The formatted landline phone for this additional contact information" + }, + "landLineExtension": { + "type": "string", + "description": "The landline phone extension for this additional contact information" + } + } + }, + "INormalizedPhones": { + "description": "Contains normalized phone numbers", + "x-interface": true, + "type": "object", + "properties": { + "normalizedMobilePhone": { + "type": "string", + "description": "The mobile phone, normalized to the E.164 format" + }, + "normalizedLandLinePhone": { + "type": "string", + "description": "The land-line phone, normalized to the E.164 format" + } + } + }, + "IPhone": { + "description": "Interface containing the common phone properties", + "type": "object", + "x-interface": true, + "properties": { + "name": { + "type": "string", + "description": "The phone name" + }, + "number": { + "type": "string", + "description": "The formatted number" + }, + "extension": { + "type": "string", + "description": "The number extension, only for landLine phones, and is only used if the phone configuration states that extensions are enabled." + } + } + }, + "IPhoneDetailed": { + "description": "Interface containing additional common phone properties", + "type": "object", + "x-interface": true, + "x-implements": "IPhone", + "properties": { + "name": { + "type": "string", + "description": "The phone name" + }, + "number": { + "type": "string", + "description": "The formatted number" + }, + "extension": { + "type": "string", + "description": "The number extension, only for landLine phones, and is only used if the phone configuration states that extensions are enabled." + }, + "hidden": { + "type": "boolean", + "description": "Indicates whether this phone is private / hidden for other users (`true`) or public / visible to all users (`false`)." + }, + "enabledForSms": { + "type": "boolean", + "description": "Only applicable if this represents a mobile phone. Whether this mobile phone is enabled for SMS, both receiving notifications and sending SMS operations. Can only be set if the mobile phone is verified." + }, + "verified": { + "type": "boolean", + "description": "Only applicable if this represents a mobile phone. Whether this mobile is verified. Can only be directly set by administrators. Regular users need to verify it." + } + } + }, + "IUser": { + "description": "Interface containing the common user properties", + "type": "object", + "x-interface": true, + "properties": { + "name": { + "type": "string", + "description": "The user's full name" + }, + "username": { + "type": "string", + "description": "The user's login name" + }, + "email": { + "type": "string", + "description": "The user's e-mail" + } + } + }, + "IdentityProvider": { + "description": "A reference to an identity provider", + "allOf": [ + { + "$ref": "#/components/schemas/InternalNamedEntity" + }, + { + "type": "object", + "properties": { + "backgroundColor": { + "description": "The background color for the button that represents this provider", + "type": "string" + }, + "borderColor": { + "description": "The border color for the button that represents this provider", + "type": "string" + }, + "textColor": { + "description": "The text color for the button that represents this provider", + "type": "string" + }, + "image": { + "description": "The provider image", + "allOf": [ + { + "$ref": "#/components/schemas/Image" + } + ] + } + } + } + ] + }, + "IdentityProviderCallbackResult": { + "description": "Result of a callback by an identity provider", + "type": "object", + "properties": { + "identityProvider": { + "$ref": "#/components/schemas/IdentityProvider" + }, + "status": { + "$ref": "#/components/schemas/IdentityProviderCallbackStatusEnum" + }, + "requestId": { + "description": "The identifier used to track this operation.", + "type": "string" + }, + "sessionToken": { + "description": "If the user was logged-in, this is the token identifying the session. Only returned if `status` is either: `loginLink`, `loginEmail` or `registrationDone`.", + "type": "string" + }, + "name": { + "description": "The user display name as returned by the provider. Only returned if `status` is `registrationData`.", + "type": "string" + }, + "email": { + "description": "The user e-mail as returned by the provider. Only returned if `status` is `registrationData`.", + "type": "string" + }, + "username": { + "description": "The user login name as returned by the provider. Only returned if `status` is `registrationData`.", + "type": "string" + }, + "mobilePhone": { + "description": "The user mobile phone number name as returned by the provider. Only returned if `status` is `registrationData`.", + "type": "string" + }, + "landLinePhone": { + "description": "The user land-line phone number name as returned by the provider. Only returned if `status` is `registrationData`.", + "type": "string" + }, + "landLineExtension": { + "description": "The user land-line phone extension name as returned by the provider. Only returned if `status` is `registrationData`.", + "type": "string" + }, + "image": { + "description": "The user image as returned by the provider. Only returned if `status` is `registrationData`.", + "allOf": [ + { + "$ref": "#/components/schemas/Image" + } + ] + }, + "customValues": { + "description": "The user custom field values as returned by the provider. Only returned if `status` is `registrationData`.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "wizardExecutionData": { + "description": "Only when the request is for a registration wizard. Contains the data for the next wizard step.", + "allOf": [ + { + "$ref": "#/components/schemas/WizardExecutionData" + } + ] + }, + "errorMessage": { + "description": "Description for the error being returned. It is possible that no message is returned. In this case, a generic error message should be displayed for the user. Only returned if `status` is `error`.", + "type": "string" + }, + "pinCreationToken": { + "description": "A token (challenge) generated only If the user was logged-in (i.e a `sessionToken` is returned). It can be used to confirm the pin creation operation. Is has a validity of 6 minutes after the session was created. After that time the pin creation can be confirmed only using the current login password.", + "type": "string" + } + } + }, + "IdentityProviderRequestResult": { + "description": "Result of the preparation of an operation with an identity provider", + "type": "object", + "properties": { + "identityProvider": { + "$ref": "#/components/schemas/IdentityProvider" + }, + "requestId": { + "description": "The identifier used to track this operation", + "type": "string" + }, + "url": { + "description": "The URL which should be opened in a new browser window / popup to get the user consent.", + "type": "string" + } + } + }, + "IdentityProvidersPermissions": { + "description": "Permissions over the logged user's identity provider links", + "type": "object", + "properties": { + "enabled": { + "description": "Is the identity providers functionality enabled for the logged user?", + "type": "boolean" + } + } + }, + "Image": { + "description": "Contains data for displaying an image", + "allOf": [ + { + "$ref": "#/components/schemas/StoredFile" + }, + { + "type": "object", + "properties": { + "width": { + "type": "integer", + "description": "The image width, in pixels" + }, + "height": { + "type": "integer", + "description": "The image height, in pixels" + } + } + } + ] + }, + "ImageConfigurationForUserProfile": { + "description": "User images data sent when editing the full profile", + "type": "object", + "properties": { + "manage": { + "description": "Can the authenticated user has permission to manage images?", + "type": "boolean" + }, + "maxImages": { + "description": "The maximum allowed number of profile images", + "type": "integer" + }, + "availability": { + "$ref": "#/components/schemas/AvailabilityEnum" + } + } + }, + "ImageView": { + "description": "Details about an image", + "allOf": [ + { + "$ref": "#/components/schemas/Image" + }, + { + "type": "object", + "properties": { + "convertedToJpeg": { + "description": "Indicates whether this was originally a PNG format that exceeded the maximum allowed size and was automatically converted to JPEG.", + "type": "boolean" + }, + "kind": { + "$ref": "#/components/schemas/ImageKind" + } + } + } + ] + }, + "ImagesListData": { + "description": "Contains information for a list of images, such as permissions and the list of images itself", + "type": "object", + "properties": { + "canEdit": { + "description": "Does the authenticated user has permission to edit these images?", + "type": "boolean" + }, + "canCreate": { + "description": "Does the authenticated user has permission to create a new image?", + "type": "boolean" + }, + "maxImages": { + "description": "The maximum number of images allowed", + "type": "integer" + }, + "images": { + "description": "The list of images", + "type": "array", + "items": { + "$ref": "#/components/schemas/Image" + } + }, + "availability": { + "$ref": "#/components/schemas/AvailabilityEnum" + } + } + }, + "ImagesPermissions": { + "description": "Permissions over images", + "type": "object", + "properties": { + "myCustom": { + "description": "Whether custom images are enabled for the logged user", + "type": "boolean" + }, + "systemCategories": { + "description": "Visible system image categories.", + "type": "array", + "items": { + "$ref": "#/components/schemas/SystemImageCategoryPermissions" + } + } + } + }, + "ImportedField": { + "description": "A field in an imported file.", + "allOf": [ + { + "$ref": "#/components/schemas/NamedEntity" + }, + { + "type": "object", + "properties": { + "fieldName": { + "description": "The original field name, used as column in the CSV file.", + "type": "string" + }, + "fieldId": { + "description": "An id which splits distinct fields with the same name, for example, it is possible to import multiple phones when importing a user. Each phone field will contain a distinct id.", + "type": "string" + } + } + } + ] + }, + "ImportedFile": { + "description": "Reference to an imported file.", + "allOf": [ + { + "$ref": "#/components/schemas/Entity" + }, + { + "type": "object", + "properties": { + "kind": { + "$ref": "#/components/schemas/ImportedFileKind" + }, + "status": { + "$ref": "#/components/schemas/ImportedFileStatusEnum" + }, + "fileName": { + "description": "The file name used on import.", + "type": "string" + }, + "creationDate": { + "description": "The date the file was uploaded.", + "type": "string", + "format": "date-time" + }, + "processingDate": { + "description": "The date the file started being processed.", + "type": "string", + "format": "date-time" + } + } + } + ] + }, + "ImportedFileDataForEdit": { + "description": "Data for editing an imported file.", + "type": "object", + "properties": { + "kind": { + "$ref": "#/components/schemas/ImportedFileKind" + }, + "status": { + "$ref": "#/components/schemas/ImportedFileStatusEnum" + }, + "user": { + "$ref": "#/components/schemas/User" + }, + "fileName": { + "description": "The file name used on import.", + "type": "string" + }, + "creationDate": { + "description": "The date the file was uploaded.", + "type": "string", + "format": "date-time" + }, + "importedFile": { + "description": "The imported file that is being edited", + "allOf": [ + { + "$ref": "#/components/schemas/ImportedFileEdit" + } + ] + } + } + }, + "ImportedFileDataForNew": { + "description": "Configuration data to import a new file.", + "type": "object", + "properties": { + "kind": { + "$ref": "#/components/schemas/ImportedFileKind" + }, + "user": { + "$ref": "#/components/schemas/User" + }, + "confirmationPasswordInput": { + "description": "If a confirmation password is used, contains the definitions on how to request that password from the user. This confirmation password is required when performing sensible actions. Sometimes this is dynamic, for example, the confirmation might be configured to be used only once per session, or operations like payments may have a limit per day to be without confirmation (pinless).", + "allOf": [ + { + "$ref": "#/components/schemas/PasswordInput" + } + ] + }, + "separator": { + "description": "The separator character in the CSV file, as configured in Cyclos.", + "type": "string" + }, + "groups": { + "description": "The available user groups. Only if `kind` is `users`.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Group" + } + }, + "currencies": { + "description": "The available currencies. Only if `kind` is `ads`.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Currency" + } + }, + "recordTypes": { + "description": "The available record types. Only if `kind` is `records`.", + "type": "array", + "items": { + "$ref": "#/components/schemas/RecordType" + } + }, + "accounts": { + "description": "The available user accounts. Only if `kind` is `userPayments`.", + "type": "array", + "items": { + "$ref": "#/components/schemas/AccountWithStatus" + } + }, + "paymentTypes": { + "description": "The available payment types. Only if `kind` is `userPayments`.", + "type": "array", + "items": { + "$ref": "#/components/schemas/TransferType" + } + }, + "dataForSend": { + "description": "Data for sending vouchers. Only if `kind` is `userSendVouchers`.", + "allOf": [ + { + "$ref": "#/components/schemas/VoucherDataForBuy" + } + ] + }, + "importedFile": { + "description": "The object that can be altered and posted back when importing the file", + "allOf": [ + { + "$ref": "#/components/schemas/ImportedFileNew" + } + ] + } + } + }, + "ImportedFileDataForSearch": { + "description": "Configuration data for searching imported files", + "type": "object", + "properties": { + "kinds": { + "description": "Visible imported file kinds for the requested context.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ImportedFileKind" + } + }, + "manageKinds": { + "description": "Kinds of imported files the logged user can manage (import new / remove).", + "type": "array", + "items": { + "$ref": "#/components/schemas/ImportedFileKind" + } + }, + "user": { + "description": "The document's owner. Only returned if searching imports of a specfific user.", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "query": { + "$ref": "#/components/schemas/ImportedFileQueryFilters" + } + } + }, + "ImportedFileEdit": { + "description": "Parameters for editing an existing imported file", + "type": "object", + "properties": { + "version": { + "type": "integer", + "description": "The version stamp for the current object, used for optimistic locking. When saving, the same version as previously received needs to be passed back. If no one else has saved the object, the version will match and the object will be updated. However, if someone other has saved the object, the version will no longer match, and an error will be raised. This is used to prevent multiple users (or processes) from updating the same object and unwilingly overridding the property values, leading to data loss." + }, + "description": { + "description": "The imported file description", + "type": "string" + }, + "fileName": { + "description": "The file name used on import.", + "type": "string" + }, + "permanent": { + "description": "Indicates whether this file was imported with setting to be permanent (never archived).", + "type": "boolean" + }, + "processAutomatically": { + "description": "Indicates whether the file should be immediately imported as soon as the CSV is parsed.", + "type": "boolean" + } + } + }, + "ImportedFileNew": { + "description": "Configuration data to import a new file.", + "type": "object", + "properties": { + "description": { + "description": "This imported file description", + "type": "string" + }, + "permanent": { + "description": "Whether this imported file should be permanent (never archived).", + "type": "boolean" + }, + "processAutomatically": { + "description": "Whether this imported file should be processed automatically as soon as possible.", + "type": "boolean" + }, + "useGroupFromFile": { + "description": "When set to `true` will enable the `group` column in the imported file. In this case, the `group` parameter is optional, and used as default. Only used if `kind` is `users`.", + "type": "boolean" + }, + "group": { + "description": "If `useGroupFromFile` is `false`, this will be required, and will be the group for imported users. Otherwise, when `true`, means the default group for imported users if the `group` column is empty. Only used if `useGroupFromFile` is `true` and `kind` is `users`.", + "type": "string" + }, + "sendActivationEmail": { + "description": "Whether to send an activation email to each registered user. Only used if `kind` is `users`.", + "type": "boolean" + }, + "currency": { + "description": "The id or internal name of the currency for imported advertisements. Only used if `kind` is `ads`.", + "type": "string" + }, + "recordType": { + "description": "The id or internal name of the type for imported records. Only used if `kind` is `records`.", + "type": "string" + }, + "sendNotifications": { + "description": "Whether to send notification for each imported payment. Only used if `kind` is `payments`.", + "type": "boolean" + }, + "paymentType": { + "description": "The required id or composite internal name (`accountType.transferType`) of the payment type for the imported payments. Only if `kind` is `enum:ImportedFileKind.userPayments`.", + "type": "string" + }, + "voucherType": { + "description": "The required id or internal name of the voucher type for sent vouchers. Only if `kind` is `enum:ImportedFileKind.userSendVouchers`.", + "type": "string" + }, + "useAmountFromFile": { + "description": "When set to `true` will enable the `amount` column in the imported file. In this case, the `amount` parameter is optional, and used as default. Only used if `kind` is `userSendVouchers`.", + "type": "boolean" + }, + "amount": { + "description": "If `useAmountFromFile` is `false`, this will be required, and will be the amount for all sent vouchers. Otherwise, when `true`, means the default amount for sent vouchers if the if the `amount` column is empty. Only used if `useAmountFromFile` is `true` and `kind` is `userSendVouchers`.", + "type": "string", + "format": "number" + }, + "sendMessage": { + "description": "An optional message sent together with the voucher via email. Can use variables: `{name}`, `{email}` and `{amount}`. Only used if `kind` is `userSendVouchers`.", + "type": "string" + } + } + }, + "ImportedFileProgress": { + "description": "Contains the progress information of an imported file", + "type": "object", + "properties": { + "progress": { + "description": "The import progress, between 0 and 1.", + "type": "number", + "format": "double" + }, + "status": { + "$ref": "#/components/schemas/ImportedFileStatusEnum" + }, + "linesImportError": { + "description": "The number of lines that had error on import (have `ImportedLine.status` = `importError`).", + "type": "integer" + }, + "linesImported": { + "description": "The number of lines that were processed and imported (have `ImportedLine.status` = `imported`).", + "type": "integer" + }, + "linesReady": { + "description": "The number of lines that are ready to import (have `ImportedLine.status` = `ready`).", + "type": "integer" + }, + "linesSkipped": { + "description": "The number of lines that could be imported but were marked to skip (have `ImportedLine.status` = `skipped`).", + "type": "integer" + }, + "linesValidationError": { + "description": "The number of lines that failed validation and cannot be imported (have `ImportedLine.status` = `validationError`).", + "type": "integer" + } + } + }, + "ImportedFileQueryFilters": { + "description": "Query filters for records", + "allOf": [ + { + "$ref": "#/components/schemas/QueryFilters" + }, + { + "type": "object", + "properties": { + "creationPeriod": { + "description": "The minimum / maximum creation date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "kinds": { + "description": "The kinds to filter", + "type": "array", + "items": { + "$ref": "#/components/schemas/ImportedFileKind" + } + }, + "statuses": { + "description": "The statuses to filter", + "type": "array", + "items": { + "$ref": "#/components/schemas/ImportedFileStatusEnum" + } + } + } + } + ] + }, + "ImportedFileResult": { + "description": "Search results data of an imported file.", + "allOf": [ + { + "$ref": "#/components/schemas/ImportedFile" + }, + { + "type": "object", + "properties": { + "by": { + "description": "The user which imported the file.", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "description": { + "description": "The (optional) file description.", + "type": "string" + }, + "errorMessage": { + "description": "Only if `status` is either `invalid` or `internalError`.", + "type": "string" + } + } + } + ] + }, + "ImportedFileView": { + "description": "Details of an imported file.", + "allOf": [ + { + "$ref": "#/components/schemas/ImportedFileResult" + }, + { + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/User" + }, + "archiveDate": { + "description": "The date where the imported file was archived. Only if `status` is `archived`.", + "type": "string", + "format": "date-time" + }, + "progress": { + "$ref": "#/components/schemas/ImportedFileProgress" + }, + "permanent": { + "description": "Indicates whether this file was imported with setting to be permanent (never archived).", + "type": "boolean" + }, + "processAutomatically": { + "description": "Indicates whether the file should be immediately imported as soon as the CSV is parsed.", + "type": "boolean" + }, + "fields": { + "description": "The fields in the imported file", + "type": "array", + "items": { + "$ref": "#/components/schemas/ImportedField" + } + }, + "ignoredFields": { + "description": "The column names that were ignored (invalid)", + "type": "array", + "items": { + "type": "string" + } + }, + "canEdit": { + "description": "Can the authenticated user edit this import?", + "type": "boolean" + }, + "canRemove": { + "description": "Can the authenticated user remove this import?", + "type": "boolean" + }, + "canProcess": { + "description": "Can the authenticated user start processing this import?", + "type": "boolean" + }, + "canAbort": { + "description": "Can the authenticated user abort this import?", + "type": "boolean" + }, + "useGroupFromFile": { + "description": "Is the `group` enabled in the imported file? Only if `kind` is `users`.", + "type": "boolean" + }, + "group": { + "description": "Depending on `useGroupFromFile`, either the group or default group. Only if `kind` is `users`.", + "allOf": [ + { + "$ref": "#/components/schemas/Group" + } + ] + }, + "sendActivationEmail": { + "description": "Whether to send an activation email to each registered user. Only if `kind` is `users`.", + "type": "boolean" + }, + "currency": { + "description": "The currency for imported advertisements. Only if `kind` is `ads`.", + "allOf": [ + { + "$ref": "#/components/schemas/Currency" + } + ] + }, + "recordType": { + "description": "The type for imported records. Only if `kind` is `records`.", + "allOf": [ + { + "$ref": "#/components/schemas/RecordType" + } + ] + }, + "sendNotifications": { + "description": "Whether to send notification for each imported payment. Only if `kind` is `payments`.", + "type": "boolean" + }, + "paymentType": { + "description": "The payment type for imported payments. Only if `kind` is `userPayments`.", + "allOf": [ + { + "$ref": "#/components/schemas/TransferType" + } + ] + }, + "voucherType": { + "description": "The voucher type for sent vouchers. Only if `kind` is `enum:ImportedFileKind.userSendVouchers`.", + "allOf": [ + { + "$ref": "#/components/schemas/VoucherType" + } + ] + }, + "useAmountFromFile": { + "description": "Is the `amount` column enabled in the imported file? Only used if `kind` is `userSendVouchers`.", + "type": "boolean" + }, + "amount": { + "description": "Depending on `useAmountFromFile`, either the amount or default amount for sent vouchers. Only `kind` is `userSendVouchers`.", + "type": "string", + "format": "number" + }, + "sendMessage": { + "description": "A message sent together with the voucher via email. Can use variables: `{name}`, `{email}` and `{amount}`. Only used if `kind` is `userSendVouchers`.", + "type": "string" + } + } + } + ] + }, + "ImportedFileWithUser": { + "description": "Imported file together with its owner", + "allOf": [ + { + "$ref": "#/components/schemas/ImportedFile" + }, + { + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/User" + } + } + } + ] + }, + "ImportedLineDataForEdit": { + "description": "Data for editing an imported line.", + "type": "object", + "properties": { + "file": { + "$ref": "#/components/schemas/ImportedFileWithUser" + }, + "fields": { + "description": "The fields in the imported file", + "type": "array", + "items": { + "$ref": "#/components/schemas/ImportedField" + } + }, + "lineNumber": { + "description": "The line number in the original file.", + "type": "integer" + }, + "status": { + "$ref": "#/components/schemas/ImportedLineStatusEnum" + }, + "errorMessage": { + "description": "Error message. Only if `status` is either `validationError` or `importError`.", + "type": "string" + }, + "canEdit": { + "description": "Can the logged user edit the given line?", + "type": "boolean" + }, + "importedLine": { + "description": "The imported line that is being edited", + "allOf": [ + { + "$ref": "#/components/schemas/ImportedLineEdit" + } + ] + } + } + }, + "ImportedLineDataForSearch": { + "description": "Configuration data for searching imported lines of a given file", + "type": "object", + "properties": { + "file": { + "$ref": "#/components/schemas/ImportedFile" + }, + "fieldsInList": { + "description": "Fields which should be displayed in the list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ImportedField" + } + }, + "canSkipOrInclude": { + "description": "Can the authenticated user mark lines as skipped / included?", + "type": "boolean" + }, + "query": { + "$ref": "#/components/schemas/ImportedLineQueryFilters" + } + } + }, + "ImportedLineEdit": { + "description": "Posted data to edit an imported line.", + "type": "object", + "properties": { + "version": { + "type": "integer", + "description": "The version stamp for the current object, used for optimistic locking. When saving, the same version as previously received needs to be passed back. If no one else has saved the object, the version will match and the object will be updated. However, if someone other has saved the object, the version will no longer match, and an error will be raised. This is used to prevent multiple users (or processes) from updating the same object and unwilingly overridding the property values, leading to data loss." + }, + "values": { + "description": "The imported line values. They refer to positional fields in `data`.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "ImportedLineQueryFilters": { + "description": "Query filters for records", + "allOf": [ + { + "$ref": "#/components/schemas/QueryFilters" + }, + { + "type": "object", + "properties": { + "keywords": { + "description": "Keywords to search within the line values", + "type": "string" + }, + "lineNumbers": { + "description": "The line numbers to include.", + "type": "array", + "items": { + "type": "integer" + } + }, + "statuses": { + "description": "The statuses to filter.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ImportedLineStatusEnum" + } + } + } + } + ] + }, + "ImportedLineResult": { + "description": "Search results data of an imported line.", + "allOf": [ + { + "$ref": "#/components/schemas/Entity" + }, + { + "type": "object", + "properties": { + "lineNumber": { + "description": "The line number in the original file.", + "type": "integer" + }, + "status": { + "$ref": "#/components/schemas/ImportedLineStatusEnum" + }, + "errorMessage": { + "description": "Error message. Only if `status` is either `validationError` or `importError`.", + "type": "string" + }, + "importedEntityId": { + "description": "The identifier of the imported entity. Only if `status` is `imported`.", + "type": "string" + }, + "values": { + "description": "The imported line values. They refer to positional fields in `data`.", + "type": "array", + "items": { + "type": "string" + } + } + } + } + ] + }, + "ImportedLineView": { + "description": "Details of an imported line.", + "allOf": [ + { + "$ref": "#/components/schemas/ImportedLineResult" + }, + { + "type": "object", + "properties": { + "file": { + "$ref": "#/components/schemas/ImportedFileWithUser" + }, + "canEdit": { + "description": "Can this line be edited?", + "type": "boolean" + }, + "canSkip": { + "description": "Can this line be marked to skip when the file is imported?", + "type": "boolean" + }, + "canInclude": { + "description": "Can this line be marked to be included when the file is imported?", + "type": "boolean" + }, + "fields": { + "description": "The fields in the imported file", + "type": "array", + "items": { + "$ref": "#/components/schemas/ImportedField" + } + } + } + } + ] + }, + "ImportsPermissions": { + "description": "Permissions over imports", + "type": "object", + "properties": { + "visibleKinds": { + "description": "Imported file kinds the logged user can view.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ImportedFileKind" + } + } + } + }, + "IncomingMessage": { + "description": "An incoming message (in the user's inbox)", + "allOf": [ + { + "$ref": "#/components/schemas/Entity" + }, + { + "type": "object", + "properties": { + "date": { + "description": "The message date", + "type": "string", + "format": "date-time" + }, + "category": { + "description": "The message category, for messages from system", + "allOf": [ + { + "$ref": "#/components/schemas/EntityReference" + } + ] + }, + "fromUser": { + "$ref": "#/components/schemas/User" + }, + "subject": { + "description": "The message subject", + "type": "string" + }, + "body": { + "description": "The message body", + "type": "string" + } + } + } + ] + }, + "InitializeNfcError": { + "description": "Error when initialize a NFC card", + "allOf": [ + { + "$ref": "#/components/schemas/BaseNfcError" + }, + { + "type": "object", + "properties": { + "code": { + "$ref": "#/components/schemas/InitializeNfcErrorCode" + } + } + } + ] + }, + "InputError": { + "description": "Error returned when some input data failed validation", + "type": "object", + "properties": { + "generalErrors": { + "description": "A list of errors that cannot be attributed to a specific property. Only returned if `code` is `validation`.", + "type": "array", + "items": { + "type": "string" + } + }, + "properties": { + "description": "An array of properties which contains errors, in the order they were processed. As `propertyErrors` is an object (without a guaranteed order for its keys) the original order would be lost otherwise. Only returned if `code` is `validation`.", + "type": "array", + "items": { + "type": "string" + } + }, + "propertyErrors": { + "description": "An object keyed by property name, whose values are lists of errors for that property. Only returned if `code` is `validation`.", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "customFields": { + "description": "An array of custom field internal names which contains errors, in the order they were processed. As `customFieldErrors` is an object (without a guaranteed order for its keys) the original order would be lost otherwise. Only returned if `code` is `validation`.", + "type": "array", + "items": { + "type": "string" + } + }, + "customFieldErrors": { + "description": "An object keyed by custom field internal name, whose values are lists of errors for that custom field. Only returned if `code` is `validation`.", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "maxItems": { + "description": "The maximum allowed items. Only returned if `code` is `maxItems`.", + "type": "integer" + }, + "maxFileSize": { + "description": "The maximum file size, in bytes, allowed for uploads. Only returned if `code` is `fileUploadSize`.", + "type": "integer" + }, + "value": { + "description": "The value that failed conversion to the expected data type, or the original full-text query keywords that failed parsing. Only returned if `code` is either `dataConversion` or `queryParse`.", + "type": "string" + }, + "name": { + "description": "The name of the required request parameter Only returned if `code` is `missingParameter`.", + "type": "string" + }, + "errors": { + "description": "The aggregated `InputError`s for each regular property, that is, those that have a single input. Only returned if `code` is `aggregated`.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/InputError" + } + }, + "indexedErrors": { + "description": "The aggregated `InputError`s for each list property, that is, those that have a list of inputs. It is guaranteed that the indexes in the input array correspond to the indexes in the corresponding value. The positions with no errors will contain `null`. Only returned if `code` is `aggregated`.", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InputError" + } + } + }, + "code": { + "$ref": "#/components/schemas/InputErrorCode" + } + } + }, + "Installment": { + "description": "Reference to a scheduled payment installment", + "allOf": [ + { + "$ref": "#/components/schemas/Entity" + }, + { + "type": "object", + "properties": { + "number": { + "description": "The installment number.", + "type": "integer" + }, + "dueDate": { + "description": "The installment due date.", + "type": "string", + "format": "date-time" + }, + "amount": { + "description": "The installment amount", + "type": "string", + "format": "number" + }, + "status": { + "$ref": "#/components/schemas/InstallmentStatusEnum" + } + } + } + ] + }, + "InstallmentDataForSearch": { + "description": "Contains data used to search installments for a given owner", + "allOf": [ + { + "$ref": "#/components/schemas/BaseInstallmentDataForSearch" + }, + { + "type": "object", + "properties": { + "user": { + "description": "When the given owner is a user, is the reference to it", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "query": { + "description": "Default query filters for the installments search", + "allOf": [ + { + "$ref": "#/components/schemas/InstallmentQueryFilters" + } + ] + } + } + } + ] + }, + "InstallmentOverviewDataForSearch": { + "description": "Contains data used to search installments regardless of an owner", + "allOf": [ + { + "$ref": "#/components/schemas/BaseInstallmentDataForSearch" + }, + { + "type": "object", + "properties": { + "preselectedPeriods": { + "description": "Contains the pre-selected period filter ranges according to the Cyclos configuration", + "type": "array", + "items": { + "$ref": "#/components/schemas/PreselectedPeriod" + } + }, + "query": { + "description": "Default query filters for the general installments search", + "allOf": [ + { + "$ref": "#/components/schemas/InstallmentOverviewQueryFilters" + } + ] + } + } + } + ] + }, + "InstallmentOverviewQueryFilters": { + "description": "Query filters for installments regardless of an account owner.", + "allOf": [ + { + "$ref": "#/components/schemas/BaseInstallmentQueryFilters" + }, + { + "type": "object", + "properties": { + "currencies": { + "description": "The currencies internal names or ids.", + "type": "array", + "items": { + "type": "string" + } + }, + "fromAccountTypes": { + "description": "The source account types internal names or ids.", + "type": "array", + "items": { + "type": "string" + } + }, + "toAccountTypes": { + "description": "The source account types internal names or ids.", + "type": "array", + "items": { + "type": "string" + } + } + } + } + ] + }, + "InstallmentOverviewResult": { + "description": "Represents an installment.", + "allOf": [ + { + "$ref": "#/components/schemas/BaseInstallmentResult" + }, + { + "type": "object", + "properties": { + "transaction": { + "description": "The transaction that originated this installment", + "allOf": [ + { + "$ref": "#/components/schemas/TransactionOverviewResult" + } + ] + } + } + } + ] + }, + "InstallmentPreview": { + "description": "Preview of an installment", + "type": "object", + "properties": { + "number": { + "description": "The installment number", + "type": "integer" + }, + "dueDate": { + "description": "The installment due date", + "type": "string", + "format": "date-time" + }, + "totalAmount": { + "description": "The final total installment amount", + "type": "string", + "format": "number" + }, + "mainAmount": { + "description": "Depending on the configured fees, it could happen that the main amount is deducted from fees amount. This reflects the new main amount. If no fees deduct, it will be the same as `totalAmount`.", + "type": "string", + "format": "number" + }, + "fees": { + "description": "Only returned for direct payments. Contains the fees that would be paid by the payer if the payment is confirmed.", + "type": "array", + "items": { + "$ref": "#/components/schemas/TransferFeePreview" + } + } + } + }, + "InstallmentQueryFilters": { + "description": "Query filters for transactions related to an account owner.", + "allOf": [ + { + "$ref": "#/components/schemas/BaseInstallmentQueryFilters" + }, + { + "type": "object", + "properties": { + "accountTypes": { + "description": "The account types", + "type": "array", + "items": { + "type": "string" + } + }, + "direction": { + "$ref": "#/components/schemas/TransferDirectionEnum" + } + } + } + ] + }, + "InstallmentResult": { + "description": "Represents an installment, as viewed from the point-of-view of an account owner. This means that credits will have a positive amount, while debits will be negative.", + "allOf": [ + { + "$ref": "#/components/schemas/BaseInstallmentResult" + }, + { + "type": "object", + "properties": { + "transaction": { + "description": "The transaction that originated this installment", + "allOf": [ + { + "$ref": "#/components/schemas/TransactionResult" + } + ] + } + } + } + ] + }, + "InstallmentView": { + "description": "Contains details about an installment", + "allOf": [ + { + "$ref": "#/components/schemas/Installment" + }, + { + "type": "object", + "properties": { + "by": { + "description": "The user that performed an status change. For example, who manually paid, settled or canceled an open installment", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "transferId": { + "description": "Only if the installment was processed, contains the internal identifier of the generated transfer.", + "type": "string" + }, + "transferTransactionNumber": { + "description": "Only if the installment was processed, contains the transaction number of the generated transfer.", + "type": "string" + }, + "transferDate": { + "description": "The date the transfer was processed.", + "type": "string", + "format": "date-time" + }, + "canProcess": { + "description": "Can the authenticated user process this installment?", + "type": "boolean" + }, + "canSettle": { + "description": "Can the authenticated user settle this installment?", + "type": "boolean" + } + } + } + ] + }, + "IntegerRange": { + "description": "Represents a range of minimum / maximum integer values (both optional). In general if both values are null the entire range is returned as null.", + "type": "object", + "properties": { + "min": { + "description": "The minimum value", + "type": "integer" + }, + "max": { + "description": "The maximum value", + "type": "integer" + } + } + }, + "InternalNamedEntity": { + "description": "Basic definition of a persistent entity which has both a name and an internal name", + "x-abstract": true, + "allOf": [ + { + "$ref": "#/components/schemas/NamedEntity" + }, + { + "type": "object", + "properties": { + "internalName": { + "type": "string", + "description": "The entity internal name, which can be seen as an extra identifier" + } + } + } + ] + }, + "InternalTransactionPreview": { + "description": "Base definitions for a preview before performing an internal transaction", + "allOf": [ + { + "$ref": "#/components/schemas/TransactionPreview" + }, + { + "type": "object", + "properties": { + "pendingAuthorization": { + "description": "Indicates whether the transaction would be initially pending authorization in order to be processed", + "type": "boolean" + }, + "toAccount": { + "$ref": "#/components/schemas/AccountWithOwner" + }, + "toOperator": { + "description": "The operator who is receiving the payment. Only sent if the payment is made to an operator.", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + } + } + } + ] + }, + "InvitePermissions": { + "description": "Permissions for sending invitations to external users", + "type": "object", + "properties": { + "send": { + "description": "Can send invitation to external users?", + "type": "boolean" + } + } + }, + "JWKSResponse": { + "type": "object", + "properties": { + "keys": { + "description": "Each of the JWK", + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "Language": { + "description": "Reference to a language in Cyclos", + "allOf": [ + { + "$ref": "#/components/schemas/VersionedEntity" + }, + { + "type": "object", + "properties": { + "code": { + "description": "The ISO 639-1 language code", + "type": "string" + } + } + } + ] + }, + "LocalizationSettings": { + "description": "Localization preferences about user language.", + "type": "object", + "properties": { + "locale": { + "description": "The locale selected by user to work with the according language and settings.", + "type": "string" + } + } + }, + "LoginAuth": { + "description": "Contains information for the recently logged in user", + "allOf": [ + { + "$ref": "#/components/schemas/Auth" + }, + { + "type": "object", + "properties": { + "identityProviderNotLinkReason": { + "$ref": "#/components/schemas/IdentityProviderNotLinkReasonEnum" + }, + "pinCreationToken": { + "description": "A token (challenge) generated only if the login was not performed using a device pin. It can be used to confirm the pin creation operation. Is has a validity of 6 minutes after the session was created. After that time the pin creation can be confirmed only using the current login password.", + "type": "string" + } + } + } + ] + }, + "LoginUser": { + "description": "Contains fields to login an user as administrator", + "type": "object", + "properties": { + "user": { + "description": "The user identification for login. The accepted kind of identification (login name, e-mail, etc) depend on the channel configuration.", + "type": "string" + }, + "password": { + "description": "The user password. The password type is set in the channel configuration.", + "type": "string" + }, + "remoteAddress": { + "description": "The IP address of the user requesting the login.", + "type": "string" + }, + "channel": { + "description": "The channel internal name. Defaults to `main`.", + "type": "string" + }, + "sessionTimeout": { + "description": "The amount of time the session is valid. The channel configuration has the session timeout, which is the maximum amount of time that can be set. If the given value is higher than the one in the configuration, it will be ignored. Defaults to the timeout set in the configuration.", + "allOf": [ + { + "$ref": "#/components/schemas/TimeInterval" + } + ] + }, + "userAgentId": { + "description": "The identifier of the user agent. A client-side generated, stable UUID, which means that it should be stored (in the browser local storage) and not generated again (except when browser data is cleared). Changing this will likely trigger an email to the user indicating the login from a new device.", + "type": "string" + } + } + }, + "MapData": { + "description": "Contains data relative to maps displayed in the application", + "type": "object", + "properties": { + "googleMapsApiKey": { + "description": "The Google Maps API key to be used by clients", + "type": "string" + }, + "defaultLocation": { + "description": "The default location, if any, for map displays", + "allOf": [ + { + "$ref": "#/components/schemas/GeographicalCoordinate" + } + ] + }, + "defaultZoomMobile": { + "description": "The default zoom level for mobile views", + "type": "integer" + }, + "defaultZoom": { + "description": "The default zoom level for larger views", + "type": "integer" + }, + "distanceUnit": { + "$ref": "#/components/schemas/DistanceUnitEnum" + } + } + }, + "MarketplacePermissions": { + "description": "Permissions for the marketplace", + "type": "object", + "properties": { + "mySimple": { + "description": "Simple advertisement permissions for the logged user. Only returned if there is an authenticated user.", + "$ref": "#/components/schemas/MyMarketplacePermissions" + }, + "myWebshop": { + "description": "Webshop ad permissions for the logged user. Only returned if there is an authenticated user.", + "$ref": "#/components/schemas/MyMarketplacePermissions" + }, + "userSimple": { + "description": "Permissions over simple advertisements of other users", + "$ref": "#/components/schemas/UserBaseAdPermissions" + }, + "userWebshop": { + "description": "Permissions over webshop ads of other users", + "$ref": "#/components/schemas/UserBaseAdPermissions" + }, + "interests": { + "description": "Are ad interests enabled? Only returned if there is an authenticated user.", + "type": "boolean" + }, + "favorites": { + "description": "Are favorites ads enabled? Only returned if there is an authenticated user.", + "type": "boolean" + } + } + }, + "Message": { + "description": "Base properties for messages", + "allOf": [ + { + "$ref": "#/components/schemas/Entity" + }, + { + "type": "object", + "properties": { + "kind": { + "description": "The message kind", + "allOf": [ + { + "$ref": "#/components/schemas/MessageKind" + } + ] + }, + "date": { + "description": "The message date", + "type": "string", + "format": "date-time" + }, + "subject": { + "description": "The subject", + "type": "string" + }, + "category": { + "description": "The message category. Only for messages from / to system", + "$ref": "#/components/schemas/MessageCategory" + } + } + } + ] + }, + "MessageCategory": { + "description": "Reference to a message category", + "allOf": [ + { + "$ref": "#/components/schemas/InternalNamedEntity" + } + ] + }, + "MessageDataForReply": { + "description": "Data for replying a message", + "type": "object", + "properties": { + "reply": { + "description": "The new reply message to be sent pre-filled with data", + "$ref": "#/components/schemas/ReplyMessage" + }, + "repliedMessage": { + "description": "The message being replied.", + "$ref": "#/components/schemas/RepliedMessage" + } + } + }, + "MessageDataForSearch": { + "description": "Contains data for searching messages", + "type": "object", + "properties": { + "canSend": { + "description": "Whether the authenticated user can send a new message or not", + "type": "boolean" + }, + "visibleCategories": { + "description": "The categories the authenticated user can search for messages. Only for authenticated administrators.", + "type": "array", + "items": { + "$ref": "#/components/schemas/MessageCategory" + } + }, + "sources": { + "description": "The sources the authenticated user can choose as the \"from\" when searching for incoming messages. Only for authenticated members and brokers.", + "type": "array", + "items": { + "$ref": "#/components/schemas/MessageSourceEnum" + } + }, + "destinations": { + "description": "The destinations the authenticated user can choose as the \"to\" when searching for outgoing messages. Only for authenticated members and brokers.", + "type": "array", + "items": { + "$ref": "#/components/schemas/MessageDestinationEnum" + } + }, + "query": { + "$ref": "#/components/schemas/MessageQueryFilters" + } + } + }, + "MessageDataForSend": { + "description": "Data for sending a message", + "type": "object", + "properties": { + "categories": { + "description": "The possible categories for the message.", + "type": "array", + "items": { + "$ref": "#/components/schemas/MessageCategory" + } + }, + "destinations": { + "description": "The possible destinations for the message.", + "type": "array", + "items": { + "$ref": "#/components/schemas/MessageDestinationEnum" + } + }, + "message": { + "description": "The new message to be sent pre-filled with data", + "$ref": "#/components/schemas/SendMessage" + }, + "toUser": { + "description": "The user being messaged.", + "$ref": "#/components/schemas/User" + }, + "maxRecipients": { + "description": "Maximum recipients when sending a message to users. Only if `user` is in the possible destinations.", + "type": "integer" + }, + "groups": { + "description": "The available groups for sending a message. Only for administrators.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Group" + } + } + } + }, + "MessageQueryFilters": { + "description": "Definitions for messages searching.", + "allOf": [ + { + "$ref": "#/components/schemas/QueryFilters" + }, + { + "type": "object", + "properties": { + "onlyUnread": { + "description": "Boolean value indicating wether return only the unread messages", + "type": "boolean" + }, + "messageBox": { + "description": "The message box to search. Defaults to `inbox`", + "allOf": [ + { + "$ref": "#/components/schemas/MessageBoxEnum" + } + ] + }, + "category": { + "description": "The category to filter by.", + "type": "string" + }, + "destination": { + "description": "The destination to filter by.", + "$ref": "#/components/schemas/MessageDestinationEnum" + }, + "keywords": { + "description": "The keywords to filter by. Used to match the subject or the body of the messages.", + "type": "string" + }, + "period": { + "description": "The minimum / maximum date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "user": { + "description": "Either the id or identifier of the from / to user", + "type": "string" + } + } + } + ] + }, + "MessageResult": { + "description": "Result for the list of messages", + "allOf": [ + { + "$ref": "#/components/schemas/Message" + }, + { + "type": "object", + "properties": { + "read": { + "description": "Whether the message was read or not", + "type": "boolean" + }, + "replied": { + "description": "Whether the message was replied or not", + "type": "boolean" + }, + "fromOwnerKind": { + "description": "The kind of the message sender. Only returned if `kind` is `incoming`.", + "allOf": [ + { + "$ref": "#/components/schemas/MessageOwnerEnum" + } + ] + }, + "fromOwner": { + "description": "Only returned if `kind` is `incoming` and `fromOwnerKind` is `user`. Is a reference to the user who sent the incoming message.", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "toGroups": { + "description": "The list of groups the outgoing message was sent. Only returned if `kind` is `outgoing`.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Group" + } + }, + "toUsers": { + "description": "The list of users the outgoing message was sent. Only returned if `kind` is `outgoing`.", + "type": "array", + "items": { + "$ref": "#/components/schemas/User" + } + }, + "destination": { + "description": "The message destination. Only returned if `kind` is `outgoing`.", + "allOf": [ + { + "$ref": "#/components/schemas/MessageDestinationEnum" + } + ] + }, + "sentBy": { + "description": "Only returned if `kind` is `outgoing`. Is a reference to the user who sent the outgoing message.", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + } + } + } + ] + }, + "MessageView": { + "description": "Contains the details of a message", + "allOf": [ + { + "$ref": "#/components/schemas/MessageResult" + }, + { + "type": "object", + "properties": { + "canRemove": { + "description": "Whether the message can be removed or not.", + "type": "boolean" + }, + "canReply": { + "description": "Whether the message can be replied.", + "type": "boolean" + }, + "canMarkUnread": { + "description": "Whether the message can be marked as unread.", + "type": "boolean" + }, + "canMoveToTrash": { + "description": "Whether the message can be moved to trash box.", + "type": "boolean" + }, + "canRestore": { + "description": "Whether the message can be restored or not.", + "type": "boolean" + }, + "ownerKind": { + "description": "The kind of the message owner", + "allOf": [ + { + "$ref": "#/components/schemas/MessageOwnerEnum" + } + ] + }, + "owner": { + "description": "Only returned if `ownerKind` is `user`. Is a reference to the owner user.", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "removedAt": { + "description": "The remotion date (if any)", + "type": "string", + "format": "date-time" + }, + "body": { + "description": "The message body", + "type": "string" + }, + "replyPosition": { + "description": "The reply position in the conversation or -1 when it is the first message sent.", + "type": "integer" + }, + "replies": { + "description": "The list with the replies to the message", + "type": "array", + "items": { + "$ref": "#/components/schemas/Message" + } + } + } + } + ] + }, + "MessagesPermissions": { + "description": "Permissions for messages", + "type": "object", + "properties": { + "my": { + "description": "Permissions over the own messages.", + "$ref": "#/components/schemas/MyMessagesPermissions" + }, + "system": { + "description": "Permissions over system messages.", + "$ref": "#/components/schemas/SystemMessagesPermissions" + } + } + }, + "MessagesStatus": { + "description": "Contains details about messages", + "type": "object", + "properties": { + "newMessages": { + "description": "Indicates the number of received messages after the last view date (i.e `lastViewDate`).", + "type": "integer" + }, + "unreadMessages": { + "description": "Indicates the total number of unread messages.", + "type": "integer" + }, + "lastViewDate": { + "description": "The last view date tracked by the server through `POST /messages/viewed`", + "type": "string", + "format": "date-time" + } + } + }, + "MobileBaseData": { + "description": "Contains basic definitions for the data for UI results for the mobile", + "type": "object", + "properties": { + "cyclosVersion": { + "description": "The version of the Cyclos server", + "type": "string" + }, + "currentClientTime": { + "description": "The current client time according to the server", + "type": "string", + "format": "date-time" + }, + "locale": { + "description": "The current locale", + "type": "string" + }, + "allowedLocales": { + "description": "The locales the user can select for example to change the language.", + "type": "array", + "items": { + "$ref": "#/components/schemas/UserLocale" + } + }, + "rootUrl": { + "description": "The main URL set in the configuration", + "type": "string" + }, + "theme": { + "description": "The mobile theme. Only returned when changed.", + "allOf": [ + { + "$ref": "#/components/schemas/ThemeUIElement" + } + ] + }, + "translations": { + "description": "The mobile translations. Only returned when changed.", + "allOf": [ + { + "$ref": "#/components/schemas/MobileTranslations" + } + ] + }, + "maxImageWidth": { + "description": "Maximum width (in pixels) for uploaded images", + "type": "integer" + }, + "maxImageHeight": { + "description": "Maximum height (in pixels) for uploaded images", + "type": "integer" + }, + "maxUploadSize": { + "description": "Maximum size (in bytes) for uploaded files", + "type": "integer" + }, + "jpegQuality": { + "description": "Quality for JPEG image types (higher means better quality)", + "type": "integer" + }, + "mapBrowserApiKey": { + "description": "The Google Maps browser API key", + "type": "string" + }, + "applicationUsername": { + "description": "An username used by the application to be displayed for example in system messages", + "type": "string" + }, + "numberFormat": { + "$ref": "#/components/schemas/NumberFormatEnum" + }, + "dateFormat": { + "$ref": "#/components/schemas/DateFormatEnum" + }, + "timeFormat": { + "$ref": "#/components/schemas/TimeFormatEnum" + } + } + }, + "MobilePage": { + "description": "Represents a content page for the mobile application", + "allOf": [ + { + "$ref": "#/components/schemas/InternalNamedEntity" + }, + { + "type": "object", + "properties": { + "version": { + "type": "integer", + "description": "The version stamp for the current object, used for optimistic locking. When saving, the same version as previously received needs to be passed back. If no one else has saved the object, the version will match and the object will be updated. However, if someone other has saved the object, the version will no longer match, and an error will be raised. This is used to prevent multiple users (or processes) from updating the same object and unwilingly overridding the property values, leading to data loss." + }, + "icon": { + "description": "The character that represents the icon in the Cyclos font. Only used by the mobile application.", + "type": "string" + }, + "customIconContent": { + "description": "The content of the custom SVG icon. Used only by the mobile application.", + "type": "string" + }, + "useFullSpace": { + "description": "Use the full available space by removing any padding or margin", + "type": "boolean" + }, + "externalUrl": { + "description": "An external URL including content which should be rendered as iFrame", + "type": "string" + } + } + } + ] + }, + "MobileTranslations": { + "description": "Contains definitions for translations that are returned for the mobile app", + "allOf": [ + { + "$ref": "#/components/schemas/VersionedEntity" + }, + { + "type": "object", + "properties": { + "locale": { + "description": "The locale represented by this language, in either of the following formats: `<2-letter lowercase language code>` or `<2-letter lowercase language code>`_`<2-letter uppercase country code>`.", + "type": "string" + }, + "translations": { + "description": "The translation keys / values for the mobile application", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + ] + }, + "MyMarketplacePermissions": { + "description": "Permissions for the marketplace for the logged user", + "type": "object", + "properties": { + "enable": { + "description": "Are advertisements enabled? Only returned if there is an authenticated user.", + "type": "boolean" + }, + "manage": { + "description": "Can manage own advertisements? Only returned if there is an authenticated user.", + "type": "boolean" + }, + "questions": { + "description": "Are questions enabled? Only returned if there is an authenticated user.", + "type": "boolean" + } + } + }, + "MyMessagesPermissions": { + "description": "Permissions ovre messages for the logged user", + "type": "object", + "properties": { + "view": { + "description": "Whether the logged user can view messages or not", + "type": "boolean" + }, + "sendToUser": { + "description": "Whether the logged user can send messages to other users or not", + "type": "boolean" + }, + "sendToSystem": { + "description": "Whether the logged user can send messages to system or not", + "type": "boolean" + }, + "sendToBrokered": { + "description": "Whether the logged broker can send messages brokered users or not", + "type": "boolean" + } + } + }, + "NamedEntity": { + "description": "Basic definition of a persistent entity which has a name", + "x-abstract": true, + "allOf": [ + { + "$ref": "#/components/schemas/Entity" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The entity name" + } + } + } + ] + }, + "NestedError": { + "description": "Error when an operation may generate another error for a specific property. An example of this is when saving the full profile, which can have an error in the basic fields, or in the n-th new land-line phone, or in the n-th removed image.", + "allOf": [ + { + "$ref": "#/components/schemas/Error" + }, + { + "type": "object", + "properties": { + "inputError": { + "description": "The nested error when `InputError`", + "allOf": [ + { + "$ref": "#/components/schemas/InputError" + } + ] + }, + "forbiddenError": { + "description": "The nested error when `ForbiddenError`", + "allOf": [ + { + "$ref": "#/components/schemas/ForbiddenError" + } + ] + }, + "unauthorizedError": { + "description": "The nested error when `UnauthorizedError`", + "allOf": [ + { + "$ref": "#/components/schemas/UnauthorizedError" + } + ] + }, + "notFoundError": { + "description": "The nested error when `NotFoundError`", + "allOf": [ + { + "$ref": "#/components/schemas/NotFoundError" + } + ] + }, + "conflictError": { + "description": "The nested error when `ConflictError`", + "allOf": [ + { + "$ref": "#/components/schemas/ConflictError" + } + ] + }, + "error": { + "description": "The nested error when `Error`", + "allOf": [ + { + "$ref": "#/components/schemas/Error" + } + ] + }, + "property": { + "description": "The property name that generated the error", + "type": "string" + }, + "index": { + "description": "If the property is indexed, contains the index with error", + "type": "integer" + } + } + } + ] + }, + "NewMessagePush": { + "description": "A new message has been received", + "type": "object", + "properties": { + "message": { + "$ref": "#/components/schemas/IncomingMessage" + }, + "newMessages": { + "description": "The number of new messages since the last login", + "type": "integer" + }, + "unreadMessages": { + "description": "The current number of unread messages", + "type": "integer" + } + } + }, + "NewNotificationPush": { + "description": "A new notification has been received", + "allOf": [ + { + "$ref": "#/components/schemas/NotificationsStatus" + }, + { + "type": "object", + "properties": { + "notification": { + "$ref": "#/components/schemas/Notification" + } + } + } + ] + }, + "NfcAuthError": { + "description": "Error when make a NFC external authentication", + "allOf": [ + { + "$ref": "#/components/schemas/Error" + }, + { + "type": "object", + "properties": { + "posError": { + "description": "The POS error details. Only if `code` is `pos`", + "allOf": [ + { + "$ref": "#/components/schemas/PosError" + } + ] + }, + "code": { + "$ref": "#/components/schemas/NfcAuthErrorCode" + } + } + } + ] + }, + "NfcDataForInitialize": { + "description": "Contains data NFC tag initialization and personalization", + "type": "object", + "properties": { + "initilizeTypes": { + "description": "The NFC token types the authenticated user can initialize tags", + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityReference" + } + }, + "personalizeTypes": { + "description": "The NFC token types the authenticated user can parsonalize tags", + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityReference" + } + } + } + }, + "NfcDataForPersonalize": { + "description": "Contains data NFC tag personalization", + "type": "object", + "properties": { + "tokenType": { + "description": "The token type reference", + "allOf": [ + { + "$ref": "#/components/schemas/EntityReference" + } + ] + }, + "confirmationPasswordInput": { + "description": "If a confirmation password is used, contains the definitions on how to request that password from the user. This confirmation password is required when performing sensible actions. Sometimes this is dynamic, for example, the confirmation might be configured to be used only once per session, or operations like payments may have a limit per day to be without confirmation (pinless).", + "allOf": [ + { + "$ref": "#/components/schemas/PasswordInput" + } + ] + } + } + }, + "NfcExternalAuthenticateParameter": { + "description": "Parameters for an external authentication", + "allOf": [ + { + "$ref": "#/components/schemas/NfcTokenParameter" + }, + { + "type": "object", + "properties": { + "tagChallenge": { + "description": "The challenge generated by the NFC tag, encoded as hex", + "type": "string" + }, + "user": { + "description": "If informed then it means we are requesting for external authentication to personalize a tag for that user, also the `group` property will be ignored.", + "type": "string" + }, + "group": { + "description": "In case of registering a user and personalizing a tag at the same time we need to inform the group in which the user is registering.", + "type": "string" + }, + "asMember": { + "description": "Only valid if the logged user is a broker, for that case we need to distinguish if the user registration is as member or as broker. This option must be specified in conjunction with the `group` property.", + "type": "boolean" + }, + "key": { + "description": "The NFC key over which the authentication is performed. Defaults to `operational`.", + "allOf": [ + { + "$ref": "#/components/schemas/NfcTagKeyEnum" + } + ] + } + } + } + ] + }, + "NfcExternalAuthenticateResult": { + "description": "Result for a NFC external authenticate", + "type": "object", + "properties": { + "cyclosChallenge": { + "description": "The Cyclos-generated challenge encoded as hex. This challenge has to be encrypted by the NFC tag", + "type": "string" + }, + "sessionKey": { + "description": "The session key to be used on subsequent NFC operations, encoded as hex", + "type": "string" + } + } + }, + "NfcInitializeParameter": { + "description": "Parameters for initializing an NFC tag", + "allOf": [ + { + "$ref": "#/components/schemas/NfcTokenWithUserParameter" + }, + { + "type": "object", + "properties": { + "label": { + "description": "A label to be displayed on the tokens list.", + "type": "string" + } + } + } + ] + }, + "NfcInitializeResult": { + "description": "Contains the keys that should be stored on the NFC tag", + "type": "object", + "properties": { + "tagKey": { + "description": "The PICC Master Key that should be used to seal the NFC tag, encoded as hex.", + "type": "string" + }, + "applicationKey": { + "description": "The Application Master Key that should be used on the application entry of the NFC tag, encoded as hex.", + "type": "string" + }, + "operationalKey": { + "description": "The Application Key used to operate with the tag, encoded as hex. Used when making a payment or to assign an already initialized tag to a user.", + "type": "string" + }, + "tokenLabel": { + "description": "The same label given by the client at initialization or the label generated according the the pattern defined.", + "type": "string" + } + } + }, + "NfcPersonalizeDataParameter": { + "description": "Parameters used to identify the NFC token type and user who will own a NFC tag.", + "type": "object", + "properties": { + "user": { + "description": "A user to whom this tag is being personalized", + "type": "string" + }, + "type": { + "description": "Either the identifier or internal name of fhe NFC token type", + "type": "string" + } + } + }, + "NfcPersonalizeParameter": { + "description": "Parameters for personalizing an NFC tag", + "allOf": [ + { + "$ref": "#/components/schemas/NfcTokenWithUserParameter" + }, + { + "type": "object", + "properties": { + "cyclosChallenge": { + "description": "The challenge that was previously generated by Cyclos, encrypted by the NFC tag. Encoded as hex.", + "type": "string" + } + } + } + ] + }, + "NfcTokenParameter": { + "description": "Definitions for parameters of actions over NFC tokens", + "type": "object", + "properties": { + "type": { + "description": "Either the identifier or internal name of fhe NFC token type", + "type": "string" + }, + "token": { + "description": "The token value. Is normally the internal tag idenfifier, encoded as hex", + "type": "string" + } + } + }, + "NfcTokenPermissions": { + "description": "Permissions over a specific nfc token", + "type": "object", + "properties": { + "type": { + "description": "The token type", + "allOf": [ + { + "$ref": "#/components/schemas/EntityReference" + } + ] + }, + "initialize": { + "description": "Can initialize tokens of this type?", + "type": "boolean" + }, + "personalize": { + "description": "Can personalize tokens of this type?", + "type": "boolean" + }, + "personalizeAsMember": { + "description": "Can personalize tokens of this type as member? Always `false` if the authenticated user is a not a broker.", + "type": "boolean" + } + } + }, + "NfcTokenWithChallengeParameter": { + "description": "Parameters for personalizing an NFC tag for a new user", + "allOf": [ + { + "$ref": "#/components/schemas/NfcTokenParameter" + }, + { + "type": "object", + "properties": { + "cyclosChallenge": { + "description": "The challenge that was previously generated by Cyclos, encrypted by the NFC tag. Encoded as hex.", + "type": "string" + } + } + } + ] + }, + "NfcTokenWithUserParameter": { + "description": "Contains shared properties by NfcInitializeParameter and NfcPersonalizeParameter", + "allOf": [ + { + "$ref": "#/components/schemas/NfcTokenParameter" + }, + { + "type": "object", + "properties": { + "user": { + "description": "a user to whom this tag is being initialized/personalized.", + "type": "string" + } + } + } + ] + }, + "NotFoundError": { + "description": "Error returned when some expected data was not found", + "type": "object", + "properties": { + "entityType": { + "type": "string", + "description": "The name of the entity being attempted, but not found" + }, + "key": { + "type": "string", + "description": "The identifier used to attempt to find the entity, such as id, internal name, principal, etc" + } + } + }, + "Notification": { + "description": "A received notification", + "allOf": [ + { + "$ref": "#/components/schemas/Entity" + }, + { + "type": "object", + "properties": { + "date": { + "description": "The notification date", + "type": "string", + "format": "date-time" + }, + "relatedUser": { + "description": "a user related to this message", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "subject": { + "description": "The notification subject", + "type": "string" + }, + "message": { + "description": "The notification message", + "type": "string" + }, + "read": { + "description": "Indicates whether the notification was marked as already read or not", + "type": "boolean" + }, + "entityId": { + "description": "The identifier of the entity referenced by the notification, if any. The `entityType` and `entityId` attributes are both not null or both null in case there is a referenced entity.", + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/NotificationTypeEnum" + }, + "entityType": { + "$ref": "#/components/schemas/NotificationEntityTypeEnum" + } + } + } + ] + }, + "NotificationQueryFilters": { + "description": "Definitions for a notifications search.", + "allOf": [ + { + "$ref": "#/components/schemas/QueryFilters" + }, + { + "type": "object", + "properties": { + "onlyUnread": { + "description": "Boolean value indicating wether return only the unread notifications", + "type": "boolean" + }, + "onlyNew": { + "description": "Boolean value indicating wether return only the new notifications received after the last view date tracked using `POST /notifications/viewed`", + "type": "boolean" + } + } + } + ] + }, + "NotificationSettingsDataForEdit": { + "description": "Contains configuration data to edit the notification settings a given user. The regular user (member / broker / operator) and administrator notification settings use different notification types.", + "allOf": [ + { + "$ref": "#/components/schemas/BaseNotificationSettings" + }, + { + "type": "object", + "properties": { + "settings": { + "description": "The object that can be modified and `POST`ed back to `/{user}/notification-settings` to save the notifications.", + "allOf": [ + { + "$ref": "#/components/schemas/NotificationSettingsEdit" + } + ] + }, + "payments": { + "description": "The visible regular payment types. Only applicable for administrators, not users (members / brokers).", + "type": "array", + "items": { + "$ref": "#/components/schemas/TransferType" + } + }, + "authorizablePayments": { + "description": "The visible regular payment types that require authorization. Only applicable for administrators, not users (members / brokers).", + "type": "array", + "items": { + "$ref": "#/components/schemas/TransferType" + } + }, + "externalPayments": { + "description": "The visible payment types that allow external payments. Only applicable for administrators, not users (members / brokers).", + "type": "array", + "items": { + "$ref": "#/components/schemas/TransferType" + } + }, + "voucherConfigurations": { + "description": "The visible voucher configurations. Only applicable for administrators, not users (members / brokers).", + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityReference" + } + }, + "userAccounts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AccountType" + }, + "description": "The available accounts types for user payment notifications" + }, + "userGroups": { + "description": "The visible user groups. Only applicable for administrators, not users (members / brokers).", + "type": "array", + "items": { + "$ref": "#/components/schemas/Group" + } + }, + "messageCategories": { + "description": "The visible message categories. Only applicable for administrators, not users (members / brokers).", + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityReference" + } + }, + "forwardMessages": { + "deprecated": true, + "x-remove-version": 4.17, + "description": "Use `settings.forwardMessages` instead.", + "type": "boolean" + } + } + } + ] + }, + "NotificationSettingsEdit": { + "description": "The parameters used to save the notification settings", + "type": "object", + "properties": { + "notifications": { + "description": "Per notification type, indicates the mediums it is sent. It is guaranteed that all and only the allowed types are sent.", + "type": "array", + "items": { + "$ref": "#/components/schemas/NotificationTypeMediums" + } + }, + "forwardMessages": { + "description": "Indicates whether to forward received internal messages to the user's e-mail. Only applicable for users, not administrators.", + "type": "boolean" + }, + "emailMailings": { + "description": "Indicates whether the user will receive email mailings. Only applicable for users (members / brokers), not administrators.", + "type": "boolean" + }, + "smsMailings": { + "description": "Indicates whether the user will receive SMS mailings. Only applicable for users (members / brokers), not administrators.", + "type": "boolean" + }, + "appMailings": { + "description": "Indicates whether the user will receive FCM mobile notification mailings. Only applicable for users (members / brokers), not administrators.", + "type": "boolean" + }, + "userAccounts": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/AccountNotificationSettings" + }, + "description": "Contains the settings for each user account. Only applicable for users, not administrators. The key is the account type id or internal name. Only applicable for users, not administrators." + }, + "payments": { + "description": "The qualified internal names (accountType.paymentType) or ids of payment types to be notified for notifications of type `paymentPerformed`. Only applicable for administrators, not users.", + "type": "array", + "items": { + "type": "string" + } + }, + "authorizablePayments": { + "description": "The qualified internal names (accountType.paymentType) or ids of payment types to be notified for notifications of type `paymentAwaitingAdminAuthorization`. Only applicable for administrators, not users.", + "type": "array", + "items": { + "type": "string" + } + }, + "externalPaymentsFailed": { + "description": "The qualified internal names (accountType.paymentType) or ids of payment types to be notified for notifications of type `externalUserPaymentPerformedFailed`. Only applicable for administrators, not users.", + "type": "array", + "items": { + "type": "string" + } + }, + "externalPaymentsExpired": { + "description": "The qualified internal names (accountType.paymentType) or ids of payment types to be notified for notifications of type `externalUserPaymentExpired`. Only applicable for administrators, not users.", + "type": "array", + "items": { + "type": "string" + } + }, + "voucherConfigurations": { + "description": "The internal names or ids of voucher configurations to be notified for notifications of types `generatedVouchersAboutToExpire` and `generatedVouchersExpired`. Only applicable for administrators, not users.", + "type": "array", + "items": { + "type": "string" + } + }, + "voucherConfigurationsBuying": { + "description": "The internal names or ids of voucher configurations to be notified for notifications of type `voucherBuyingAboutToExpire`. Only applicable for administrators, not users.", + "type": "array", + "items": { + "type": "string" + } + }, + "userGroups": { + "description": "The internal names or ids of groups to be notified for notifications of type `userRegistration`. Only applicable for administrators, not users.", + "type": "array", + "items": { + "type": "string" + } + }, + "systemAlerts": { + "description": "The kinds of system alerts to be notified for notifications of type `systemAlert`. Only applicable for administrators, not users.", + "type": "array", + "items": { + "$ref": "#/components/schemas/SystemAlertTypeEnum" + } + }, + "userAlerts": { + "description": "The kinds of user alerts to be notified for notifications of type `userAlert`. Only applicable for administrators, not users.", + "type": "array", + "items": { + "$ref": "#/components/schemas/UserAlertTypeEnum" + } + }, + "forwardMessageCategories": { + "description": "The internal names or ids of message categories to which new messages to system will be forwarded to the administrator e-mail. Not tied to any notification type. Only applicable for administrators, not users.", + "type": "array", + "items": { + "type": "string" + } + }, + "version": { + "type": "integer", + "description": "The version stamp for the current object, used for optimistic locking. When saving, the same version as previously received needs to be passed back. If no one else has saved the object, the version will match and the object will be updated. However, if someone other has saved the object, the version will no longer match, and an error will be raised. This is used to prevent multiple users (or processes) from updating the same object and unwilingly overridding the property values, leading to data loss." + } + } + }, + "NotificationSettingsPermissions": { + "description": "Permissions over notification settings", + "type": "object", + "properties": { + "enable": { + "description": "Whether the own notification settings are enabled or not.", + "type": "boolean" + } + } + }, + "NotificationSettingsView": { + "description": "Contains the current notification settings for a given user. The regular user (member / broker) and administrator notification settings use different notification kinds.", + "allOf": [ + { + "$ref": "#/components/schemas/BaseNotificationSettings" + }, + { + "type": "object", + "properties": { + "notifications": { + "description": "Per notification kind, indicates the mediums it is sent. It is guaranteed that all and only the allowed kinds are sent.", + "type": "array", + "items": { + "$ref": "#/components/schemas/NotificationTypeMediums" + } + }, + "forwardMessages": { + "description": "Indicates whether to forward received internal messages to the user's e-mail. Only applicable for users, not administrators.", + "type": "boolean" + }, + "emailMailings": { + "description": "Indicates whether the user will receive email mailings. Only applicable for users (members / brokers), not administrators.", + "type": "boolean" + }, + "smsMailings": { + "description": "Indicates whether the user will receive SMS mailings. Only applicable for users (members / brokers), not administrators.", + "type": "boolean" + }, + "appMailings": { + "description": "Indicates whether the user will receive FCM mobile notification mailings. Only applicable for users (members / brokers), not administrators.", + "type": "boolean" + }, + "userAccounts": { + "description": "Contains the settings for each user account. Only applicable for users (members / brokers), not administrators.", + "type": "array", + "items": { + "$ref": "#/components/schemas/AccountNotificationSettingsView" + } + }, + "payments": { + "description": "The payment types to be notified for notifications of type `paymentPerformed`. Only applicable for administrators, not users (members / brokers).", + "type": "array", + "items": { + "$ref": "#/components/schemas/TransferType" + } + }, + "authorizablePayments": { + "description": "The payment types to be notified for notifications of type `paymentAwaitingAdminAuthorization`. Only applicable for administrators, not users (members / brokers).", + "type": "array", + "items": { + "$ref": "#/components/schemas/TransferType" + } + }, + "externalPaymentsFailed": { + "description": "The payment types to be notified for notifications of type `externalUserPaymentPerformedFailed`. Only applicable for administrators, not users (members / brokers).", + "type": "array", + "items": { + "$ref": "#/components/schemas/TransferType" + } + }, + "externalPaymentsExpired": { + "description": "The payment types to be notified for notifications of type `externalUserPaymentExpired`. Only applicable for administrators, not users (members / brokers).", + "type": "array", + "items": { + "$ref": "#/components/schemas/TransferType" + } + }, + "voucherConfigurations": { + "description": "The voucher configurations to be notified for notifications of types `generatedVouchersAboutToExpire` and `generatedVouchersExpired`. Only applicable for administrators, not users (members / brokers).", + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityReference" + } + }, + "voucherConfigurationsBuying": { + "description": "The voucher configurations to be notified for notifications of type `voucherBuyingAboutToExpire`. Only applicable for administrators, not users (members / brokers).", + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityReference" + } + }, + "userGroups": { + "description": "The groups to be notified for notifications of type `userRegistration`. Only applicable for administrators, not users (members / brokers).", + "type": "array", + "items": { + "$ref": "#/components/schemas/Group" + } + }, + "systemAlerts": { + "description": "The kinds of system alerts to be notified for notifications of type `systemAlert`. Only applicable for administrators, not users (members / brokers).", + "type": "array", + "items": { + "$ref": "#/components/schemas/SystemAlertTypeEnum" + } + }, + "userAlerts": { + "description": "The kinds of user alerts to be notified for notifications of type `userAlert`. Only applicable for administrators, not users (members / brokers).", + "type": "array", + "items": { + "$ref": "#/components/schemas/UserAlertTypeEnum" + } + }, + "forwardMessageCategories": { + "description": "The message categories to which new messages to system will be forwarded to the administrator e-mail. Not tied to any notification type. Only applicable for administrators, not users (members / brokers).", + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityReference" + } + } + } + } + ] + }, + "NotificationTypeMediums": { + "description": "Indicates the mediums a notification type is sent", + "type": "object", + "properties": { + "kind": { + "deprecated": true, + "x-remove-version": 4.17, + "description": "Use `type` instead.", + "allOf": [ + { + "$ref": "#/components/schemas/NotificationKind" + } + ] + }, + "type": { + "$ref": "#/components/schemas/NotificationTypeEnum" + }, + "internal": { + "description": "Indicates whether a given type of notification is enabled. Internal notifications act as a 'master control' for the notification type. If disabled, no other mediums will be enabled either.", + "type": "boolean" + }, + "email": { + "description": "Indicates whether notifications of this type will be sent to the user's e-mail.", + "type": "boolean" + }, + "sms": { + "description": "Indicates whether notifications of this type will be sent as SMS to the user's mobile phone.", + "type": "boolean" + } + } + }, + "NotificationsPermissions": { + "description": "Permissions over notifications", + "type": "object", + "properties": { + "enable": { + "description": "Whether the own notifications are enabled or not.", + "type": "boolean" + } + } + }, + "NotificationsStatus": { + "description": "Contains details about the notifications", + "type": "object", + "properties": { + "newNotifications": { + "description": "Indicates the number of received notifications after the last view date (i.e `lastViewDate`).", + "type": "integer" + }, + "unreadNotifications": { + "description": "Indicates the total number of unread notifications.", + "type": "integer" + }, + "lastViewDate": { + "description": "The last view date tracked by the server through `POST /notifications/viewed`", + "type": "string", + "format": "date-time" + } + } + }, + "OidcAuthorizeResult": { + "description": "Result after an OAuth2 / OpenID Connect approve / deny", + "type": "object", + "properties": { + "url": { + "description": "The URL to which the user should be redirected", + "type": "string" + }, + "postData": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Variables that should be POSTed to the given URL. When null it means that a plain redirect should be performed." + } + } + }, + "OidcClient": { + "description": "Represents a client", + "allOf": [ + { + "$ref": "#/components/schemas/InternalNamedEntity" + }, + { + "type": "object", + "properties": { + "image": { + "$ref": "#/components/schemas/Image" + } + } + } + ] + }, + "OidcError": { + "description": "Error generating an OAuth2 / OpenID Connect response", + "allOf": [ + { + "$ref": "#/components/schemas/Error" + }, + { + "type": "object", + "properties": { + "error": { + "description": "The error code", + "type": "string" + }, + "error_description": { + "description": "The error description", + "type": "string" + } + } + } + ] + }, + "OidcRegisterParams": { + "description": "Parameters for registering a dynamic OIDC client", + "type": "object", + "properties": { + "redirect_uris": { + "description": "The allowed redirect uris. For dynamic clients, Cyclos will always present the domain of the redirect URI in the consent page. If multiple redirect uris are passed, they must all match the same domain. Also, any of the other URI parameters must match the domain.", + "type": "array", + "items": { + "type": "string" + } + }, + "response_types": { + "description": "The response types allowed for authorization requests. If not specied, `code` is assumed. Valid values are any combination of `code`, `token` and `id_token`.", + "type": "array", + "items": { + "type": "string" + } + }, + "grant_types": { + "description": "The grant types the client restricts itself from requesting. Valid values are `authorization_code`, `implicit` and `refresh_token`.", + "type": "array", + "items": { + "type": "string" + } + }, + "application_type": { + "description": "Indicates whether the application using this client will be a `web` (default) or `native`. The type of application influences the accepted protocols of `redirect_uris`.", + "type": "string" + }, + "client_name": { + "description": "The display name of the client, which is presented to users in the consent page. Note that internationalization is not supported.", + "type": "string" + }, + "logo_uri": { + "description": "The URL of the client logo to be displayed in the consent page. If given, it must have the same domain as `redirect_uris`.", + "type": "string" + }, + "client_uri": { + "description": "The link to the client website to be displayed in the consent page. If given, it must have the same domain as `redirect_uris`.", + "type": "string" + }, + "policy_uri": { + "description": "The link to client's privacy policy page to be displayed in the consent page. If given, it must have the same domain as `redirect_uris`.", + "type": "string" + }, + "tos_uri": { + "description": "The link to client's terms of service page to be displayed in the consent page. If given, it must have the same domain as `redirect_uris`.", + "type": "string" + } + } + }, + "OidcRegisterResult": { + "description": "Response after registering a dynamic OIDC client", + "type": "object", + "properties": { + "client_id": { + "description": "The assigned client id", + "type": "string" + }, + "client_secret": { + "description": "The assigned client secret", + "type": "string" + }, + "client_id_issued_at": { + "description": "Time at which the client id was issued, as a number of seconds since the epoch time (1970-01-01T0:0:0Z).", + "type": "integer" + }, + "client_secret_expires_at": { + "description": "Time at which the client secret will expire. Cyclos never expires client secrets, so the result is always zero.", + "type": "integer" + } + } + }, + "OidcTokenResult": { + "description": "Result after an OAuth2 / OpenID Connect token request", + "type": "object", + "properties": { + "access_token": { + "description": "The access token which can be used to make additional requests. It will be used as a `Bearer` token.", + "type": "string" + }, + "token_type": { + "description": "Cyclos always returns `bearer` tokens.", + "type": "string" + }, + "id_token": { + "description": "The JWT-encoded ID token.", + "type": "string" + }, + "state": { + "description": "The same opaque `state` value provided by the client on the authenticate request.", + "type": "string" + }, + "expires_in": { + "description": "The number of seconds until the token expires, counted from the time the request was received.", + "type": "integer" + }, + "refresh_token": { + "description": "The refresh token, which can be used to obtain additional access tokens. Is only issued if the `offline_access` scope has been granted, and only when the `grant_type` is `authorization_code`.", + "type": "string" + } + } + }, + "Operation": { + "description": "Contains definitions used to run a custom operation", + "allOf": [ + { + "$ref": "#/components/schemas/InternalNamedEntity" + }, + { + "type": "object", + "properties": { + "svgIcon": { + "description": "The name of the SVG icon. The content of the icon can be obtained with `GET /images/svg-icons/{name}.svg`", + "type": "string" + }, + "icon": { + "description": "The character that represents the icon in the Cyclos font. Only used by the mobile application.", + "type": "string" + }, + "customIconContent": { + "description": "The content of the custom SVG icon. Used only by the mobile application.", + "type": "string" + }, + "label": { + "description": "A representative label about the operation", + "type": "string" + }, + "informationText": { + "description": "A message to be displayed to the user when displaying the parameters form. Only returned in contexts where the operation can be executed.", + "type": "string" + }, + "confirmationText": { + "description": "A message to be shown to the user in order to confirm the operation execution. Only returned in contexts where the operation can be executed.", + "type": "string" + }, + "requireConfirmationPassword": { + "description": "Indicates whether this operation requires confirmation password. Only returned in contexts where the operation can be executed.", + "type": "boolean" + }, + "hasFileUpload": { + "description": "Indicates whether this operation accepts a file upload as input. Only returned in contexts where the operation can be executed.", + "type": "boolean" + }, + "allowExport": { + "description": "Does this operation allows exporting the result page as file? Only returned if `resultType` is `resultPage`. Only returned in contexts where the operation can be executed.", + "type": "boolean" + }, + "allowPrint": { + "description": "Should the front-end show a print action for the custom operation result? Before Cyclos 4.13 this was used for `resultType` `resultPage`, but since 4.13 is only used for `plainText` or `richText`. Only returned in contexts where the operation can be executed.", + "type": "boolean" + }, + "submitWithQrCodeScan": { + "description": "Should the form for this custom operation present a scan QR-code action instead of a submit button?", + "type": "boolean" + }, + "missingOptionalParameters": { + "description": "The optional custom fields without a value. The front-end could opt-in to rely on the `showFormForMissingOptionalParameters` flag to determine whether to show or not an input form if there's a missing poptional form field. Only returned in contexts where the operation can be executed.", + "type": "array", + "items": { + "type": "string" + } + }, + "missingRequiredParameters": { + "description": "The required custom fields without a value. This means the operation will fail with a validation error if the parameters present in this list are not given when run it. Only returned in contexts where the operation can be executed.", + "type": "array", + "items": { + "type": "string" + } + }, + "showForm": { + "description": "Indicates the conditions in which the form with the parameters must be shown. Only returned if the `resultType` is not `resultPage`, for this `resultType` see `OperationDataForRun.searchAutomatically`. Only returned in contexts where the operation can be executed.", + "allOf": [ + { + "$ref": "#/components/schemas/OperationShowFormEnum" + } + ] + }, + "scope": { + "$ref": "#/components/schemas/OperationScopeEnum" + }, + "resultType": { + "description": "The type of data returned after the operation is executed. Only returned in contexts where the operation can be executed.", + "allOf": [ + { + "$ref": "#/components/schemas/OperationResultTypeEnum" + } + ] + }, + "adminMenu": { + "description": "In which administration menu the operation shows up. Only returned in contexts where the operation can be executed.", + "allOf": [ + { + "$ref": "#/components/schemas/AdminMenuEnum" + } + ] + }, + "userMenu": { + "description": "In which user menu the operation shows up. Only returned in contexts where the operation can be executed.", + "allOf": [ + { + "$ref": "#/components/schemas/UserMenuEnum" + } + ] + }, + "userProfileSection": { + "description": "In which user profile section the operation shows up. Only returned in contexts where the operation can be executed.", + "allOf": [ + { + "$ref": "#/components/schemas/UserProfileSectionEnum" + } + ] + } + } + } + ] + }, + "OperationCustomFieldDetailed": { + "description": "Adds to `CustomFieldDetailed` some operation-specific definitions", + "allOf": [ + { + "$ref": "#/components/schemas/CustomFieldDetailed" + }, + { + "type": "object", + "properties": { + "readonly": { + "description": "This flag determine whether this field should be readonly or not.", + "type": "boolean" + }, + "section": { + "description": "The fields section", + "allOf": [ + { + "$ref": "#/components/schemas/FieldSection" + } + ] + } + } + } + ] + }, + "OperationDataForRun": { + "description": "Contains definitions used to run a custom operation", + "allOf": [ + { + "$ref": "#/components/schemas/Operation" + }, + { + "type": "object", + "properties": { + "resultInformationText": { + "description": "A message to be displayed to the user when displaying the page results. Only returned if `resultType` is `resultPage`.", + "type": "string" + }, + "customSubmitLabel": { + "description": "A label to be shown on the submit button. When not returned, a generic 'Submit' should be displayed.", + "type": "string" + }, + "formParameters": { + "description": "The custom fields which are used in a form as parameters for the operation execution.", + "type": "array", + "items": { + "$ref": "#/components/schemas/OperationCustomFieldDetailed" + } + }, + "confirmationPasswordInput": { + "description": "If a confirmation password is used, contains the definitions on how to request that password from the user. This confirmation password is required when performing sensible actions. Sometimes this is dynamic, for example, the confirmation might be configured to be used only once per session, or operations like payments may have a limit per day to be without confirmation (pinless).", + "allOf": [ + { + "$ref": "#/components/schemas/PasswordInput" + } + ] + }, + "exportFormats": { + "description": "The formats which a custom operation result of type `resultPage` can be exported.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExportFormat" + } + }, + "closeAfterSeconds": { + "description": "When returned indicates the number of seconds the result of a content custom operation should be visible before automatically closing and restarting the operation. Only returned if `resultType` is either `plainText` or `richText`.", + "type": "integer" + }, + "searchAutomatically": { + "description": "Should the operation be immediately executed by the third party client software when first presenting the form to the user (when `true`) or only when the user clicks submit (when `false`)? Only returned if `resultType` is `resultPage`.", + "type": "boolean" + }, + "autoRunActionId": { + "description": "If it is present, it indicates the id of the action that should be executed automatically.", + "type": "string" + }, + "reRun": { + "description": "A boolean value indicating if the custom operation must be re-run when going back to it before displaying it.", + "type": "boolean" + }, + "actions": { + "description": "Actions are other internal custom operations that can be executed from this custom operation. The returned parameters should be passed to the server when running this action.", + "type": "array", + "items": { + "$ref": "#/components/schemas/RunOperationAction" + } + }, + "rowLocation": { + "description": "The location to which the client should be redirected when selecting a row in the results table. Only returned if `resultType` is `resultPage` and `rowAction` is `location`.", + "type": "string" + }, + "rowOperation": { + "description": "The custom operation that should be executed when clicking a row. Only returned if `resultType` is `resultPage` and `rowAction` is `operation`.", + "allOf": [ + { + "$ref": "#/components/schemas/Operation" + } + ] + }, + "rowUrl": { + "description": "The URL the client should be redirected when clicking a row. Only returned if `resultType` is `resultPage` and `rowAction` is `url`.", + "type": "string" + }, + "rowParameters": { + "description": "The names of parameters belonging to each custom operation result that should be passed as parameter to the custom operation or URL which is executed when selecting a row in the table. Only returned if `resultType` is `resultPage`.", + "type": "array", + "items": { + "type": "string" + } + }, + "rowAction": { + "$ref": "#/components/schemas/OperationRowActionEnum" + }, + "user": { + "description": "The user for whom this custom operation will be executed. Returned if `scope` is either `user`, `advertisement`, `contact` (the contact owner), `contactInfo` or `record` (for user records).", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "ad": { + "description": "The advertisement for which this custom operation will be executed. Only returned if `scope` is `advertisement`", + "allOf": [ + { + "$ref": "#/components/schemas/Ad" + } + ] + }, + "contact": { + "description": "The contact for whom this custom operation will be executed. Only returned if `scope` is `contact`", + "allOf": [ + { + "$ref": "#/components/schemas/Contact" + } + ] + }, + "contactInfo": { + "description": "The additional contact for which this custom operation will be executed. Only returned if `scope` is `contactInfo`", + "allOf": [ + { + "$ref": "#/components/schemas/ContactInfo" + } + ] + }, + "record": { + "description": "The record for which this custom operation will be executed. Only returned if `scope` is `record`", + "allOf": [ + { + "$ref": "#/components/schemas/Record" + } + ] + }, + "recordType": { + "description": "The record type of the record for which this custom operation will be executed. Only returned if `scope` is `record`", + "allOf": [ + { + "$ref": "#/components/schemas/RecordType" + } + ] + }, + "transfer": { + "description": "The transfer for which this custom operation will be executed. Only returned if `scope` is `transfer`", + "allOf": [ + { + "$ref": "#/components/schemas/Transfer" + } + ] + }, + "menuItem": { + "description": "The custom menu item on which this custom operation will be executed. Only returned if `scope` is `menu`", + "allOf": [ + { + "$ref": "#/components/schemas/EntityReference" + } + ] + } + } + } + ] + }, + "OperationPermissions": { + "description": "Permissions over a specific custom operation", + "type": "object", + "properties": { + "operation": { + "$ref": "#/components/schemas/Operation" + }, + "run": { + "description": "Can run this operation?", + "type": "boolean" + } + } + }, + "OperationsPermissions": { + "description": "Permissions over own or system operations", + "type": "object", + "properties": { + "user": { + "description": "Permissions over custom operations applied to the authenticated user, with `scope` = `user`.", + "type": "array", + "items": { + "$ref": "#/components/schemas/OperationPermissions" + } + }, + "system": { + "description": "Custom operations the authenticated has access, with `scope` = `system`. Only returned for administrators.", + "type": "array", + "items": { + "$ref": "#/components/schemas/OperationPermissions" + } + } + } + }, + "OperatorDataForNew": { + "description": "Contains data used to register an operator", + "allOf": [ + { + "$ref": "#/components/schemas/BasicUserDataForNew" + }, + { + "type": "object", + "properties": { + "user": { + "description": "Details of user that will be the owner of the new operator", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "groups": { + "description": "The available operator groups for the given owner. When a group was passed on the request, will contain only that group. If no group was passed, will return all available groups.", + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityReference" + } + }, + "operator": { + "description": "The object that can be altered and posted back to register the operator", + "allOf": [ + { + "$ref": "#/components/schemas/OperatorNew" + } + ] + } + } + } + ] + }, + "OperatorGroupAccount": { + "description": "Settings for an account access for an operator group", + "type": "object", + "properties": { + "access": { + "$ref": "#/components/schemas/OperatorGroupAccountAccessEnum" + }, + "notificationAmount": { + "description": "The minimum / maximum amount for payment notifications to be sent", + "allOf": [ + { + "$ref": "#/components/schemas/DecimalRange" + } + ] + } + } + }, + "OperatorGroupAccountView": { + "description": "Settings for an account access for an operator group", + "allOf": [ + { + "$ref": "#/components/schemas/OperatorGroupAccount" + }, + { + "type": "object", + "properties": { + "accountType": { + "$ref": "#/components/schemas/AccountType" + } + } + } + ] + }, + "OperatorGroupBasicData": { + "description": "Contains data shared by both OperatorGroupDataForNew and OperatorGroupDataForEdit", + "type": "object", + "properties": { + "user": { + "description": "Details of the user that is the owner of the operator group", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "canChargebackPayments": { + "type": "boolean", + "description": "Can the permission to chargeback payments be granted?" + }, + "canReceivePayments": { + "type": "boolean", + "description": "Can the permission to receive payments be granted?" + }, + "canRequestPayments": { + "type": "boolean", + "description": "Can the permission to request payments be granted?" + }, + "canPerformVoucherTransactions": { + "type": "boolean", + "description": "Can the permission to redeem / top-up vouchers and view voucher transactions be granted?" + }, + "canViewAdvertisements": { + "type": "boolean", + "description": "Can the permission to view advertisements be granted?" + }, + "canManageAdvertisements": { + "type": "boolean", + "description": "Can the permission to manage advertisements be granted?" + }, + "canBlockToken": { + "type": "boolean", + "description": "Can the permission to block tokens (cards) be granted?" + }, + "canCancelToken": { + "type": "boolean", + "description": "Can the permission to cancel tokens (cards) be granted?" + }, + "canEnableToken": { + "type": "boolean", + "description": "Can the permission to enable tokens (cards) be granted?" + }, + "canUnblockToken": { + "type": "boolean", + "description": "Can the permission to unblock tokens (cards) be granted?" + }, + "broker": { + "type": "boolean", + "description": "Indicates whether the owner user is a broker. If so, can delegate brokering operations to operators." + }, + "canHaveMessages": { + "type": "boolean", + "description": "Can the permission over messages be granted?" + }, + "canHaveNotifications": { + "type": "boolean", + "description": "Can the permission over notificationsto be granted?" + }, + "operations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Operation" + }, + "description": "Custom operations that can be granted" + }, + "recordTypes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RecordType" + }, + "description": "Record types that can be granted" + }, + "accountTypes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AccountType" + }, + "description": "Account types details for the account settings" + }, + "paymentTypes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TransferTypeWithCurrency" + }, + "description": "Payment types details for the payment settings" + }, + "topUpEnabled": { + "description": "Indicates whether there is a voucher configuration supporting top-up which is enabled for this user and visible for the authenticated user. This flag is not related to the top-up permission.", + "type": "boolean" + }, + "canRedeemVouchers": { + "type": "boolean", + "x-remove-version": 4.17, + "deprecated": true, + "description": "Use `canPerformVoucherTransactions` instead" + } + } + }, + "OperatorGroupDataForEdit": { + "description": "Contains data for editing an existing operator group", + "allOf": [ + { + "$ref": "#/components/schemas/OperatorGroupBasicData" + }, + { + "type": "object", + "properties": { + "restrictPaymentsToUsers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/User" + }, + "description": "Details of the currently set users in the `restrictPaymentsToUsers` property in `operatorGroup` (which have only the ids)." + }, + "operatorGroup": { + "description": "The operator group that is being edited. This value can be modified and sent back on `PUT /operator-groups/{id}`.", + "allOf": [ + { + "$ref": "#/components/schemas/OperatorGroupEdit" + } + ] + }, + "canEdit": { + "type": "boolean", + "description": "Can the authenticated user edit this operator group?" + }, + "canRemove": { + "type": "boolean", + "description": "Can the authenticated user remove this operator group?" + } + } + } + ] + }, + "OperatorGroupDataForNew": { + "description": "Contains data for creating a new operator group", + "allOf": [ + { + "$ref": "#/components/schemas/OperatorGroupBasicData" + }, + { + "type": "object", + "properties": { + "operatorGroup": { + "description": "The operator group populated with the default fields. This value can be modified and sent back on `POST /{user}/operator-groups`.", + "allOf": [ + { + "$ref": "#/components/schemas/OperatorGroupNew" + } + ] + } + } + } + ] + }, + "OperatorGroupEdit": { + "description": "Fields for editing an operator group.", + "allOf": [ + { + "$ref": "#/components/schemas/OperatorGroupManage" + }, + { + "type": "object", + "properties": { + "version": { + "type": "integer", + "description": "The version stamp for the current object, used for optimistic locking. When saving, the same version as previously received needs to be passed back. If no one else has saved the object, the version will match and the object will be updated. However, if someone other has saved the object, the version will no longer match, and an error will be raised. This is used to prevent multiple users (or processes) from updating the same object and unwilingly overridding the property values, leading to data loss." + } + } + } + ] + }, + "OperatorGroupManage": { + "description": "Common fields for either creating or editing an operator group", + "type": "object", + "x-abstract": true, + "properties": { + "name": { + "type": "string", + "description": "The operator group name" + }, + "description": { + "type": "string", + "description": "Optional description of the group" + }, + "editOwnProfile": { + "type": "boolean", + "description": "Can operators of this group edit their own profile?" + }, + "chargebackPayments": { + "type": "boolean", + "description": "Can operators of this group chargeback payments received by the owner?" + }, + "messages": { + "type": "boolean", + "description": "Can operators of this group access the message box of the owner?" + }, + "notifications": { + "type": "boolean", + "description": "Can operators of this group own notifications?" + }, + "receivePayments": { + "type": "boolean", + "description": "Can operators of this group receive payments?" + }, + "voucherTransactions": { + "type": "boolean", + "description": "Can operators of this group redeem / top-up vouchers and view transactions?" + }, + "requestPayments": { + "type": "boolean", + "description": "Can operators of this group request payments?" + }, + "viewAdvertisements": { + "type": "boolean", + "description": "Can operators of this group view advertisements?" + }, + "manageAdvertisements": { + "type": "boolean", + "description": "Can operators of this group manage advertisements of the owner?" + }, + "enableToken": { + "type": "boolean", + "description": "Can operators of this group have tokens (cards)?" + }, + "cancelToken": { + "type": "boolean", + "description": "Can operators of this group cancel their own tokens (cards)?" + }, + "blockToken": { + "type": "boolean", + "description": "Can operators of this group block their own tokens (cards)?" + }, + "unblockToken": { + "type": "boolean", + "description": "Can operators of this group unblock their own tokens (cards)?" + }, + "brokering": { + "type": "boolean", + "description": "Can operators of this group perform brokering operations? This includes full brokering operatations the user is allowed, including user registration, accounts access, payments as user, etc." + }, + "restrictPaymentsToUsers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "When set, operators of this group will only be able to perform payments to one of this users" + }, + "operations": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Ids / internal names of custom operators that operators of this group will only be able to run" + }, + "records": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Ids / internal names of record types that operators of this group will only be able to access" + }, + "accounts": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OperatorGroupAccount" + }, + "description": "Defines how operators access the owner accounts, and defines restrictions on payment notifications. The key is the account type id or internal name." + }, + "payments": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OperatorGroupPayment" + }, + "description": "Defines which payment types can be used by operators to perform payments or authorize payments performed by other operators. Also defines the maximum daily amount that can be paid per operator." + }, + "redeemVouchers": { + "type": "boolean", + "x-remove-version": 4.17, + "deprecated": true, + "description": "Use `voucherTransactions` instead" + } + } + }, + "OperatorGroupNew": { + "description": "Fields for a new operator group.", + "allOf": [ + { + "$ref": "#/components/schemas/OperatorGroupManage" + } + ] + }, + "OperatorGroupPayment": { + "description": "Settings for payments for an operator group.", + "type": "object", + "properties": { + "authorize": { + "type": "boolean", + "description": "Can operators of this group authorize payments of this type which were performed by other operators?" + }, + "perform": { + "type": "boolean", + "description": "Can operators of this group perform payments of this type?" + }, + "requiresAuthorization": { + "type": "boolean", + "description": "Do performed payments of this type by operators require authorization by the owner or other operators?" + }, + "maxAmountPerDay": { + "type": "string", + "format": "number", + "description": "Maximum amount of payments that operators of this group can perform per day." + } + } + }, + "OperatorGroupPaymentView": { + "description": "Settings for payments for an operator group.", + "allOf": [ + { + "$ref": "#/components/schemas/OperatorGroupPayment" + }, + { + "type": "object", + "properties": { + "paymentType": { + "$ref": "#/components/schemas/TransferTypeWithCurrency" + } + } + } + ] + }, + "OperatorGroupView": { + "description": "Detailed information when viewing an operator group", + "allOf": [ + { + "$ref": "#/components/schemas/NamedEntity" + }, + { + "type": "object", + "properties": { + "user": { + "description": "The user which owns this operator group", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "canEdit": { + "description": "Can the authenticated user edit / remove this operator group?", + "type": "boolean" + }, + "description": { + "type": "string", + "description": "Optional description of the group" + }, + "editOwnProfile": { + "type": "boolean", + "description": "Can operators of this group edit their own profile?" + }, + "chargebackPayments": { + "type": "boolean", + "description": "Can operators of this group chargeback payments received by the owner?" + }, + "messages": { + "type": "boolean", + "description": "Can operators of this group access the message box of the owner?" + }, + "notifications": { + "type": "boolean", + "description": "Can operators of this group own notifications?" + }, + "receivePayments": { + "type": "boolean", + "description": "Can operators of this group receive payments?" + }, + "voucherTransactions": { + "type": "boolean", + "description": "Can operators of this group redeem / top-up vouchers and view transactions?" + }, + "requestPayments": { + "type": "boolean", + "description": "Can operators of this group request payments?" + }, + "viewAdvertisements": { + "type": "boolean", + "description": "Can operators of this group view advertisements?" + }, + "manageAdvertisements": { + "type": "boolean", + "description": "Can operators of this group manage advertisements of the owner?" + }, + "enableToken": { + "type": "boolean", + "description": "Can operators of this group have tokens (cards)?" + }, + "cancelToken": { + "type": "boolean", + "description": "Can operators of this group cancel their own tokens (cards)?" + }, + "blockToken": { + "type": "boolean", + "description": "Can operators of this group block their own tokens (cards)?" + }, + "unblockToken": { + "type": "boolean", + "description": "Can operators of this group unblock their own tokens (cards)?" + }, + "brokering": { + "type": "boolean", + "description": "Can operators of this group perform brokering operations?" + }, + "restrictPaymentsToUsers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/User" + }, + "description": "When set, operators of this group will only be able to perform payments to one of this users" + }, + "operations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Operation" + }, + "description": "Custom operators that operators of this group will only be able to run" + }, + "records": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RecordType" + }, + "description": "Record types that operators of this group will only be able to access" + }, + "accounts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OperatorGroupAccountView" + }, + "description": "Settings for the access operators will have over owner accounts." + }, + "payments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OperatorGroupPaymentView" + }, + "description": "Settings for payments that can be performed by operators." + }, + "redeemVouchers": { + "type": "boolean", + "x-remove-version": 4.17, + "deprecated": true, + "description": "Use `voucherTransactions` instead" + } + } + } + ] + }, + "OperatorNew": { + "description": "Contains data used to register an operator. All basic profile fields (full name, login name, e-mail, phones and addresses) can be enabled or disabled on Cyclos, via products.", + "x-implements": "IBasicUserNew", + "allOf": [ + { + "$ref": "#/components/schemas/BasicUserManage" + }, + { + "type": "object", + "properties": { + "group": { + "type": "string", + "description": "The operator group. When not specified the operator will be an 'alias', that means, will have all permissions of his owner." + }, + "mobilePhones": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PhoneNew" + }, + "description": "Mobile phones to be registered together with the user" + }, + "landLinePhones": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PhoneNew" + }, + "description": "Land-line phones to be registered together with the user" + }, + "passwords": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PasswordRegistration" + }, + "description": "The initial passwords of the user" + }, + "skipActivationEmail": { + "type": "boolean", + "description": "When set to true, the activation e-mail is not sent to the registered user. Can only be used when an administrator / broker is registering a user, and ignored on public registrations (the e-mail is always sent on public registrations)." + } + } + } + ] + }, + "OperatorResult": { + "description": "Result of a operator search.", + "allOf": [ + { + "$ref": "#/components/schemas/UserResult" + }, + { + "type": "object", + "properties": { + "group": { + "$ref": "#/components/schemas/EntityReference" + } + } + } + ] + }, + "OperatorsPermissions": { + "description": "Permissions over own operators", + "type": "object", + "properties": { + "enable": { + "description": "Whether operators are enabled", + "type": "boolean" + }, + "manageOperators": { + "description": "Whether I can manage my own operators", + "type": "boolean" + }, + "manageGroups": { + "description": "Whether I can manage my own operator groups", + "type": "boolean" + } + } + }, + "OrderBasicData": { + "description": "Common data for `OrderDataForNew` and `OrderDataForEdit`", + "type": "object", + "properties": { + "seller": { + "$ref": "#/components/schemas/User" + }, + "buyer": { + "$ref": "#/components/schemas/User" + }, + "deliveryMethods": { + "description": "List with all delivery methods defined for the seller. When creating or updating an order it can be filled with the fields from one of these existing delivery methods or a custom delivery method can be set.", + "type": "array", + "items": { + "$ref": "#/components/schemas/DeliveryMethod" + } + }, + "addressConfiguration": { + "description": "The address configuration for the buyer\n", + "$ref": "#/components/schemas/AddressConfiguration" + }, + "addresses": { + "description": "List containing the visible addresses of the buyer. When creating or updating an order it can be filled with the fields from one of these existing addresses or a custom delivery address can be set.\n", + "type": "array", + "items": { + "$ref": "#/components/schemas/Address" + } + }, + "sellerAddressConfiguration": { + "description": "The address configuration for the seller\n", + "$ref": "#/components/schemas/AddressConfiguration" + }, + "sellerAddresses": { + "description": "List containing the visible addresses of the seller for pickup point delivery methods.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Address" + } + } + } + }, + "OrderDataForAcceptByBuyer": { + "description": "Data used to accept an order by the buyer.", + "type": "object", + "properties": { + "paymentTypes": { + "description": "Contains the allowed payment types.", + "type": "array", + "items": { + "$ref": "#/components/schemas/TransferType" + } + }, + "confirmationPasswordInput": { + "description": "If a confirmation password is used, contains the definitions on how to request that password from the user. This confirmation password is required when performing sensible actions. Sometimes this is dynamic, for example, the confirmation might be configured to be used only once per session, or operations like payments may have a limit per day to be without confirmation (pinless).", + "allOf": [ + { + "$ref": "#/components/schemas/PasswordInput" + } + ] + } + } + }, + "OrderDataForEdit": { + "description": "Data for edit an order as the seller", + "allOf": [ + { + "$ref": "#/components/schemas/OrderBasicData" + }, + { + "type": "object", + "properties": { + "canEdit": { + "description": "Can the authenticated user edit this order?", + "type": "boolean" + }, + "canRemove": { + "description": "Can the authenticated user remove this order?", + "type": "boolean" + }, + "currency": { + "$ref": "#/components/schemas/Currency" + }, + "order": { + "description": "The order that is being edited", + "$ref": "#/components/schemas/OrderEdit" + }, + "creationDate": { + "type": "string", + "format": "date-time", + "description": "The creation date when the order was saved for first time" + }, + "number": { + "type": "string", + "description": "The generated order number according to the webshop settings." + }, + "status": { + "$ref": "#/components/schemas/OrderStatusEnum" + }, + "items": { + "description": "The list of product items added to the order", + "type": "array", + "items": { + "$ref": "#/components/schemas/WebshopAd" + } + } + } + } + ] + }, + "OrderDataForNew": { + "description": "Data for create a new order as the seller", + "allOf": [ + { + "$ref": "#/components/schemas/OrderBasicData" + }, + { + "type": "object", + "properties": { + "currencies": { + "description": "The available currencies for the sale", + "type": "array", + "items": { + "$ref": "#/components/schemas/Currency" + } + }, + "order": { + "description": "The order that is being created", + "$ref": "#/components/schemas/OrderNew" + } + } + } + ] + }, + "OrderDataForSearch": { + "description": "Data for searching orders (purchases / sales)", + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/User" + }, + "query": { + "description": "Default query filters to search operators", + "allOf": [ + { + "$ref": "#/components/schemas/OrderQueryFilters" + } + ] + }, + "numberMask": { + "type": "string", + "description": "The order number mask according to the webshop settings if it is manually generated. Only for sales" + }, + "currencies": { + "description": "The visible currencies the user have. Only for sales", + "type": "array", + "items": { + "$ref": "#/components/schemas/Currency" + } + }, + "canCreateNew": { + "description": "Whether the logged user can create a new sale or not.", + "type": "boolean" + } + } + }, + "OrderDataForSetDeliveryMethod": { + "description": "Data used to to set a delivery method.", + "type": "object", + "properties": { + "currency": { + "$ref": "#/components/schemas/Currency" + }, + "deliveryMethods": { + "description": "List with all delivery methods shared by all products contained in the order.", + "type": "array", + "items": { + "$ref": "#/components/schemas/DeliveryMethod" + } + } + } + }, + "OrderDeliveryMethod": { + "description": "The order delivery method", + "type": "object", + "properties": { + "name": { + "description": "The name of the delivery method", + "type": "string" + }, + "minTime": { + "description": "The minimum time interval expected for the products to be delivered.", + "allOf": [ + { + "$ref": "#/components/schemas/TimeInterval" + } + ] + }, + "maxTime": { + "description": "The maximum time interval expected for the products to be delivered.", + "allOf": [ + { + "$ref": "#/components/schemas/TimeInterval" + } + ] + }, + "price": { + "description": "The amount to be charged for the delivery method", + "type": "string", + "format": "number" + }, + "deliveryType": { + "$ref": "#/components/schemas/DeliveryMethodTypeEnum" + } + } + }, + "OrderEdit": { + "description": "Fields for modifying an order.", + "allOf": [ + { + "$ref": "#/components/schemas/OrderManage" + }, + { + "type": "object", + "properties": { + "version": { + "type": "integer", + "description": "The version stamp for the current object, used for optimistic locking. When saving, the same version as previously received needs to be passed back. If no one else has saved the object, the version will match and the object will be updated. However, if someone other has saved the object, the version will no longer match, and an error will be raised. This is used to prevent multiple users (or processes) from updating the same object and unwilingly overridding the property values, leading to data loss." + } + } + } + ] + }, + "OrderItem": { + "description": "Data for an order item.", + "allOf": [ + { + "$ref": "#/components/schemas/BaseOrderItem" + }, + { + "type": "object", + "properties": { + "totalPrice": { + "description": "The total price for this item, i.e the charged price of the product multiplied by its corresponding quantity.", + "type": "string", + "format": "number" + } + } + } + ] + }, + "OrderItemManage": { + "description": "Data for create / edit an order item", + "type": "object", + "properties": { + "quantity": { + "description": "It represents how much of the product was ordered. It could be a decimal number only if it's allowed by the product (i.e the webshopad).", + "type": "string", + "format": "number" + }, + "price": { + "description": "The charged price of the product.", + "type": "string", + "format": "number" + }, + "product": { + "description": "Can be either the ad webshop internal identifier or the product number. If the number is solely comprised of numbers, it must be prefixed by a single quote.", + "type": "string" + } + } + }, + "OrderLog": { + "description": "Information regarding a specific order status change", + "type": "object", + "properties": { + "by": { + "$ref": "#/components/schemas/User" + }, + "date": { + "description": "When the chage was made", + "type": "string", + "format": "date-time" + }, + "remarks": { + "description": "The remarks associated to the change made by the user", + "type": "string" + }, + "status": { + "description": "The new status for the order", + "allOf": [ + { + "$ref": "#/components/schemas/OrderStatusEnum" + } + ] + } + } + }, + "OrderManage": { + "description": "Common fields for either creating or editing an order", + "type": "object", + "properties": { + "deliveryMethod": { + "$ref": "#/components/schemas/OrderDeliveryMethod" + }, + "deliveryAddress": { + "$ref": "#/components/schemas/SimpleAddress" + }, + "draft": { + "description": "If `true` then the order is saved with status `draft` and is visible only for the seller. Otherwise, the order is saved with status `pendingBuyer` and sent to the buyer for acceptance.", + "type": "boolean" + }, + "remarks": { + "description": "Remarks shown to the buyer if set", + "type": "string" + }, + "items": { + "description": "The order items", + "type": "array", + "items": { + "$ref": "#/components/schemas/OrderItemManage" + } + } + } + }, + "OrderNew": { + "description": "A new order to be created", + "allOf": [ + { + "$ref": "#/components/schemas/OrderManage" + }, + { + "type": "object", + "properties": { + "currency": { + "description": "Either internal name or id of the order currency.", + "type": "string" + }, + "buyer": { + "description": "Either internal id or other accepted identification (username, e-mail, etc) for the buyer", + "type": "string" + } + } + } + ] + }, + "OrderQueryFilters": { + "description": "Search filters for orders.", + "allOf": [ + { + "$ref": "#/components/schemas/QueryFilters" + }, + { + "type": "object", + "properties": { + "relatedUser": { + "type": "string", + "description": "Either id or an identification, such as login name, e-mail, etc, for the seller or buyer according whether we are searching for purchases or sales. The allowed identification methods are those the authenticated user can use on keywords search." + }, + "number": { + "type": "string", + "description": "The generated order number according to the webshop settings." + }, + "creationPeriod": { + "description": "The minimum / maximum order creation date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "sales": { + "type": "boolean", + "description": "Are we searching for sales or purchases? If not specified it's assumed purchases (i.e `false`)" + }, + "statuses": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OrderStatusEnum" + } + }, + "productNumber": { + "type": "string", + "description": "The product number (with the mask if there is one) of an advertisement contained in the orders." + } + } + } + ] + }, + "OrderResult": { + "description": "Data of an order as returned on list.", + "allOf": [ + { + "$ref": "#/components/schemas/BaseOrder" + }, + { + "type": "object", + "properties": { + "creationDate": { + "type": "string", + "format": "date-time", + "description": "The creation date corresponding to the date when the first item of this order was added to the shopping cart." + }, + "currency": { + "description": "The currency of the order.", + "allOf": [ + { + "$ref": "#/components/schemas/Currency" + } + ] + }, + "number": { + "type": "string", + "description": "The generated order number according to the webshop settings." + }, + "totalPrice": { + "type": "string", + "format": "number", + "description": "The total price of the order, i.e the sum of the total price of all of its `items` and the delivery method (if any)." + }, + "image": { + "description": "This represents the first image of the first item in the order (if any).", + "allOf": [ + { + "$ref": "#/components/schemas/Image" + } + ] + }, + "status": { + "$ref": "#/components/schemas/OrderStatusEnum" + } + } + } + ] + }, + "OrderView": { + "description": "Detailed information when viewing an order", + "allOf": [ + { + "$ref": "#/components/schemas/OrderResult" + }, + { + "type": "object", + "properties": { + "buyer": { + "description": "The buyer of the order.", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "seller": { + "description": "The seller of the order.", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "deliveryAddress": { + "$ref": "#/components/schemas/SimpleAddress" + }, + "deliveryMethod": { + "$ref": "#/components/schemas/OrderDeliveryMethod" + }, + "paymentType": { + "$ref": "#/components/schemas/TransferType" + }, + "items": { + "description": "The order items", + "type": "array", + "items": { + "$ref": "#/components/schemas/OrderItem" + } + }, + "remarks": { + "type": "string", + "description": "The current order remarks (i.e those for check-out, accept or reject)." + }, + "sale": { + "type": "boolean", + "description": "Is it a sale (initiated by the seller)?" + }, + "canAccept": { + "description": "An order can be accepted only for the following statuses:\n\n- `draft`: only if the authenticated user is the seller meaning the seller can submit the sale to the buyer.\n- `pendingBuyer`: only if the authenticated user is the buyer\n- `pendingSeller`: only if the authenticated user is the seller and the order has a delivery method already set", + "type": "boolean" + }, + "canReject": { + "description": "An order can be rejected only for the following statuses:\n\n- `pendingBuyer`: only if the authenticated user is the buyer or the seller\n- `pendingSeller`: only if the authenticated user is the seller", + "type": "boolean" + }, + "canSetDeliveryInformation": { + "description": "Delivery information can be set only for the following statuses:\n\n- `draft`: only if the authenticated user is the seller\n- `pendingSeller`: only if the authenticated user is the seller and a delivery method was not already set", + "type": "boolean" + }, + "history": { + "description": "Contains the history entries for all order status changes", + "type": "array", + "items": { + "$ref": "#/components/schemas/OrderLog" + } + }, + "exportFormats": { + "description": "The formats which the ordercan be exported", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExportFormat" + } + } + } + } + ] + }, + "OtpResult": { + "description": "Result of sending a verification code.", + "allOf": [ + { + "$ref": "#/components/schemas/Entity" + }, + { + "type": "object", + "properties": { + "sendMedium": { + "$ref": "#/components/schemas/SendMediumEnum" + }, + "sentTo": { + "description": "The email address or mobile phone number to which the OTP was sent", + "type": "string" + } + } + } + ] + }, + "OwnerAccountsListData": { + "description": "Contains information for list accounts, plus status information", + "type": "object", + "properties": { + "accounts": { + "description": "The list of accounts plus status information", + "type": "array", + "items": { + "$ref": "#/components/schemas/AccountWithStatus" + } + }, + "user": { + "description": "The accounts owner. Only returned if the owner is a user.", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + } + } + }, + "OwnerRecordData": { + "description": "Data over a user record type for a given owner", + "allOf": [ + { + "$ref": "#/components/schemas/RecordPermissions" + }, + { + "type": "object", + "properties": { + "count": { + "description": "The current number of records of this type for this owner", + "type": "integer" + } + } + } + ] + }, + "OwnerRecordPermissions": { + "description": "Permissions over a user record for a given owner", + "allOf": [ + { + "$ref": "#/components/schemas/RecordPermissions" + }, + { + "type": "object" + } + ] + }, + "PasswordActions": { + "description": "Indicates the possible actions the authenticated user can perform over this password", + "type": "object", + "properties": { + "change": { + "description": "Manually change the password.", + "type": "boolean" + }, + "changeGenerated": { + "description": "Manually generate another value for a generated password. Can only be done for the authenticated user himself.", + "type": "boolean" + }, + "generate": { + "description": "Generate the password value for the first time. Can only be done for the authenticated user himself.", + "type": "boolean" + }, + "allowGeneration": { + "description": "Granted only for those generated passwords that have a setting to require administration authorization and have the status `neverCreated`. Can only be done by administrators with permissions to enable/disable the password.", + "type": "boolean" + }, + "disable": { + "description": "Disables a password, making it unusable until being enabled again.", + "type": "boolean" + }, + "enable": { + "description": "Enables a disabled password, either manually disabled or by exceeding the wrong tries, depending on the password type configuration.", + "type": "boolean" + }, + "resetGenerated": { + "description": "Resets a generated password, making it go back to the `pending` state. The user will then be able to generate a new value for it.", + "type": "boolean" + }, + "resetAndSend": { + "description": "Resets a manual password to a generated value and send it to the user. Can also be used to reset and send the main channel's access password if it is generated. The new password is initially expired, so the user needs to change it on first login.", + "type": "boolean" + }, + "unblock": { + "description": "Unblocks a password which has been blocked by exceeding the wrong tries", + "type": "boolean" + } + } + }, + "PasswordInput": { + "description": "Contains all information for a displaying a widget for the user to enter a credential. A credential may be:\n* A password, entered as regular texts or as virtual keyboards. For\n `virtualKeyboard`, a number of information is\n sent, such as an unique `virtualKeyboardId`, the number of buttons to be\n displayed, the number of rows that should visually hold those buttons,\nthe sequences of characters that should be displayed on each button. When sending the value of a password of type virtual keyboard, that `virtualKeyboardId` must be sent, together with the entire sequence for each entered button, all separated by pipes. So, suppose a very simple (and weakly configured) example where the `virtualKeyboardId` is `123` and the sequences are: `[[\"abc\", \"def\", \"fgh\"], [\"ijk\", \"lmn\", \"opq\"]]`. This describes 2 sequences of 3 buttons each. First, the buttons with the options `abc`, `def` and `fgh` should be shown. Suppose the user chooses the second one. Then the button labels should be changed to `ijk`, `lmn` and `opq`. Now the user picks the first one. The password value sent to the server must be `123|def|ijk`.", + "type": "object", + "properties": { + "allowedCredentials": { + "description": "The credential types which are allowed in this action.", + "type": "array", + "items": { + "$ref": "#/components/schemas/CredentialTypeEnum" + } + }, + "activeCredentials": { + "description": "The credential types which the current authenticated user have active. Is a subset of `allowedCredentials`.", + "type": "array", + "items": { + "$ref": "#/components/schemas/CredentialTypeEnum" + } + }, + "passwordType": { + "description": "The password type used for confirmation. Only if `allowedCredentials` contains `password`.", + "allOf": [ + { + "$ref": "#/components/schemas/PasswordTypeDetailed" + } + ] + }, + "passwordStatus": { + "$ref": "#/components/schemas/PasswordStatusEnum" + }, + "confirmationPasswordOncePerSession": { + "description": "Only returned when there is an authenticated user (not for login). Determines whether this password, when used as confirmation, should be requested only once until the user logs out.", + "type": "boolean" + }, + "buttons": { + "description": "Only for `virtualKeyboard`, contains the sequences of buttons that should be displayed for the user. The explanation for the value that should be sent on virtual keyboard mode is shown above, in the description of this type.", + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "virtualKeyboardId": { + "description": "The id that should be sent together with the sequences when `passwordType.inputMethod` is `virtualKeyboard`.", + "type": "string" + }, + "pinInput": { + "description": "The device PIN min length. Only if `pinAvailability` is not `disabled`", + "allOf": [ + { + "$ref": "#/components/schemas/PinInput" + } + ] + }, + "emailToSendOtp": { + "description": "The email available to request a new otp. Only returned if `otpSendMediums` contains `email`", + "type": "string" + }, + "mobilePhonesToSendOtp": { + "description": "The phones available to request a new otp. Only returned if `otpSendMediums` contains `sms`", + "type": "array", + "items": { + "$ref": "#/components/schemas/Phone" + } + }, + "otpSendMediums": { + "description": "Indicates the mediums the user can use to receive an OTP. Only returned when `allowedCredentials` contains `password` and `passwordType.mode` is `otp`.", + "type": "array", + "items": { + "$ref": "#/components/schemas/SendMediumEnum" + } + }, + "hasReusableOtp": { + "description": "Indicates if the password is an OTP marked as reusable and the user has a currently valid OTP value. Only returned when `allowedCredentials` contains `password` and `passwordType.mode` is `otp`.", + "type": "boolean" + }, + "hasActivePassword": { + "deprecated": true, + "x-remove-version": 4.18, + "description": "Use `activeCredentials` instead, which should contain `password`.", + "type": "boolean" + }, + "hasActiveDevice": { + "deprecated": true, + "x-remove-version": 4.18, + "description": "Use `activeCredentials` instead, which should contain `device`.", + "type": "boolean" + }, + "deviceAvailability": { + "deprecated": true, + "x-remove-version": 4.18, + "description": "Use `allowedCredentials` instead, which should contain `device`.", + "allOf": [ + { + "$ref": "#/components/schemas/AvailabilityEnum" + } + ] + }, + "pinAvailability": { + "deprecated": true, + "x-remove-version": 4.18, + "description": "Use `allowedCredentials` instead, which should contain `pin`.", + "allOf": [ + { + "$ref": "#/components/schemas/AvailabilityEnum" + } + ] + }, + "id": { + "type": "string", + "deprecated": true, + "x-remove-version": 4.18, + "description": "Use `passwordType.id` instead" + }, + "name": { + "type": "string", + "deprecated": true, + "x-remove-version": 4.18, + "description": "Use `passwordType.name` instead" + }, + "internalName": { + "type": "string", + "deprecated": true, + "x-remove-version": 4.18, + "description": "Use `passwordType.internalName` instead" + }, + "onlyNumeric": { + "type": "boolean", + "deprecated": true, + "x-remove-version": 4.18, + "description": "Use `passwordType.onlyNumeric` instead" + }, + "minLength": { + "type": "integer", + "deprecated": true, + "x-remove-version": 4.18, + "description": "Use `passwordType.minLength` instead" + }, + "maxLength": { + "type": "integer", + "deprecated": true, + "x-remove-version": 4.18, + "description": "Use `passwordType.maxLength` instead" + }, + "lowerCaseLetters": { + "allOf": [ + { + "$ref": "#/components/schemas/AvailabilityEnum" + } + ], + "deprecated": true, + "x-remove-version": 4.18, + "description": "Use `passwordType.lowerCaseLetters` instead" + }, + "upperCaseLetters": { + "allOf": [ + { + "$ref": "#/components/schemas/AvailabilityEnum" + } + ], + "deprecated": true, + "x-remove-version": 4.18, + "description": "Use `passwordType.upperCaseLetters` instead" + }, + "numbers": { + "allOf": [ + { + "$ref": "#/components/schemas/AvailabilityEnum" + } + ], + "deprecated": true, + "x-remove-version": 4.18, + "description": "Use `passwordType.numbers` instead" + }, + "specialCharacters": { + "allOf": [ + { + "$ref": "#/components/schemas/AvailabilityEnum" + } + ], + "deprecated": true, + "x-remove-version": 4.18, + "description": "Use `passwordType.specialCharacters` instead" + }, + "global": { + "type": "boolean", + "deprecated": true, + "x-remove-version": 4.18, + "description": "Use `passwordType.global` instead" + }, + "mode": { + "allOf": [ + { + "$ref": "#/components/schemas/PasswordModeEnum" + } + ], + "deprecated": true, + "x-remove-version": 4.18, + "description": "Use `passwordType.mode` instead" + }, + "inputMethod": { + "allOf": [ + { + "$ref": "#/components/schemas/PasswordInputMethodEnum" + } + ], + "deprecated": true, + "x-remove-version": 4.18, + "description": "Use `passwordType.inputMethod` instead" + }, + "numberOfButtons": { + "type": "integer", + "deprecated": true, + "x-remove-version": 4.18, + "description": "Use `passwordType.numberOfButtons` instead" + }, + "buttonsPerRow": { + "type": "integer", + "deprecated": true, + "x-remove-version": 4.18, + "description": "Use `passwordType.buttonsPerRow` instead" + }, + "description": { + "type": "string", + "deprecated": true, + "x-remove-version": 4.18, + "description": "Use `passwordType.description` instead" + } + } + }, + "PasswordLog": { + "type": "object", + "properties": { + "by": { + "description": "The user that performed the action", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "action": { + "$ref": "#/components/schemas/PasswordActionEnum" + }, + "date": { + "description": "The action date", + "type": "string", + "format": "date-time" + } + } + }, + "PasswordPermissions": { + "description": "Permissions a single password", + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/PasswordType" + }, + "change": { + "description": "Can change this password?", + "type": "boolean" + }, + "enable": { + "description": "Can enable / disable this password?", + "type": "boolean" + }, + "reset": { + "description": "Can reset this password?", + "type": "boolean" + }, + "unblock": { + "description": "Can unblock this password if blocked by exceeding tries?", + "type": "boolean" + } + } + }, + "PasswordRegistration": { + "description": "Data regarding a password being registered with the user", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "The password type" + }, + "value": { + "type": "string", + "description": "The password value" + }, + "checkConfirmation": { + "type": "boolean", + "description": "Depending on the client, if a confirm password field is shown to users, it might be useful to check the confirmation password value on the server. This way, if there are other validation exceptions, they are all shown together. In this case, this field should be set to `true` and the `confirmationValue` should be passed in with the user input. However, in cases where clients just want to register a user with a password non interactively (like in a bulk registration), passing the password value twice is not desirable. In such cases, this field can be left empty (or set to `false`), and the `confirmationValue` will be ignored." + }, + "confirmationValue": { + "type": "string", + "description": "The password confirmation value. Is ignored unless `checkConfirmation` is set to `true`." + }, + "forceChange": { + "type": "boolean", + "description": "When set to true will force the user to change it after the first login" + } + } + }, + "PasswordStatus": { + "description": "Contains the status of a password", + "type": "object", + "properties": { + "date": { + "description": "The date this status took place", + "type": "string", + "format": "date-time" + }, + "status": { + "$ref": "#/components/schemas/PasswordStatusEnum" + } + } + }, + "PasswordStatusAndActions": { + "description": "Contains the status and possible actions over a password", + "allOf": [ + { + "$ref": "#/components/schemas/PasswordStatus" + }, + { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/PasswordTypeDetailed" + }, + "requireOldPasswordForChange": { + "description": "Indicates whether the `change` action, if enabled, requires the old password to be sent. This is the case when changing the password of the logged user, and the current password was ever set and is not currently expired / reset.", + "type": "boolean" + }, + "permissions": { + "description": "The permissions over actions the authenticated user can perform on this password", + "allOf": [ + { + "$ref": "#/components/schemas/PasswordActions" + } + ] + }, + "history": { + "description": "The password history", + "type": "array", + "items": { + "$ref": "#/components/schemas/PasswordLog" + } + } + } + } + ] + }, + "PasswordStatusAndType": { + "description": "Contains the status of a password and its type.", + "allOf": [ + { + "$ref": "#/components/schemas/PasswordStatus" + }, + { + "type": "object", + "properties": { + "type": { + "description": "The password type", + "allOf": [ + { + "$ref": "#/components/schemas/PasswordTypeDetailed" + } + ] + } + } + } + ] + }, + "PasswordType": { + "description": "Contains base definitions for a password type", + "allOf": [ + { + "$ref": "#/components/schemas/InternalNamedEntity" + }, + { + "type": "object", + "properties": { + "mode": { + "$ref": "#/components/schemas/PasswordModeEnum" + }, + "global": { + "type": "boolean", + "description": "Indicates whether this password type is defined in global mode (`true`) or in a network (`false`)" + } + } + } + ] + }, + "PasswordTypeDetailed": { + "description": "Contains additional definitions for a password type", + "allOf": [ + { + "$ref": "#/components/schemas/PasswordType" + }, + { + "type": "object", + "properties": { + "onlyNumeric": { + "type": "boolean", + "description": "Indicates whether this password type only allows numbers as possible characters" + }, + "minLength": { + "type": "integer", + "description": "Indicates the minimum length of characters allowed for a password definition" + }, + "maxLength": { + "type": "integer", + "description": "Indicates the maximum length of characters allowed for a password definition" + }, + "lowerCaseLetters": { + "description": "The policy for lower case letters in the password.", + "allOf": [ + { + "$ref": "#/components/schemas/AvailabilityEnum" + } + ] + }, + "upperCaseLetters": { + "description": "The policy for upper case letters in the password.", + "allOf": [ + { + "$ref": "#/components/schemas/AvailabilityEnum" + } + ] + }, + "numbers": { + "description": "The policy for numbers in the password.", + "allOf": [ + { + "$ref": "#/components/schemas/AvailabilityEnum" + } + ] + }, + "specialCharacters": { + "description": "The policy for special characters in the password. The current list of special characters is: ``@`!\"#$%&'()*+,-./:;<=>?[\\]^_{}~``.", + "allOf": [ + { + "$ref": "#/components/schemas/AvailabilityEnum" + } + ] + }, + "inputMethod": { + "$ref": "#/components/schemas/PasswordInputMethodEnum" + }, + "numberOfButtons": { + "description": "Only for `virtualKeyboard`, is the number of buttons to be displayed", + "type": "integer" + }, + "buttonsPerRow": { + "description": "Only for `virtualKeyboard`, is the number of buttons that should be displayed on each row", + "type": "integer" + }, + "numberOfRows": { + "description": "Only for `virtualKeyboard`, is the number of rows with buttons", + "type": "integer" + }, + "allowReuseOtp": { + "type": "boolean", + "description": "Only when `mode` is `otp`, indicates when the OTP is allowed to be reused (in this case is not strictly a 'one time password', but a temporary password with a small validity)." + }, + "description": { + "type": "string", + "description": "The description of the password type. Useful to know what a password must contain to meet the restrictions of this type." + } + } + } + ] + }, + "PasswordTypeRegistration": { + "description": "Data for a given password type to be used on user registration", + "allOf": [ + { + "$ref": "#/components/schemas/PasswordTypeDetailed" + }, + { + "type": "object", + "properties": { + "canForceChange": { + "type": "boolean", + "description": "Whether the current user can set the password to be changed on the first user login" + } + } + } + ] + }, + "PasswordsPermissions": { + "description": "Permissions over own passwords", + "type": "object", + "properties": { + "manage": { + "description": "Can manage any password?", + "type": "boolean" + }, + "passwords": { + "description": "Permissions over each password type", + "type": "array", + "items": { + "$ref": "#/components/schemas/PasswordPermissions" + } + } + } + }, + "PaymentAwaitingFeedbackQueryFilters": { + "description": "Query filters for transactions without a given feedback", + "allOf": [ + { + "$ref": "#/components/schemas/QueryFilters" + }, + { + "type": "object", + "properties": { + "relatedUser": { + "description": "The user that received the payment feedback in reference to the user specified in the path. Should be either the id or some other allowed identification (login name, email, etc).", + "type": "string" + } + } + } + ] + }, + "PaymentError": { + "description": "Error when performing a payment", + "allOf": [ + { + "$ref": "#/components/schemas/Error" + }, + { + "type": "object", + "properties": { + "currency": { + "description": "Currency reference. Only if `code` is `dailyAmountExceeded`, `weeklyAmountExceeded` or `monthlyAmountExceeded`", + "allOf": [ + { + "$ref": "#/components/schemas/Currency" + } + ] + }, + "maxAmount": { + "description": "The maximum amount. Only if `code` is `dailyAmountExceeded`, `weeklyAmountExceeded` or `monthlyAmountExceeded`", + "type": "string", + "format": "number" + }, + "maxPayments": { + "description": "The maximum payments count. Only if `code` is `dailyPaymentsExceeded`, `weeklyPaymentsExceeded` or `monthlyPaymentsExceeded`", + "type": "integer" + }, + "posError": { + "description": "The POS error details. Only if `code` is `pos`", + "allOf": [ + { + "$ref": "#/components/schemas/PosError" + } + ] + }, + "code": { + "$ref": "#/components/schemas/PaymentErrorCode" + }, + "voucher": { + "description": "Only if `code` is `insufficientBalance`, indicates whether what would have insufficient balance is a related voucher.", + "type": "boolean" + } + } + } + ] + }, + "PaymentFeedback": { + "description": "A payment feedback", + "allOf": [ + { + "$ref": "#/components/schemas/Reference" + }, + { + "type": "object", + "properties": { + "replyComments": { + "description": "The payment feedback reply comments", + "type": "string" + }, + "replyCommentsDate": { + "description": "The payment feedback reply comments date", + "type": "string", + "format": "date-time" + } + } + } + ] + }, + "PaymentFeedbackDataForEdit": { + "description": "Contains data for editing an existing payment feedback", + "type": "object", + "properties": { + "feedback": { + "description": "The payment feedback being edited.", + "allOf": [ + { + "$ref": "#/components/schemas/PaymentFeedbackEdit" + } + ] + }, + "transaction": { + "description": "The payment for which the feedback was given. Only if the authenticated user as access at least to one of the involved accounts.", + "allOf": [ + { + "$ref": "#/components/schemas/Transaction" + } + ] + } + } + }, + "PaymentFeedbackDataForGive": { + "description": "Data for give or change and already given a payment feedback", + "type": "object", + "properties": { + "canGive": { + "description": "Whether the user can give a feedback", + "type": "boolean" + }, + "deadline": { + "description": "The deadline until the feedback is allowed", + "type": "string", + "format": "date-time" + }, + "required": { + "description": "Whether payment feedbacks are required or not", + "type": "boolean" + }, + "feedback": { + "description": "The payment feedback being given", + "allOf": [ + { + "$ref": "#/components/schemas/PaymentFeedbackGive" + } + ] + }, + "transaction": { + "description": "The payment for which the feedback is being given. Only if the authenticated user as access at least to one of the involved accounts.", + "allOf": [ + { + "$ref": "#/components/schemas/Transaction" + } + ] + } + } + }, + "PaymentFeedbackDataForReply": { + "description": "Data for reply for a given a payment feedback", + "type": "object", + "properties": { + "level": { + "$ref": "#/components/schemas/ReferenceLevelEnum" + }, + "comments": { + "description": "Given comments for this payment feedback", + "type": "string" + }, + "canReply": { + "description": "Whether the user can reply for a given feedback", + "type": "boolean" + }, + "deadline": { + "description": "The deadline until the reply is allowed. Null means there is no limit for reply and the user can reply while the feedback has not expired.", + "type": "string", + "format": "date-time" + }, + "transaction": { + "description": "The payment for which the feedback is being replied. Only if the authenticated user as access at least to one of the involved accounts.", + "allOf": [ + { + "$ref": "#/components/schemas/Transaction" + } + ] + } + } + }, + "PaymentFeedbackDataForSearch": { + "description": "Data for searching payment feedbacks of a given user", + "allOf": [ + { + "$ref": "#/components/schemas/BaseReferenceDataForSearch" + }, + { + "type": "object", + "properties": { + "query": { + "description": "Default query filters", + "allOf": [ + { + "$ref": "#/components/schemas/PaymentFeedbackQueryFilters" + } + ] + } + } + } + ] + }, + "PaymentFeedbackEdit": { + "description": "Parameters for editing an existing payment feedback", + "type": "object", + "properties": { + "level": { + "$ref": "#/components/schemas/ReferenceLevelEnum" + }, + "giveComments": { + "description": "The modified payer's comment", + "type": "string" + }, + "replyComments": { + "description": "The modified reply comment", + "type": "string" + }, + "managerComments": { + "description": "The admin/broker comments", + "type": "string" + }, + "version": { + "type": "integer", + "description": "The version stamp for the current object, used for optimistic locking. When saving, the same version as previously received needs to be passed back. If no one else has saved the object, the version will match and the object will be updated. However, if someone other has saved the object, the version will no longer match, and an error will be raised. This is used to prevent multiple users (or processes) from updating the same object and unwilingly overridding the property values, leading to data loss." + } + } + }, + "PaymentFeedbackGive": { + "description": "Data for give (create or change) a payment feedback", + "type": "object", + "properties": { + "level": { + "$ref": "#/components/schemas/ReferenceLevelEnum" + }, + "comments": { + "description": "Comments for this payment feedback", + "type": "string" + } + } + }, + "PaymentFeedbackQueryFilters": { + "description": "Query filters for a user's payment feedbacks", + "allOf": [ + { + "$ref": "#/components/schemas/BaseReferenceQueryFilters" + }, + { + "type": "object", + "properties": { + "noReplied": { + "description": "If true only those payment feedbacks without a reply comment would be returned", + "type": "boolean" + } + } + } + ] + }, + "PaymentFeedbackResult": { + "description": "Result of searching payment feedbacks of a given user", + "allOf": [ + { + "$ref": "#/components/schemas/PaymentFeedback" + }, + { + "type": "object", + "properties": { + "relatedUser": { + "description": "The user that either gave to (i.e the payer) or received from (the payee) the user specified in the path variable.", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "direction": { + "description": "Whether this payment feedback was given to or received from the user specified in the path variable.", + "allOf": [ + { + "$ref": "#/components/schemas/ReferenceDirectionEnum" + } + ] + } + } + } + ] + }, + "PaymentFeedbackView": { + "description": "Details of a payment feedback", + "allOf": [ + { + "$ref": "#/components/schemas/PaymentFeedback" + }, + { + "type": "object", + "properties": { + "canEdit": { + "description": "Indicates whether the feedback can be edited or removed if the authenticated user is a manager", + "type": "boolean" + }, + "canGive": { + "description": "Indicates if feedback can be given also checking it's deadline", + "type": "boolean" + }, + "canReply": { + "description": "Indicates if feedback can be replied also checking it's deadline", + "type": "boolean" + }, + "from": { + "description": "The user that gave the feedback (i.e the payer)", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "to": { + "description": "The user that received the feedback (i.e the payee)", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "managerComments": { + "description": "The admin/broker comments. Only returned if the authenticated user is a manager.", + "type": "string" + }, + "managerCommentsDate": { + "description": "The admin/broker comments date. Only returned if the authenticated user is a manager.", + "type": "string", + "format": "date-time" + }, + "transaction": { + "description": "The payment for which the feedback was given. Only if the authenticated user as access at least to one of the involved accounts.", + "allOf": [ + { + "$ref": "#/components/schemas/Transaction" + } + ] + } + } + } + ] + }, + "PaymentFeedbacksPermissions": { + "description": "Permissions over payment feedbacks", + "type": "object", + "properties": { + "view": { + "description": "Can view other user's payment feedbacks?", + "type": "boolean" + }, + "give": { + "description": "Can give payment feedbacks?", + "type": "boolean" + }, + "receive": { + "description": "Can receive payment feedbacks?", + "type": "boolean" + } + } + }, + "PaymentPreview": { + "description": "Preview of either a direct or scheduled payment", + "allOf": [ + { + "$ref": "#/components/schemas/InternalTransactionPreview" + }, + { + "type": "object", + "properties": { + "mainAmount": { + "description": "This reflects the new transaction amount. Depending on the configured fees, it could happen that the fee amount is deducted from transaction amount. If no fees deduct, it will be the same as transaction amount. E.g: payment from A to B by 100 units with two fees: 10 units deducted from payment amount and other of 15 not deducted. Then the `totalAmount` will be 115, 90 for the `mainAmount`, 10 for the first fee and 15 for the other fee.", + "type": "string", + "format": "number" + }, + "fees": { + "description": "Only returned for direct payments. Contains the fees that would be paid by the payer if the payment is confirmed.", + "type": "array", + "items": { + "$ref": "#/components/schemas/TransferFeePreview" + } + }, + "installments": { + "description": "Only returned for scheduled payments. Contains the previews of each installment, if the payment is confirmed.", + "type": "array", + "items": { + "$ref": "#/components/schemas/InstallmentPreview" + } + }, + "payment": { + "description": "Depending on the configuration, some script might alter the payment object, for example, filling in custom fields. This object can be used to show the actual data to the user, and to be posted again to the `POST /{owner}/payments/` path.", + "allOf": [ + { + "$ref": "#/components/schemas/PerformPayment" + } + ] + }, + "ARate": { + "description": "The balance aging counter used for this payment", + "type": "string", + "format": "number" + }, + "DRate": { + "description": "The balance maturity used for this payment", + "type": "string", + "format": "number" + }, + "previousDRate": { + "description": "The number of days until the present balance reaches its maturity", + "type": "string", + "format": "number" + }, + "transferDRate": { + "description": "The maturity used for this payment", + "type": "string", + "format": "number" + }, + "skipConfirmation": { + "description": "True if the payment should be performed directly without showing the preview. If there is a `confirmationPasswordInput` defined then this flag will be false regardless the setting in the transfer type.", + "type": "boolean" + } + } + } + ] + }, + "PaymentRequestPermissions": { + "description": "Permissions the user has over a payment request.", + "type": "object", + "properties": { + "accept": { + "description": "The payment request can be accepted by the payer.", + "type": "boolean" + }, + "reject": { + "description": "The payment request can be rejected by the payer.", + "type": "boolean" + }, + "cancel": { + "description": "The payment request can be canceled by the payee or managers.", + "type": "boolean" + }, + "reschedule": { + "description": "The payment request can be rescheduled by the payee or managers.", + "type": "boolean" + }, + "changeExpiration": { + "description": "The payment request expiration date can be changed by the payee or managers.", + "type": "boolean" + } + } + }, + "PaymentRequestPreview": { + "description": "Contains a preview of the payment that would be performed upon accepting a payment request.", + "allOf": [ + { + "$ref": "#/components/schemas/PaymentPreview" + }, + { + "type": "object", + "properties": { + "paymentRequest": { + "description": "A reference to the payment request being previewed", + "allOf": [ + { + "$ref": "#/components/schemas/TransactionView" + } + ] + } + } + } + ] + }, + "PaymentRequestsPermissions": { + "description": "Permissions over own payment requests", + "allOf": [ + { + "$ref": "#/components/schemas/PaymentRequestPermissions" + }, + { + "type": "object", + "properties": { + "view": { + "description": "Can view payment requests?", + "type": "boolean" + }, + "sendToSystem": { + "description": "Can the authenticated user send payment requests to system accounts?", + "type": "boolean" + }, + "sendToUser": { + "description": "Can the authenticated user send payment requests to users?", + "type": "boolean" + } + } + } + ] + }, + "PaymentsPermissions": { + "description": "General payment permissions", + "type": "object", + "properties": { + "user": { + "description": "Can perform payments to users?", + "type": "boolean" + }, + "system": { + "description": "Can perform payments to system accounts?", + "type": "boolean" + }, + "self": { + "description": "Can perform payments between own accounts?", + "type": "boolean" + }, + "pos": { + "description": "Can receive payments from users?", + "type": "boolean" + } + } + }, + "PendingPaymentActionParams": { + "description": "Parameters for actions over pending payments", + "type": "object", + "properties": { + "comments": { + "description": "Comments for the current action", + "type": "string" + } + } + }, + "PerformBaseTransaction": { + "description": "Base definitions for performing a transaction", + "type": "object", + "x-abstract": true, + "properties": { + "amount": { + "description": "The transaction amount", + "type": "string", + "format": "number" + }, + "description": { + "description": "The (optional) transaction description", + "type": "string" + }, + "currency": { + "description": "The currency id or internal name. Only used when not specifying a payment type. In this case, will narrow the search for the payment type.", + "type": "string" + }, + "type": { + "description": "The payment type, either the id or qualified internal name (in the form `fromAccountType.paymentType`). If no payment type is specified, if a single one is possible, it will be used. If a currency is specified, it will be taken into account in order to find the payment type. If, however, there would be multiple possibilities, a validation error is returned.", + "type": "string" + }, + "customValues": { + "type": "object", + "description": "Holds the custom field values, keyed by field internal name or id. The format of the value depends on the custom field type.", + "additionalProperties": { + "type": "string" + } + } + } + }, + "PerformExternalPayment": { + "description": "Parameters for performing an external payment", + "allOf": [ + { + "$ref": "#/components/schemas/PerformTransaction" + }, + { + "type": "object", + "properties": { + "toPrincipalType": { + "description": "The principal type used to identify the external user. Generally `email` or `mobilePhone`.", + "type": "string" + }, + "toPrincipalValue": { + "description": "The value for the corresponding principal type, for example, the e-mail address or mobile phone number.", + "type": "string" + } + } + } + ] + }, + "PerformInstallment": { + "description": "An installment definition when performing a scheduled payment", + "type": "object", + "properties": { + "dueDate": { + "description": "The installment due date", + "type": "string", + "format": "date-time" + }, + "amount": { + "description": "The installment amount", + "type": "string", + "format": "number" + } + }, + "required": [ + "dueDate", + "amount" + ] + }, + "PerformInternalTransaction": { + "description": "Base definitions to performing a transaction to an internal account (any except `externalPayment`, or `chargeback` which is performed distinctly).", + "allOf": [ + { + "$ref": "#/components/schemas/PerformTransaction" + }, + { + "type": "object", + "properties": { + "fromName": { + "description": "If the payment type allows setting a custom name for the origin account, is its name. If not allowed, is ignored. For example, integration with other systems could use 'Bank account [IBAN]'.", + "type": "string" + }, + "toName": { + "description": "If the payment type allows setting a custom name for the destination account, is its name. If not allowed, is ignored. For example, integration with other systems could use 'Bank account [IBAN]'.", + "type": "string" + } + } + } + ] + }, + "PerformPayment": { + "description": "Definitions used to perform either a direct, scheduled or recurring payment. Regarding scheduling, the `scheduling` field must be set if some scheduling option (other than direct payment) is desired. The scheduling possibilities are:\n\n- Direct payment: For a direct payment, leave empty the `scheduling`\n field or set it to `direct`;\n\n- Single future payment: For a payment scheduled to a future date, set\n the `scheduling` field to `scheduled` and set\n the `firstDueDate` property with the desired due date;\n\n- Multiple installments, being the first immediately and the rest with\n regular 1 month interval in-between: For this, set the `scheduling` field\n to `scheduled` and the `installmentsCount` to\n a value greater than 1;\n\n- Multiple installments, starting at a specific date, with other\n installments with regular 1 month interval in-between: For this, set the\n `scheduling` field to `scheduled`, the\n `installmentsCount` to a value greater than 1 and the\n `firstInstallmentDate` with a future date;\n\n- Custom installments: For a full control on the generated installments,\n set the `scheduling` field to `scheduled`\n and pass in the `installments` array. However, there are some rules:\n\n - The total amount must be equals the sum of all installment amounts;\n\n - The first due date must be in the future;\n\n - The due dates of all installments must be in ascending order;\n\n - There must be at least one day between distinct due dates.\n\n- Recurring payment with the first payment immediately, the others at fixed\n future dates: This can be achieved by setting the `scheduling` field to\n `recurring` and leaving blank the\n `firstOccurrenceDate`. It is possible to schedule a limited number of\n occurrences, by setting `occurrencesCount`, or until it is manually\n canceled, by leaving `occurrencesCount` empty. Also, it is possible to\n customize the interval (default is 1 month) between each occurrence, by\n setting the `occurrenceInterval` field.\n\n- Recurring payment starting in a future date: This can be achieved by\n setting the `scheduling` field to `recurring`\n and setting the `firstOccurrenceDate`. The other options, the fixed number\n of occurrences (`occurrencesCount`) and interval between each occurrence\n (`occurrenceInterval`) can be set just like the case above.", + "allOf": [ + { + "$ref": "#/components/schemas/PerformInternalTransaction" + }, + { + "type": "object", + "properties": { + "installmentsCount": { + "description": "Represents the number of installments. When not specified, assumes a single installment. Used only if `scheduling` is `scheduled`. Can be used together with `installmentsCount` as an alternative to providing individual `installments` definitions.", + "type": "integer", + "minimum": 1 + }, + "firstInstallmentDate": { + "description": "Represents the first installment date. When not specified, assumes the first installment is processed instantly. Used only if `scheduling` is `scheduled`. Can be used together with `installmentsCount` as an alternative to providing individual `installments` definitions.", + "type": "string", + "format": "date-time" + }, + "installments": { + "description": "An array containing individual installments definitions, allowing full control over generated installments. Used only if `scheduling` is `scheduled`.", + "type": "array", + "items": { + "$ref": "#/components/schemas/PerformInstallment" + } + }, + "occurrencesCount": { + "description": "Represents the number of occurrences in a recurring payment. When not provided, the payment will be repeated until it is manually canceled. Used only if `scheduling` is `recurring`.", + "type": "integer", + "minimum": 1 + }, + "firstOccurrenceDate": { + "description": "Represents the first occurrence date for a recurring payment. If none is given, it is assumed that the first occurrence is immediate. Used only if `scheduling` is `recurring`.", + "type": "string", + "format": "date-time" + }, + "occurrenceInterval": { + "description": "Defines the interval between payment occurrences. If none is given, it is assumed 1 month between occurrences. Used only if `scheduling` is `recurring`.", + "allOf": [ + { + "$ref": "#/components/schemas/TimeInterval" + } + ] + }, + "nfcChallence": { + "description": "If this payment is performed with a NFC token, must be the challenge (as returned by the server) encrypted by the NFC chip, encoded in HEX form (2 hex chars per byte).", + "type": "string" + }, + "scheduling": { + "$ref": "#/components/schemas/PaymentSchedulingEnum" + } + } + } + ] + }, + "PerformTransaction": { + "description": "Base definitions for performing a transaction", + "allOf": [ + { + "$ref": "#/components/schemas/PerformBaseTransaction" + }, + { + "type": "object", + "x-abstract": true, + "properties": { + "subject": { + "description": "The payment destination (in case of perform payment) or payer (in case of receive payment). Either a user principal (id, login name, etc) or the word `system` when the payment is to be performed to / from a system account. Note that a valid numeric value is always considered as id. For example, when using another identification method that can be numeric only, prefix the value with a single quote (like in Excel spreadsheets), for example, `'1234567890`.", + "type": "string" + } + } + } + ] + }, + "PerformVoucherTransaction": { + "description": "Common parameters for a voucher transaction", + "type": "object", + "properties": { + "amount": { + "description": "The transaction amount. In some cases, such as when redeeming vouchers that don't allow partial redeems, is optional.", + "type": "string", + "format": "number" + }, + "paymentCustomValues": { + "type": "object", + "description": "Holds the custom field values for the payment generated on this voucher transaction. The object keys are custom field internal names. The format of the value depends on the custom field type.", + "additionalProperties": { + "type": "string" + } + } + } + }, + "Permissions": { + "description": "Contains all permissions and configurations a user or guest can perform in the REST API", + "type": "object", + "properties": { + "users": { + "description": "Permissions over other users", + "allOf": [ + { + "$ref": "#/components/schemas/UsersPermissions" + } + ] + }, + "myProfile": { + "description": "Permissions over own profile", + "allOf": [ + { + "$ref": "#/components/schemas/UserProfilePermissions" + } + ] + }, + "banking": { + "description": "Permissions over banking / accounts", + "allOf": [ + { + "$ref": "#/components/schemas/BankingPermissions" + } + ] + }, + "marketplace": { + "description": "Permissions for marketplace", + "allOf": [ + { + "$ref": "#/components/schemas/MarketplacePermissions" + } + ] + }, + "passwords": { + "description": "Permissions over own passwords", + "allOf": [ + { + "$ref": "#/components/schemas/PasswordsPermissions" + } + ] + }, + "records": { + "description": "Permissions over own records", + "allOf": [ + { + "$ref": "#/components/schemas/RecordsPermissions" + } + ] + }, + "operations": { + "description": "Permissions over own custom operations", + "allOf": [ + { + "$ref": "#/components/schemas/OperationsPermissions" + } + ] + }, + "wizards": { + "description": "Permissions over own custom wizards", + "allOf": [ + { + "$ref": "#/components/schemas/WizardsPermissions" + } + ] + }, + "contacts": { + "description": "Permissions over contacts", + "allOf": [ + { + "$ref": "#/components/schemas/ContactsPermissions" + } + ] + }, + "operators": { + "description": "Permissions over own operators", + "allOf": [ + { + "$ref": "#/components/schemas/OperatorsPermissions" + } + ] + }, + "notifications": { + "description": "Permissions over notifications", + "allOf": [ + { + "$ref": "#/components/schemas/NotificationsPermissions" + } + ] + }, + "notificationSettings": { + "description": "Permissions over notifications settings", + "allOf": [ + { + "$ref": "#/components/schemas/NotificationSettingsPermissions" + } + ] + }, + "tokens": { + "description": "Permissions over tokens", + "allOf": [ + { + "$ref": "#/components/schemas/TokensPermissions" + } + ] + }, + "sessions": { + "description": "Permissions over user sessions", + "allOf": [ + { + "$ref": "#/components/schemas/SessionsPermissions" + } + ] + }, + "alerts": { + "description": "Permissions related to user alers", + "allOf": [ + { + "$ref": "#/components/schemas/AlertsPermissions" + } + ] + }, + "vouchers": { + "description": "Permissions over vouchers", + "allOf": [ + { + "$ref": "#/components/schemas/VouchersPermissions" + } + ] + }, + "identityProviders": { + "description": "Permissions over identity provider links", + "allOf": [ + { + "$ref": "#/components/schemas/IdentityProvidersPermissions" + } + ] + }, + "privacySettings": { + "description": "Permissions over own privacy settings", + "allOf": [ + { + "$ref": "#/components/schemas/PrivacySettingsPermissions" + } + ] + }, + "agreements": { + "description": "Permissions over own agreements", + "allOf": [ + { + "$ref": "#/components/schemas/AgreementsPermissions" + } + ] + }, + "images": { + "description": "Permissions over images (others than the profile image)", + "allOf": [ + { + "$ref": "#/components/schemas/ImagesPermissions" + } + ] + }, + "documents": { + "description": "Permissions over documents", + "allOf": [ + { + "$ref": "#/components/schemas/DocumentsPermissions" + } + ] + }, + "references": { + "description": "Permissions over general references", + "allOf": [ + { + "$ref": "#/components/schemas/ReferencesPermissions" + } + ] + }, + "paymentFeedbacks": { + "description": "Permissions over payment feedbacks", + "allOf": [ + { + "$ref": "#/components/schemas/PaymentFeedbacksPermissions" + } + ] + }, + "invite": { + "description": "Permissions for sending invitations to external users", + "allOf": [ + { + "$ref": "#/components/schemas/InvitePermissions" + } + ] + }, + "messages": { + "description": "Permissions over messages", + "allOf": [ + { + "$ref": "#/components/schemas/MessagesPermissions" + } + ] + }, + "imports": { + "description": "Permissions over imports", + "allOf": [ + { + "$ref": "#/components/schemas/ImportsPermissions" + } + ] + } + } + }, + "PersonalizeNfcError": { + "description": "Error when personalize a NFC card", + "allOf": [ + { + "$ref": "#/components/schemas/BaseNfcError" + }, + { + "type": "object", + "properties": { + "code": { + "$ref": "#/components/schemas/PersonalizeNfcErrorCode" + } + } + } + ] + }, + "Phone": { + "description": "A phone reference", + "allOf": [ + { + "$ref": "#/components/schemas/NamedEntity" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The phone name" + }, + "number": { + "type": "string", + "description": "The formatted number" + }, + "extension": { + "type": "string", + "description": "The number extension, only for landLine phones, and is only used if the phone configuration states that extensions are enabled." + }, + "normalizedNumber": { + "type": "string", + "description": "The number, normalized to the E.164 format", + "readOnly": true + }, + "type": { + "$ref": "#/components/schemas/PhoneKind" + } + } + } + ] + }, + "PhoneBasicData": { + "description": "Contains data shared by both PhoneDataForNew and PhoneDataForEdit", + "type": "object", + "properties": { + "country": { + "description": "The 2-letter country code used by default for numbers. Unless an international number is specified (using the `+` prefix), the phone number is assumed to belong to this country.", + "type": "string" + }, + "alwaysShowInternationalNumber": { + "description": "Indicates the it is configured to always format numbers using the international format. If set to false, numbers will be formatted in the national format.", + "type": "boolean" + }, + "example": { + "description": "An example phone number. Can be either a land-line or mobile phone number example, depending on this phone kind phone", + "type": "string" + }, + "extensionEnabled": { + "description": "Only returned for land line phones. Indicates whether the extension is enabled.", + "type": "boolean" + }, + "smsEnabled": { + "description": "Only returned for mobile phones. Indicates whether outbound SMS is enabled in Cyclos", + "type": "boolean" + }, + "enablePrivacy": { + "description": "Indicates whether privacy can be used for this phone", + "type": "boolean" + }, + "managePrivacy": { + "type": "boolean", + "description": "Can the authenticated user manage the privacy of this phone?" + }, + "manuallyVerify": { + "type": "boolean", + "description": "Can the authenticated user manully verify a mobile phone?" + }, + "confirmationPasswordInput": { + "description": "If a confirmation password is used, contains the definitions on how to request that password from the user. This confirmation password is required when performing sensible actions. Sometimes this is dynamic, for example, the confirmation might be configured to be used only once per session, or operations like payments may have a limit per day to be without confirmation (pinless).", + "allOf": [ + { + "$ref": "#/components/schemas/PasswordInput" + } + ] + }, + "type": { + "$ref": "#/components/schemas/PhoneKind" + }, + "user": { + "description": "The user which owns the phone", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + } + } + }, + "PhoneConfiguration": { + "description": "Contains configuration information related to phones", + "type": "object", + "properties": { + "country": { + "description": "The 2-letter country code used by default for numbers. Unless an international number is specified (using the `+` prefix), the phone number is assumed to belong to this country.", + "type": "string" + }, + "alwaysShowInternationalNumber": { + "description": "Indicates the it is configured to always format numbers using the international format. If set to false, numbers will be formatted in the national format.", + "type": "boolean" + }, + "extensionEnabled": { + "description": "Indicates whether the extension is enabled for land-line phones", + "type": "boolean" + }, + "smsEnabled": { + "description": "Indicates whether outbound SMS is enabled in Cyclos", + "type": "boolean" + }, + "landLineExample": { + "description": "An example phone number for a land-line phone", + "type": "string" + }, + "mobileExample": { + "description": "An example phone number for a mobile phone", + "type": "string" + } + } + }, + "PhoneConfigurationForUserProfile": { + "description": "Contains extended phone configuration for a user profile", + "allOf": [ + { + "$ref": "#/components/schemas/PhoneConfiguration" + }, + { + "type": "object", + "properties": { + "mobilePhone": { + "description": "Contains a template with default values for a new mobile phone", + "allOf": [ + { + "$ref": "#/components/schemas/PhoneNew" + } + ] + }, + "landLinePhone": { + "description": "Contains a template the default values for a new land-line phone", + "allOf": [ + { + "$ref": "#/components/schemas/PhoneNew" + } + ] + }, + "edit": { + "type": "boolean", + "description": "Can edit phones?" + }, + "managePrivacy": { + "type": "boolean", + "description": "Can manage the privacy of phones?" + }, + "maxLandLines": { + "type": "integer", + "description": "The maximum number of land-line phones the user can own" + }, + "maxMobiles": { + "type": "integer", + "description": "The maximum number of mobile phones the user can own" + }, + "mobileAvailability": { + "$ref": "#/components/schemas/AvailabilityEnum" + }, + "landLineAvailability": { + "$ref": "#/components/schemas/AvailabilityEnum" + } + } + } + ] + }, + "PhoneDataForEdit": { + "description": "Contains data for editing an existing phone", + "allOf": [ + { + "$ref": "#/components/schemas/PhoneBasicData" + }, + { + "type": "object", + "properties": { + "phone": { + "description": "The phone that is being edited. This value can be modified and sent back on `PUT /phones/{id}`.", + "allOf": [ + { + "$ref": "#/components/schemas/PhoneEdit" + } + ] + }, + "canEdit": { + "type": "boolean", + "description": "Can the authenticated user edit this phone?" + }, + "canRemove": { + "type": "boolean", + "description": "Can the authenticated user remove this phone?" + } + } + } + ] + }, + "PhoneDataForNew": { + "description": "Contains data for creating a new phone", + "allOf": [ + { + "$ref": "#/components/schemas/PhoneBasicData" + }, + { + "type": "object", + "properties": { + "phone": { + "description": "The phone populated with the default fields. This value can be modified and sent back on `POST /{user}/phones`.", + "allOf": [ + { + "$ref": "#/components/schemas/PhoneNew" + } + ] + }, + "example": { + "description": "An example phone number", + "type": "string" + } + } + } + ] + }, + "PhoneEdit": { + "description": "Parameters for editing an existing phone", + "allOf": [ + { + "$ref": "#/components/schemas/PhoneManage" + }, + { + "type": "object", + "properties": { + "version": { + "type": "integer", + "description": "The version stamp for the current object, used for optimistic locking. When saving, the same version as previously received needs to be passed back. If no one else has saved the object, the version will match and the object will be updated. However, if someone other has saved the object, the version will no longer match, and an error will be raised. This is used to prevent multiple users (or processes) from updating the same object and unwilingly overridding the property values, leading to data loss." + } + } + } + ] + }, + "PhoneEditWithId": { + "description": "Parameters for editing an existing phone", + "allOf": [ + { + "$ref": "#/components/schemas/PhoneEdit" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The internal entity identifier" + } + } + } + ] + }, + "PhoneManage": { + "description": "Common fields for either creating or editing a phone", + "type": "object", + "x-implements": "IPhoneDetailed", + "x-abstract": true, + "properties": { + "name": { + "type": "string", + "description": "The phone name" + }, + "number": { + "type": "string", + "description": "The formatted number" + }, + "extension": { + "type": "string", + "description": "The number extension, only for landLine phones, and is only used if the phone configuration states that extensions are enabled." + }, + "hidden": { + "type": "boolean", + "description": "Indicates whether this phone is private / hidden for other users (`true`) or public / visible to all users (`false`)." + }, + "enabledForSms": { + "type": "boolean", + "description": "Only applicable if this represents a mobile phone. Whether this mobile phone is enabled for SMS, both receiving notifications and sending SMS operations. Can only be set if the mobile phone is verified." + }, + "verified": { + "type": "boolean", + "description": "Only applicable if this represents a mobile phone. Whether this mobile is verified. Can only be directly set by administrators. Regular users need to verify it." + } + } + }, + "PhoneNew": { + "description": "Parameters for creating a new phone", + "allOf": [ + { + "$ref": "#/components/schemas/PhoneManage" + }, + { + "type": "object", + "properties": { + "kind": { + "$ref": "#/components/schemas/PhoneKind" + } + } + } + ] + }, + "PhoneResult": { + "description": "Data for a phone as returned on list", + "allOf": [ + { + "$ref": "#/components/schemas/Phone" + }, + { + "type": "object", + "properties": { + "verified": { + "description": "Indicates whether this phone is verified. Is only returned if `kind` is `mobile` and the authenticated user manages the owner of this phone.", + "type": "boolean" + }, + "enabledForSms": { + "description": "Indicates whether this phone is verified and enabled for SMS. Is only returned if `kind` is `mobile` and the authenticated user manages the owner of this phone.", + "type": "boolean" + }, + "hidden": { + "description": "Indicates whether this phone is hidden for other users. It always returns false if the authenticated user doesn't manage the owner of this phone.", + "type": "boolean" + }, + "verificationCodeSendDate": { + "description": "The date the verification code was sent, if any. Is only returned if `kind` is `mobile` and the authenticated user manages the owner of this phone.", + "type": "string", + "format": "date-time" + } + } + } + ] + }, + "PhoneView": { + "description": "Detailed information when viewing a phone", + "allOf": [ + { + "$ref": "#/components/schemas/PhoneResult" + }, + { + "type": "object", + "x-implements": "IPhoneDetailed", + "properties": { + "user": { + "description": "The user which owns this phone", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "canEdit": { + "description": "Can the authenticated user edit / remove this phone?", + "type": "boolean" + }, + "name": { + "type": "string", + "description": "The phone name" + }, + "number": { + "type": "string", + "description": "The formatted number" + }, + "extension": { + "type": "string", + "description": "The number extension, only for landLine phones, and is only used if the phone configuration states that extensions are enabled." + }, + "hidden": { + "type": "boolean", + "description": "Indicates whether this phone is private / hidden for other users (`true`) or public / visible to all users (`false`)." + }, + "enabledForSms": { + "type": "boolean", + "description": "Only applicable if this represents a mobile phone. Whether this mobile phone is enabled for SMS, both receiving notifications and sending SMS operations. Can only be set if the mobile phone is verified." + }, + "verified": { + "type": "boolean", + "description": "Only applicable if this represents a mobile phone. Whether this mobile is verified. Can only be directly set by administrators. Regular users need to verify it." + }, + "enablePrivacy": { + "description": "Indicates whether phone privacy can be used for this user", + "type": "boolean" + } + } + } + ] + }, + "PinInput": { + "description": "Contains all information for a PIN entry. PINs are always numeric.", + "type": "object", + "properties": { + "minLength": { + "description": "The minimum allowed PIN length", + "type": "integer" + }, + "maxLength": { + "description": "The maximum allowed PIN length", + "type": "integer" + } + } + }, + "PosError": { + "description": "Error when performing a POS operation", + "allOf": [ + { + "$ref": "#/components/schemas/Error" + }, + { + "type": "object", + "properties": { + "code": { + "$ref": "#/components/schemas/PosErrorCode" + } + } + } + ] + }, + "PreselectedPeriod": { + "description": "Represents a pre-calculated date period", + "type": "object", + "properties": { + "defaultOption": { + "description": "Indicates whether this period should be pre-selected", + "type": "boolean" + }, + "name": { + "description": "The period display name", + "type": "string" + }, + "begin": { + "description": "The period begin date", + "type": "string", + "format": "date-time" + }, + "end": { + "description": "The period begin date", + "type": "string", + "format": "date-time" + } + } + }, + "Principal": { + "description": "Represents a user identification method of a user", + "type": "object", + "properties": { + "value": { + "description": "This is the value which is used to identify the user", + "type": "string" + }, + "type": { + "description": "This is the type of the user identification which can be a token, profile field, etc", + "allOf": [ + { + "$ref": "#/components/schemas/EntityReference" + } + ] + } + } + }, + "PrincipalType": { + "description": "A reference to a principal type", + "allOf": [ + { + "$ref": "#/components/schemas/InternalNamedEntity" + }, + { + "type": "object", + "properties": { + "kind": { + "$ref": "#/components/schemas/PrincipalTypeKind" + } + } + } + ] + }, + "PrincipalTypeInput": { + "description": "Definition on how a principal value can be entered by the user", + "allOf": [ + { + "$ref": "#/components/schemas/PrincipalType" + }, + { + "type": "object", + "properties": { + "customField": { + "description": "If this principal is based on a custom field, holds its definition", + "allOf": [ + { + "$ref": "#/components/schemas/CustomFieldDetailed" + } + ] + }, + "mask": { + "description": "If this principal is either a token or account number, holds the (optional) mask which clients can use to input the value.", + "type": "string" + }, + "allowManualInput": { + "description": "Only returned if `kind` is `token`. Specifies if the principal type allows enter manually the token value.", + "type": "boolean" + }, + "example": { + "description": "If this principal is mobile phone, holds an example number.", + "type": "string" + }, + "tokenType": { + "description": "If this principal is a token, contains its type", + "allOf": [ + { + "$ref": "#/components/schemas/TokenTypeEnum" + } + ] + } + } + } + ] + }, + "PrivacyControl": { + "description": "A privacy control definition", + "allOf": [ + { + "$ref": "#/components/schemas/InternalNamedEntity" + }, + { + "type": "object", + "properties": { + "fieldsAlwaysVisible": { + "description": "If true an admin having this control will see all fields", + "type": "boolean" + }, + "informationText": { + "description": "A message about this control to be displayed to the user.", + "type": "string" + } + } + } + ] + }, + "PrivacySettingsData": { + "description": "The privacy settings of a user with the information to edit it", + "type": "object", + "properties": { + "user": { + "description": "The privacy settings owner", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "enabled": { + "description": "Whether the privacy control is enabled or not for the owner", + "type": "boolean" + }, + "canEdit": { + "description": "Can the authenticated user edit this privacy setting data?", + "type": "boolean" + }, + "controlledFields": { + "description": "The profile fields defined in the configuration subject to privacy control.", + "type": "array", + "items": { + "type": "string" + } + }, + "customFields": { + "description": "Detailed information for those custom fields included in the `controlledFields` list.", + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomField" + } + }, + "availableControls": { + "description": "The available privacy controls (departments) that could be selected to put the fields under control.", + "type": "array", + "items": { + "$ref": "#/components/schemas/PrivacyControl" + } + }, + "selectedControls": { + "description": "The internal name or id of the already selected controls.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "PrivacySettingsParams": { + "description": "The parameters to save a privacy control", + "type": "object", + "properties": { + "enabled": { + "description": "If false the controlled fields in the configuration are not subject to privacy control. Otherwise only the `selectedControls` can view the user fields", + "type": "boolean" + }, + "selectedControls": { + "description": "The internal name or id of the controls that can view the user fields.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "PrivacySettingsPermissions": { + "description": "Permissions regarding the privacy settings", + "type": "object", + "properties": { + "view": { + "description": "Can the current user view his own privacy settings?", + "type": "boolean" + }, + "manage": { + "description": "Can the current user manage his own privacy settings?", + "type": "boolean" + } + } + }, + "ProcessDynamicDocument": { + "description": "Defines parameters used to process a dynamic document", + "type": "object", + "properties": { + "formFields": { + "description": "Holds the form field values, keyed by field internal name or id. The format of the value depends on the custom field type.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "Product": { + "description": "Reference to a product", + "allOf": [ + { + "$ref": "#/components/schemas/InternalNamedEntity" + }, + { + "type": "object", + "properties": { + "kind": { + "$ref": "#/components/schemas/ProductKind" + } + } + } + ] + }, + "ProductAssignmentLog": { + "description": "Information regarding a specific product assignment change", + "type": "object", + "properties": { + "by": { + "$ref": "#/components/schemas/User" + }, + "product": { + "$ref": "#/components/schemas/Product" + }, + "date": { + "description": "When the action was performed", + "type": "string", + "format": "date-time" + }, + "action": { + "$ref": "#/components/schemas/ProductAssignmentActionEnum" + } + } + }, + "ProductWithUserAccount": { + "description": "Reference to a product, together with the related user account", + "allOf": [ + { + "$ref": "#/components/schemas/Product" + }, + { + "type": "object", + "properties": { + "userAccount": { + "$ref": "#/components/schemas/AccountType" + } + } + } + ] + }, + "ProfileFieldActions": { + "description": "Determines the allowed actions over a given profile field", + "type": "object", + "properties": { + "edit": { + "type": "boolean", + "description": "Can the authenticated user edit this field?" + }, + "managePrivacy": { + "type": "boolean", + "description": "Can the authenticated user manage the visibility of this field for other users? Note that this is not related to the privacy setting, which uses the privacy controls, and are more general (not per field)." + } + } + }, + "QueryFilters": { + "description": "Base definitions for objects used as filters for queries", + "x-abstract": true, + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "The page number (zero-based) of the search. The default value is zero." + }, + "pageSize": { + "type": "integer", + "description": "The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting." + }, + "skipTotalCount": { + "type": "boolean", + "description": "When set to true the result will not include the total record count, only the information on whether there are more records. Depending on the server-side configuration, this can be always true. Otherwise, if the server allows total count, and the client doesn't need it, setting this to true can increase performance a bit." + } + } + }, + "QuickAccess": { + "description": "Describes an icon in the quick access", + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/QuickAccessTypeEnum" + }, + "operation": { + "description": "The custom operation to be executed by the quick access. Only if `type` is `operation`.", + "allOf": [ + { + "$ref": "#/components/schemas/Operation" + } + ] + }, + "wizard": { + "description": "The custom wizard to be executed by the quick access. Only if `type` is `wizard`.", + "allOf": [ + { + "$ref": "#/components/schemas/Wizard" + } + ] + }, + "recordType": { + "description": "The record type to be visited by the quick access. Only if `type` is `record`.", + "allOf": [ + { + "$ref": "#/components/schemas/RecordType" + } + ] + }, + "tokenType": { + "description": "The token type to be visited by the quick access. Only if `type` is `token`.", + "allOf": [ + { + "$ref": "#/components/schemas/TokenType" + } + ] + } + } + }, + "Receipt": { + "description": "Structured data to be sent to a receipt printer", + "type": "object", + "properties": { + "timestamp": { + "description": "When returned, the given timestamp is printed before the header.", + "type": "string", + "format": "date-time" + }, + "header": { + "description": "A text to be shown before the title. By default the text is normal size, normal style, left-alienged, and a line break is printed afterwards.", + "allOf": [ + { + "$ref": "#/components/schemas/ReceiptPart" + } + ] + }, + "title": { + "description": "The receipt title, shown below the header and before the items. By default the text is normal size, bold, centered, and a line break is printed afterwards.", + "allOf": [ + { + "$ref": "#/components/schemas/ReceiptPart" + } + ] + }, + "items": { + "description": "The main content of the receipt. Contains a list of items.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ReceiptItem" + } + }, + "footer": { + "description": "A text to be shown after the items. By default the text is normal size, normal style, left-alienged, and a line break is printed afterwards.", + "allOf": [ + { + "$ref": "#/components/schemas/ReceiptPart" + } + ] + }, + "labelSuffix": { + "description": "When the items have label, is the suffix appended to each label. Defaults to `: `.", + "type": "string" + }, + "autoPrint": { + "description": "Should the mobile application print the receipt as soon as the custom operation result is displayed? Defaults to false.", + "type": "boolean" + } + } + }, + "ReceiptItem": { + "description": "An item in the main section of a receipt.", + "allOf": [ + { + "$ref": "#/components/schemas/ReceiptPart" + }, + { + "type": "object", + "properties": { + "label": { + "description": "When set, this item is handled as a field, printing a left-aligned label and a right-aligned value. In this case, the following attributes are ignored: `align`, `width` and `height`.", + "type": "string" + }, + "labelStyle": { + "description": "The label font style. Defaults to bold. Not returned when there is no label.", + "allOf": [ + { + "$ref": "#/components/schemas/ReceiptPartStyleEnum" + } + ] + } + } + } + ] + }, + "ReceiptPart": { + "description": "A generic part of data to be printed in a receipt printer", + "type": "object", + "properties": { + "text": { + "description": "The text contained in the part", + "type": "string" + }, + "style": { + "description": "The font style. The default value depends on the section:\n\n- Header and items are `normal`; - Title and footer are `bold`.", + "allOf": [ + { + "$ref": "#/components/schemas/ReceiptPartStyleEnum" + } + ] + }, + "align": { + "description": "The text align. The default value depends on the section:\n\n- Header and items are `left`; - Title and footer are `center`.\n\nNot returned for items with a label.", + "allOf": [ + { + "$ref": "#/components/schemas/ReceiptPartAlignEnum" + } + ] + }, + "width": { + "description": "The font width. The default is `normal`. Not returned for items with a label.", + "allOf": [ + { + "$ref": "#/components/schemas/ReceiptPartSizeEnum" + } + ] + }, + "height": { + "description": "The font height. The default value depends on the section:\n\n- Title is `double`; - Others are `normal`.\n\nNot returned for items with a label.", + "allOf": [ + { + "$ref": "#/components/schemas/ReceiptPartSizeEnum" + } + ] + }, + "lineBefore": { + "description": "Should a line be printed before the text? By default, is true on footer, false on others.", + "type": "boolean" + }, + "lineAfter": { + "description": "Should a line be printed after the text? By default, is true on footer, false on others.", + "type": "boolean" + } + } + }, + "Record": { + "description": "A custom record is a structured data stored either for a user or for system (a general record, unrelated to a user).", + "allOf": [ + { + "$ref": "#/components/schemas/Entity" + }, + { + "type": "object", + "properties": { + "display": { + "type": "string", + "description": "The descriptive text for this record, according to the record type configuration in Cyclos" + }, + "kind": { + "$ref": "#/components/schemas/RecordKind" + } + } + } + ] + }, + "RecordBasePermissions": { + "description": "Basic definitions shared by `OwnerRecordPermissions` and `BaseRecordDataForSearch`", + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/RecordType" + }, + "create": { + "description": "Can the authenticated user create new records of this type?", + "type": "boolean" + }, + "edit": { + "description": "Can the authenticated user edit records of this type?", + "type": "boolean" + }, + "remove": { + "description": "Can the authenticated user remove records of this type?", + "type": "boolean" + } + } + }, + "RecordBasicData": { + "description": "Contains data shared by both RecordDataForNew and RecordDataForEdit", + "type": "object", + "x-abstract": true, + "properties": { + "type": { + "$ref": "#/components/schemas/RecordTypeDetailed" + }, + "fields": { + "description": "The record custom fields (either defined within this record type or shared fields linked with this record type)", + "type": "array", + "items": { + "$ref": "#/components/schemas/RecordCustomFieldDetailed" + } + }, + "user": { + "description": "The record owner user. Only returned if `kind` is `user`.", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "kind": { + "$ref": "#/components/schemas/RecordKind" + }, + "confirmationPasswordInput": { + "description": "If a confirmation password is used, contains the definitions on how to request that password from the user. This confirmation password is required when performing sensible actions. Sometimes this is dynamic, for example, the confirmation might be configured to be used only once per session, or operations like payments may have a limit per day to be without confirmation (pinless).", + "allOf": [ + { + "$ref": "#/components/schemas/PasswordInput" + } + ] + } + } + }, + "RecordCustomField": { + "description": "Adds to `CustomField` some record-specific definitions", + "allOf": [ + { + "$ref": "#/components/schemas/CustomField" + }, + { + "type": "object", + "properties": { + "section": { + "description": "The record fields section", + "allOf": [ + { + "$ref": "#/components/schemas/EntityReference" + } + ] + }, + "colspan": { + "description": "The number of columns this field spans", + "type": "integer" + } + } + } + ] + }, + "RecordCustomFieldDetailed": { + "description": "Adds to `CustomFieldDetailed` some record-specific definitions", + "allOf": [ + { + "$ref": "#/components/schemas/CustomFieldDetailed" + }, + { + "type": "object", + "properties": { + "section": { + "description": "The record fields section", + "allOf": [ + { + "$ref": "#/components/schemas/EntityReference" + } + ] + }, + "colspan": { + "description": "The number of columns this field spans", + "type": "integer" + } + } + } + ] + }, + "RecordCustomFieldValue": { + "description": "Adds to `CustomFieldValue` the section where this field should be shown", + "allOf": [ + { + "$ref": "#/components/schemas/BaseCustomFieldValue" + }, + { + "type": "object", + "properties": { + "field": { + "description": "The custom field reference", + "allOf": [ + { + "$ref": "#/components/schemas/RecordCustomField" + } + ] + } + } + } + ] + }, + "RecordDataForEdit": { + "description": "Contains data for editing an existing record", + "allOf": [ + { + "$ref": "#/components/schemas/RecordBasicData" + }, + { + "type": "object", + "properties": { + "canEdit": { + "description": "Can the authenticated user edit records of this type?", + "type": "boolean" + }, + "canRemove": { + "description": "Can the authenticated user remove records of this type?", + "type": "boolean" + }, + "editableFields": { + "description": "The internal names of fields that can be edited", + "type": "array", + "items": { + "type": "string" + } + }, + "record": { + "description": "The record that is being edited. This value can be modified and sent back to `PUT /records/{id}`", + "allOf": [ + { + "$ref": "#/components/schemas/RecordEdit" + } + ] + }, + "binaryValues": { + "description": "Holds the current values for file / image custom fields as lists of `StoredFile`s / `Image`s.", + "allOf": [ + { + "$ref": "#/components/schemas/CustomFieldBinaryValues" + } + ] + } + } + } + ] + }, + "RecordDataForNew": { + "description": "Contains data for creating a new record", + "allOf": [ + { + "$ref": "#/components/schemas/RecordBasicData" + }, + { + "type": "object", + "properties": { + "record": { + "description": "The record populated with the default fields. This value can be modified and sent back to `POST /{owner}/records/{type}`.", + "allOf": [ + { + "$ref": "#/components/schemas/RecordNew" + } + ] + } + } + } + ] + }, + "RecordDataForSearch": { + "description": "Data for searching records of a specific owner and type", + "allOf": [ + { + "$ref": "#/components/schemas/BaseRecordDataForSearch" + }, + { + "type": "object", + "properties": { + "user": { + "description": "The records owner. Only returned if is not system.", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "hideKeywordsSearch": { + "description": "Whether the keywords search filter should be hidden. Only returned if is not system.", + "type": "boolean" + }, + "query": { + "description": "Default query filters for searching records", + "allOf": [ + { + "$ref": "#/components/schemas/RecordQueryFilters" + } + ] + } + } + } + ] + }, + "RecordEdit": { + "description": "Parameters for editing an existing record", + "allOf": [ + { + "$ref": "#/components/schemas/RecordManage" + }, + { + "type": "object", + "properties": { + "version": { + "type": "integer", + "description": "The version stamp for the current object, used for optimistic locking. When saving, the same version as previously received needs to be passed back. If no one else has saved the object, the version will match and the object will be updated. However, if someone other has saved the object, the version will no longer match, and an error will be raised. This is used to prevent multiple users (or processes) from updating the same object and unwilingly overridding the property values, leading to data loss." + } + } + } + ] + }, + "RecordManage": { + "description": "Common fields for either creating or editing a record", + "type": "object", + "x-abstract": true, + "properties": { + "customValues": { + "type": "object", + "description": "Holds the custom field values, keyed by field internal name or id. The format of the value depends on the custom field type. Example: `{..., \"customValues\": {\"gender\": \"male\", \"birthDate\": \"1980-10-27\"}}`", + "additionalProperties": { + "type": "string" + } + } + } + }, + "RecordNew": { + "description": "Parameters for creating a new record", + "allOf": [ + { + "$ref": "#/components/schemas/RecordManage" + }, + { + "type": "object" + } + ] + }, + "RecordPermissions": { + "description": "Permissions over own records of a given type", + "allOf": [ + { + "$ref": "#/components/schemas/RecordBasePermissions" + }, + { + "type": "object", + "properties": { + "singleRecordId": { + "description": "If this record type layout is single, and the record exists, contains its identifier", + "type": "string" + } + } + } + ] + }, + "RecordQueryFilters": { + "description": "Query filters for records", + "allOf": [ + { + "$ref": "#/components/schemas/FullTextQueryFilters" + }, + { + "type": "object", + "properties": { + "customFields": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Record custom field values used as filters. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by : (colon). For example, `customFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, customFields=field1:valueA|valueB. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `customFields=tradeType:offer|search,extraDate:2000-01-01|2001-12-31` would match results whose custom field with internal name `tradeType` is either `offer` or `search`, and whose `extraDate` is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `customFields=extraDate:|2001-12-31`.\nA note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `customFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `customFields=dynamic:'business`." + }, + "creationPeriod": { + "description": "The minimum / maximum record creation date", + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "createdBy": { + "description": "Either the id or identifier of the user that created the record", + "type": "string" + } + } + } + ] + }, + "RecordResult": { + "description": "Contains data returned when searching for records", + "allOf": [ + { + "$ref": "#/components/schemas/Record" + }, + { + "type": "object", + "properties": { + "creationDate": { + "description": "The record creation date", + "type": "string", + "format": "date-time" + }, + "createdBy": { + "$ref": "#/components/schemas/User" + }, + "lastModificationDate": { + "description": "The record last modification date", + "type": "string", + "format": "date-time" + }, + "lastModifiedBy": { + "$ref": "#/components/schemas/User" + }, + "customValues": { + "type": "object", + "description": "Holds the values for custom record fields, keyed by field internal name", + "additionalProperties": { + "type": "string" + } + } + } + } + ] + }, + "RecordSection": { + "description": "Details for a section of fields in a record type", + "allOf": [ + { + "$ref": "#/components/schemas/FieldSection" + }, + { + "type": "object", + "properties": { + "fields": { + "description": "The internal names of the custom fields which are part of this section.", + "type": "array", + "items": { + "type": "string" + } + } + } + } + ] + }, + "RecordType": { + "description": "Contains definitions for a record type", + "allOf": [ + { + "$ref": "#/components/schemas/InternalNamedEntity" + }, + { + "type": "object", + "properties": { + "pluralName": { + "description": "The name for the plural form", + "type": "string" + }, + "svgIcon": { + "description": "The name of the SVG icon. The content of the icon can be obtained with `GET /images/svg-icons/{name}.svg`", + "type": "string" + }, + "useViewPage": { + "description": "Whether the record type is set to use a separated view / edit page", + "type": "boolean" + }, + "layout": { + "$ref": "#/components/schemas/RecordLayoutEnum" + }, + "adminMenu": { + "description": "In which administration menu the record type shows up. Only returned for system record types.", + "allOf": [ + { + "$ref": "#/components/schemas/AdminMenuEnum" + } + ] + }, + "userMenu": { + "description": "In which user menu the record type shows up. Only returned for user record types.", + "allOf": [ + { + "$ref": "#/components/schemas/UserMenuEnum" + } + ] + }, + "userProfileSection": { + "description": "In which user profile section the record type shows up. Only returned for user record types.", + "allOf": [ + { + "$ref": "#/components/schemas/UserProfileSectionEnum" + } + ] + } + } + } + ] + }, + "RecordTypeDetailed": { + "description": "A record type with more information for its records", + "allOf": [ + { + "$ref": "#/components/schemas/RecordType" + }, + { + "type": "object", + "properties": { + "fieldColumns": { + "description": "The number of columns which should be used to layout fields", + "type": "integer" + }, + "nowrapLabels": { + "description": "Indicates whether labels in the form should be prevented from wrapping lines", + "type": "boolean" + }, + "informationText": { + "description": "An informative text that should be shown in the form. The text is formatted in HTML.", + "type": "string" + }, + "sections": { + "description": "The field sections in this record type", + "type": "array", + "items": { + "$ref": "#/components/schemas/RecordSection" + } + } + } + } + ] + }, + "RecordView": { + "description": "Detailed information when viewing a record", + "allOf": [ + { + "$ref": "#/components/schemas/Record" + }, + { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/RecordTypeDetailed" + }, + "user": { + "description": "The user which owns this record, only returned if `kind` is `user`", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "creationDate": { + "description": "The record creation date", + "type": "string", + "format": "date-time" + }, + "createdBy": { + "$ref": "#/components/schemas/User" + }, + "lastModificationDate": { + "description": "The record last modification date", + "type": "string", + "format": "date-time" + }, + "lastModifiedBy": { + "$ref": "#/components/schemas/User" + }, + "customValues": { + "description": "The list of custom field values this record has", + "type": "array", + "items": { + "$ref": "#/components/schemas/RecordCustomFieldValue" + } + }, + "canEdit": { + "description": "Can the authenticated user edit this record?", + "type": "boolean" + }, + "canRemove": { + "description": "Can the authenticated user remove this record?", + "type": "boolean" + }, + "operations": { + "description": "List of runnable custom operations.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Operation" + } + } + } + } + ] + }, + "RecordWithOwnerResult": { + "description": "Results for a shared record search, containing the owner user as well", + "allOf": [ + { + "$ref": "#/components/schemas/RecordResult" + }, + { + "type": "object", + "properties": { + "user": { + "description": "The record owner", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + } + } + } + ] + }, + "RecordsPermissions": { + "description": "Permissions over own or system records", + "type": "object", + "properties": { + "user": { + "description": "Permissions over each visible own user record type.", + "type": "array", + "items": { + "$ref": "#/components/schemas/RecordPermissions" + } + }, + "userManagement": { + "description": "Permissions over each visible user record type of managed users.", + "type": "array", + "items": { + "$ref": "#/components/schemas/RecordPermissions" + } + }, + "system": { + "description": "Permissions over each visible system record type.", + "type": "array", + "items": { + "$ref": "#/components/schemas/RecordPermissions" + } + } + } + }, + "RecurringPaymentDataForEdit": { + "description": "Contains data for editing a recurring payment", + "type": "object", + "properties": { + "originalRecurringPayment": { + "description": "The original recurring payment being edited", + "allOf": [ + { + "$ref": "#/components/schemas/Transaction" + } + ] + }, + "recurringPayment": { + "description": "The recurring payment edition. This value can be modified and sent back on `PUT /recurring-payments/{key}/modify`.", + "allOf": [ + { + "$ref": "#/components/schemas/RecurringPaymentEdit" + } + ] + }, + "canEdit": { + "type": "boolean", + "description": "Can the authenticated user edit this recurring payment?" + }, + "confirmationPasswordInput": { + "description": "If a confirmation password is used, contains the definitions on how to request that password from the user. This confirmation password is required when performing sensible actions. Sometimes this is dynamic, for example, the confirmation might be configured to be used only once per session, or operations like payments may have a limit per day to be without confirmation (pinless).", + "allOf": [ + { + "$ref": "#/components/schemas/PasswordInput" + } + ] + } + } + }, + "RecurringPaymentEdit": { + "description": "Parameters for editing an existing recurring payment", + "type": "object", + "properties": { + "occurrencesCount": { + "description": "Represents the number of occurrences in a recurring payment. When not provided, the payment will be repeated until it is manually canceled. Used only if `scheduling` is `recurring`.", + "type": "integer", + "minimum": 1 + }, + "firstOccurrenceDate": { + "description": "Represents the first occurrence date for a recurring payment. If none is given, it is assumed that the first occurrence is immediate. Used only if `scheduling` is `recurring`.", + "type": "string", + "format": "date-time" + }, + "occurrenceInterval": { + "description": "Defines the interval between payment occurrences. If none is given, it is assumed 1 month between occurrences. Used only if `scheduling` is `recurring`.", + "allOf": [ + { + "$ref": "#/components/schemas/TimeInterval" + } + ] + }, + "version": { + "type": "integer", + "description": "The version stamp for the current object, used for optimistic locking. When saving, the same version as previously received needs to be passed back. If no one else has saved the object, the version will match and the object will be updated. However, if someone other has saved the object, the version will no longer match, and an error will be raised. This is used to prevent multiple users (or processes) from updating the same object and unwilingly overridding the property values, leading to data loss." + } + } + }, + "RecurringPaymentPermissions": { + "description": "Permissions the user has over a recurring payment", + "type": "object", + "properties": { + "cancel": { + "description": "Can cancel the recurring payment?", + "type": "boolean" + }, + "block": { + "description": "Can block the recurring payment?", + "type": "boolean" + }, + "unblock": { + "description": "Can unblock the recurring payment?", + "type": "boolean" + }, + "edit": { + "description": "Can edit the recurring payment?", + "type": "boolean" + } + } + }, + "RecurringPaymentsPermissions": { + "description": "Permissions over own recurring payments", + "allOf": [ + { + "$ref": "#/components/schemas/RecurringPaymentPermissions" + }, + { + "type": "object", + "properties": { + "view": { + "description": "Can view recurring payments?", + "type": "boolean" + } + } + } + ] + }, + "RedeemVoucher": { + "description": "Parameters to redeem a voucher", + "allOf": [ + { + "$ref": "#/components/schemas/PerformVoucherTransaction" + }, + { + "type": "object", + "properties": { + "pin": { + "description": "The voucher PIN. The definition on whether a PIN is used is in the voucher type. When needed, must be passed in. Otherwise is ignored.", + "type": "string" + } + } + } + ] + }, + "RedeemVoucherError": { + "description": "Error when redeeming a voucher", + "allOf": [ + { + "$ref": "#/components/schemas/Error" + }, + { + "type": "object", + "properties": { + "redeemAfterDate": { + "description": "Indicates the date after which this voucher can be redeemed. Only if `code` is `notAllowedYet`.", + "type": "string", + "format": "date-time" + }, + "paymentError": { + "description": "The `PaymentError` generated when the voucher payment was being created. Only if `code` is `payment`.", + "allOf": [ + { + "$ref": "#/components/schemas/PaymentError" + } + ] + }, + "code": { + "$ref": "#/components/schemas/RedeemVoucherErrorCode" + }, + "voucherStatus": { + "description": "Only if `code` is `notAllowedForVoucher`", + "allOf": [ + { + "$ref": "#/components/schemas/VoucherStatusEnum" + } + ] + }, + "allowedDays": { + "description": "Only if `code` is `notAllowedToday`", + "type": "array", + "items": { + "$ref": "#/components/schemas/WeekDayEnum" + } + }, + "balance": { + "description": "Only if `code` is `insufficientBalance` and the voucher has a fixed amount (doesn't allows multiple top-ups, i.e., works like a wallet).", + "type": "string", + "format": "number" + }, + "currency": { + "description": "Only returned if `balance` is returned.", + "allOf": [ + { + "$ref": "#/components/schemas/Currency" + } + ] + } + } + } + ] + }, + "Reference": { + "description": "A general reference between 2 users or payment feedback", + "allOf": [ + { + "$ref": "#/components/schemas/Entity" + }, + { + "type": "object", + "properties": { + "date": { + "description": "The date the reference/payment feedback was set", + "type": "string", + "format": "date-time" + }, + "level": { + "$ref": "#/components/schemas/ReferenceLevelEnum" + }, + "comments": { + "description": "The reference/payment feedback comments", + "type": "string" + } + } + } + ] + }, + "ReferenceDataForSet": { + "description": "Configuration data for setting a reference", + "type": "object", + "properties": { + "from": { + "description": "The user that gave the reference", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "to": { + "description": "The user that received the reference", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "reference": { + "description": "The object that should be edited and posted back", + "allOf": [ + { + "$ref": "#/components/schemas/ReferenceSet" + } + ] + }, + "date": { + "description": "The date when the reference was given", + "type": "string", + "format": "date-time" + } + } + }, + "ReferencePeriodStatistics": { + "description": "Statistics for received or given references in a given period", + "type": "object", + "properties": { + "period": { + "description": "The date period ranges. Null when the results are for all time.", + "allOf": [ + { + "$ref": "#/components/schemas/DatePeriod" + } + ] + }, + "total": { + "type": "integer", + "description": "The total number of accounted references." + }, + "totalNegative": { + "description": "The total number of accounted `bad` or `veryBad` references.", + "type": "integer" + }, + "totalPositive": { + "description": "The total number of accounted `good` or `veryGood` references.", + "type": "integer" + }, + "counts": { + "description": "References count per level.", + "type": "object", + "additionalProperties": { + "type": "integer" + } + }, + "score": { + "type": "number", + "format": "float", + "description": "The score is a value from 1 to 5 which contains the average score when counting all levels. Each reference level has a score:\n\n- `veryBad`: 1;\n- `bad`: 2;\n- `neutral`: 3;\n- `good`: 4;\n- `veryGood`: 5.\n\nThe score will be 0 when there are no references." + } + } + }, + "ReferenceSet": { + "description": "Parameters for setting a reference value. When modifying an existing reference, the `version` field must be passed in with the correct value, as returned in `GET /{from}/reference/{to}/data-for-set`.", + "type": "object", + "properties": { + "level": { + "$ref": "#/components/schemas/ReferenceLevelEnum" + }, + "comments": { + "description": "Comments for this reference", + "type": "string" + }, + "version": { + "type": "integer", + "description": "The version stamp for the current object, used for optimistic locking. When saving, the same version as previously received needs to be passed back. If no one else has saved the object, the version will match and the object will be updated. However, if someone other has saved the object, the version will no longer match, and an error will be raised. This is used to prevent multiple users (or processes) from updating the same object and unwilingly overridding the property values, leading to data loss." + } + } + }, + "ReferenceStatistics": { + "description": "Statistics for received or given references", + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/User" + }, + "periods": { + "description": "For each requested period, contains corresponding statistics", + "type": "array", + "items": { + "$ref": "#/components/schemas/ReferencePeriodStatistics" + } + } + } + }, + "ReferenceView": { + "description": "Details of a reference", + "allOf": [ + { + "$ref": "#/components/schemas/Reference" + }, + { + "type": "object", + "properties": { + "from": { + "description": "The user that gave the reference", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "to": { + "description": "The user that received the reference", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "canEdit": { + "description": "Can the authenticated user edit this reference?", + "type": "boolean" + } + } + } + ] + }, + "ReferencesPermissions": { + "description": "Permissions over general user references", + "type": "object", + "properties": { + "view": { + "description": "Can view other user's references?", + "type": "boolean" + }, + "give": { + "description": "Can give references?", + "type": "boolean" + }, + "receive": { + "description": "Can receive references?", + "type": "boolean" + } + } + }, + "RejectOrder": { + "description": "Parameters used to reject an order by the authenticated user.", + "allOf": [ + { + "$ref": "#/components/schemas/BaseOrderAction" + }, + { + "type": "object" + } + ] + }, + "RelatedTransferType": { + "description": "A transfer type related to an account point-of-view", + "allOf": [ + { + "$ref": "#/components/schemas/InternalNamedEntity" + }, + { + "type": "object", + "properties": { + "related": { + "description": "Reference to the related account type", + "allOf": [ + { + "$ref": "#/components/schemas/EntityReference" + } + ] + } + } + } + ] + }, + "RemoveFcmTokenParams": { + "description": "Parameters for removing a FCM token.", + "type": "object", + "properties": { + "token": { + "description": "The FCM registration token", + "type": "string" + }, + "users": { + "description": "The user identifiers which the token will be removed from.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "RepliedMessage": { + "description": "Contains data about a replied message.", + "type": "object", + "properties": { + "subject": { + "description": "The subject of the incoming message.", + "type": "string" + }, + "body": { + "description": "The body of the incoming message.", + "type": "string" + }, + "date": { + "description": "The date of the incoming message.", + "type": "string", + "format": "date-time" + }, + "from": { + "description": "The user or system who sent the message.", + "$ref": "#/components/schemas/User" + } + } + }, + "ReplyMessage": { + "description": "Contains data for a message reply", + "allOf": [ + { + "$ref": "#/components/schemas/BaseSendMessage" + }, + { + "type": "object" + } + ] + }, + "RunOperation": { + "description": "Defines parameters used to run a custom operation", + "type": "object", + "properties": { + "formParameters": { + "description": "Holds the form field values, keyed by field internal name or id. The format of the value depends on the custom field type.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "confirmationPassword": { + "description": "If the custom operation requires confirmation password, the `OperationDataForRun.confirmationPasswordInput` will contain the data for inputting the confirmation password. When such value is present, the password value should be provided in this property.", + "type": "string" + }, + "scannedQrCode": { + "description": "When the operation's `submitWithQrCodeScan` is true. Is the value which was scanned when submitting the operation.", + "type": "string" + }, + "page": { + "description": "When running a custom operation with `resultType` = `resultPage`, determines the current page offset. Whether this is implemented depends on the script code itself.", + "type": "integer" + }, + "pageSize": { + "description": "When running a custom operation with `resultType` = `resultPage`, determines the number of results per page. Whether this is implemented depends on the script code itself.", + "type": "integer" + }, + "skipTotalCount": { + "description": "When running a custom operation with `resultType` = `resultPage`, when set to true will ignre the total count when searching. Of course, it should be honored by the script implementing the query in order to make effect.", + "type": "boolean" + }, + "exportFormat": { + "description": "Only when running a custom operation with `resultType` = `resultPage`. Is the internal name of the format to export the results. If unset will not generate a file, but return the result data.", + "type": "string" + } + } + }, + "RunOperationAction": { + "description": "Describes an action that can be executed after running an operation.", + "type": "object", + "properties": { + "action": { + "description": "The custom operation that executes this action", + "allOf": [ + { + "$ref": "#/components/schemas/Operation" + } + ] + }, + "parameters": { + "description": "The parameters that should be sent back when executing this action", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "primary": { + "description": "Indicates whether this action is a primary one.", + "type": "boolean" + } + } + }, + "RunOperationResult": { + "description": "Defines what is returned when a custom operation is executed. The actual property that are filled depend on the `resultType` property. Not returned when the `resultType` is file. In that case, the response content will be the file content", + "type": "object", + "properties": { + "title": { + "description": "The text title. May be returned only if `resultType` is either `plainText`, `richText` or `resultPage`.", + "type": "string" + }, + "content": { + "description": "The execution result content. Only returned if `resultType` is either `plainText` or `richText`.", + "type": "string" + }, + "notification": { + "description": "The execution result as string that should be shown as a notification. Only returned if `resultType` is `notification`.", + "type": "string" + }, + "url": { + "description": "The execution result as an URL, to which the client should be redirected. Only returned if `resultType` is either `externalRedirect` or `url`.", + "type": "string" + }, + "backTo": { + "description": "Either the id or internal name of the custom operation to go back after run the operation.", + "allOf": [ + { + "$ref": "#/components/schemas/EntityReference" + } + ] + }, + "backToRoot": { + "description": "A boolean value indicating if the client application must go back to the page that originated the custom operation executions.", + "type": "boolean" + }, + "reRun": { + "description": "A boolean value indicating if the custom operation we went back to or the current action container operation must be re-run before displaying it.", + "type": "boolean" + }, + "autoRunActionId": { + "description": "If it is present, it indicates the id of the action that should be executed automatically.", + "type": "string" + }, + "columns": { + "description": "Contains the definitions for each column in the result. Only returned if `resultType` is `resultPage`.", + "type": "array", + "items": { + "$ref": "#/components/schemas/RunOperationResultColumn" + } + }, + "rows": { + "description": "Each row is an object containing the cells for that row, keyed by each column's `property`. Only returned if `resultType` is `resultPage`.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + }, + "actions": { + "description": "Actions are other internal custom operations that can be executed from this custom operation. The returned parameters should be passed to the server when running this action.", + "type": "array", + "items": { + "$ref": "#/components/schemas/RunOperationAction" + } + }, + "resultType": { + "$ref": "#/components/schemas/OperationResultTypeEnum" + }, + "notificationLevel": { + "description": "Only returned if `resultType` is `notification`.", + "allOf": [ + { + "$ref": "#/components/schemas/NotificationLevelEnum" + } + ] + }, + "receipt": { + "description": "When returned, contains the structured data that should be printed via a receipt printer", + "allOf": [ + { + "$ref": "#/components/schemas/Receipt" + } + ] + } + } + }, + "RunOperationResultColumn": { + "description": "A column definition when the result type is `resultPage`.", + "type": "object", + "properties": { + "header": { + "description": "The column header text", + "type": "string" + }, + "property": { + "description": "Contains the property name for each row element to access this column value.", + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/RunOperationResultColumnTypeEnum" + }, + "align": { + "description": "The horizontal alignment. The actual values depend on the semantics of both the script result and the client application.", + "type": "string" + }, + "decimalDigits": { + "description": "The number of decimal digits (scale) to format numbers. -1 represents variable scale. Only if `type` is `number`.", + "type": "integer" + }, + "valign": { + "description": "The vertical alignment. The actual values depend on the semantics of both the script result and the client application.", + "type": "string" + }, + "width": { + "description": "The column width. The actual values depend on the semantics of both the script result and the client application.", + "type": "string" + } + } + }, + "SaveUserAccountVisibilityAsVisibleParams": { + "description": "Parameters for saving he account visibility of a user", + "type": "object", + "properties": { + "accounts": { + "description": "Either the ids or internal names of account types the user want to be visible. All non-included accounts will be hidden.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "ScheduledPaymentPermissions": { + "description": "Permissions the user has over a scheduled payment", + "type": "object", + "properties": { + "block": { + "description": "Can block the whole scheduled payment?", + "type": "boolean" + }, + "unblock": { + "description": "Can unblock the whole scheduled payment?", + "type": "boolean" + }, + "cancel": { + "description": "Can cancel the whole scheduled payment?", + "type": "boolean" + }, + "settle": { + "description": "Can settle open installments?", + "type": "boolean" + } + } + }, + "ScheduledPaymentsPermissions": { + "description": "Permissions over own scheduled payments", + "allOf": [ + { + "$ref": "#/components/schemas/ScheduledPaymentPermissions" + }, + { + "type": "object", + "properties": { + "view": { + "description": "Can view own scheduled payments?", + "type": "boolean" + }, + "process": { + "description": "Can process installments?", + "type": "boolean" + } + } + } + ] + }, + "SearchByDistanceData": { + "description": "Contains configuration information for searching data by distance", + "type": "object", + "properties": { + "addresses": { + "description": "The list of addresses owned by the authenticated user", + "type": "array", + "items": { + "$ref": "#/components/schemas/Address" + } + }, + "defaultValues": { + "description": "The default values, keyed by field name, for address fields", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "distanceUnit": { + "$ref": "#/components/schemas/DistanceUnitEnum" + } + } + }, + "SendActivationCodeRequest": { + "description": "Parameters for requesting sending a device activation code.", + "allOf": [ + { + "$ref": "#/components/schemas/SendOtp" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The device name. This name must be unique per user, in case it already exist then a suffix will be added in the form `_i` with `i` being a number. E.g if a device with name 'my_device' already exist then the final name will be 'my_device_1'. It's ignored if authenticated with a PIN or if a valid `pinId` was given." + }, + "pinId": { + "type": "string", + "description": "Only if the device for which the activation is requested for already has a defined pin, then it must be specified here. This is necessary to get in sync when a device is activated after a pin was already defined." + }, + "mobilePhoneId": { + "deprecated": true, + "x-remove-version": 4.18, + "type": "string", + "description": "Use `mobilePhone` instead, as this parameter only allows id, while `mobilePhone` allows either id or number" + } + } + } + ] + }, + "SendActivationCodeResult": { + "description": "Contains the result of sending a device activation code.", + "allOf": [ + { + "$ref": "#/components/schemas/OtpResult" + }, + { + "type": "object", + "properties": { + "device": { + "description": "The pending device. The device's name is the same name given in `GET /devices/send-activation-code` only if it was not already in use. Otherwise, it contains a new name generated from the selected one but adding a suffix. The name generated is of the form `name_i` with `i` a number and `name` the selected name.\"", + "allOf": [ + { + "$ref": "#/components/schemas/Device" + } + ] + } + } + } + ] + }, + "SendInvitation": { + "description": "Parameters for sending invitation e-mails to external users", + "type": "object", + "properties": { + "toEmails": { + "description": "The e-mail address to which the invitation will be sent. The maximum number of allowed addresses is defined in `DataForSendInvitation.maxRecipients`", + "type": "array", + "items": { + "type": "string" + } + }, + "assignBroker": { + "description": "When the authenticated user is a broker, this flag indicates whether the user that was registered by clicking the link in the sent e-mail will be immediately assigned to that broker. Ignored when the authenticated user is not a broker.", + "type": "boolean" + } + } + }, + "SendMessage": { + "description": "Contains data for a new message to be sent", + "allOf": [ + { + "$ref": "#/components/schemas/BaseSendMessage" + }, + { + "type": "object", + "properties": { + "category": { + "description": "The category for a message send to system. Required for messages between system and members.", + "type": "string" + }, + "destination": { + "description": "The message destination", + "$ref": "#/components/schemas/MessageDestinationEnum" + }, + "toGroups": { + "description": "The groups to send the message to. Only for administrators. Used only if `destination` is `user`", + "type": "array", + "items": { + "type": "string" + } + }, + "toUsers": { + "description": "The users to send the message to. Used only if `destination` is `user`", + "type": "array", + "items": { + "type": "string" + } + } + } + } + ] + }, + "SendOtp": { + "description": "Parameters for sending an OTP", + "type": "object", + "properties": { + "mobilePhone": { + "type": "string", + "description": "Either the id or phone number. Note that optional signs (`-` or `+`) immediately followed by digits-only are interpreted as ids. To use a phone number, either escape it starting or enclosing with single quotes (`'`) or prefixing the value with `number:`. Phone number can only be used if the configuration sets mobile numbers to be unique. Only required if medium is `sms`." + }, + "medium": { + "description": "The medium the user wants to receive the activation code.", + "allOf": [ + { + "$ref": "#/components/schemas/SendMediumEnum" + } + ] + } + } + }, + "SendOtpWithId": { + "description": "Parameters for resending an Otp for a device", + "allOf": [ + { + "$ref": "#/components/schemas/SendOtp" + }, + { + "type": "object", + "properties": { + "mobilePhoneId": { + "deprecated": true, + "x-remove-version": 4.18, + "type": "string", + "description": "Use `mobilePhone` instead, as this parameter only allows id, while `mobilePhone` allows either id or number" + } + } + } + ] + }, + "SendPaymentRequest": { + "description": "Definitions used to send a payment request. The request has an expiration date (which can be hidden from the user, depending on the configuration) and can be set to be scheduled.", + "allOf": [ + { + "$ref": "#/components/schemas/PerformInternalTransaction" + }, + { + "type": "object", + "properties": { + "expirationDate": { + "description": "The payment request expiration date. Required, unless the expiration date is configured in the payment type to be hidden from users.", + "type": "string", + "format": "date-time" + }, + "firstInstallmentIsImmediate": { + "description": "Indicates whether the first installment should be immediately processed once the scheduled payment is accepted. Used only if `scheduling` is `scheduled`. When not explicitly set to `false` will process the first installment immediately.", + "type": "boolean" + }, + "installmentsCount": { + "description": "Represents the number of installments. When not specified, assumes a single installment. Used only if `scheduling` is `scheduled`.", + "type": "integer", + "minimum": 1 + }, + "scheduling": { + "$ref": "#/components/schemas/PaymentRequestSchedulingEnum" + }, + "occurrencesCount": { + "description": "Represents the number of occurrences. When not specified, assumes a the payment will continue until be manually canceled. Used only if `scheduling` is `recurring`.", + "type": "integer" + }, + "firstOccurrenceIsImmediate": { + "description": "Indicates whether the first occurrence should be immediately processed once the recurring payment is accepted. Used only if `scheduling` is `recurring`. When not explicitly set to `false` will process the first occurrence immediately.", + "type": "boolean" + }, + "occurrenceInterval": { + "description": "Defines the interval between payment occurrences. If none is given, it is assumed 1 month between occurrences. Used only if `scheduling` is `recurring`.", + "allOf": [ + { + "$ref": "#/components/schemas/TimeInterval" + } + ] + } + } + } + ] + }, + "SendVoucher": { + "description": "Parameters for sending a voucher", + "type": "object", + "properties": { + "email": { + "description": "The e-mail address to which the voucher will be sent", + "type": "string" + }, + "message": { + "description": "A message to include in the e-mail that will be sent", + "type": "string" + }, + "amount": { + "description": "The voucher amount", + "type": "string", + "format": "number" + }, + "type": { + "description": "Either the `id` or `internalName` of the voucher type", + "type": "string" + }, + "voucherCustomValues": { + "type": "object", + "description": "Holds the custom field values, keyed by field internal name or id. The format of the value depends on the custom field type. Example: `{..., \"customValues\": {\"gender\": \"male\", \"birthDate\": \"1980-10-27\"}}`", + "additionalProperties": { + "type": "string" + } + }, + "paymentCustomValues": { + "type": "object", + "description": "Holds the payment custom field values, keyed by field internal name or id. The format of the value depends on the custom field type.", + "additionalProperties": { + "type": "string" + } + } + } + }, + "SessionDataForSearch": { + "description": "Data for searching user sessions", + "type": "object", + "properties": { + "roles": { + "description": "The roles the authenticated user can use to filter sessions.", + "type": "array", + "items": { + "$ref": "#/components/schemas/RoleEnum" + } + }, + "channels": { + "description": "The channel internal names the authenticated user can use to filter sessions.", + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityReference" + } + }, + "query": { + "description": "Default query filters for searching sessions", + "allOf": [ + { + "$ref": "#/components/schemas/SessionQueryFilters" + } + ] + } + } + }, + "SessionPropertiesEdit": { + "description": "Session properties to be modified.", + "type": "object", + "properties": { + "source": { + "description": "Changes the session source. Can only be changed when the current session is trusted.", + "allOf": [ + { + "$ref": "#/components/schemas/SessionSourceEnum" + } + ] + } + } + }, + "SessionPropertiesView": { + "description": "Contains properties of a user session", + "type": "object", + "properties": { + "createdAt": { + "description": "The timestamp of the session creation", + "type": "string", + "format": "date-time" + }, + "expirationInterval": { + "description": "The inactivity interval for this session to expire", + "allOf": [ + { + "$ref": "#/components/schemas/TimeInterval" + } + ] + }, + "expiresAt": { + "description": "The current session expiration timestamp. After each usage of this session, the timeout is renewed, and the additional timeout will be the operation timestamp added to `expirationInterval`.", + "type": "string", + "format": "date-time" + }, + "source": { + "description": "Indicates how the session was created. Can be modified in runtime.", + "allOf": [ + { + "$ref": "#/components/schemas/SessionSourceEnum" + } + ] + }, + "device": { + "description": "Reference to the trusted device that wither created or confirmed this session. When null, the session is not trusted.", + "allOf": [ + { + "$ref": "#/components/schemas/EntityReference" + } + ] + }, + "devicePin": { + "description": "Reference to the device PIN that was used to login. Otherwise, when the session was created with a trusted device, and the device has a PIN attached, will reflect it.", + "allOf": [ + { + "$ref": "#/components/schemas/DevicePin" + } + ] + } + } + }, + "SessionQueryFilters": { + "description": "Search filters for sessions", + "allOf": [ + { + "$ref": "#/components/schemas/QueryFilters" + }, + { + "type": "object", + "properties": { + "broker": { + "description": "Either id or a principal (login name, e-mail, etc) of a broker. Used to filter the sessions of users brokered by the given broker.", + "type": "string" + }, + "channels": { + "description": "Internal names of the sessions channels that can be returned.", + "type": "array", + "items": { + "type": "string" + } + }, + "excludeCurrentSession": { + "type": "boolean", + "description": "Whether to exclude or not the current session." + }, + "operatorsOf": { + "description": "Either id or a principal (login name, e-mail, etc) of a user. The owner member of the operators sessions Used to filter the operator sessions of the given user.", + "type": "string" + }, + "roles": { + "description": "The role of the logged user in the sessions.", + "type": "array", + "items": { + "$ref": "#/components/schemas/RoleEnum" + } + }, + "user": { + "description": "Either id or a principal (login name, e-mail, etc) of the sessions owner.", + "type": "string" + } + } + } + ] + }, + "SessionResult": { + "description": "Contains data returned when searching for sessions", + "type": "object", + "properties": { + "sessionToken": { + "description": "The session token", + "type": "string" + }, + "creationDate": { + "description": "The session creation date", + "type": "string", + "format": "date-time" + }, + "remoteAddress": { + "description": "The session remote address", + "type": "string" + }, + "user": { + "$ref": "#/components/schemas/User" + }, + "channel": { + "$ref": "#/components/schemas/EntityReference" + }, + "currentSession": { + "description": "Whether the session is the current one", + "type": "boolean" + } + } + }, + "SessionsPermissions": { + "description": "Permissions over user sessions", + "type": "object", + "properties": { + "view": { + "description": "Whether the logged user can view connected users or not", + "type": "boolean" + }, + "disconnect": { + "description": "Whether the logged user can disconnect users or not", + "type": "boolean" + }, + "login": { + "description": "Whether the logged user can login (i.e create a session) users or not", + "type": "boolean" + } + } + }, + "SetAccountBalanceLimits": { + "description": "Parameters for setting the new account limits.", + "allOf": [ + { + "$ref": "#/components/schemas/BaseAccountBalanceLimits" + }, + { + "type": "object", + "properties": { + "comment": { + "description": "Comments supplied by the manager regarding the limit change.", + "type": "string" + } + } + } + ] + }, + "SetAccountPaymentLimits": { + "description": "Parameters for setting the new account payment limits.", + "allOf": [ + { + "$ref": "#/components/schemas/BaseAccountPaymentLimits" + }, + { + "type": "object", + "properties": { + "comment": { + "description": "Comments supplied by the manager regarding the limit change.", + "type": "string" + } + } + } + ] + }, + "SetDeliveryMethod": { + "description": "Delivery method information", + "allOf": [ + { + "$ref": "#/components/schemas/BaseOrderAction" + }, + { + "type": "object", + "properties": { + "name": { + "description": "The delivery method name.", + "type": "string" + }, + "chargeAmount": { + "description": "The delivery method charge amount.", + "type": "string", + "format": "number" + }, + "deliveryType": { + "$ref": "#/components/schemas/DeliveryMethodTypeEnum" + }, + "minTime": { + "description": "The delivery method minimum time interval", + "allOf": [ + { + "$ref": "#/components/schemas/TimeInterval" + } + ] + }, + "maxTime": { + "description": "The delivery method maximum time interval", + "allOf": [ + { + "$ref": "#/components/schemas/TimeInterval" + } + ] + } + } + } + ] + }, + "SetSecurityAnswer": { + "description": "Parameters to define the security answer.", + "type": "object", + "properties": { + "securityQuestion": { + "type": "string", + "description": "If the server is configured to use security question, is the `internalName` of the question present in the result of `data-for-new`, in the `securityQuestions` property. Is optional and only used in public registration." + }, + "securityAnswer": { + "type": "string", + "description": "If a `securityQuestion` is informed, this is the answer. Required in this case. Only used in public registration..." + } + } + }, + "SharedRecordsDataForSearch": { + "description": "Data for searching records with shared fields (multiple types)", + "allOf": [ + { + "$ref": "#/components/schemas/BaseRecordDataForSearch" + }, + { + "type": "object", + "properties": { + "recordTypes": { + "description": "The possible record types.", + "type": "array", + "items": { + "$ref": "#/components/schemas/RecordType" + } + }, + "query": { + "description": "Default query filters for searching records", + "allOf": [ + { + "$ref": "#/components/schemas/SharedRecordsQueryFilters" + } + ] + } + } + } + ] + }, + "SharedRecordsQueryFilters": { + "description": "Query filters for searching distinct record types which shared common fields", + "allOf": [ + { + "$ref": "#/components/schemas/GeneralRecordsQueryFilters" + }, + { + "type": "object", + "properties": { + "types": { + "description": "Either the ids or identification methods of record types", + "type": "array", + "items": { + "type": "string" + } + } + } + } + ] + }, + "ShoppingCartCheckout": { + "description": "Contains data required to check-out a shopping cart", + "allOf": [ + { + "$ref": "#/components/schemas/BaseOrderAction" + }, + { + "type": "object", + "properties": { + "deliveryAddress": { + "description": "The address used for delivery in this specific order. The fields `name`, `defaultAddress` and `hidden` are ignored.", + "allOf": [ + { + "$ref": "#/components/schemas/AddressNew" + } + ] + }, + "deliveryMethod": { + "description": "The id of the selected delivery method (if any)", + "type": "string" + }, + "paymentType": { + "description": "Either the internal name or id of the selected payment type.", + "type": "string" + } + } + } + ] + }, + "ShoppingCartCheckoutError": { + "description": "Error when check-out a shopping cart.", + "allOf": [ + { + "$ref": "#/components/schemas/Error" + }, + { + "type": "object", + "properties": { + "shoppingCartError": { + "description": "The `ShoppingCartError` generated when the products in the cart were being validated. Only if `code` is `products`.", + "allOf": [ + { + "$ref": "#/components/schemas/ShoppingCartError" + } + ] + }, + "code": { + "$ref": "#/components/schemas/ShoppingCartCheckoutErrorCode" + } + } + } + ] + }, + "ShoppingCartDataForCheckout": { + "description": "Confiugration data need to check-out a shopping cart.", + "type": "object", + "properties": { + "cart": { + "description": "The cart containing the currency and items.", + "allOf": [ + { + "$ref": "#/components/schemas/ShoppingCartView" + } + ] + }, + "paymentTypes": { + "description": "Contains the allowed payment types.", + "type": "array", + "items": { + "$ref": "#/components/schemas/TransferType" + } + }, + "deliveryMethods": { + "description": "The list of delivery method commons to all of the products added to the shopping cart ordered by name.", + "type": "array", + "items": { + "$ref": "#/components/schemas/DeliveryMethod" + } + }, + "addressConfiguration": { + "$ref": "#/components/schemas/AddressConfiguration" + }, + "confirmationPasswordInput": { + "description": "If a confirmation password is used, contains the definitions on how to request that password from the user. This confirmation password is required when performing sensible actions. Sometimes this is dynamic, for example, the confirmation might be configured to be used only once per session, or operations like payments may have a limit per day to be without confirmation (pinless).", + "allOf": [ + { + "$ref": "#/components/schemas/PasswordInput" + } + ] + }, + "addresses": { + "description": "The addresses the logged user (i.e the buyer) has.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Address" + } + } + } + }, + "ShoppingCartError": { + "description": "Error when interacting with the shopping cart.", + "allOf": [ + { + "$ref": "#/components/schemas/Error" + }, + { + "type": "object", + "properties": { + "ad": { + "description": "The webshop ad for which there is not enough stock. Only if `code` is `notEnoughStock`", + "allOf": [ + { + "$ref": "#/components/schemas/WebshopAd" + } + ] + }, + "seller": { + "description": "The seller whose webshop ad can not be bought. Only if `code` is `canNotBuyFromSeller`", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "code": { + "$ref": "#/components/schemas/ShoppingCartErrorCode" + } + } + } + ] + }, + "ShoppingCartItem": { + "description": "An item in a shopping cart.", + "allOf": [ + { + "$ref": "#/components/schemas/BaseOrderItem" + }, + { + "type": "object", + "properties": { + "priceWhenAdded": { + "description": "The current product price at the moment of add it to the shopping cart. Be carefull, this could not be the same price finally charged at check-out (e.g because the promotional period has finished). It could be used to show a warning message to the client indicating the price has changed if it is different from the current price of the `product`.", + "type": "string", + "format": "number" + }, + "promotionalPrice": { + "description": "The promotional price (aka the current price). if it is present then that is the current price that would be charged at check-out. Otherwise would be the `price`. Only present if it is defined and the promotional period has not yet finished.", + "type": "string", + "format": "number" + } + } + } + ] + }, + "ShoppingCartItemDetailed": { + "description": "Detailed information of a shopping cart item.", + "allOf": [ + { + "$ref": "#/components/schemas/ShoppingCartItem" + }, + { + "type": "object", + "properties": { + "totalPrice": { + "description": "The total price for this item, i.e the curent price of the product multiplied by its corresponding quantity.", + "type": "string", + "format": "number" + }, + "availability": { + "$ref": "#/components/schemas/ShoppingCartItemAvailabilityEnum" + }, + "quantityAdjustment": { + "$ref": "#/components/schemas/ShoppingCartItemQuantityAdjustmentEnum" + } + } + } + ] + }, + "ShoppingCartResult": { + "description": "Represents a group of webshop ads offered by the same seller and in the same currency.", + "allOf": [ + { + "$ref": "#/components/schemas/BaseShoppingCart" + }, + { + "type": "object", + "properties": { + "items": { + "description": "The webshop ads added to the cart.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ShoppingCartItem" + } + } + } + } + ] + }, + "ShoppingCartView": { + "description": "Represents a group of webshop ads offered by the same seller and in the same currency.", + "allOf": [ + { + "$ref": "#/components/schemas/BaseShoppingCart" + }, + { + "type": "object", + "properties": { + "totalPrice": { + "description": "The total price of this cart, i.e the sum of the total price of all of its `items`.", + "type": "string", + "format": "number" + }, + "items": { + "description": "Detailed information of the items present in the cart.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ShoppingCartItemDetailed" + } + } + } + } + ] + }, + "SimpleAddress": { + "description": "Address fields container", + "type": "object", + "x-implements": "IAddress", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the descriptive address" + }, + "addressLine2": { + "type": "string", + "description": "The second line of the descriptive address" + }, + "street": { + "type": "string", + "description": "The street name" + }, + "buildingNumber": { + "type": "string", + "description": "The numeric identifier for a land parcel, house, building or other" + }, + "complement": { + "type": "string", + "description": "The complement (like apartment number)" + }, + "zip": { + "type": "string", + "description": "A zip code that identifies a specific geographic (postal) delivery area" + }, + "poBox": { + "type": "string", + "description": "The post-office box, is an uniquely addressable box" + }, + "neighborhood": { + "type": "string", + "description": "The neighborhood name" + }, + "city": { + "type": "string", + "description": "The city name" + }, + "region": { + "type": "string", + "description": "The region or state" + }, + "country": { + "type": "string", + "description": "The country, represented as 2-letter, uppercase, ISO 3166-1 code" + }, + "location": { + "description": "The geolocation of the current address", + "allOf": [ + { + "$ref": "#/components/schemas/GeographicalCoordinate" + } + ] + } + } + }, + "SimpleChangeVoucherPin": { + "description": "Parameters for changing the voucher pin, shared by both the operation for `Vouchers` and `VoucherInfo` tags.", + "type": "object", + "properties": { + "newPin": { + "description": "The new pin.", + "type": "string" + }, + "newPinConfirmation": { + "description": "The new pin confirmation.", + "type": "string" + }, + "checkPinConfirmation": { + "type": "boolean", + "description": "Depending on the client, if a confirm PIN field is shown to users, it might be useful to check the confirmation password value on the server. This way, if there are other validation exceptions, they are all shown together. In this case, this field should be set to `true` and the `newPinConfirmation` should be passed in with the user input. However, in cases where clients just want to change the voucher PIN in a non-interactive way, this field can be left empty (or set to `false`), and the `newPinConfirmation` field will be ignored." + } + } + }, + "StoredFile": { + "description": "Contains data about a stored file", + "allOf": [ + { + "$ref": "#/components/schemas/NamedEntity" + }, + { + "type": "object", + "properties": { + "contentType": { + "type": "string", + "description": "MIME type of the stored file" + }, + "length": { + "type": "integer", + "description": "The file size, in bytes" + }, + "url": { + "type": "string", + "description": "The URL for getting the content of this file" + } + } + } + ] + }, + "SystemImageCategoryListData": { + "description": "Contains information for a given system image category, with its images.", + "type": "object", + "properties": { + "category": { + "$ref": "#/components/schemas/EntityReference" + }, + "canCreate": { + "description": "Does the authenticated admin has permission to create a new image in this category?", + "type": "boolean" + }, + "canEdit": { + "description": "Does the authenticated user has permission to edit images in this category?", + "type": "boolean" + }, + "images": { + "description": "The list of images in this category", + "type": "array", + "items": { + "$ref": "#/components/schemas/Image" + } + } + } + }, + "SystemImageCategoryPermissions": { + "description": "Permissions over categories of system custom images", + "type": "object", + "properties": { + "category": { + "$ref": "#/components/schemas/EntityReference" + }, + "canEdit": { + "description": "Whether the logged user can edit images in this category", + "type": "boolean" + } + } + }, + "SystemImagesListData": { + "description": "Contains for each system image category", + "type": "object", + "properties": { + "categories": { + "description": "Contains each of the system image categories, together with their permissions and images.", + "type": "array", + "items": { + "$ref": "#/components/schemas/SystemImageCategoryListData" + } + } + } + }, + "SystemMessagesPermissions": { + "description": "Permissions ovre messages for the logged administrator", + "type": "object", + "properties": { + "view": { + "description": "Whether the logged administrator can view system messages or not", + "type": "boolean" + }, + "manage": { + "description": "Whether the logged administrator can manage system messages or not", + "type": "boolean" + }, + "sendToUser": { + "description": "Whether the logged administrator can send messages to managed users or not", + "type": "boolean" + }, + "sendToGroups": { + "description": "Whether the logged administrator can send messages to managed groups or not", + "type": "boolean" + } + } + }, + "ThemeUIElement": { + "description": "UI element containing wether the content or the components.", + "allOf": [ + { + "$ref": "#/components/schemas/UIElementWithContent" + }, + { + "type": "object", + "properties": { + "definitions": { + "description": "Base LESS variables.", + "type": "string" + }, + "advancedDefinitions": { + "description": "Advanced (based on the base ones) LESS variables.", + "type": "string" + }, + "customStyle": { + "description": "Customized CSS.", + "type": "string" + } + } + } + ] + }, + "TicketApprovalResult": { + "description": "Ticket approval result.", + "allOf": [ + { + "$ref": "#/components/schemas/Entity" + }, + { + "type": "object", + "properties": { + "ticketNumber": { + "description": "The ticket number identifier.", + "type": "string" + }, + "cancelUrl": { + "type": "string", + "description": "The URL to redirect when canceling the accept ticket flow" + }, + "successUrl": { + "type": "string", + "description": "The URL to redirect after successfully accepting a ticket" + }, + "transaction": { + "description": "The generated payment. Only if `status` is `processed`.", + "allOf": [ + { + "$ref": "#/components/schemas/Transaction" + } + ] + }, + "ticketStatus": { + "$ref": "#/components/schemas/TicketStatusEnum" + } + } + } + ] + }, + "TicketNew": { + "description": "Contain the information to create a new ticket for the logged user", + "allOf": [ + { + "$ref": "#/components/schemas/PerformBaseTransaction" + }, + { + "type": "object", + "properties": { + "payer": { + "type": "string", + "description": "An identification for the user which will pay the ticket. Is optional, and in most cases, should be left empty. If empty, at the moment the client will pay the ticket, both user identification and password will be entered, and the ticket will be confirmed. If specified, when confirming, only that user will be able to pay the ticket." + }, + "cancelUrl": { + "type": "string", + "description": "The url to redirect when canceling the approve ticket flow. If an `orderId` is given then it will be added as a query parameter to this url when redirect as well as the ticket number too." + }, + "successUrl": { + "type": "string", + "description": "The url to redirect after successful approving a ticket. If an `orderId` is given then it will be added as a query parameter to this url when redirect as well as the ticket number too." + }, + "successWebhook": { + "type": "string", + "description": "The url to be invoked by the server after successfully approving a ticket. If an `orderId` is given then it will be added as a query parameter to this url when redirect as well as the ticket number too." + }, + "orderId": { + "type": "string", + "description": "An optional order identifier given by the ticket's creator. If given then that identifier will be used at ticket processing to ensure the ticket is for that order. This attribute is usefull in case the client doesn't want to reflect the generated ticket number in its database after creating the ticket," + }, + "expiresAfter": { + "description": "Defines the expiration interval. If none is given, it is assumed that the ticket expires in one day.", + "allOf": [ + { + "$ref": "#/components/schemas/TimeInterval" + } + ] + } + } + } + ] + }, + "TicketPreview": { + "description": "null", + "allOf": [ + { + "$ref": "#/components/schemas/PaymentPreview" + }, + { + "type": "object", + "properties": { + "cancelUrl": { + "type": "string", + "description": "The URL to redirect when canceling the accept ticket flow" + }, + "successUrl": { + "type": "string", + "description": "The URL to redirect after successfully accepting a ticket" + } + } + } + ] + }, + "TicketProcessResult": { + "description": "Ticket process result.", + "allOf": [ + { + "$ref": "#/components/schemas/Entity" + }, + { + "type": "object", + "properties": { + "ticketNumber": { + "description": "The ticket number identifier.", + "type": "string" + }, + "actuallyProcessed": { + "description": "Flag indicating if the ticket was processed by this invocation or the ticket was already processed in a previous invocation. This will only be true for the first invocation of the `process` service method.", + "type": "boolean" + }, + "transaction": { + "description": "The generated payment.", + "allOf": [ + { + "$ref": "#/components/schemas/Transaction" + } + ] + } + } + } + ] + }, + "TicketsPermissions": { + "description": "Permissions over own tickets", + "type": "object", + "properties": { + "view": { + "description": "Can view tickets?", + "type": "boolean" + }, + "create": { + "description": "Can create tickets?", + "type": "boolean" + }, + "cancel": { + "description": "Can cancel tickets?", + "type": "boolean" + }, + "approve": { + "description": "Can approve tickets from others?", + "type": "boolean" + } + } + }, + "TimeInterval": { + "description": "Represents a time interval such as 1 month, 3 weeks, 12 months, etc.", + "type": "object", + "properties": { + "amount": { + "description": "The amount of time units", + "type": "integer" + }, + "field": { + "$ref": "#/components/schemas/TimeFieldEnum" + } + } + }, + "Token": { + "description": "Contains reference to a token. Tokens are used to identify users, and are normally used as cards.", + "allOf": [ + { + "$ref": "#/components/schemas/Entity" + }, + { + "type": "object", + "properties": { + "value": { + "description": "The token value only if not NFC. Otherwise is the token label.", + "type": "string" + }, + "activationDate": { + "description": "When the owner user activated the token.", + "type": "string", + "format": "date-time" + }, + "creationDate": { + "description": "The creation date.", + "type": "string", + "format": "date-time" + }, + "expiryDate": { + "description": "The expiration date. Only if the corresponding token type defines an expiration period.", + "type": "string", + "format": "date-time" + }, + "status": { + "$ref": "#/components/schemas/TokenStatusEnum" + } + } + } + ] + }, + "TokenDataForNew": { + "description": "Configuration data to create a new token", + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/TokenType" + }, + "user": { + "description": "The user details, in case a user was requested.", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "token": { + "description": "The object that should be modified and posted back.", + "allOf": [ + { + "$ref": "#/components/schemas/TokenNew" + } + ] + } + } + }, + "TokenDataForSearch": { + "description": "Configuration data for a general tokens search of a given type", + "allOf": [ + { + "$ref": "#/components/schemas/TokenPermissions" + }, + { + "type": "object", + "properties": { + "groups": { + "description": "The groups the authenticated user can use to filter tokens. Admins can always filter by groups, while brokers depend on a permission, which can be to only view group sets, only groups or none.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Group" + } + }, + "exportFormats": { + "description": "The formats which the data can be exported", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExportFormat" + } + }, + "query": { + "description": "Default query filters to search tokens", + "allOf": [ + { + "$ref": "#/components/schemas/TokenQueryFilters" + } + ] + } + } + } + ] + }, + "TokenDetailed": { + "description": "Contains detailed information of a token.", + "allOf": [ + { + "$ref": "#/components/schemas/TokenResult" + }, + { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/TokenType" + } + } + } + ] + }, + "TokenNew": { + "description": "Data to create a new token", + "type": "object", + "properties": { + "user": { + "description": "Either id or identification of the user to initially assign the token to. If set the token initial status will be either `pending` or `active` (if `activateNow` is true). If the user is not set, the initial status will always be `unassigned`.", + "type": "string" + }, + "value": { + "description": "The token value to create. The token value is commonly used as the card number.", + "type": "string" + }, + "activateNow": { + "description": "When set to true, the token will be initially active when `user` is also set. Has no effect if `user` is null.", + "type": "boolean" + } + } + }, + "TokenPermissions": { + "description": "Permissions over tokens of a specific type", + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/TokenType" + }, + "create": { + "description": "Can create tokens of this type? For NFC tags, this permission is mapped to the 'Initialize' action.", + "type": "boolean" + }, + "activate": { + "description": "Can activate tokens of this type? For NFC tags, this permission is mapped to the 'Personalize' action.", + "type": "boolean" + } + } + }, + "TokenQueryFilters": { + "description": "Query filters for tokens", + "allOf": [ + { + "$ref": "#/components/schemas/QueryFilters" + }, + { + "type": "object", + "properties": { + "activationPeriod": { + "description": "The minimum / maximum token activation date.", + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "expiryPeriod": { + "description": "The minimum / maximum token expiry date.", + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "groups": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Either id or internal names of groups / group sets" + }, + "brokers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Either id or a principal (login name, e-mail, etc) for brokers" + }, + "user": { + "type": "string", + "description": "Either id or a principal (login name, e-mail, etc) for the token owner user" + }, + "value": { + "type": "string", + "description": "The token value" + }, + "statuses": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TokenStatusEnum" + }, + "description": "The desired token statuses" + } + } + } + ] + }, + "TokenResult": { + "description": "Result of a general token search", + "allOf": [ + { + "$ref": "#/components/schemas/Token" + }, + { + "type": "object", + "properties": { + "user": { + "description": "The assigned user. Only if status is not `unassigned`.", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + } + } + } + ] + }, + "TokenType": { + "description": "A reference to a token type", + "allOf": [ + { + "$ref": "#/components/schemas/InternalNamedEntity" + }, + { + "type": "object", + "properties": { + "pluralName": { + "description": "The name for the plural form", + "type": "string" + }, + "mask": { + "description": "In case the token value is entered by users or formatted, this is the (optional) mask to be used.", + "type": "string" + }, + "physicalType": { + "$ref": "#/components/schemas/PhysicalTokenTypeEnum" + } + } + } + ] + }, + "TokenView": { + "description": "Contains all data regarding a token", + "allOf": [ + { + "$ref": "#/components/schemas/TokenDetailed" + }, + { + "type": "object", + "properties": { + "activationDeadline": { + "description": "Limit date a pending token can be activated. Not returned when status is not `pending`.", + "type": "string", + "format": "date-time" + }, + "activate": { + "description": "Can this token be directly activated?", + "type": "boolean" + }, + "assign": { + "description": "Can this token be assigned to a user?", + "type": "boolean" + }, + "block": { + "description": "Can this token be blocked?", + "type": "boolean" + }, + "unblock": { + "description": "Can this token be unblocked?", + "type": "boolean" + }, + "cancel": { + "description": "Can this token be canceled?", + "type": "boolean" + }, + "setActivationDeadline": { + "description": "Can the activation deadline date of this token be changed?", + "type": "boolean" + }, + "setExpiryDate": { + "description": "Can the expiry date of this token be changed?", + "type": "boolean" + } + } + } + ] + }, + "TokensPermissions": { + "description": "Permissions over tokens", + "type": "object", + "properties": { + "my": { + "description": "Permissions over my own tokens type", + "type": "array", + "items": { + "$ref": "#/components/schemas/TokenPermissions" + } + }, + "user": { + "description": "Permissions over tokens types of other users", + "type": "array", + "items": { + "$ref": "#/components/schemas/TokenPermissions" + } + }, + "personalizeNfcTokensAsMember": { + "description": "NFC token types the authenticated member can personalize to other members (example, a business personalizing cards for clients).", + "type": "array", + "items": { + "$ref": "#/components/schemas/TokenType" + } + } + } + }, + "TopUpVoucher": { + "description": "Parameter to top-up / activate a voucher", + "allOf": [ + { + "$ref": "#/components/schemas/PerformVoucherTransaction" + }, + { + "type": "object", + "properties": { + "email": { + "description": "The e-mail address to which the voucher PIN will be sent. Only used when `pinOnActivation` is `send`.", + "type": "string" + }, + "mobilePhone": { + "description": "The phone number to which the voucher PIN will be sent via SMS. Only used when `pinOnActivation` is `send`.", + "type": "string" + }, + "pin": { + "description": "The value for the voucher PIN. Only used when `pinOnActivation` is `input`.", + "type": "string" + }, + "pinConfirmation": { + "description": "Confirmation for the voucher PIN. Only used when `pinOnActivation` is `input` and `checkPinConfirmation` is set to true.", + "type": "string" + }, + "checkPinConfirmation": { + "type": "boolean", + "description": "Depending on the client, if a confirm PIN field is shown to users, it might be useful to check the confirmation password value on the server. This way, if there are other validation exceptions, they are all shown together. In this case, this field should be set to `true` and the `pinConfirmation` should be passed in with the user input. However, in cases where clients just want to activate vouchers in a non-interactive way, this field can be left empty (or set to `false`), and the `pinConfirmation` field will be ignored." + }, + "voucherCustomValues": { + "type": "object", + "description": "Holds the voucher custom field values, keyed by field internal name or id. The format of the value depends on the custom field type. Example: `{..., \"customValues\": {\"gender\": \"male\", \"birthDate\": \"1980-10-27\"}}`", + "additionalProperties": { + "type": "string" + } + } + } + } + ] + }, + "TopUpVoucherError": { + "description": "Error when topping-up a voucher", + "allOf": [ + { + "$ref": "#/components/schemas/Error" + }, + { + "type": "object", + "properties": { + "activationLimit": { + "description": "The limit date the voucher had to be activated. Only if `code` is `activationExpired`.", + "type": "string", + "format": "date-time" + }, + "voucherStatus": { + "description": "Only if `code` is `notAllowedForVoucher`", + "allOf": [ + { + "$ref": "#/components/schemas/VoucherStatusEnum" + } + ] + }, + "paymentError": { + "description": "The `PaymentError` generated when the voucher payment was being created. Only if `code` is `payment`.", + "allOf": [ + { + "$ref": "#/components/schemas/PaymentError" + } + ] + }, + "code": { + "$ref": "#/components/schemas/TopUpVoucherErrorCode" + } + } + } + ] + }, + "TotpSecretData": { + "description": "Information about a user's TOTP secret.", + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/User" + }, + "status": { + "$ref": "#/components/schemas/TotpStatusEnum" + }, + "activationDate": { + "description": "The action date. Only returned if `status` is `active`.", + "type": "string", + "format": "date-time" + }, + "canActivate": { + "description": "Can a TOTP secret be activated? Only returned if logged in as the same user.", + "type": "boolean" + }, + "canRemove": { + "description": "Can the TOTP secret of this used be removed by the logged user? Both the logged user himself and his managers (with permissions) can do it.", + "type": "boolean" + }, + "confirmationPasswordInput": { + "description": "If a confirmation password is used, contains the definitions on how to request that password from the user. This confirmation password is required when performing sensible actions. Sometimes this is dynamic, for example, the confirmation might be configured to be used only once per session, or operations like payments may have a limit per day to be without confirmation (pinless).", + "allOf": [ + { + "$ref": "#/components/schemas/PasswordInput" + } + ] + }, + "secretUrl": { + "description": "The URL to show as QR-code or open the app on device to complete the activation. Only returned if logged in as the same user, and the `status` is `pending`.", + "type": "string" + }, + "sendVerificationCodeData": { + "description": "Data for verifying the identity via a verification code before activating the totp. Only returned when `canActivate` is true and `status` is not `active`.", + "allOf": [ + { + "$ref": "#/components/schemas/DataForSendingOtp" + } + ] + } + } + }, + "Trans": { + "description": "Common data for transfer and transaction", + "allOf": [ + { + "$ref": "#/components/schemas/Entity" + }, + { + "type": "object", + "properties": { + "display": { + "type": "string", + "description": "A display text for this transfer / transaction, according to the transaction type and currency configuration in Cyclos." + }, + "transactionNumber": { + "description": "The transaction number identifying this transfer / transaction. The currency configuration has the definition on whether transaction numbers are enabled and which format they have.", + "type": "string" + }, + "date": { + "description": "The creation date and time.", + "type": "string", + "format": "date-time" + }, + "amount": { + "description": "The transfer / transaction amount.", + "type": "string", + "format": "number" + }, + "from": { + "description": "The debited account.", + "allOf": [ + { + "$ref": "#/components/schemas/AccountWithOwner" + } + ] + }, + "to": { + "description": "The credited account.", + "allOf": [ + { + "$ref": "#/components/schemas/AccountWithOwner" + } + ] + }, + "type": { + "description": "Reference to the transfer type", + "allOf": [ + { + "$ref": "#/components/schemas/EntityReference" + } + ] + }, + "currency": { + "description": "The transfer / transaction currency.", + "allOf": [ + { + "$ref": "#/components/schemas/Currency" + } + ] + } + } + } + ] + }, + "TransResult": { + "description": "Base fields for results of both transfers and transactions", + "allOf": [ + { + "$ref": "#/components/schemas/Entity" + }, + { + "type": "object", + "properties": { + "transactionNumber": { + "description": "The transaction number identifying this balance transfer. The currency configuration has the definition on whether transaction numbers are enabled and which format they have.", + "type": "string" + }, + "date": { + "description": "The transaction date and time.", + "type": "string", + "format": "date-time" + }, + "amount": { + "description": "The transaction amount.", + "type": "string", + "format": "number" + }, + "type": { + "description": "Reference to the transfer type", + "allOf": [ + { + "$ref": "#/components/schemas/EntityReference" + } + ] + }, + "description": { + "description": "The transaction description. Is optional.", + "type": "string" + }, + "image": { + "description": "Reference an image. Is returned on special cases, like voucher buying / redeeming. Generally the image which should be displayed will be in the corresponding account", + "allOf": [ + { + "$ref": "#/components/schemas/Image" + } + ] + }, + "customValues": { + "type": "object", + "description": "Holds the custom field values, keyed by field internal name or id. The format of the value depends on the custom field type. In order to lookup the custom fields, use the `GET /{owner}/accounts/{accountType}/data-for-history` operation, and lookup each field by either internal name (if configured) or id. Example: `{..., \"customValues\": {\"linkedAccount\": \"123456789\"}}`", + "additionalProperties": { + "type": "string" + } + } + } + } + ] + }, + "Transaction": { + "description": "Reference to a transaction", + "allOf": [ + { + "$ref": "#/components/schemas/Trans" + }, + { + "type": "object", + "properties": { + "ticketNumber": { + "description": "A 32-length alphanumeric ticket identifier. Only returned if kind is `ticket`.", + "type": "string" + }, + "fromName": { + "description": "Contains an optional custom from name, which can be set when the transaction is performed.", + "type": "string" + }, + "toName": { + "description": "Contains an optional custom to name, which can be set when the transaction is performed.", + "type": "string" + }, + "description": { + "description": "The optional transaction description.", + "type": "string" + }, + "kind": { + "description": "The transaction kind. For example, if the front end has distinct views for a regular payment, scheduled payment and so on, this information is useful to determine the actual view.", + "allOf": [ + { + "$ref": "#/components/schemas/TransactionKind" + } + ] + }, + "creationType": { + "description": "Indicates how this payment was created. Only returned if `kind` is either `payment`, `scheduledPayment` or `recurringPayment`.", + "allOf": [ + { + "$ref": "#/components/schemas/PaymentCreationTypeEnum" + } + ] + }, + "authorizationStatus": { + "description": "Indicates the authorization status for this payment. Only returned if `kind` is either `payment`, `scheduledPayment` or `recurringPayment`.", + "allOf": [ + { + "$ref": "#/components/schemas/TransactionAuthorizationStatusEnum" + } + ] + } + } + } + ] + }, + "TransactionAuthorization": { + "description": "Contains details of an authorization.", + "allOf": [ + { + "$ref": "#/components/schemas/Entity" + }, + { + "type": "object", + "properties": { + "action": { + "$ref": "#/components/schemas/TransactionAuthorizationActionEnum" + }, + "by": { + "$ref": "#/components/schemas/User" + }, + "comments": { + "description": "The authorizer's comment.", + "type": "string" + }, + "date": { + "description": "When the authorization was made.", + "type": "string", + "format": "date-time" + }, + "level": { + "description": "The level number.", + "type": "integer" + } + } + } + ] + }, + "TransactionAuthorizationLevelData": { + "description": "Contains detailed data of a payment's authorization level.", + "type": "object", + "properties": { + "allowBroker": { + "description": "Indicates that any of the payer's brokers can authorize this level.", + "type": "boolean" + }, + "allowPayer": { + "description": "Indicates that the payer can authorize this level.", + "type": "boolean" + }, + "allowReceiver": { + "description": "Indicates that the payer can authorize this level.", + "type": "boolean" + }, + "allowAdmin": { + "description": "Indicates that an administrator can authorize this level.", + "type": "boolean" + }, + "brokers": { + "description": "Contains the brokers that can authorize this level.", + "type": "array", + "items": { + "$ref": "#/components/schemas/User" + } + } + } + }, + "TransactionAuthorizationPermissions": { + "description": "Permissions the user has over a pending payment.", + "type": "object", + "properties": { + "authorize": { + "description": "The payment can be authorized.", + "type": "boolean" + }, + "deny": { + "description": "The payment can be denied.", + "type": "boolean" + }, + "cancel": { + "description": "The payment can be cenceled regardless the current authorization level.", + "type": "boolean" + } + } + }, + "TransactionAuthorizationsPermissions": { + "description": "Permissions over own authorized payments", + "allOf": [ + { + "$ref": "#/components/schemas/TransactionAuthorizationPermissions" + }, + { + "type": "object", + "properties": { + "view": { + "description": "Can view own authorized payments?", + "type": "boolean" + } + } + } + ] + }, + "TransactionDataForSearch": { + "description": "Contains data used to search transactions for a given owner", + "allOf": [ + { + "$ref": "#/components/schemas/BaseTransactionDataForSearch" + }, + { + "type": "object", + "properties": { + "user": { + "description": "When the given owner is a user, is the reference to it", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "userPermissions": { + "description": "When the given owner is a user, contains the transaction permissions over that user", + "allOf": [ + { + "$ref": "#/components/schemas/UserTransactionPermissions" + } + ] + }, + "accessClients": { + "description": "References for access clients which can be used to filter entries by transfers generated by a specific access client", + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityReference" + } + }, + "operators": { + "description": "References for operators, which can be used to filter entries by transfers performed or received by that specific operator", + "type": "array", + "items": { + "$ref": "#/components/schemas/User" + } + }, + "query": { + "description": "Default query filters for the transactions search", + "allOf": [ + { + "$ref": "#/components/schemas/TransactionQueryFilters" + } + ] + } + } + } + ] + }, + "TransactionOverviewDataForSearch": { + "description": "Contains data used to search transactions regardless of an account owner", + "allOf": [ + { + "$ref": "#/components/schemas/BaseTransactionDataForSearch" + }, + { + "type": "object", + "properties": { + "authorizablePaymentTypes": { + "description": "Payment types the authenticated administrator can authorize. Only returned when logged-in as administrator and the request had the `pendingMyAuthorization` flag set to true.", + "type": "array", + "items": { + "$ref": "#/components/schemas/TransferType" + } + }, + "query": { + "description": "Default query filters for the transactions search", + "allOf": [ + { + "$ref": "#/components/schemas/TransactionOverviewQueryFilters" + } + ] + } + } + } + ] + }, + "TransactionOverviewQueryFilters": { + "description": "Query filters for transactions regardless of an account owner.", + "allOf": [ + { + "$ref": "#/components/schemas/BaseTransactionQueryFilters" + }, + { + "type": "object", + "properties": { + "currencies": { + "description": "The currencies internal names or ids.", + "type": "array", + "items": { + "type": "string" + } + }, + "fromAccountTypes": { + "description": "The source account types internal names or ids.", + "type": "array", + "items": { + "type": "string" + } + }, + "toAccountTypes": { + "description": "The source account types internal names or ids.", + "type": "array", + "items": { + "type": "string" + } + }, + "pendingMyAuthorization": { + "description": "When set to true will only return transactions (`payment`, `recurringPayment` or `scheduledPayment`) in pending authorization state that the logged user can authorize", + "type": "boolean" + } + } + } + ] + }, + "TransactionOverviewResult": { + "description": "Represents a transaction.", + "allOf": [ + { + "$ref": "#/components/schemas/BaseTransactionResult" + }, + { + "type": "object", + "properties": { + "from": { + "description": "The debited account", + "allOf": [ + { + "$ref": "#/components/schemas/AccountWithOwner" + } + ] + }, + "fromName": { + "description": "Contains an optional custom from name, which can be set when the transaction is performed.", + "type": "string" + }, + "to": { + "description": "The credited account", + "allOf": [ + { + "$ref": "#/components/schemas/AccountWithOwner" + } + ] + }, + "toName": { + "description": "Contains an optional custom to name, which can be set when the transaction is performed.", + "type": "string" + } + } + } + ] + }, + "TransactionPreview": { + "description": "Base definitions for a preview before performing a transaction", + "type": "object", + "properties": { + "confirmationMessage": { + "description": "If configured in the payment type, is a message to be shown to the user before confirming the transaction", + "type": "string" + }, + "confirmationPasswordInput": { + "description": "If a confirmation password is used, contains the definitions on how to request that password from the user. This confirmation password is required when performing sensible actions. Sometimes this is dynamic, for example, the confirmation might be configured to be used only once per session, or operations like payments may have a limit per day to be without confirmation (pinless).", + "allOf": [ + { + "$ref": "#/components/schemas/PasswordInput" + } + ] + }, + "paymentType": { + "$ref": "#/components/schemas/TransferType" + }, + "currency": { + "$ref": "#/components/schemas/Currency" + }, + "fromAccount": { + "$ref": "#/components/schemas/AccountWithOwner" + }, + "fromOperator": { + "description": "The operator who is performing the payment. Only sent if the payment is made from an operator.", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "totalAmount": { + "description": "The final amount charged to the payer including fees.", + "type": "string", + "format": "number" + }, + "customValues": { + "description": "The list of custom field values, in a detailed view", + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldValue" + } + } + } + }, + "TransactionQueryFilters": { + "description": "Query filters for transactions related to an account owner.", + "allOf": [ + { + "$ref": "#/components/schemas/BaseTransactionQueryFilters" + }, + { + "type": "object", + "properties": { + "accountTypes": { + "description": "The account types", + "type": "array", + "items": { + "type": "string" + } + }, + "direction": { + "$ref": "#/components/schemas/TransferDirectionEnum" + } + } + } + ] + }, + "TransactionResult": { + "description": "Represents a transaction, as viewed from the point-of-view of an account owner. This means that credits will have a positive amount, while debits will be negative.", + "allOf": [ + { + "$ref": "#/components/schemas/BaseTransactionResult" + }, + { + "type": "object", + "properties": { + "related": { + "description": "Either from or to account", + "allOf": [ + { + "$ref": "#/components/schemas/AccountWithOwner" + } + ] + }, + "relatedName": { + "description": "Contains an optional custom from / to name, which can be set when the transaction is performed.", + "type": "string" + } + } + } + ] + }, + "TransactionTypeData": { + "description": "Contains definitions regarding a given payment type when performing a transaction (payment or payment request).", + "allOf": [ + { + "$ref": "#/components/schemas/InternalNamedEntity" + }, + { + "type": "object", + "properties": { + "currency": { + "$ref": "#/components/schemas/Currency" + }, + "fixedAmount": { + "description": "The only allowed amount if the payment type uses a fixed amount", + "type": "string", + "format": "number" + }, + "allowsRecurringPayments": { + "description": "Can payments of this type be made recurring?", + "type": "boolean" + }, + "maxInstallments": { + "description": "The maximum allowed installments. If it is zero, no kind of scheduled payments is allowed. If it is 1, a single future date can be used.", + "type": "integer" + }, + "defaultExpirationDate": { + "description": "The default expiration date, according to the configuration. Only for payment requests.", + "type": "string", + "format": "date-time" + }, + "hideExpirationDate": { + "description": "Whether the expiration date should be hidden from users, Only for payment requests.", + "type": "boolean" + }, + "customFields": { + "description": "The custom fields related to this payment type", + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldDetailed" + } + }, + "ARate": { + "description": "The balance aging counter used for this payment. Only for payments.", + "type": "string", + "format": "number" + }, + "DRate": { + "description": "The balance maturity used for this payment. Only for payments.", + "type": "string", + "format": "number" + }, + "DRateCreationValue": { + "description": "The initial value for the balance maturity on this payment type. Only for payments.", + "type": "string", + "format": "number" + }, + "limitedAwaitingAuthorization": { + "type": "boolean", + "description": "Only for payments." + }, + "noNegativesMaturityPolicy": { + "type": "boolean", + "description": "Only for payments." + }, + "maxAmountByMaturityPolicy": { + "description": "The maximum amount that can be performed when `maturityPolicy` is `history`. It corresponds to the maturity table entry indicated by `maturityTableWinnerId`. Only for payments.", + "type": "string", + "format": "number" + }, + "maturityTableWinnerId": { + "description": "When `maturityPolicy` is `history`, contains the id of the maturity table entry that granted. Only for payments.", + "type": "string" + }, + "descriptionAvailability": { + "$ref": "#/components/schemas/AvailabilityEnum" + }, + "maturityPolicy": { + "description": "Only for payments.", + "allOf": [ + { + "$ref": "#/components/schemas/MaturityPolicyEnum" + } + ] + } + } + } + ] + }, + "TransactionView": { + "description": "Details about a transaction. The `confirmationPasswordInput` property is not returned if this `TransactionView` is already in a `TransferView`.", + "allOf": [ + { + "$ref": "#/components/schemas/Transaction" + }, + { + "type": "object", + "properties": { + "channel": { + "description": "The channel this transaction was performed on", + "allOf": [ + { + "$ref": "#/components/schemas/EntityReference" + } + ] + }, + "accessClient": { + "description": "The access client in use when this transaction was performed", + "allOf": [ + { + "$ref": "#/components/schemas/EntityReference" + } + ] + }, + "oidcClient": { + "description": "When the transaction was performed from an OpenID Connect / OAuth2 client, contains a reference to it. The client is the third party application used to perform the payment", + "allOf": [ + { + "$ref": "#/components/schemas/OidcClient" + } + ] + }, + "by": { + "description": "The user that actually performed the action. May be different than the from, for example, an administrator can perform payments in behalf of other users", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "receivedBy": { + "description": "The operator that actually received the payment. Only available if some other user has paid directly to it or the operator has received the payment via POS.", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "received": { + "description": "True if the payment was received via POS.", + "type": "boolean" + }, + "customValues": { + "description": "The list of custom field values", + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldValue" + } + }, + "confirmationPasswordInput": { + "description": "If a confirmation password is used, contains the definitions on how to request that password from the user. This confirmation password is required when performing sensible actions. Sometimes this is dynamic, for example, the confirmation might be configured to be used only once per session, or operations like payments may have a limit per day to be without confirmation (pinless).", + "allOf": [ + { + "$ref": "#/components/schemas/PasswordInput" + } + ] + }, + "authorizationLevelData": { + "description": "Only returned if the `kind` is either `payment`, `scheduledPayment` or `recurringPayment` and the transaction is pending for authorization. Contains data related to the current autorization level that can be authorized / denied.", + "allOf": [ + { + "$ref": "#/components/schemas/TransactionAuthorizationLevelData" + } + ] + }, + "authorizationPermissions": { + "description": "Permissions the authenticated user has over this payment regarding authorizations.", + "allOf": [ + { + "$ref": "#/components/schemas/TransactionAuthorizationPermissions" + } + ] + }, + "authorizations": { + "description": "Contains the details of the authorizations this payment has (for the previous levels). To see the final status of the payment please check the `authorizationStatus` property.", + "type": "array", + "items": { + "$ref": "#/components/schemas/TransactionAuthorization" + } + }, + "transfer": { + "description": "Only returned if the `kind` is `payment`. This is the transfer generated when the payment was processed. Will be null if the payment went through authorization and was not authorized. Not returned if this `TransactionView` is already in a `TransferView`.", + "allOf": [ + { + "$ref": "#/components/schemas/TransferView" + } + ] + }, + "scheduledPaymentPermissions": { + "description": "Only returned if the `kind` is `scheduledPayment`. Permissions over the scheduled payment.", + "allOf": [ + { + "$ref": "#/components/schemas/ScheduledPaymentPermissions" + } + ] + }, + "dueAmount": { + "description": "Only returned if the `kind` is `scheduledPayment`. Means the amount that is still needs to be paid until the last installment.", + "type": "string", + "format": "number" + }, + "installments": { + "description": "Only returned if the `kind` is `scheduledPayment`. Contains the installment references.", + "type": "array", + "items": { + "$ref": "#/components/schemas/InstallmentView" + } + }, + "recurringPaymentPermissions": { + "description": "Only returned if the `kind` is `recurringPayment`. Permissions over the scheduled payment.", + "allOf": [ + { + "$ref": "#/components/schemas/RecurringPaymentPermissions" + } + ] + }, + "nextOccurrenceDate": { + "description": "Only returned if the `kind` is `recurringPayment`. The scheduled date for the next occurrence.", + "type": "string", + "format": "date-time" + }, + "occurrenceInterval": { + "description": "Only returned if the `kind` is `recurringPayment`. The interval between occurrences.", + "allOf": [ + { + "$ref": "#/components/schemas/TimeInterval" + } + ] + }, + "occurrencesCount": { + "description": "Only returned if the `kind` is `recurringPayment` or if it is `paymentRequest` and `scheduling` is `recurring`. The programmed number of occurrences. If not set, means the payment will be processed until manually canceled.", + "type": "integer" + }, + "occurrences": { + "description": "Only returned if the `kind` is `recurringPayment`. A list with all occurrences this payment has.", + "type": "array", + "items": { + "$ref": "#/components/schemas/InstallmentView" + } + }, + "paymentRequestPermissions": { + "description": "Permissions the user has over this payment request.", + "allOf": [ + { + "$ref": "#/components/schemas/PaymentRequestPermissions" + } + ] + }, + "comments": { + "description": "Only returned if the `kind` is either `paymentRequest` or `externalPayment`. The comments the user informed when performing the payment.", + "type": "string" + }, + "expirationDate": { + "description": "Only returned if the `kind` is either `paymentRequest`, `externalPayment` or `ticket`. The deadline for the payment to be processed. In case of `externalPayment` if no user is registered with either e-mail or mobile phone matching, it is canceled. The same is done in case of `ticket` if it is not accepted by any user.", + "type": "string", + "format": "date-time" + }, + "changeExpirationDateComments": { + "description": "Only returned if the `kind` is `paymentRequest`. The comments the user informed when changing the expiration date.", + "type": "string" + }, + "processDate": { + "description": "Only returned if the `kind` is either `paymentRequest`, `ticket` or `externalPayment` and the status is `processed`. In case of `payementRequest` the status could also be `scheduled`. The date the `externalPayment`, `paymentRequest`, `ticket` was processed if the `status` is `processed` or the date the `paymentRequest` will be processed if the `status` is `scheduled`.", + "type": "string", + "format": "date-time" + }, + "transaction": { + "description": "Only returned if the `kind` is `paymentRequest`, `ticket` or `externalPayment` and `status` is `processed`. Reference to the transaction that was generated when processing this payment request / externalPayment / ticket.", + "allOf": [ + { + "$ref": "#/components/schemas/Transaction" + } + ] + }, + "smsCode": { + "description": "Only returned if the `kind` is either `paymentRequest` and `status` is not `processed`. The code that can be used by the receiver to confirm this payment request via SMS operation.", + "type": "string" + }, + "scheduling": { + "description": "Only returned if the `kind` is `paymentRequest`. Indicates whether the generated payment will be a scheduled, recurring or regular payment once this payment request is confirmed.", + "allOf": [ + { + "$ref": "#/components/schemas/PaymentRequestSchedulingEnum" + } + ] + }, + "installmentsCount": { + "description": "Only returned if the `kind` is `paymentRequest` and `scheduling` is `scheduled`. Indicates the number of installments to be generated.", + "type": "integer" + }, + "firstInstallmentIsImmediate": { + "description": "Only returned if the `kind` is `paymentRequest` and `scheduling` is `scheduled`. Indicates whether the first installment should be processed immediately when the payment request is confirmed.", + "type": "boolean" + }, + "firstOccurrenceIsImmediate": { + "description": "Only returned if the `kind` is `paymentRequest` and `scheduling` is `recurring`. Indicates whether the first occurrence should be processed immediately when the payment request is confirmed.", + "type": "boolean" + }, + "externalPaymentPermissions": { + "description": "Only returned if the `kind` is `externalPayment`. Permissions over the external payment.", + "allOf": [ + { + "$ref": "#/components/schemas/ExternalPaymentPermissions" + } + ] + }, + "toPrincipalType": { + "description": "Only returned if the `kind` is `externalPayment`. Is the user identification method for this external payment (for example, e-mail or mobile phone).", + "allOf": [ + { + "$ref": "#/components/schemas/PrincipalType" + } + ] + }, + "toPrincipalValue": { + "description": "Only returned if the `kind` is `externalPayment`. Is the user identification value for this external payment (for example, the e-mail or mobile phone values).", + "type": "string" + }, + "payee": { + "description": "Only returned if the `kind` is `ticket` and the ticket status is `open`. Is user that created the ticket.", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "payerPrincipal": { + "description": "Only returned if the `kind` is `ticket`, the ticket status is `open` and there is a fixed payer. Is the principal (for example, login name or e-mail) which can be used to login the user, so he can accept the ticket.", + "type": "string" + }, + "payer": { + "description": "Only returned if the `kind` is `ticket` and the ticket status is `open`. Is the fixed payer user, if any.", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "approveUrl": { + "description": "Only returned if the `kind` is `ticket` and `status` is `open`. The URL used by clients to approve the ticket.", + "type": "string" + }, + "cancelUrl": { + "description": "Only returned if the `kind` is `ticket`. The URL to redirect when canceling the ticket.", + "type": "string" + }, + "successUrl": { + "description": "Only returned if the `kind` is `ticket`. The URL to redirect after successfully accepting a ticket", + "type": "string" + }, + "preview": { + "description": "Only returned if the `kind` is `ticket` and the ticket can be accepted. Is the payment preview if accepting the ticket. The preview will never contain a confirmation password input, because this object already contains it on the `confirmationPasswordInput` property, neither a payment to be sent back, as this payment is supposed to be confirmed by accepting the ticket. Also, the preview's currency is never sent, as it is the same one of the ticket.", + "allOf": [ + { + "$ref": "#/components/schemas/PaymentPreview" + } + ] + }, + "boughtVouchers": { + "description": "Only returned if the `kind` is `payment` and the payment was done to buy vouchers.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Voucher" + } + }, + "voucherTransaction": { + "description": "Only returned if the `kind` is `payment` and the payment was done to due to a voucher transaction (redeem or top-up).", + "allOf": [ + { + "$ref": "#/components/schemas/VoucherTransactionResult" + } + ] + }, + "usersWhichCanAddToContacts": { + "$ref": "#/components/schemas/TransactionSubjectsEnum" + }, + "usersWhichCanViewProfile": { + "$ref": "#/components/schemas/TransactionSubjectsEnum" + }, + "authorizationType": { + "$ref": "#/components/schemas/TransactionAuthorizationTypeEnum" + }, + "scheduledPaymentStatus": { + "$ref": "#/components/schemas/ScheduledPaymentStatusEnum" + }, + "recurringPaymentStatus": { + "$ref": "#/components/schemas/RecurringPaymentStatusEnum" + }, + "paymentRequestStatus": { + "$ref": "#/components/schemas/PaymentRequestStatusEnum" + }, + "externalPaymentStatus": { + "$ref": "#/components/schemas/ExternalPaymentStatusEnum" + }, + "ticketStatus": { + "$ref": "#/components/schemas/TicketStatusEnum" + }, + "exportFormats": { + "description": "The formats which the data can be exported. Not returned if this `TransactionView` is already in a `TransferView`.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExportFormat" + } + }, + "feedback": { + "description": "The payment feedback ()if any). Only returned if the `kind` is either `payment`, `scheduledPayment` or `recurringPayment` and the transaction between users.", + "allOf": [ + { + "$ref": "#/components/schemas/PaymentFeedback" + } + ] + }, + "feedbackPermissions": { + "description": "Permissions the authenticated user has over this payment regarding feedback. Only returned if the `kind` is either `payment`, `scheduledPayment` or `recurringPayment` and is a user-to.user payment.", + "allOf": [ + { + "$ref": "#/components/schemas/PaymentFeedbacksPermissions" + } + ] + }, + "feesOnAuthorization": { + "description": "Only returned for direct payments which are in pending authorization status. Contains the (visible) transfer fees that would be triggered once the payment is authorized", + "allOf": [ + { + "$ref": "#/components/schemas/TransferFeesPreview" + } + ] + }, + "originalTransfer": { + "description": "Starting with Cyclos 4.16, chargebacks are only at transfer level, no transaction of kind chargeback exist anymore.", + "deprecated": true, + "x-remove-version": 4.18, + "allOf": [ + { + "$ref": "#/components/schemas/Transfer" + } + ] + }, + "chargebackTransfer": { + "description": "Starting with Cyclos 4.16, chargebacks are only at transfer level, no transaction of kind chargeback exist anymore.", + "deprecated": true, + "x-remove-version": 4.18, + "allOf": [ + { + "$ref": "#/components/schemas/Transfer" + } + ] + } + } + } + ] + }, + "Transfer": { + "description": "Reference to a balance transfer between accounts", + "allOf": [ + { + "$ref": "#/components/schemas/Trans" + }, + { + "type": "object", + "properties": { + "kind": { + "$ref": "#/components/schemas/TransferKind" + }, + "statuses": { + "description": "Contains the current status for each status flow this transfer has", + "type": "array", + "items": { + "$ref": "#/components/schemas/TransferStatus" + } + } + } + } + ] + }, + "TransferDataForSearch": { + "description": "Contains data for searching transfers over multiple accounts", + "allOf": [ + { + "$ref": "#/components/schemas/BaseTransferDataForSearch" + }, + { + "type": "object", + "properties": { + "accountTypes": { + "description": "References for the account types", + "type": "array", + "items": { + "$ref": "#/components/schemas/AccountType" + } + }, + "query": { + "description": "Default query filters for the general transfers search", + "allOf": [ + { + "$ref": "#/components/schemas/TransferQueryFilters" + } + ] + }, + "currencies": { + "deprecated": true, + "x-remove-version": 4.18, + "description": "The currencies are already sent with account types. Use `accountTypes.currency` instead.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Currency" + } + } + } + } + ] + }, + "TransferDetailed": { + "description": "More detailed information on a transfer.", + "allOf": [ + { + "$ref": "#/components/schemas/Transfer" + }, + { + "type": "object", + "properties": { + "parent": { + "description": "Reference to the parent transfer that generated this one, if any. When returned, will never have `parent` nor `children`.", + "allOf": [ + { + "$ref": "#/components/schemas/TransferDetailed" + } + ] + }, + "children": { + "description": "Reference to the transfers generated by this one, if any. When returned, will never have `parent` nor `children`.", + "type": "array", + "items": { + "$ref": "#/components/schemas/TransferDetailed" + } + }, + "transferFee": { + "description": "Reference to the transfer fee which generated this transfer. Only returned if `kind` is `transferFee` and logged-in as an administrator.", + "allOf": [ + { + "$ref": "#/components/schemas/EntityReference" + } + ] + }, + "accountFee": { + "description": "Reference to the account fee which generated this transfer. Only returned if `kind` is `accountFee` and logged-in as an administrator.", + "allOf": [ + { + "$ref": "#/components/schemas/EntityReference" + } + ] + }, + "installment": { + "description": "Reference to the installment which triggered this transfer. Only returned if `kind` is `installment`.", + "allOf": [ + { + "$ref": "#/components/schemas/Installment" + } + ] + }, + "chargebackOf": { + "description": "Reference to the transfer that this transfer has charged back. Only returned if `kind` is `chargeback`.", + "allOf": [ + { + "$ref": "#/components/schemas/Transfer" + } + ] + }, + "chargedBackBy": { + "description": "Reference to the transfer that has charged back this transfer. Only returned if this transfer has been charged back.", + "allOf": [ + { + "$ref": "#/components/schemas/Transfer" + } + ] + }, + "description": { + "description": "The transfer description. Only returned for transfers whose types are generated. Otherwise, the description, if any, should be obtained from `transaction.description`.", + "type": "string" + }, + "ARate": { + "description": "The balance aging counter", + "type": "string", + "format": "number" + }, + "DRate": { + "description": "The balance maturity", + "type": "string", + "format": "number" + } + } + } + ] + }, + "TransferFeePreview": { + "description": "Preview of a transfer fee in case a payment is confirmed", + "type": "object", + "properties": { + "fee": { + "description": "The transfer fee", + "allOf": [ + { + "$ref": "#/components/schemas/EntityReference" + } + ] + }, + "amount": { + "description": "The transfer fee amout", + "type": "string", + "format": "number" + }, + "currency": { + "description": "The transfer fee currency", + "allOf": [ + { + "$ref": "#/components/schemas/Currency" + } + ] + }, + "from": { + "description": "The account from which funds will be transferred", + "allOf": [ + { + "$ref": "#/components/schemas/AccountWithOwner" + } + ] + }, + "to": { + "description": "The account to which funds will be transferred", + "allOf": [ + { + "$ref": "#/components/schemas/AccountWithOwner" + } + ] + }, + "type": { + "description": "The payment type of the generated fee", + "allOf": [ + { + "$ref": "#/components/schemas/TransferType" + } + ] + } + } + }, + "TransferFeesPreview": { + "description": "Preview of applied fees", + "type": "object", + "properties": { + "mainAmount": { + "description": "This reflects the new transaction amount. Depending on the configured fees, it could happen that the fee amount is deducted from transaction amount. If no fees deduct, it will be the same as transaction amount. E.g: payment from A to B by 100 units with two fees: 10 units deducted from payment amount and other of 15 not deducted. Then the `totalAmount` will be 115, 90 for the `mainAmount`, 10 for the first fee and 15 for the other fee.", + "type": "string", + "format": "number" + }, + "totalAmount": { + "description": "Indicates the total amount to be paid, including fees.", + "type": "string", + "format": "number" + }, + "fees": { + "description": "Only returned for direct payments. Contains the fees that would be paid by the payer if the payment is confirmed.", + "type": "array", + "items": { + "$ref": "#/components/schemas/TransferFeePreview" + } + } + } + }, + "TransferFilter": { + "description": "Reference to a transfer filter", + "allOf": [ + { + "$ref": "#/components/schemas/InternalNamedEntity" + }, + { + "type": "object", + "properties": { + "accountType": { + "description": "Reference to the account type", + "allOf": [ + { + "$ref": "#/components/schemas/EntityReference" + } + ] + } + } + } + ] + }, + "TransferQueryFilters": { + "description": "Query filters for transfers", + "allOf": [ + { + "$ref": "#/components/schemas/BaseTransferQueryFilters" + }, + { + "type": "object", + "properties": { + "currencies": { + "description": "Either ids or internal names of the currency", + "type": "array", + "items": { + "type": "string" + } + }, + "fromAccountTypes": { + "description": "Either ids or internal names of the origin account type", + "type": "array", + "items": { + "type": "string" + } + }, + "toAccountTypes": { + "description": "Either ids or internal names of the destination account type", + "type": "array", + "items": { + "type": "string" + } + } + } + } + ] + }, + "TransferResult": { + "description": "Result from searching transfers", + "allOf": [ + { + "$ref": "#/components/schemas/Transfer" + }, + { + "type": "object", + "properties": { + "fromName": { + "description": "The custom name for the debited account. Only returned if a custom name was given when performing the payment.", + "type": "string" + }, + "toName": { + "description": "The custom name for the credited account. Only returned if a custom name was given when performing the payment.", + "type": "string" + }, + "customValues": { + "type": "object", + "description": "Holds the values for custom fields, keyed by field internal name or id. The format of the value depends on the custom field type. Example: `{..., \"customValues\": {\"gender\": \"male\", \"birthDate\": \"1980-10-27\"}}`", + "additionalProperties": { + "type": "string" + } + } + } + } + ] + }, + "TransferStatus": { + "description": "Reference to a status and its flow", + "allOf": [ + { + "$ref": "#/components/schemas/InternalNamedEntity" + }, + { + "type": "object", + "properties": { + "flow": { + "description": "The status flow", + "allOf": [ + { + "$ref": "#/components/schemas/EntityReference" + } + ] + } + } + } + ] + }, + "TransferStatusFlow": { + "description": "A transfer status flow determines a status a transfer may have. For each flow the transfer participates (can be multiple) the transfer will have a status. The transition between states is also defined on the flow.", + "allOf": [ + { + "$ref": "#/components/schemas/InternalNamedEntity" + }, + { + "type": "object", + "properties": { + "statuses": { + "description": "All statuses this flow has", + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityReference" + } + } + } + } + ] + }, + "TransferStatusFlowForTransferView": { + "description": "Contains other data for a transfer status flow when viewing a transfer.", + "allOf": [ + { + "$ref": "#/components/schemas/InternalNamedEntity" + }, + { + "type": "object", + "properties": { + "canManage": { + "description": "Can this status flow be managed by the authenticated user?", + "type": "boolean" + }, + "log": { + "description": "A log of status changes for this flow", + "type": "array", + "items": { + "$ref": "#/components/schemas/TransferStatusLog" + } + } + } + } + ] + }, + "TransferStatusLog": { + "description": "Details of a change that took place in a transfer status.", + "allOf": [ + { + "$ref": "#/components/schemas/Entity" + }, + { + "type": "object", + "properties": { + "by": { + "description": "The user that performed the change", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "date": { + "description": "The date / time the action was performed", + "type": "string", + "format": "date-time" + }, + "status": { + "description": "The new status", + "allOf": [ + { + "$ref": "#/components/schemas/EntityReference" + } + ] + }, + "comments": { + "description": "Comments provided by the user which performed the change", + "type": "string" + } + } + } + ] + }, + "TransferType": { + "description": "Reference to a transfer type", + "allOf": [ + { + "$ref": "#/components/schemas/InternalNamedEntity" + }, + { + "type": "object", + "properties": { + "from": { + "description": "Reference to the source account type", + "allOf": [ + { + "$ref": "#/components/schemas/EntityReference" + } + ] + }, + "to": { + "description": "Reference to the destination account type", + "allOf": [ + { + "$ref": "#/components/schemas/EntityReference" + } + ] + } + } + } + ] + }, + "TransferTypeWithCurrency": { + "description": "A transfer type with currency", + "allOf": [ + { + "$ref": "#/components/schemas/TransferType" + }, + { + "type": "object", + "properties": { + "currency": { + "$ref": "#/components/schemas/Currency" + } + } + } + ] + }, + "TransferView": { + "description": "Details about a balance transfer between accounts. The `confirmationPasswordInput` property is not returned if this `TransferView` is already in a `TransactionView`.", + "allOf": [ + { + "$ref": "#/components/schemas/TransferDetailed" + }, + { + "type": "object", + "properties": { + "transaction": { + "description": "If this balance transfer was originated from a transaction (like a payment or scheduled payment), contains the reference to this transaction. Not returned if this `TransferView` is already in a `TransactionView`.", + "allOf": [ + { + "$ref": "#/components/schemas/TransactionView" + } + ] + }, + "statusFlows": { + "description": "List with each status this transfer has, with additional information, such as the flow and the log", + "type": "array", + "items": { + "$ref": "#/components/schemas/TransferStatusFlowForTransferView" + } + }, + "canChargeback": { + "description": "Can the authenticated user chargeback this transfer?", + "type": "boolean" + }, + "operations": { + "description": "The list of custom operations the logged user can run over this transfer", + "type": "array", + "items": { + "$ref": "#/components/schemas/Operation" + } + }, + "confirmationPasswordInput": { + "description": "If a confirmation password is used, contains the definitions on how to request that password from the user. This confirmation password is required when performing sensible actions. Sometimes this is dynamic, for example, the confirmation might be configured to be used only once per session, or operations like payments may have a limit per day to be without confirmation (pinless).", + "allOf": [ + { + "$ref": "#/components/schemas/PasswordInput" + } + ] + }, + "usersWhichCanAddToContacts": { + "deprecated": true, + "x-remove-version": 4.18, + "description": "Use `transaction.usersWhichCanAddToContacts` instead.\n\n\nDefines which of the users involved in the transaction can be added as a contact.", + "$ref": "#/components/schemas/TransactionSubjectsEnum" + }, + "usersWhichCanViewProfile": { + "deprecated": true, + "x-remove-version": 4.18, + "description": "Use `transaction.usersWhichCanViewProfile` instead.\n\n\nDefines for which of the users involved in the transaction the profile can be viewed.", + "$ref": "#/components/schemas/TransactionSubjectsEnum" + }, + "exportFormats": { + "description": "The formats which the data can be exported Not returned if this `TransferView` is already in a `TransactionView`.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExportFormat" + } + } + } + } + ] + }, + "TranslatableUIElementWithContent": { + "description": "Definition of a persistent translatable entity which has a version, translation information and content", + "allOf": [ + { + "$ref": "#/components/schemas/VersionedEntity" + }, + { + "type": "object", + "properties": { + "dataTranslationId": { + "type": "string", + "description": "The data translation identifier." + }, + "dataTranslationVersion": { + "type": "integer", + "description": "The data translation version." + }, + "content": { + "type": "string", + "description": "The translated content." + }, + "contentHash": { + "type": "string", + "description": "SHA-256 generated from the `content`." + } + } + } + ] + }, + "UIElementWithContent": { + "description": "Contains definitions for a UI element that has a content", + "allOf": [ + { + "$ref": "#/components/schemas/VersionedEntity" + }, + { + "type": "object", + "properties": { + "content": { + "description": "The content of this element", + "type": "string" + }, + "contentHash": { + "type": "string", + "description": "SHA-256 generated from the `content`." + } + } + } + ] + }, + "UnauthorizedError": { + "description": "Error returned when a HTTP status code 401 occurs", + "type": "object", + "properties": { + "missingLoginConfirmationCredentials": { + "description": "If a user logs in and is required to confirm the login with a credential, this array is the credentials the user can use to confirm the login, but don't have any", + "type": "array", + "items": { + "$ref": "#/components/schemas/CredentialTypeEnum" + } + }, + "missingLoginConfirmationPasswordType": { + "description": "If `missingLoginConfirmationPasswordType` contains `password`, is a reference to the missing password type.", + "allOf": [ + { + "$ref": "#/components/schemas/PasswordType" + } + ] + }, + "invalidDeviceConfirmation": { + "description": "The result associated to an invalid device confrmation. May only returned when `code` is `login` and the login was performed with a trusted device.", + "allOf": [ + { + "$ref": "#/components/schemas/InvalidDeviceConfirmationEnum" + } + ] + }, + "code": { + "$ref": "#/components/schemas/UnauthorizedErrorCode" + }, + "userStatus": { + "description": "May only returned when `code` is `login`.", + "allOf": [ + { + "$ref": "#/components/schemas/UserStatusEnum" + } + ] + }, + "passwordStatus": { + "description": "May only returned when `code` is `login`.", + "allOf": [ + { + "$ref": "#/components/schemas/PasswordStatusEnum" + } + ] + }, + "error": { + "description": "Is the OAuth2 / OpenID Connect required error message. Is only returned when `code` is `invalidAccessToken`.", + "type": "string" + }, + "missingSecondaryPassword": { + "allOf": [ + { + "$ref": "#/components/schemas/PasswordType" + } + ], + "deprecated": true, + "x-remove-version": 4.18, + "description": "Use `missingLoginConfirmationPasswordType` instead." + }, + "secondaryDeviceAllowed": { + "type": "boolean", + "deprecated": true, + "x-remove-version": 4.18, + "description": "Use `missingLoginConfirmationCredentials` instead, which should contain `device`." + } + } + }, + "UnavailableError": { + "description": "Error returned when some required service is unavailable", + "type": "object", + "properties": { + "code": { + "$ref": "#/components/schemas/UnavailableErrorCode" + }, + "smsStatus": { + "description": "Only if code is `smsSending`", + "allOf": [ + { + "$ref": "#/components/schemas/OutboundSmsStatusEnum" + } + ] + } + } + }, + "UpdateFcmTokenParams": { + "description": "Parameters for updating a FCM token.", + "type": "object", + "properties": { + "oldToken": { + "description": "The FCM registration token to be updated", + "type": "string" + }, + "newToken": { + "description": "The new FCM registration token", + "type": "string" + } + } + }, + "User": { + "description": "Basic representation of a user (both admin and regular)", + "allOf": [ + { + "$ref": "#/components/schemas/Entity" + }, + { + "type": "object", + "properties": { + "display": { + "type": "string", + "description": "Contains the formatting of the user according to the configuration. When this object is in the search result, this is only returned if no profile fields are marked to return in user list." + }, + "image": { + "description": "The primary user profile image", + "allOf": [ + { + "$ref": "#/components/schemas/Image" + } + ] + }, + "user": { + "description": "Is the operator owner, only returned if this user represents an operator. Even so, in some cases, like searching for operators of a specific user, this field may not be returned.", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "locator": { + "description": "Only returned if this user was located from a string value (login name, email, phone, account number, etc). Is the raw string value.", + "type": "string" + }, + "locatorPrincipal": { + "description": "Only returned if this user was located from a string value (login name, email, phone, account number, etc). Is the detailed locator pricipal.", + "allOf": [ + { + "$ref": "#/components/schemas/Principal" + } + ] + } + } + } + ] + }, + "UserAccountBalanceLimitsListData": { + "description": "Data regarding the lower and upper limits of a user's accounts.", + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/User" + }, + "accountLimits": { + "description": "The balance limits for each account", + "type": "array", + "items": { + "$ref": "#/components/schemas/AccountBalanceLimitsResult" + } + } + } + }, + "UserAccountPaymentLimitsListData": { + "description": "Data regarding the payment, daily, weekly and monthly amount limits of a user accounts.", + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/User" + }, + "accountLimits": { + "description": "The payment limits for each account", + "type": "array", + "items": { + "$ref": "#/components/schemas/AccountPaymentLimitsResult" + } + } + } + }, + "UserAccountVisibility": { + "description": "References an account type, indicating whether it is allowed to be hidden by users, and whether it is currently visible", + "allOf": [ + { + "$ref": "#/components/schemas/AccountWithCurrency" + }, + { + "type": "object", + "properties": { + "canHide": { + "description": "Indicates Whether this account can be hidden by users", + "type": "boolean" + }, + "visible": { + "description": "Indicates Whether this account is currently visible", + "type": "boolean" + } + } + } + ] + }, + "UserAccountVisibilitySettingsPermissions": { + "description": "Permissions regarding the account visibility settings of a given user", + "type": "object", + "properties": { + "view": { + "description": "Can the authenticated user view the account visibility settings?", + "type": "boolean" + } + } + }, + "UserAdInterestsListData": { + "description": "Contains, besides the user's advertisement interests, additional data for its management", + "type": "object", + "properties": { + "user": { + "description": "The user which owns this advertisement interests", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "canEdit": { + "description": "Indicates whether the advertisement interests can be edited by the authenticated user", + "type": "boolean" + }, + "canCreate": { + "description": "Indicates whether the authenticated user can create a new ad interest", + "type": "boolean" + }, + "adInterests": { + "description": "The advertisement interests list", + "type": "array", + "items": { + "$ref": "#/components/schemas/AdInterest" + } + } + } + }, + "UserAddressesListData": { + "description": "Contains, besides the user's addresses, additional data for its management", + "type": "object", + "properties": { + "user": { + "description": "The user which owns this addresses", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "canEdit": { + "description": "Indicates whether the addresses can be edited by the authenticated user", + "type": "boolean" + }, + "canCreate": { + "description": "Indicates whether the authenticated user can create a new address for this user", + "type": "boolean" + }, + "enablePrivacy": { + "description": "Indicates whether address privacy can be used for this user", + "type": "boolean" + }, + "maxAddresses": { + "description": "Indicates the maximum number of addresses the user can have", + "type": "integer" + }, + "addresses": { + "description": "The address list", + "type": "array", + "items": { + "$ref": "#/components/schemas/AddressResult" + } + }, + "availability": { + "$ref": "#/components/schemas/AvailabilityEnum" + } + } + }, + "UserAdsDataForSearch": { + "description": "Data for a search of advertisements of a specific user", + "allOf": [ + { + "$ref": "#/components/schemas/BaseAdDataForSearch" + }, + { + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/User" + }, + "createNew": { + "description": "Indicates whether the authenticated user can create new advertisements for this user", + "type": "boolean" + }, + "maxAds": { + "description": "The maximum number of advertisements this user can have", + "type": "integer" + }, + "requiresAuthorization": { + "description": "Does advertisements of this user requires authorization to be published for other users to see?", + "type": "boolean" + }, + "query": { + "description": "Default query filters to search advertisements of a specific user", + "allOf": [ + { + "$ref": "#/components/schemas/UserAdsQueryFilters" + } + ] + } + } + } + ] + }, + "UserAdsQueryFilters": { + "description": "Definitions for search filters of advertisements of a given owner search", + "allOf": [ + { + "$ref": "#/components/schemas/BasicAdQueryFilters" + }, + { + "type": "object" + } + ] + }, + "UserAgreementsData": { + "description": "Information of agreements related to a user", + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/User" + }, + "agreements": { + "description": "All agreements enabled for the user, both required and optional", + "type": "array", + "items": { + "$ref": "#/components/schemas/Agreement" + } + }, + "accepted": { + "description": "Keyed by agreement id, contains details of each accepted agreement. Agreements whose id isn't a key in this field weren't accepted.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/AcceptedAgreement" + } + }, + "canEdit": { + "description": "Indicates whether the authenticated user can manage the optional agreements for this user", + "type": "boolean" + }, + "history": { + "description": "The history log for the agreements that were accepted, or optional agreements that were no longer accepted.", + "type": "array", + "items": { + "$ref": "#/components/schemas/AgreementLog" + } + } + } + }, + "UserAlert": { + "description": "An alert for a specific user", + "allOf": [ + { + "$ref": "#/components/schemas/Alert" + }, + { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/UserAlertTypeEnum" + }, + "user": { + "$ref": "#/components/schemas/User" + } + } + } + ] + }, + "UserAlertDataForSearch": { + "description": "Contains data for searching user alerts", + "type": "object", + "properties": { + "groups": { + "description": "The groups the authenticated user can use to filter users.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Group" + } + }, + "query": { + "$ref": "#/components/schemas/UserAlertQueryFilters" + } + } + }, + "UserAlertQueryFilters": { + "description": "Query filters for searching user alerts", + "allOf": [ + { + "$ref": "#/components/schemas/QueryFilters" + }, + { + "type": "object", + "properties": { + "datePeriod": { + "description": "The minimum / maximum alert date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "types": { + "description": "The types of user alerts to search", + "type": "array", + "items": { + "$ref": "#/components/schemas/UserAlertTypeEnum" + } + }, + "groups": { + "description": "Either the ids or internal names of the alert user", + "type": "array", + "items": { + "type": "string" + } + }, + "brokers": { + "description": "Either the ids or identification methods the alert user's brokers", + "type": "array", + "items": { + "type": "string" + } + }, + "user": { + "description": "Either the id or identifier of the alert user", + "type": "string" + } + } + } + ] + }, + "UserAuth": { + "description": "Contains information returned after logging in an user.", + "allOf": [ + { + "$ref": "#/components/schemas/BaseAuth" + }, + { + "type": "object", + "properties": { + "configuration": { + "description": "The current configuration", + "allOf": [ + { + "$ref": "#/components/schemas/VersionedEntityReference" + } + ] + }, + "group": { + "$ref": "#/components/schemas/Group" + } + } + } + ] + }, + "UserAuthorizedPaymentsPermissions": { + "description": "Permissions for authorized payments over a user", + "type": "object", + "properties": { + "view": { + "description": "Can the authenticated administrator or broker view authorized payments of the given user?", + "type": "boolean" + } + } + }, + "UserBalanceLimitsPermissions": { + "description": "Permissions regarding the account balance limits of a given user", + "type": "object", + "properties": { + "view": { + "description": "Can the authenticated user view the balance limits of the user?", + "type": "boolean" + } + } + }, + "UserBaseAdPermissions": { + "description": "Permissions over advertisements of other users", + "type": "object", + "properties": { + "view": { + "description": "Can view advertisements of others?", + "type": "boolean" + }, + "manage": { + "description": "Can manage advertisements of others? Only returned if there is an authenticated user.", + "type": "boolean" + }, + "viewPending": { + "description": "Can view pending advertisements of others? Only returned if there is an authenticated manager with permissions", + "type": "boolean" + }, + "managePending": { + "description": "Can manage pending advertisements of others? Only returned if there is an authenticated manager with permissions", + "type": "boolean" + }, + "purchase": { + "description": "Can purchase webshop ads? Only returned if there is an authenticated user. It is false for simple ads.", + "type": "boolean" + } + } + }, + "UserBasicData": { + "description": "Contains properties shared by both UserDataForNew and UserDataForEdit", + "type": "object", + "properties": { + "emailRequired": { + "description": "Indicates whether the e-mail is required", + "type": "boolean" + }, + "enablePrivacy": { + "description": "Indicates whether privacy over profile fields can be controlled for this user.", + "type": "boolean" + }, + "profileFieldActions": { + "description": "An object, keyed by profile field internal name (either one of the basic profile fields or custom fields), containing other objects that defines the allowed actions over these profile fields", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ProfileFieldActions" + } + }, + "customFields": { + "description": "The available custom field definitions", + "type": "array", + "items": { + "$ref": "#/components/schemas/UserCustomFieldDetailed" + } + }, + "binaryValues": { + "description": "Holds the current values for file / image custom fields as lists of `StoredFile`s / `Image`s.", + "allOf": [ + { + "$ref": "#/components/schemas/CustomFieldBinaryValues" + } + ] + } + } + }, + "UserBrokeringPermissions": { + "description": "Permissions regarding the user's brokers and brokered users", + "type": "object", + "properties": { + "viewBrokers": { + "description": "Can the authenticated user view the brokers of this user?", + "type": "boolean" + }, + "viewMembers": { + "description": "Can the authenticated user view the assigned members of this broker?", + "type": "boolean" + } + } + }, + "UserBrokersData": { + "description": "Contains the current user brokers, as well as other information", + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/User" + }, + "brokers": { + "description": "Brokers currently assigned, together with additional information", + "type": "array", + "items": { + "$ref": "#/components/schemas/Brokering" + } + }, + "editable": { + "description": "Can the authenticated user manage brokers of this user?", + "type": "boolean" + }, + "history": { + "description": "Contains the history entries for all brokering changes", + "type": "array", + "items": { + "$ref": "#/components/schemas/BrokeringLog" + } + } + } + }, + "UserClientTypePermissions": { + "description": "Contains details of an access client, together with permissions over it", + "allOf": [ + { + "$ref": "#/components/schemas/InternalNamedEntity" + }, + { + "type": "object", + "properties": { + "canManage": { + "description": "Can the authenticated user manage access clients of this type?", + "type": "boolean" + }, + "canCreateNew": { + "description": "Can the authenticated user create an unassigned access client of this type and user? Maybe the maximum allowed has been reached or the type doesn't allow manual creation. Later on, the client must be manually activated using an activation code.", + "type": "boolean" + }, + "canActivateNew": { + "description": "Can the authenticated user create and activate a new access client of this type and user? Maybe the maximum allowed has been reached.", + "type": "boolean" + }, + "hasUnassigned": { + "description": "Is there at least one access client for this type and user which is in the unassigned status?", + "type": "boolean" + } + } + } + ] + }, + "UserContactInfosListData": { + "description": "Contains, besides the user's additional contact informations, data for managing them", + "type": "object", + "properties": { + "user": { + "description": "The user which owns this contacts", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "canEdit": { + "description": "Indicates whether the additional contact informations can be edited by the authenticated user", + "type": "boolean" + }, + "canCreate": { + "description": "Indicates whether new additional contact informations can be created by the authenticated user", + "type": "boolean" + }, + "maxContactInfos": { + "description": "Indicates the maximum number of additional contact informations the user can have", + "type": "integer" + }, + "customFields": { + "description": "The list of additional contact informations custom fields", + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldDetailed" + } + }, + "contactInfos": { + "description": "The additional contact information list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ContactInfoResult" + } + }, + "availability": { + "$ref": "#/components/schemas/AvailabilityEnum" + } + } + }, + "UserContactPermissions": { + "description": "Permissions regarding the contact list", + "type": "object", + "properties": { + "add": { + "description": "Can the current user be added to the contact list?", + "type": "boolean" + }, + "remove": { + "description": "Can the current user be removed from the contact list?", + "type": "boolean" + } + } + }, + "UserCustomField": { + "description": "Adds to `CustomField` some user-specific definitions", + "allOf": [ + { + "$ref": "#/components/schemas/CustomField" + }, + { + "type": "object", + "properties": { + "section": { + "description": "The user fields section", + "allOf": [ + { + "$ref": "#/components/schemas/FieldSection" + } + ] + } + } + } + ] + }, + "UserCustomFieldDetailed": { + "description": "Adds to `CustomFieldDetailed` some user-specific definitions", + "allOf": [ + { + "$ref": "#/components/schemas/CustomFieldDetailed" + }, + { + "type": "object", + "properties": { + "hiddenByDefault": { + "description": "This flag determine whether this field is hidden or not by default", + "type": "boolean" + }, + "section": { + "description": "The fields section", + "allOf": [ + { + "$ref": "#/components/schemas/FieldSection" + } + ] + } + } + } + ] + }, + "UserCustomFieldValue": { + "description": "Contains the custom field value information, plus the hidden flag", + "allOf": [ + { + "$ref": "#/components/schemas/BaseCustomFieldValue" + }, + { + "type": "object", + "properties": { + "hidden": { + "type": "boolean", + "description": "Whether this field is hidden for other users" + }, + "field": { + "description": "The custom field reference", + "allOf": [ + { + "$ref": "#/components/schemas/UserCustomField" + } + ] + } + } + } + ] + }, + "UserDataForEdit": { + "description": "Contains data used to edit a user profile", + "allOf": [ + { + "$ref": "#/components/schemas/UserBasicData" + }, + { + "type": "object", + "properties": { + "nameLabel": { + "description": "The label used for the name of users", + "type": "string" + }, + "details": { + "description": "Additional details to the user being edited", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "user": { + "description": "The object that can be altered and posted back to save the user / operator", + "allOf": [ + { + "$ref": "#/components/schemas/UserEdit" + } + ] + }, + "role": { + "$ref": "#/components/schemas/RoleEnum" + }, + "emailPendingValidation": { + "description": "The new e-mail address, which is still pending validation. Is only returned when e-mail validation is enabled for edit profile, and the user has changed the e-mail address.", + "type": "string" + }, + "confirmationPasswordInput": { + "description": "If a confirmation password is used, contains the definitions on how to request that password from the user. This confirmation password is required when performing sensible actions. Sometimes this is dynamic, for example, the confirmation might be configured to be used only once per session, or operations like payments may have a limit per day to be without confirmation (pinless).", + "allOf": [ + { + "$ref": "#/components/schemas/PasswordInput" + } + ] + } + } + } + ] + }, + "UserDataForMap": { + "description": "Contains configuration data for the user directory (map)", + "allOf": [ + { + "$ref": "#/components/schemas/UserDataForSearch" + }, + { + "type": "object", + "properties": { + "mapDirectoryField": { + "description": "Internal name of the custom field currently set as primary search filter for the user directory (map) search. When not returned (null) it is assumed that keywords should be the primary filter.", + "type": "string" + }, + "defaultMapLocation": { + "description": "The default location for the map to be displayed", + "allOf": [ + { + "$ref": "#/components/schemas/GeographicalCoordinate" + } + ] + }, + "defaultMapZoomMobile": { + "description": "The default map zoom level for mobile applications", + "type": "integer" + }, + "defaultMapZoomWeb": { + "description": "The default map zoom level for web applications", + "type": "integer" + } + } + } + ] + }, + "UserDataForNew": { + "description": "Contains data used to register a user", + "allOf": [ + { + "$ref": "#/components/schemas/BasicUserDataForNew" + }, + { + "type": "object", + "properties": { + "nameLabel": { + "description": "The label used for the name of users", + "type": "string" + }, + "group": { + "description": "Details of the registration group.", + "allOf": [ + { + "$ref": "#/components/schemas/GroupForRegistration" + } + ] + }, + "broker": { + "description": "When the user registration is requested with a broker, contains the broker details.", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "identityProviders": { + "description": "The identity providers available for registering in this group. Only returned for public registrations.", + "type": "array", + "items": { + "$ref": "#/components/schemas/IdentityProvider" + } + }, + "addressConfiguration": { + "$ref": "#/components/schemas/AddressConfigurationForUserProfile" + }, + "contactInfoConfiguration": { + "$ref": "#/components/schemas/ContactInfoConfigurationForUserProfile" + }, + "imageConfiguration": { + "$ref": "#/components/schemas/ImageConfigurationForUserProfile" + }, + "user": { + "description": "The object that can be altered and posted back to register the user", + "allOf": [ + { + "$ref": "#/components/schemas/UserNew" + } + ] + }, + "images": { + "description": "The images which are already assigned to the new user.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Image" + } + }, + "agreements": { + "description": "The agreements that needs to be accepted by the user to be able to register. Only returned for public registrations.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Agreement" + } + }, + "securityQuestions": { + "description": "If enabled in the server, are the possible security questions the user can use to set the answer.", + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityReference" + } + }, + "requireSecurityQuestion": { + "description": "Indicates whether the security question is required or not when enabled in the server.", + "type": "boolean" + }, + "nfcTokenTypes": { + "description": "The NFC token types the authenticated user can parsonalize tags for the user being registered", + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityReference" + } + }, + "captchaInput": { + "description": "The data for a captcha response if needed for registration, or null if no captcha is needed.", + "allOf": [ + { + "$ref": "#/components/schemas/CaptchaInput" + } + ] + }, + "captchaType": { + "deprecated": true, + "x-remove-version": 4.17, + "description": "Use `captchaInput.provider` instead.\nThe captcha provider used to requested a captcha for registration, or null if no captcha is needed.", + "allOf": [ + { + "$ref": "#/components/schemas/CaptchaProviderEnum" + } + ] + } + } + } + ] + }, + "UserDataForSearch": { + "description": "Contains data with the configuration for searching users", + "allOf": [ + { + "$ref": "#/components/schemas/BaseUserDataForSearch" + }, + { + "type": "object", + "properties": { + "broker": { + "description": "When a `broker` parameter was set when getting the data, contains the details of the broker", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "fieldsInList": { + "description": "The internal names of either basic or custom profile fields that are configured to be shown on the list. This actually defines the fields that will be loaded on the result. It is possible that no fields are configured to be returned on list. In this case, the result objects will have the 'display' property loaded with what is configured to be the user formatting field(s).", + "type": "array", + "items": { + "type": "string" + } + }, + "groupsForRegistration": { + "description": "Possible groups an administrator or broker can use to register users", + "type": "array", + "items": { + "$ref": "#/components/schemas/Group" + } + }, + "query": { + "description": "Default query filters to search users", + "allOf": [ + { + "$ref": "#/components/schemas/UserQueryFilters" + } + ] + }, + "statuses": { + "description": "The possible user statuses the authenticated user can use to filter the search. Only administrators or brokers over their members can filter by status (also depends on permissions)", + "type": "array", + "items": { + "$ref": "#/components/schemas/UserStatusEnum" + } + }, + "resultType": { + "description": "Indicates the type for customizable results like tiles, list, etc", + "allOf": [ + { + "$ref": "#/components/schemas/ResultTypeEnum" + } + ] + } + } + } + ] + }, + "UserDeliveryMethodsListData": { + "description": "Contains, besides the user's delivery methods, additional data for its management", + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/User" + }, + "canEdit": { + "description": "Indicates whether the delivery methods can be edited by the authenticated user", + "type": "boolean" + }, + "canCreate": { + "description": "Indicates whether the authenticated user can create a new delivery method this user", + "type": "boolean" + }, + "deliveryMethods": { + "description": "The delivery methods list", + "type": "array", + "items": { + "$ref": "#/components/schemas/DeliveryMethod" + } + } + } + }, + "UserDocuments": { + "description": "Data regarding the documents of a given user", + "type": "object", + "properties": { + "count": { + "description": "The number of documents for this user", + "type": "integer" + } + } + }, + "UserDocumentsPermissions": { + "description": "Permissions regarding the documents of a given user", + "type": "object", + "properties": { + "view": { + "description": "Can the authenticated user view the documents of this user?", + "type": "boolean" + } + } + }, + "UserEdit": { + "description": "Contains data used to edit a user / operator profile fields. Operators are always \"hidden\", so the `hiddenFields` property don't apply to them.", + "allOf": [ + { + "$ref": "#/components/schemas/UserManage" + }, + { + "type": "object", + "properties": { + "version": { + "type": "integer", + "description": "The version stamp for the current object, used for optimistic locking. When saving, the same version as previously received needs to be passed back. If no one else has saved the object, the version will match and the object will be updated. However, if someone other has saved the object, the version will no longer match, and an error will be raised. This is used to prevent multiple users (or processes) from updating the same object and unwilingly overridding the property values, leading to data loss." + } + } + } + ] + }, + "UserExternalPaymentsPermissions": { + "description": "Permissions for external payments over a user", + "type": "object", + "properties": { + "view": { + "description": "Can the authenticated administrator or broker view external payments of the given user?", + "type": "boolean" + }, + "performAsSelf": { + "description": "Only if authenticated as this user. Indicates whether an external payment can be performed.", + "type": "boolean" + }, + "performAsUser": { + "description": "Can the authenticated administrator or broker perform an external payment in behalf of the given user to other users?", + "type": "boolean" + } + } + }, + "UserFavoriteAdsListData": { + "description": "Contains data for favorite ads management", + "type": "object", + "properties": { + "user": { + "description": "The user which owns this favorite advertisments", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "canEdit": { + "description": "Indicates whether the advertisement favorites can be edited by the authenticated user", + "type": "boolean" + }, + "currencies": { + "description": "The currencies used to display a formatted price", + "type": "array", + "items": { + "$ref": "#/components/schemas/Currency" + } + } + } + }, + "UserGroupPermissions": { + "description": "Permissions regarding the group membership of a given user", + "type": "object", + "properties": { + "view": { + "description": "Can the authenticated user view the group membership of a given user?", + "type": "boolean" + } + } + }, + "UserIdentityProvider": { + "description": "A link between a user an an identity provider", + "allOf": [ + { + "$ref": "#/components/schemas/Entity" + }, + { + "type": "object", + "properties": { + "identityProvider": { + "$ref": "#/components/schemas/IdentityProvider" + }, + "status": { + "$ref": "#/components/schemas/UserIdentityProviderStatusEnum" + }, + "linkDate": { + "description": "The date the link was created. Only if `status` is `linked`.", + "type": "string", + "format": "date-time" + }, + "name": { + "description": "The display name of the user in the identity provider. Only if `status` is `linked`.", + "type": "string" + }, + "email": { + "description": "The e-mail name of the user in the identity provider Only if `status` is `linked` and if the provider has disclosed the user's e-mail.", + "type": "string" + } + } + } + ] + }, + "UserIdentityProvidersListData": { + "description": "Contains, besides the user's identity provider links, additional data for its management", + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/User" + }, + "canLink": { + "description": "Indicates whether a new identity provider can be linked to the user", + "type": "boolean" + }, + "canEdit": { + "description": "Indicates whether existing links can be edited", + "type": "boolean" + }, + "identityProviders": { + "description": "The identity provider links", + "type": "array", + "items": { + "$ref": "#/components/schemas/UserIdentityProvider" + } + } + } + }, + "UserIdentityProvidersPermissions": { + "description": "Permissions over the identity provider links", + "type": "object", + "properties": { + "view": { + "description": "Can view the relationships to identity providers?", + "type": "boolean" + } + } + }, + "UserImportsPermissions": { + "description": "Permissions over imports of a given user", + "type": "object", + "properties": { + "kinds": { + "description": "The import kinds the authenticated user can view over the givben user", + "type": "array", + "items": { + "$ref": "#/components/schemas/UserImportedFileKind" + } + } + } + }, + "UserLocale": { + "description": "Defines the user's language and region", + "allOf": [ + { + "$ref": "#/components/schemas/NamedEntity" + }, + { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Locale code used to specify user's language" + } + } + } + ] + }, + "UserManage": { + "x-abstract": true, + "description": "Contains the fields for either creating or modifying a user", + "allOf": [ + { + "$ref": "#/components/schemas/BasicUserManage" + }, + { + "type": "object", + "properties": { + "hiddenFields": { + "type": "array", + "items": { + "type": "string" + }, + "description": "An array with the internal names of either the basic or custom fields that should be hidden from other users. Currently the only basic profile field that can be hidden is email. Any other will be considered a custom field, and should be the same key as used in the 'customValues' property. Note that this is not related to the privacy setting, which uses the privacy controls, and are more general (not per field)." + } + } + } + ] + }, + "UserMarketplacePermissions": { + "description": "Permissions over a user marketplace", + "type": "object", + "properties": { + "simple": { + "description": "Permissions over simple advertisements", + "$ref": "#/components/schemas/UserBaseAdPermissions" + }, + "webshop": { + "description": "Permissions over webshop ads", + "$ref": "#/components/schemas/UserWebshopPermissions" + }, + "viewFavorites": { + "description": "Can view favorite ads? Only returned if there is an authenticated user.", + "type": "boolean" + }, + "viewInterests": { + "description": "Can view ad interests? Only returned if there is an authenticated user.", + "type": "boolean" + }, + "manageInterests": { + "description": "Can manage ad interests? Only returned if there is an authenticated user.", + "type": "boolean" + } + } + }, + "UserMessagesPermissions": { + "description": "Permissions regarding to the messaging of a given user", + "type": "object", + "properties": { + "send": { + "description": "Can the authenticated user send a message to a given user?", + "type": "boolean" + } + } + }, + "UserNew": { + "description": "Contains data used to register a user. All basic profile fields (full name, login name, e-mail, phones, addresses and image) can be enabled or disabled on Cyclos, via products. Also, the available custom fields and whether they can be hidden depend on the products the selected group has.", + "x-implements": "IBasicUserNew", + "allOf": [ + { + "$ref": "#/components/schemas/UserManage" + }, + { + "type": "object", + "properties": { + "group": { + "type": "string", + "description": "The initial user group" + }, + "broker": { + "type": "string", + "description": "Either the identifier or other identification value (login name, e-mail, etc) of the broker for the new user. Only allowed if logged-in as administrator with permission." + }, + "mobilePhones": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PhoneNew" + }, + "description": "Mobile phones to be registered together with the user" + }, + "landLinePhones": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PhoneNew" + }, + "description": "Land-line phones to be registered together with the user" + }, + "passwords": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PasswordRegistration" + }, + "description": "The initial passwords of the user" + }, + "skipActivationEmail": { + "type": "boolean", + "description": "When set to true, the activation e-mail is not sent to the registered user. Can only be used when an administrator / broker is registering a user, and ignored on public registrations (the e-mail is always sent on public registrations)." + }, + "identityProviderRequestId": { + "type": "string", + "description": "When using an [external identity provider](https://wiki4.cyclos.org/index.php/External_identity_providers), this is the request id used to complete the registration process after filling up the registration form." + }, + "addresses": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AddressNew" + }, + "description": "Addresses to be registered together with the user" + }, + "contactInfos": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ContactInfoNew" + }, + "description": "Additional contacts to be registered together with the user" + }, + "images": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The ids of previously uploaded user temporary images to be initially used as profile images" + }, + "captcha": { + "type": "object", + "description": "The captcha response is required on public registrations, and ignored when administrators / brokers register another user.", + "allOf": [ + { + "$ref": "#/components/schemas/CaptchaResponse" + } + ] + }, + "acceptAgreement": { + "type": "boolean", + "description": "When there are agreements that need to be accepted for registration, either this property should be set to `true`, indicating that all agreements are accepted, or the `accepteAgreements` array must be set indicating which ones are agreed." + }, + "acceptAgreements": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Either ids or internal names of agreements to accept. When there are agreements, either the `accepteAgreement` flag should be sent, indicating that all agreements are accepted, or this array should be sent indicating which agreements are accepted. All required agreements must be sent, or a validation error is returned. Optional agreements can be sent or not." + }, + "asMember": { + "type": "boolean", + "description": "Flag required only when the authenticated user is a broker, in that case we need to distingish between registering as member or broker. If true then the new user will be registered without a brokering relationship. Otherwise the authenticated user will be set as the broker of the new user." + }, + "securityQuestion": { + "type": "string", + "description": "If the server is configured to use security question, is the `internalName` of the question present in the result of `data-for-new`, in the `securityQuestions` property. Is optional and only used in public registration." + }, + "securityAnswer": { + "type": "string", + "description": "If a `securityQuestion` is informed, this is the answer. Required in this case. Only used in public registration." + }, + "nfcToken": { + "type": "object", + "description": "If not null then the given NFC token parameters will be used to personalize a tag for the user.", + "allOf": [ + { + "$ref": "#/components/schemas/NfcTokenWithChallengeParameter" + } + ] + }, + "inviteToken": { + "type": "string", + "description": "A token generated by sending an invitation for new users. When given, the e-mail will be pre-filled, and if the same e-mail address is used, it won't need to be validated, because the token was previously sent to that e-mail address. Also, if the link was sent by a broker, that broker will be immediately assigned to the the newly registered user. Only used for public registrations." + }, + "externalPaymentToken": { + "type": "string", + "description": "The payment token generated by sending a external payment for new users. When given, the e-mail will be filled and it won't need to be validated, because the payment identifier was previously sent to that e-mail address. Only used for public registrations." + }, + "userAgentId": { + "type": "string", + "description": "A stable client-side generated id, which will be used to identify the device from which the user is being registered. It will be used when a trusted device activation is requested, in case the activation comes from the same device and the user's email was verified, then an activation code would not be required. Only used for public registrations." + } + } + } + ] + }, + "UserNotificationSettingsPermissions": { + "description": "Permissions regarding the notification settings of a given user", + "type": "object", + "properties": { + "view": { + "description": "Can the authenticated user view the notification settings of a given user?", + "type": "boolean" + } + } + }, + "UserOperatorGroupsListData": { + "description": "Contains, besides the user's operator groups, additional data for their management", + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/User" + }, + "canEdit": { + "description": "Indicates whether the operator groups can be edited by the authenticated user", + "type": "boolean" + }, + "canCreate": { + "description": "Indicates whether the authenticated user can create a new operator groups for this user", + "type": "boolean" + }, + "operatorGroups": { + "description": "The operator groups list", + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityReference" + } + } + } + }, + "UserOperatorsDataForSearch": { + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/User" + }, + "canCreateNew": { + "description": "Indicates whether the authenticated user can create more operators for the specified user.", + "type": "boolean" + }, + "groups": { + "description": "The operator groups this user owns", + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityReference" + } + }, + "fieldsInList": { + "description": "The internal names of either basic or custom profile fields that are configured to be shown on the list. This actually defines the fields that will be loaded on the result. It is possible that no fields are configured to be returned on list. In this case, the result objects will have the 'display' property loaded with what is configured to be the user formatting field(s).", + "type": "array", + "items": { + "type": "string" + } + }, + "basicFields": { + "description": "The basic profile fields in the result list", + "type": "array", + "items": { + "$ref": "#/components/schemas/BasicProfileFieldInput" + } + }, + "customFields": { + "description": "The custom profile fields in the result list", + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldDetailed" + } + }, + "query": { + "description": "Default query filters to search a user's operators", + "allOf": [ + { + "$ref": "#/components/schemas/UserOperatorsQueryFilters" + } + ] + } + } + }, + "UserOperatorsPermissions": { + "description": "Permissions regarding the user's operators and operator groups", + "type": "object", + "properties": { + "viewOperators": { + "description": "Can the authenticated user view the operators of this user?", + "type": "boolean" + }, + "viewGroups": { + "description": "Can the authenticated user view the operator groups of this user?", + "type": "boolean" + } + } + }, + "UserOperatorsQueryFilters": { + "description": "Definitions for a user's operators search filters", + "allOf": [ + { + "$ref": "#/components/schemas/BasicOperatorQueryFilters" + }, + { + "type": "object", + "properties": { + "ignoreProfileFieldsInList": { + "type": "boolean", + "description": "When set to `true`, instead of returning users with corresponding profile fields set on list, will return them with `display`." + }, + "operatorGroups": { + "description": "An array of operator group ids", + "type": "array", + "items": { + "type": "string" + } + } + } + } + ] + }, + "UserOrderResult": { + "description": "Data of an order as returned on list associated to an user.", + "allOf": [ + { + "$ref": "#/components/schemas/OrderResult" + }, + { + "type": "object", + "properties": { + "relatedUser": { + "description": "The other related user, i.e if we're listing the sales of a user then it represents the buyer. Otherwise (purchases) the seller.", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + } + } + } + ] + }, + "UserPasswordsPermissions": { + "description": "Permissions over passwords of a given user", + "type": "object", + "properties": { + "manage": { + "description": "Can the authenticated administrator or broker manage the password(s) of the given user?", + "type": "boolean" + }, + "resetSecurityQuestion": { + "description": "Can the authenticated administrator or broker reset the user's security question, so that the user can set it again?", + "type": "boolean" + }, + "viewTotpSecret": { + "description": "Can the authenticated administrator or broker view the status of the user's TOTP secret?", + "type": "boolean" + } + } + }, + "UserPaymentFeedbacksPermissions": { + "description": "Permissions over payment feedbacks of an user", + "type": "object", + "properties": { + "view": { + "description": "Can view other payment feedback's references?", + "type": "boolean" + } + } + }, + "UserPaymentLimitsPermissions": { + "description": "Permissions regarding the account payment limits of a given user", + "type": "object", + "properties": { + "view": { + "description": "Can the authenticated user view the payment limits of the user?", + "type": "boolean" + } + } + }, + "UserPaymentPermissions": { + "description": "Permissions for payments regarding a user", + "type": "object", + "properties": { + "selfToSelf": { + "description": "Only if authenticated as this user. Indicates whether a self payment can be performed.", + "type": "boolean" + }, + "selfToSystem": { + "description": "Only if authenticated as this user. Indicates whether a payment to system can be performed.", + "type": "boolean" + }, + "selfToUser": { + "description": "Only if authenticated as this user. Indicates whether a payment to another user can be performed.", + "type": "boolean" + }, + "asUserToSelf": { + "description": "Can the authenticated administrator or broker perform a payment in behalf of this user to another account belonging to the same user?", + "type": "boolean" + }, + "asUserToSystem": { + "description": "Can the authenticated administrator or broker perform a payment in behalf of this user to a system account?", + "type": "boolean" + }, + "asUserToUser": { + "description": "Can the authenticated administrator or broker perform a payment in behalf of this user to another user?", + "type": "boolean" + }, + "systemToUser": { + "description": "Can the authenticated administrator perform a payment from a system account to this user?", + "type": "boolean" + }, + "userToUser": { + "description": "Can the authenticated member perform a payment from an himself to this user?", + "type": "boolean" + } + } + }, + "UserPaymentRequestsPermissions": { + "description": "Permissions for payment requests over a user", + "type": "object", + "properties": { + "view": { + "description": "Can the authenticated administrator or broker view payment requests of the given user?", + "type": "boolean" + }, + "sendSelfToSystem": { + "description": "Only if authenticated as this user. Indicates whether the user can send a payment request to system.", + "type": "boolean" + }, + "sendSelfToUser": { + "description": "Only if authenticated as this user. Indicates whether the user can send a payment request to another user.", + "type": "boolean" + }, + "sendFromSystem": { + "description": "Can the authenticated administrator send a payment request from system to the given user?", + "type": "boolean" + }, + "sendFromUser": { + "description": "Can the authenticated user send a payment request to the given user?", + "type": "boolean" + }, + "sendAsUserToUser": { + "description": "Can the authenticated administrator or broker send payment requests in behalf of the given user to other users?", + "type": "boolean" + }, + "sendAsUserToSystem": { + "description": "Can the authenticated administrator or broker send payment requests in behalf of the given user to system?", + "type": "boolean" + } + } + }, + "UserPermissions": { + "description": "Determines permission the authenticated have over a specific user", + "allOf": [ + { + "$ref": "#/components/schemas/UserTransactionPermissions" + }, + { + "type": "object", + "properties": { + "profile": { + "$ref": "#/components/schemas/UserProfilePermissions" + }, + "passwords": { + "$ref": "#/components/schemas/UserPasswordsPermissions" + }, + "products": { + "$ref": "#/components/schemas/UserProductsPermissions" + }, + "validation": { + "$ref": "#/components/schemas/UserValidationPermissions" + }, + "contact": { + "$ref": "#/components/schemas/UserContactPermissions" + }, + "brokering": { + "$ref": "#/components/schemas/UserBrokeringPermissions" + }, + "operators": { + "$ref": "#/components/schemas/UserOperatorsPermissions" + }, + "marketplace": { + "$ref": "#/components/schemas/UserMarketplacePermissions" + }, + "group": { + "$ref": "#/components/schemas/UserGroupPermissions" + }, + "references": { + "$ref": "#/components/schemas/UserReferencesPermissions" + }, + "paymentFeedbacks": { + "$ref": "#/components/schemas/UserPaymentFeedbacksPermissions" + }, + "status": { + "$ref": "#/components/schemas/UserStatusPermissions" + }, + "accounts": { + "description": "Accounts which can be viewed by the authenticated user", + "type": "array", + "items": { + "$ref": "#/components/schemas/AccountWithCurrency" + } + }, + "accountVisibilitySettings": { + "$ref": "#/components/schemas/UserAccountVisibilitySettingsPermissions" + }, + "balanceLimits": { + "$ref": "#/components/schemas/UserBalanceLimitsPermissions" + }, + "paymentLimits": { + "$ref": "#/components/schemas/UserPaymentLimitsPermissions" + }, + "identityProviders": { + "$ref": "#/components/schemas/UserIdentityProvidersPermissions" + }, + "records": { + "description": "Records types the authenticated user can view over the given user", + "type": "array", + "items": { + "$ref": "#/components/schemas/OwnerRecordPermissions" + } + }, + "documents": { + "$ref": "#/components/schemas/UserDocumentsPermissions" + }, + "session": { + "$ref": "#/components/schemas/UserSessionPermissions" + }, + "operations": { + "description": "Custom operations the authenticated user can run over the given user", + "type": "array", + "items": { + "$ref": "#/components/schemas/Operation" + } + }, + "wizards": { + "description": "Custom wizards the authenticated user can run over the given user", + "type": "array", + "items": { + "$ref": "#/components/schemas/Wizard" + } + }, + "tokens": { + "description": "Permissions over tokens of each visible type.", + "type": "array", + "items": { + "$ref": "#/components/schemas/TokenPermissions" + } + }, + "vouchers": { + "$ref": "#/components/schemas/UserVouchersPermissions" + }, + "notificationSettings": { + "$ref": "#/components/schemas/UserNotificationSettingsPermissions" + }, + "privacySettings": { + "$ref": "#/components/schemas/UserPrivacySettingsPermissions" + }, + "agreements": { + "$ref": "#/components/schemas/AgreementsPermissions" + }, + "messages": { + "$ref": "#/components/schemas/UserMessagesPermissions" + }, + "quickAccess": { + "$ref": "#/components/schemas/UserQuickAccessPermissions" + }, + "imports": { + "$ref": "#/components/schemas/UserImportsPermissions" } - }, - "confirmationPasswordInput" : { - "description" : "If a confirmation password is used, contains the definitions on how to request that password from the user. This confirmation password is required when performing sensible actions. Sometimes this is dynamic, for example, the confirmation might be configured to be used only once per session, or operations like payments may have a limit per day to be without confirmation (pinless).", - "allOf" : [ { - "$ref" : "#/components/schemas/PasswordInput" - } ] - }, - "usersWhichCanAddToContacts" : { - "$ref" : "#/components/schemas/TransactionSubjectsEnum" - }, - "usersWhichCanViewProfile" : { - "$ref" : "#/components/schemas/TransactionSubjectsEnum" - }, - "exportFormats" : { - "description" : "The formats which the data can be exported", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ExportFormat" - } - } - } - } ] - }, - "TranslatableUIElementWithContent" : { - "description" : "Basic definition of a persistent translatable entity which has content", - "allOf" : [ { - "$ref" : "#/components/schemas/TranslatableVersionedEntity" - }, { - "type" : "object", - "properties" : { - "content" : { - "type" : "string", - "description" : "The translated content." - } - } - } ] - }, - "TranslatableVersionedEntity" : { - "description" : "Definition of a persistent translatable entity which has a version and translation information", - "allOf" : [ { - "$ref" : "#/components/schemas/VersionedEntity" - }, { - "type" : "object", - "properties" : { - "dataTranslationId" : { - "type" : "string", - "description" : "The data translation identifier." - }, - "dataTranslationVersion" : { - "type" : "integer", - "description" : "The data translation version." - } - } - } ] - }, - "UIElementWithContent" : { - "description" : "Contains definitions for a UI element that has a content", - "allOf" : [ { - "$ref" : "#/components/schemas/VersionedEntity" - }, { - "type" : "object", - "properties" : { - "content" : { - "description" : "The content of this element", - "type" : "string" - } - } - } ] - }, - "UnauthorizedError" : { - "description" : "Error returned when a HTTP status code 401 occurs", - "type" : "object", - "properties" : { - "missingSecondaryPassword" : { - "description" : "May only returned when `code` is `login` and there is a login confirmation with password defined for the channel.", - "allOf" : [ { - "$ref" : "#/components/schemas/PasswordType" - } ] - }, - "secondaryDeviceAllowed" : { - "description" : "Whether confirmations with device are allowed or not. May only returned when `code` is `login` and there is a login confirmation defined for the channel.", - "type" : "boolean" - }, - "invalidDeviceConfirmation" : { - "description" : "The result associated to an invalid device confrmation. May only returned when `code` is `login` and the login was performed with a trusted device.", - "allOf" : [ { - "$ref" : "#/components/schemas/InvalidDeviceConfirmationEnum" - } ] - }, - "code" : { - "$ref" : "#/components/schemas/UnauthorizedErrorCode" - }, - "userStatus" : { - "description" : "May only returned when `code` is `login`.", - "allOf" : [ { - "$ref" : "#/components/schemas/UserStatusEnum" - } ] - }, - "passwordStatus" : { - "description" : "May only returned when `code` is `login`.", - "allOf" : [ { - "$ref" : "#/components/schemas/PasswordStatusEnum" - } ] - }, - "error" : { - "description" : "Is the OAuth2 / OpenID Connect required error message. Is only returned when `code` is `invalidAccessToken`.", - "type" : "string" - } - } - }, - "UnavailableError" : { - "description" : "Error returned when some required service is unavailable", - "type" : "object", - "properties" : { - "code" : { - "$ref" : "#/components/schemas/UnavailableErrorCode" - }, - "smsStatus" : { - "description" : "Only if code is `smsSending`", - "allOf" : [ { - "$ref" : "#/components/schemas/OutboundSmsStatusEnum" - } ] - } - } - }, - "UpdateFcmTokenParams" : { - "description" : "Parameters for updating a FCM token.", - "type" : "object", - "properties" : { - "oldToken" : { - "description" : "The FCM registration token to be updated", - "type" : "string" - }, - "newToken" : { - "description" : "The new FCM registration token", - "type" : "string" - } - } - }, - "User" : { - "description" : "Basic representation of a user (both admin and regular)", - "allOf" : [ { - "$ref" : "#/components/schemas/Entity" - }, { - "type" : "object", - "properties" : { - "display" : { - "type" : "string", - "description" : "Contains the formatting of the user according to the configuration. When this object is in the search result, this is only returned if no profile fields are marked to return in user list." - }, - "image" : { - "description" : "The primary user profile image", - "allOf" : [ { - "$ref" : "#/components/schemas/Image" - } ] - }, - "user" : { - "description" : "Is the operator owner, only returned if this user represents an operator. Even so, in some cases, like searching for operators of a specific user, this field may not be returned.", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "locator" : { - "description" : "Only returned if this user was located from a string value (login name, email, phone, account number, etc). Is the raw string value.", - "type" : "string" - }, - "locatorPrincipal" : { - "description" : "Only returned if this user was located from a string value (login name, email, phone, account number, etc). Is the detailed locator pricipal.", - "allOf" : [ { - "$ref" : "#/components/schemas/Principal" - } ] } } - } ] + ] }, - "UserAccountBalanceLimitsListData" : { - "description" : "Data regarding the lower and upper limits of a user's accounts.", - "type" : "object", - "properties" : { - "user" : { - "$ref" : "#/components/schemas/User" + "UserPhonesListData": { + "description": "Contains information for a list of phones", + "type": "object", + "properties": { + "user": { + "description": "The user which owns this phones", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "canEdit": { + "description": "Can the authenticated user edit phones of this user?", + "type": "boolean" + }, + "canCreateLandLine": { + "description": "Can the authenticated user create new land-line phones for this user?", + "type": "boolean" + }, + "canCreateMobile": { + "description": "Can the authenticated user create new mobile phones for this user?", + "type": "boolean" + }, + "enablePrivacy": { + "description": "Indicates whether phone privacy can be used for this user", + "type": "boolean" + }, + "smsEnabled": { + "description": "Indicates whether outbound SMS is enabled in Cyclos", + "type": "boolean" + }, + "canVerify": { + "description": "Can the authenticated user verify mobile phones of this user?", + "type": "boolean" + }, + "canEnableForSms": { + "description": "Can the authenticated user enable / disable mobile phones of this user to send / receive SMS?", + "type": "boolean" }, - "accountLimits" : { - "description" : "The balance limits for each account", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/AccountBalanceLimitsResult" + "maxMobilePhones": { + "description": "Indicates the maximum number of mobile phones this user can have. Is only returned when `canManage` is `true`.", + "type": "integer" + }, + "maxLandLinePhones": { + "description": "Indicates the maximum number of land line (fixed) phones this user can have. Is only returned when `canManage` is `true`.", + "type": "integer" + }, + "phones": { + "description": "The list of (visible) phones", + "type": "array", + "items": { + "$ref": "#/components/schemas/PhoneResult" } + }, + "landLineAvailability": { + "$ref": "#/components/schemas/AvailabilityEnum" + }, + "mobileAvailability": { + "$ref": "#/components/schemas/AvailabilityEnum" } } }, - "UserAccountPaymentLimitsListData" : { - "description" : "Data regarding the payment, daily, weekly and monthly amount limits of a user accounts.", - "type" : "object", - "properties" : { - "user" : { - "$ref" : "#/components/schemas/User" - }, - "accountLimits" : { - "description" : "The payment limits for each account", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/AccountPaymentLimitsResult" - } + "UserPrivacySettingsPermissions": { + "description": "Permissions regarding the privacy settings of other users", + "type": "object", + "properties": { + "view": { + "description": "Can the current user view the privacy settings of other users?", + "type": "boolean" } } }, - "UserAccountVisibility" : { - "description" : "References an account type, indicating whether it is allowed to be hidden by users, and whether it is currently visible", - "allOf" : [ { - "$ref" : "#/components/schemas/AccountWithCurrency" - }, { - "type" : "object", - "properties" : { - "canHide" : { - "description" : "Indicates Whether this account can be hidden by users", - "type" : "boolean" - }, - "visible" : { - "description" : "Indicates Whether this account is currently visible", - "type" : "boolean" + "UserProductAssignmentData": { + "description": "Contains the current user individually assigned products, as well as other information", + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/User" + }, + "group": { + "$ref": "#/components/schemas/Group" + }, + "userProducts": { + "description": "Products currently assigned to this individual user", + "type": "array", + "items": { + "$ref": "#/components/schemas/ProductWithUserAccount" + } + }, + "groupProducts": { + "description": "Products currently assigned to the user's group", + "type": "array", + "items": { + "$ref": "#/components/schemas/ProductWithUserAccount" + } + }, + "groupSetProducts": { + "description": "Products currently assigned to the user's group set", + "type": "array", + "items": { + "$ref": "#/components/schemas/ProductWithUserAccount" + } + }, + "assignable": { + "description": "If the authenticated user can assign more products to the user, this is the list of possible products to assign to the user.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ProductWithUserAccount" + } + }, + "unassignable": { + "description": "Either internal names or ids of currently assigned products that the logged user can unassign from the user.", + "type": "array", + "items": { + "type": "string" + } + }, + "history": { + "description": "Contains the history entries for all product assignment changes", + "type": "array", + "items": { + "$ref": "#/components/schemas/ProductAssignmentLog" } - } - } ] - }, - "UserAccountVisibilitySettingsPermissions" : { - "description" : "Permissions regarding the account visibility settings of a given user", - "type" : "object", - "properties" : { - "view" : { - "description" : "Can the authenticated user view the account visibility settings?", - "type" : "boolean" } } }, - "UserAdInterestsListData" : { - "description" : "Contains, besides the user's advertisement interests, additional data for its management", - "type" : "object", - "properties" : { - "user" : { - "description" : "The user which owns this advertisement interests", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] + "UserProductsPermissions": { + "description": "Permissions over products of a given user", + "type": "object", + "properties": { + "view": { + "description": "Can the authenticated user view assigned products?", + "type": "boolean" }, - "canEdit" : { - "description" : "Indicates whether the advertisement interests can be edited by the authenticated user", - "type" : "boolean" + "individual": { + "description": "The individual products assigned to the user", + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityReference" + } }, - "canCreate" : { - "description" : "Indicates whether the authenticated user can create a new ad interest", - "type" : "boolean" + "group": { + "description": "The products assigned to the user's group", + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityReference" + } }, - "adInterests" : { - "description" : "The advertisement interests list", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/AdInterest" + "groupSet": { + "description": "The products assigned to the user's group set", + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityReference" } } } }, - "UserAddressesListData" : { - "description" : "Contains, besides the user's addresses, additional data for its management", - "type" : "object", - "properties" : { - "user" : { - "description" : "The user which owns this addresses", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] + "UserProfilePermissions": { + "description": "Permissions over a user profile", + "type": "object", + "properties": { + "editProfile": { + "description": "Can edit the user profile?", + "type": "boolean" }, - "canEdit" : { - "description" : "Indicates whether the addresses can be edited by the authenticated user", - "type" : "boolean" + "manageAddresses": { + "description": "Can manage addresses?", + "type": "boolean" }, - "canCreate" : { - "description" : "Indicates whether the authenticated user can create a new address for this user", - "type" : "boolean" + "manageAddressesPrivacy": { + "type": "boolean", + "description": "Can manage the addresses privacy?" }, - "enablePrivacy" : { - "description" : "Indicates whether address privacy can be used for this user", - "type" : "boolean" + "managePhones": { + "description": "Can manage phones?", + "type": "boolean" }, - "maxAddresses" : { - "description" : "Indicates the maximum number of addresses the user can have", - "type" : "integer" + "managePhonesPrivacy": { + "type": "boolean", + "description": "Can manage the phones privacy?" }, - "addresses" : { - "description" : "The address list", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/AddressResult" - } + "manageImages": { + "description": "Can manage profile images?", + "type": "boolean" + }, + "manageContactInfos": { + "description": "Can manage additional contact informations?", + "type": "boolean" + }, + "canCreateAddress": { + "description": "Will be true if the authenticated user can manage addresses and the user for which we are viewing its profile has not reached the maximum allowed addresses. Only if `manageAddresses` is true.", + "type": "boolean" + }, + "canCreateLandLine": { + "description": "Will be true if the authenticated user can manage phones and the user for whom we are viewing its profile has not reached the maximum allowed landline phones. Only if `managePhones` is true.", + "type": "boolean" + }, + "canCreateMobile": { + "description": "Will be true if the authenticated user can manage phones and the user for whom we are viewing its profile has not reached the maximum allowed mobile phones. Only if `managePhones` is true.", + "type": "boolean" + }, + "canCreateImage": { + "description": "Will be true if the authenticated user can manage images and the user for whom we are viewing its profile has not reached the maximum allowed profile images. Only if `manageImages` is true.", + "type": "boolean" + }, + "canCreateContactInfo": { + "description": "Will be true if the authenticated user can manage additional contact informations and the user for whom we are viewing its profile has not reached the maximum allowed additional contact informations. Only if `manageContactInfos` is true.", + "type": "boolean" + }, + "maxAddresses": { + "description": "The maximum number of addresses the user can own. Only if `manageAddresses` is true", + "type": "integer" + }, + "maxMobiles": { + "description": "The maximum number of mobile phones the user can own. Only if `managePhones` is true.", + "type": "integer" }, - "availability" : { - "$ref" : "#/components/schemas/AvailabilityEnum" + "maxLandLines": { + "description": "The maximum number of land-line phones the user can own. Only if `managePhones` is true.", + "type": "integer" + }, + "maxImages": { + "description": "The maximum number of profile images the user can own. Only if `manageImages` is true.", + "type": "integer" + }, + "maxContactInfos": { + "description": "The maximum number of additional contacts the user can own.\n Only if `manageContactInfos` is true.", + "type": "integer" + }, + "addressAvailability": { + "description": "The availability for addresses. Only if `manageAddresses` is true", + "allOf": [ + { + "$ref": "#/components/schemas/AvailabilityEnum" + } + ] + }, + "mobileAvailability": { + "description": "The availability for mobile phones. Only if `managePhones` is true", + "allOf": [ + { + "$ref": "#/components/schemas/AvailabilityEnum" + } + ] + }, + "landLineAvailability": { + "description": "The availability for land-line phones. Only if `managePhones` is true", + "allOf": [ + { + "$ref": "#/components/schemas/AvailabilityEnum" + } + ] + }, + "profileImageAvailability": { + "description": "The availability for profile images. Only if `manageImages` is true", + "allOf": [ + { + "$ref": "#/components/schemas/AvailabilityEnum" + } + ] + }, + "contactInfoAvailability": { + "description": "The availability for additional contacts. Only if `manageContactInfos` is true", + "allOf": [ + { + "$ref": "#/components/schemas/AvailabilityEnum" + } + ] + }, + "physicallyRemove": { + "description": "Indicates whether this user is in status `pending` and can be removed.", + "type": "boolean" } } }, - "UserAdsDataForSearch" : { - "description" : "Data for a search of advertisements of a specific user", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseAdDataForSearch" - }, { - "type" : "object", - "properties" : { - "user" : { - "$ref" : "#/components/schemas/User" - }, - "createNew" : { - "description" : "Indicates whether the authenticated user can create new advertisements for this user", - "type" : "boolean" - }, - "maxAds" : { - "description" : "The maximum number of advertisements this user can have", - "type" : "integer" - }, - "requiresAuthorization" : { - "description" : "Does advertisements of this user requires authorization to be published for other users to see?", - "type" : "boolean" - }, - "query" : { - "description" : "Default query filters to search advertisements of a specific user", - "allOf" : [ { - "$ref" : "#/components/schemas/UserAdsQueryFilters" - } ] - } - } - } ] - }, - "UserAdsQueryFilters" : { - "description" : "Definitions for search filters of advertisements of a given owner search", - "allOf" : [ { - "$ref" : "#/components/schemas/BasicAdQueryFilters" - }, { - "type" : "object" - } ] - }, - "UserAgreementsData" : { - "description" : "Information of agreements related to a user", - "type" : "object", - "properties" : { - "user" : { - "$ref" : "#/components/schemas/User" - }, - "agreements" : { - "description" : "All agreements enabled for the user, both required and optional", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Agreement" - } - }, - "accepted" : { - "description" : "Keyed by agreement id, contains details of each accepted agreement. Agreements whose id isn't a key in this field weren't accepted.", - "type" : "object", - "additionalProperties" : { - "$ref" : "#/components/schemas/AcceptedAgreement" - } - }, - "canEdit" : { - "description" : "Indicates whether the authenticated user can manage the optional agreements for this user", - "type" : "boolean" - }, - "history" : { - "description" : "The history log for the agreements that were accepted, or optional agreements that were no longer accepted.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/AgreementLog" - } - } - } - }, - "UserAlert" : { - "description" : "An alert for a specific user", - "allOf" : [ { - "$ref" : "#/components/schemas/Alert" - }, { - "type" : "object", - "properties" : { - "type" : { - "$ref" : "#/components/schemas/UserAlertTypeEnum" - }, - "user" : { - "$ref" : "#/components/schemas/User" + "UserQueryFilters": { + "description": "Parameters for searching users", + "allOf": [ + { + "$ref": "#/components/schemas/BasicUserQueryFilters" + }, + { + "type": "object", + "properties": { + "contactsOwner": { + "type": "string", + "description": "Indicates the (managed) user to exclude contacts when `excludecontacts` is set. Defaults to the logged user." + }, + "excludeContacts": { + "type": "boolean", + "description": "When set to `true` will not return any user that is already a contact of the user indicated on `contactsOwner` (the logged user if not set)." + }, + "fromMenu": { + "type": "boolean", + "description": "When set to true the search will be restricted to those groups defined for the user search menu, if false then for those defined in the 'Search users on groups' product setting (or in the configuration in case of guests)." + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RoleEnum" + } + }, + "orderBy": { + "$ref": "#/components/schemas/UserOrderByEnum" + } } } - } ] + ] }, - "UserAlertDataForSearch" : { - "description" : "Contains data for searching user alerts", - "type" : "object", - "properties" : { - "groups" : { - "description" : "The groups the authenticated user can use to filter users.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Group" - } + "UserQuickAccessEdit": { + "description": "Information for saving a quick access item.", + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/QuickAccessTypeEnum" + }, + "entity": { + "description": "The id of the related entity", + "type": "string" }, - "query" : { - "$ref" : "#/components/schemas/UserAlertQueryFilters" + "enabled": { + "description": "Is this item enabled?", + "type": "boolean" } } }, - "UserAlertQueryFilters" : { - "description" : "Query filters for searching user alerts", - "allOf" : [ { - "$ref" : "#/components/schemas/QueryFilters" - }, { - "type" : "object", - "properties" : { - "datePeriod" : { - "description" : "The minimum / maximum alert date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "type" : "array", - "items" : { - "type" : "string", - "format" : "date-time" - } - }, - "types" : { - "description" : "The types of user alerts to search", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/UserAlertTypeEnum" + "UserQuickAccessPermissions": { + "description": "Permissions over the quick access items of a given user", + "type": "object", + "properties": { + "view": { + "description": "Can the authenticated user view the quick access items of the user?", + "type": "boolean" + } + } + }, + "UserQuickAccessSettingsEdit": { + "description": "Parameters for saving the quick access settings of a user", + "type": "object", + "properties": { + "quickAccess": { + "description": "The quick access elements", + "type": "array", + "items": { + "$ref": "#/components/schemas/UserQuickAccessEdit" + } + } + } + }, + "UserQuickAccessView": { + "description": "Represents a setting for a quick access user", + "allOf": [ + { + "$ref": "#/components/schemas/QuickAccess" + }, + { + "type": "object", + "properties": { + "enabled": { + "description": "Is this quick access item enabled?", + "type": "boolean" + }, + "originalOrder": { + "description": "The order this item originally has", + "type": "integer" } - }, - "groups" : { - "description" : "Either the ids or internal names of the alert user", - "type" : "array", - "items" : { - "type" : "string" + } + } + ] + }, + "UserRecords": { + "description": "Data over user records for a given owner and type", + "type": "object", + "properties": { + "count": { + "description": "The current number of records of this type for this owner", + "type": "integer" + } + } + }, + "UserReferenceDataForSearch": { + "description": "Data for searching references of a given user", + "allOf": [ + { + "$ref": "#/components/schemas/BaseReferenceDataForSearch" + }, + { + "type": "object", + "properties": { + "query": { + "description": "Default query filters", + "allOf": [ + { + "$ref": "#/components/schemas/UserReferenceQueryFilters" + } + ] + }, + "set": { + "description": "Can the authenticated user set a reference to the given user?", + "type": "boolean" + }, + "current": { + "description": "The current reference, if any, from the authenticated user to the given user", + "allOf": [ + { + "$ref": "#/components/schemas/Reference" + } + ] } - }, - "brokers" : { - "description" : "Either the ids or identification methods the alert user's brokers", - "type" : "array", - "items" : { - "type" : "string" + } + } + ] + }, + "UserReferenceQueryFilters": { + "description": "Query filters for a user's references", + "allOf": [ + { + "$ref": "#/components/schemas/BaseReferenceQueryFilters" + } + ] + }, + "UserReferenceResult": { + "description": "Result of searching references of a given user", + "allOf": [ + { + "$ref": "#/components/schemas/Reference" + }, + { + "type": "object", + "properties": { + "relatedUser": { + "description": "The user that either gave to or received from the user specified in the path variable.", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "direction": { + "description": "Whether this reference was given to or received from the user specified in the path variable.", + "allOf": [ + { + "$ref": "#/components/schemas/ReferenceDirectionEnum" + } + ] } - }, - "user" : { - "description" : "Either the id or identifier of the alert user", - "type" : "string" - } - } - } ] - }, - "UserAuth" : { - "description" : "Contains information returned after logging in an user.", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseAuth" - }, { - "type" : "object", - "properties" : { - "configuration" : { - "description" : "The current configuration", - "allOf" : [ { - "$ref" : "#/components/schemas/VersionedEntityReference" - } ] - }, - "group" : { - "$ref" : "#/components/schemas/Group" } } - } ] + ] }, - "UserAuthorizedPaymentsPermissions" : { - "description" : "Permissions for authorized payments over a user", - "type" : "object", - "properties" : { - "view" : { - "description" : "Can the authenticated administrator or broker view authorized payments of the given user?", - "type" : "boolean" + "UserReferences": { + "description": "Information about general references for a user", + "type": "object", + "properties": { + "count": { + "description": "The current number of received references", + "type": "integer" + }, + "score": { + "description": "From 1 to 5 represents the average score of received references", + "type": "number" } } }, - "UserBalanceLimitsPermissions" : { - "description" : "Permissions regarding the account balance limits of a given user", - "type" : "object", - "properties" : { - "view" : { - "description" : "Can the authenticated user view the balance limits of the user?", - "type" : "boolean" + "UserReferencesPermissions": { + "description": "Permissions over general references of an user", + "type": "object", + "properties": { + "view": { + "description": "Can view other user's references?", + "type": "boolean" } } }, - "UserBaseAdPermissions" : { - "description" : "Permissions over advertisements of other users", - "type" : "object", - "properties" : { - "view" : { - "description" : "Can view advertisements of others?", - "type" : "boolean" - }, - "manage" : { - "description" : "Can manage advertisements of others? Only returned if there is an authenticated user.", - "type" : "boolean" - }, - "viewPending" : { - "description" : "Can view pending advertisements of others? Only returned if there is an authenticated manager with permissions", - "type" : "boolean" + "UserRegistrationPrincipal": { + "description": "Contains information about a principal (user identification) and the channels that can be accessed using it", + "type": "object", + "properties": { + "value": { + "description": "The principal value", + "type": "string" }, - "managePending" : { - "description" : "Can manage pending advertisements of others? Only returned if there is an authenticated manager with permissions", - "type" : "boolean" + "type": { + "$ref": "#/components/schemas/PrincipalType" }, - "purchase" : { - "description" : "Can purchase webshop ads? Only returned if there is an authenticated user. It is false for simple ads.", - "type" : "boolean" + "channels": { + "description": "The channels that can be accessed using this principal", + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityReference" + } } } }, - "UserBasicData" : { - "description" : "Contains properties shared by both UserDataForNew and UserDataForEdit", - "type" : "object", - "properties" : { - "emailRequired" : { - "description" : "Indicates whether the e-mail is required", - "type" : "boolean" - }, - "enablePrivacy" : { - "description" : "Indicates whether privacy over profile fields can be controlled for this user.", - "type" : "boolean" + "UserRegistrationResult": { + "description": "Result of a user registration", + "type": "object", + "properties": { + "user": { + "description": "The user that has just been registered", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] }, - "profileFieldActions" : { - "description" : "An object, keyed by profile field internal name (either one of the basic profile fields or custom fields), containing other objects that defines the allowed actions over these profile fields", - "type" : "object", - "additionalProperties" : { - "$ref" : "#/components/schemas/ProfileFieldActions" + "generatedPasswords": { + "description": "The types of passwords that were generated", + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityReference" } }, - "customFields" : { - "description" : "The available custom field definitions", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/UserCustomFieldDetailed" + "rootUrl": { + "description": "The root URL that can be used to access the web interface", + "type": "string" + }, + "principals": { + "description": "Contains information about each user principal (identification) and the channels that can be accessed using it", + "type": "array", + "items": { + "$ref": "#/components/schemas/UserRegistrationPrincipal" } }, - "binaryValues" : { - "description" : "Holds the current values for file / image custom fields as lists of `StoredFile`s / `Image`s.", - "allOf" : [ { - "$ref" : "#/components/schemas/CustomFieldBinaryValues" - } ] + "status": { + "$ref": "#/components/schemas/UserRegistrationStatusEnum" } } }, - "UserBrokeringPermissions" : { - "description" : "Permissions regarding the user's brokers and brokered users", - "type" : "object", - "properties" : { - "viewBrokers" : { - "description" : "Can the authenticated user view the brokers of this user?", - "type" : "boolean" + "UserResult": { + "description": "Data returned from user search", + "allOf": [ + { + "$ref": "#/components/schemas/User" }, - "viewMembers" : { - "description" : "Can the authenticated user view the assigned members of this broker?", - "type" : "boolean" + { + "type": "object", + "x-implements": "IUser", + "properties": { + "name": { + "type": "string", + "description": "The user's full name" + }, + "username": { + "type": "string", + "description": "The user's login name" + }, + "email": { + "type": "string", + "description": "The user's e-mail" + }, + "address": { + "description": "Address to be placed on map. Is only returned when the search result type is `map`.", + "allOf": [ + { + "$ref": "#/components/schemas/Address" + } + ] + }, + "distance": { + "description": "Only returned when there is a base location to calculate the distance from. The unit (kilometers or miles) depends on configuration.", + "type": "number", + "format": "double" + }, + "customValues": { + "type": "object", + "description": "Holds the values for custom fields, keyed by field internal name or id. The format of the value depends on the custom field type. Example: `{..., \"customValues\": {\"gender\": \"male\", \"birthDate\": \"1980-10-27\"}}`", + "additionalProperties": { + "type": "string" + } + }, + "phone": { + "type": "string", + "description": "First phone number, used when phone is marked on products to be returned on user list" + }, + "accountNumber": { + "type": "string", + "description": "First account number, used when account number is marked on products to be returned on user list" + }, + "group": { + "description": "The user group. Only returned when the `includeGroup` parameter is set to `true` and the current user can see other users' groups.", + "allOf": [ + { + "$ref": "#/components/schemas/EntityReference" + } + ] + }, + "groupSet": { + "description": "The user group. Only returned when the `includeGroupSet` parameter is set to `true` and the current user can see other users' group set.", + "allOf": [ + { + "$ref": "#/components/schemas/EntityReference" + } + ] + } + } + } + ] + }, + "UserScheduledPaymentsPermissions": { + "description": "Permissions for scheduled payments over a user", + "type": "object", + "properties": { + "view": { + "description": "Can the authenticated administrator or broker view scheduled payments of the given user?", + "type": "boolean" + } + } + }, + "UserSessionPermissions": { + "description": "Permissions regarding the login session of a given user", + "type": "object", + "properties": { + "disconnect": { + "description": "Can the authenticated admin disconnect this user?", + "type": "boolean" } } }, - "UserBrokersData" : { - "description" : "Contains the current user brokers, as well as other information", - "type" : "object", - "properties" : { - "user" : { - "$ref" : "#/components/schemas/User" + "UserStatusData": { + "description": "Contains the current user status, as well as other information", + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/User" }, - "brokers" : { - "description" : "Brokers currently assigned, together with additional information", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Brokering" - } + "status": { + "$ref": "#/components/schemas/UserStatusEnum" }, - "editable" : { - "description" : "Can the authenticated user manage brokers of this user?", - "type" : "boolean" + "possibleNewStatuses": { + "description": "If the authenticated user can manage the given user's status, contains the list of statuses that can be assigned.", + "type": "array", + "items": { + "$ref": "#/components/schemas/UserStatusEnum" + } }, - "history" : { - "description" : "Contains the history entries for all brokering changes", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/BrokeringLog" + "history": { + "description": "Contains the history entries for all status changes", + "type": "array", + "items": { + "$ref": "#/components/schemas/UserStatusLog" } } } }, - "UserClientTypePermissions" : { - "description" : "Contains details of an access client, together with permissions over it", - "allOf" : [ { - "$ref" : "#/components/schemas/InternalNamedEntity" - }, { - "type" : "object", - "properties" : { - "canManage" : { - "description" : "Can the authenticated user manage access clients of this type?", - "type" : "boolean" - }, - "canCreateNew" : { - "description" : "Can the authenticated user create a new access client of this type and user? Maybe the maximum allowed has been reached.", - "type" : "boolean" - }, - "hasUnassigned" : { - "description" : "Is there at least one access client for this type and user which is in the unassigned status?", - "type" : "boolean" - } - } - } ] - }, - "UserContactInfosListData" : { - "description" : "Contains, besides the user's additional contact informations, data for managing them", - "type" : "object", - "properties" : { - "user" : { - "description" : "The user which owns this contacts", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "canEdit" : { - "description" : "Indicates whether the additional contact informations can be edited by the authenticated user", - "type" : "boolean" - }, - "canCreate" : { - "description" : "Indicates whether new additional contact informations can be created by the authenticated user", - "type" : "boolean" - }, - "maxContactInfos" : { - "description" : "Indicates the maximum number of additional contact informations the user can have", - "type" : "integer" - }, - "customFields" : { - "description" : "The list of additional contact informations custom fields", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/CustomFieldDetailed" - } - }, - "contactInfos" : { - "description" : "The additional contact information list", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ContactInfoResult" - } - }, - "availability" : { - "$ref" : "#/components/schemas/AvailabilityEnum" - } - } - }, - "UserContactPermissions" : { - "description" : "Permissions regarding the contact list", - "type" : "object", - "properties" : { - "add" : { - "description" : "Can the current user be added to the contact list?", - "type" : "boolean" - }, - "remove" : { - "description" : "Can the current user be removed from the contact list?", - "type" : "boolean" - } - } - }, - "UserCustomField" : { - "description" : "Adds to `CustomField` some user-specific definitions", - "allOf" : [ { - "$ref" : "#/components/schemas/CustomField" - }, { - "type" : "object", - "properties" : { - "section" : { - "description" : "The user fields section", - "allOf" : [ { - "$ref" : "#/components/schemas/FieldSection" - } ] - } - } - } ] - }, - "UserCustomFieldDetailed" : { - "description" : "Adds to `CustomFieldDetailed` some user-specific definitions", - "allOf" : [ { - "$ref" : "#/components/schemas/CustomFieldDetailed" - }, { - "type" : "object", - "properties" : { - "hiddenByDefault" : { - "description" : "This flag determine whether this field is hidden or not by default", - "type" : "boolean" - }, - "section" : { - "description" : "The fields section", - "allOf" : [ { - "$ref" : "#/components/schemas/FieldSection" - } ] - } - } - } ] - }, - "UserCustomFieldValue" : { - "description" : "Contains the custom field value information, plus the hidden flag", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseCustomFieldValue" - }, { - "type" : "object", - "properties" : { - "hidden" : { - "type" : "boolean", - "description" : "Whether this field is hidden for other users" - }, - "field" : { - "description" : "The custom field reference", - "allOf" : [ { - "$ref" : "#/components/schemas/UserCustomField" - } ] - } - } - } ] - }, - "UserDataForEdit" : { - "description" : "Contains data used to edit a user profile", - "allOf" : [ { - "$ref" : "#/components/schemas/UserBasicData" - }, { - "type" : "object", - "properties" : { - "nameLabel" : { - "description" : "The label used for the name of users", - "type" : "string" - }, - "details" : { - "description" : "Additional details to the user being edited", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "user" : { - "description" : "The object that can be altered and posted back to save the user / operator", - "allOf" : [ { - "$ref" : "#/components/schemas/UserEdit" - } ] - }, - "role" : { - "$ref" : "#/components/schemas/RoleEnum" - }, - "emailPendingValidation" : { - "description" : "The new e-mail address, which is still pending validation. Is only returned when e-mail validation is enabled for edit profile, and the user has changed the e-mail address.", - "type" : "string" - }, - "confirmationPasswordInput" : { - "description" : "If a confirmation password is used, contains the definitions on how to request that password from the user. This confirmation password is required when performing sensible actions. Sometimes this is dynamic, for example, the confirmation might be configured to be used only once per session, or operations like payments may have a limit per day to be without confirmation (pinless).", - "allOf" : [ { - "$ref" : "#/components/schemas/PasswordInput" - } ] - } - } - } ] - }, - "UserDataForMap" : { - "description" : "Contains configuration data for the user directory (map)", - "allOf" : [ { - "$ref" : "#/components/schemas/UserDataForSearch" - }, { - "type" : "object", - "properties" : { - "mapDirectoryField" : { - "description" : "Internal name of the custom field currently set as primary search filter for the user directory (map) search. When not returned (null) it is assumed that keywords should be the primary filter.", - "type" : "string" - }, - "defaultMapLocation" : { - "description" : "The default location for the map to be displayed", - "allOf" : [ { - "$ref" : "#/components/schemas/GeographicalCoordinate" - } ] - }, - "defaultMapZoomMobile" : { - "description" : "The default map zoom level for mobile applications", - "type" : "integer" - }, - "defaultMapZoomWeb" : { - "description" : "The default map zoom level for web applications", - "type" : "integer" - } - } - } ] - }, - "UserDataForNew" : { - "description" : "Contains data used to register a user", - "allOf" : [ { - "$ref" : "#/components/schemas/BasicUserDataForNew" - }, { - "type" : "object", - "properties" : { - "nameLabel" : { - "description" : "The label used for the name of users", - "type" : "string" - }, - "group" : { - "description" : "Details of the registration group.", - "allOf" : [ { - "$ref" : "#/components/schemas/GroupForRegistration" - } ] - }, - "broker" : { - "description" : "When the user registration is requested with a broker, contains the broker details.", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "identityProviders" : { - "description" : "The identity providers available for registering in this group. Only returned for public registrations.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/IdentityProvider" - } - }, - "addressConfiguration" : { - "$ref" : "#/components/schemas/AddressConfigurationForUserProfile" - }, - "contactInfoConfiguration" : { - "$ref" : "#/components/schemas/ContactInfoConfigurationForUserProfile" - }, - "imageConfiguration" : { - "$ref" : "#/components/schemas/ImageConfigurationForUserProfile" - }, - "user" : { - "description" : "The object that can be altered and posted back to register the user", - "allOf" : [ { - "$ref" : "#/components/schemas/UserNew" - } ] - }, - "images" : { - "description" : "The images which are already assigned to the new user.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Image" - } - }, - "agreements" : { - "description" : "The agreements that needs to be accepted by the user to be able to register. Only returned for public registrations.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Agreement" - } - }, - "securityQuestions" : { - "description" : "If enabled in the server, are the possible security questions the user can use to set the answer.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/EntityReference" - } - }, - "nfcTokenTypes" : { - "description" : "The NFC token types the authenticated user can parsonalize tags for the user being registered", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/EntityReference" - } - }, - "captchaInput" : { - "description" : "The data for a captcha response if needed for registration, or null if no captcha is needed.", - "allOf" : [ { - "$ref" : "#/components/schemas/CaptchaInput" - } ] - }, - "captchaType" : { - "deprecated" : true, - "x-remove-version" : 4.17, - "description" : "Use `captchaInput.provider` instead.\nThe captcha provider used to requested a captcha for registration, or null if no captcha is needed.", - "allOf" : [ { - "$ref" : "#/components/schemas/CaptchaProviderEnum" - } ] - } - } - } ] - }, - "UserDataForSearch" : { - "description" : "Contains data with the configuration for searching users", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseUserDataForSearch" - }, { - "type" : "object", - "properties" : { - "broker" : { - "description" : "When a `broker` parameter was set when getting the data, contains the details of the broker", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "fieldsInList" : { - "description" : "The internal names of either basic or custom profile fields that are configured to be shown on the list. This actually defines the fields that will be loaded on the result. It is possible that no fields are configured to be returned on list. In this case, the result objects will have the 'display' property loaded with what is configured to be the user formatting field(s).", - "type" : "array", - "items" : { - "type" : "string" + "UserStatusLog": { + "description": "Information regarding a specific status change", + "type": "object", + "properties": { + "by": { + "$ref": "#/components/schemas/User" + }, + "status": { + "$ref": "#/components/schemas/UserStatusEnum" + }, + "period": { + "description": "The begin and end date the for this status. The current status has no end date.", + "allOf": [ + { + "$ref": "#/components/schemas/DatePeriod" } - }, - "groupsForRegistration" : { - "description" : "Possible groups an administrator or broker can use to register users", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Group" + ] + }, + "comment": { + "description": "Comments supplied by the manager that performed the status change", + "type": "string" + } + } + }, + "UserStatusPermissions": { + "description": "Permissions regarding the status of a given user", + "type": "object", + "properties": { + "view": { + "description": "Can the authenticated user view the status and history of a given user?", + "type": "boolean" + } + } + }, + "UserTicketsPermissions": { + "description": "Permissions for tickets over a user", + "type": "object", + "properties": { + "view": { + "description": "Can the authenticated administrator or broker view tickets of the given user?", + "type": "boolean" + } + } + }, + "UserTokensListData": { + "description": "Data for tokens of a specific type and user", + "allOf": [ + { + "$ref": "#/components/schemas/TokenPermissions" + }, + { + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/User" + }, + "maxPerUser": { + "description": "The maximum number of tokens of this type a user can have at a time", + "type": "integer" + }, + "tokens": { + "description": "The tokens for this type and user.", + "type": "array", + "items": { + "$ref": "#/components/schemas/TokenResult" + } } - }, - "query" : { - "description" : "Default query filters to search users", - "allOf" : [ { - "$ref" : "#/components/schemas/UserQueryFilters" - } ] - }, - "statuses" : { - "description" : "The possible user statuses the authenticated user can use to filter the search. Only administrators or brokers over their members can filter by status (also depends on permissions)", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/UserStatusEnum" + } + } + ] + }, + "UserTransactionPermissions": { + "description": "Permissions over transactions of a specific user", + "type": "object", + "properties": { + "payment": { + "$ref": "#/components/schemas/UserPaymentPermissions" + }, + "scheduledPayments": { + "$ref": "#/components/schemas/UserScheduledPaymentsPermissions" + }, + "paymentRequests": { + "$ref": "#/components/schemas/UserPaymentRequestsPermissions" + }, + "authorizedPayments": { + "$ref": "#/components/schemas/UserAuthorizedPaymentsPermissions" + }, + "tickets": { + "$ref": "#/components/schemas/UserTicketsPermissions" + }, + "externalPayments": { + "$ref": "#/components/schemas/UserExternalPaymentsPermissions" + } + } + }, + "UserValidationPermissions": { + "description": "Permissions over the registration / email change validations of a given user", + "type": "object", + "properties": { + "validateRegistration": { + "description": "Can the authenticated administrator or broker manually mark a pending user as validated?", + "type": "boolean" + }, + "resendRegistrationValidation": { + "description": "Can the authenticated administrator or broker re-send the e-mail to confirm the registration of the given user?", + "type": "boolean" + }, + "validateEmailChange": { + "description": "Can the authenticated administrator or broker manually mark a pending e-mail change as validated for the given user?", + "type": "boolean" + }, + "resendEmailChange": { + "description": "Can the authenticated administrator or broker re-send the e-mail to confirm the e-mail change of the given user?", + "type": "boolean" + } + } + }, + "UserView": { + "description": "Represents a user with all data for viewing the profile", + "allOf": [ + { + "$ref": "#/components/schemas/User" + }, + { + "type": "object", + "x-implements": "IUser", + "properties": { + "name": { + "type": "string", + "description": "The user's full name" + }, + "username": { + "type": "string", + "description": "The user's login name" + }, + "email": { + "type": "string", + "description": "The user's e-mail" + }, + "nameLabel": { + "description": "The label used for the name of users", + "type": "string" + }, + "emailPendingValidation": { + "description": "Returned for managers / own user when the user has changed his e-mail but hasn't yet validated the new e-mail. The e-mail change validation is a configuration in Cyclos.", + "type": "string" + }, + "enabledProfileFields": { + "description": "The internal names of profile fields enabled for this user. For example, the user might have no phones, but it might be because he is not allowed to have phones or because there are currently no phones. Same for addresses, images and optional profile fields.", + "type": "array", + "items": { + "type": "string" + } + }, + "customValues": { + "description": "The list of custom field values this user has", + "type": "array", + "items": { + "$ref": "#/components/schemas/UserCustomFieldValue" + } + }, + "group": { + "description": "Reference to the user group. Is only returned if the authenticated user has permission to see groups.", + "allOf": [ + { + "$ref": "#/components/schemas/EntityReference" + } + ] + }, + "groupSet": { + "description": "Reference to the user group set. Is only returned if the authenticated user has permission to see group sets and the user group is in a group set.", + "allOf": [ + { + "$ref": "#/components/schemas/EntityReference" + } + ] + }, + "status": { + "description": "The user status. Only returned if the authenticated user has permission to view the user status.", + "allOf": [ + { + "$ref": "#/components/schemas/UserStatusEnum" + } + ] + }, + "additionalImages": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Image" + }, + "description": "Holds the images other than the primary image, which is returned in the `image` field" + }, + "addresses": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AddressView" + }, + "description": "Visible addresses" + }, + "phones": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PhoneView" + }, + "description": "Visible phones" + }, + "contactInfos": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ContactInfoDetailed" + }, + "description": "Visible additional contact information" + }, + "contact": { + "description": "When this user is in the contact list of the currently logged user, returns data about the contact relation. When not returned, this user is no in the logged user's contact list.", + "allOf": [ + { + "$ref": "#/components/schemas/ContactView" + } + ] + }, + "registrationDate": { + "type": "string", + "format": "date-time", + "description": "The date the user was registered. Only returned if the logged user manages the given used." + }, + "activationDate": { + "type": "string", + "format": "date-time", + "description": "The date the user was made active the first time. Only returned if the logged user manages the given used." + }, + "online": { + "type": "boolean", + "description": "Indicates whether the given user is logged-in to the system. Only returned if the logged user manages the given used." + }, + "lastLogin": { + "type": "string", + "format": "date-time", + "description": "The last time the user logged in, or null if never logged in. Only returned if the logged user manages the given used." + }, + "firstLogin": { + "type": "string", + "format": "date-time", + "description": "The first time the user logged in, or null if never logged in. Only returned if the logged user manages the given used." + }, + "invitedBy": { + "description": "Reference to the user that invited this user to register, if any. Only returned when a manager of the user (not the user himself or other users) is viewing the profile.", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "references": { + "description": "User general reference activities like score and total count.", + "allOf": [ + { + "$ref": "#/components/schemas/UserReferences" + } + ] + }, + "paymentFeedbacks": { + "description": "User payment feedbacks activities like score and total count.", + "allOf": [ + { + "$ref": "#/components/schemas/UserReferences" + } + ] + }, + "permissions": { + "description": "Permissions the authenticated user has over this other user. If both are the same, only the `permissions.profile` property will have information, the other permissions will be set to false, for this case, we advise you to use the permissions from the `GET /auth` operation.", + "allOf": [ + { + "$ref": "#/components/schemas/UserPermissions" + } + ] + }, + "brokers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BrokerView" + }, + "description": "Visible brokers" + }, + "role": { + "$ref": "#/components/schemas/RoleEnum" + }, + "relationship": { + "$ref": "#/components/schemas/UserRelationshipEnum" + }, + "records": { + "description": "Records data, keyed by record type id or internal name.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/UserRecords" + } + }, + "documents": { + "$ref": "#/components/schemas/UserDocuments" + }, + "accounts": { + "description": "The list of accounts with status", + "type": "array", + "items": { + "$ref": "#/components/schemas/AccountWithStatus" + } } - }, - "resultType" : { - "description" : "Indicates the type for customizable results like tiles, list, etc", - "allOf" : [ { - "$ref" : "#/components/schemas/ResultTypeEnum" - } ] } } - } ] + ] }, - "UserDeliveryMethodsListData" : { - "description" : "Contains, besides the user's delivery methods, additional data for its management", - "type" : "object", - "properties" : { - "user" : { - "$ref" : "#/components/schemas/User" - }, - "canEdit" : { - "description" : "Indicates whether the delivery methods can be edited by the authenticated user", - "type" : "boolean" + "UserVoucherTransactionsDataForSearch": { + "description": "Contains configuration data for searching voucher transactions of a user", + "allOf": [ + { + "$ref": "#/components/schemas/BaseVouchersDataForSearch" }, - "canCreate" : { - "description" : "Indicates whether the authenticated user can create a new delivery method this user", - "type" : "boolean" - }, - "deliveryMethods" : { - "description" : "The delivery methods list", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/DeliveryMethod" + { + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/User" + }, + "canRedeem": { + "description": "Indicates whether the authenticated user can redeem vouchers in behalf of this user", + "type": "boolean" + }, + "canTopUp": { + "description": "Indicates whether the authenticated user can top-up vouchers in behalf of this user", + "type": "boolean" + }, + "operators": { + "description": "When searching for redeemed vouchers, the operators of the redeemer.", + "type": "array", + "items": { + "$ref": "#/components/schemas/User" + } + }, + "topUpEnabled": { + "description": "Indicates whether there is a voucher configuration supporting top-up which is enabled for this user and visible for the authenticated user. This flag is not related to the top-up permission.", + "type": "boolean" + }, + "query": { + "$ref": "#/components/schemas/UserVoucherTransactionsQueryFilters" + } } } - } - }, - "UserDocuments" : { - "description" : "Data regarding the documents of a given user", - "type" : "object", - "properties" : { - "count" : { - "description" : "The number of documents for this user", - "type" : "integer" - } - } + ] }, - "UserDocumentsPermissions" : { - "description" : "Permissions regarding the documents of a given user", - "type" : "object", - "properties" : { - "view" : { - "description" : "Can the authenticated user view the documents of this user?", - "type" : "boolean" + "UserVoucherTransactionsQueryFilters": { + "description": "Definitions for searching voucher transactions of a user", + "allOf": [ + { + "$ref": "#/components/schemas/QueryFilters" }, - "count" : { - "deprecated" : true, - "x-remove-version" : 4.16, - "description" : "Use `UserView.documents` instead.\n\n\nThe number of documents for this user", - "type" : "integer" - } - } - }, - "UserEdit" : { - "description" : "Contains data used to edit a user / operator profile fields. Operators are always \"hidden\", so the `hiddenFields` property don't apply to them.", - "allOf" : [ { - "$ref" : "#/components/schemas/UserManage" - }, { - "type" : "object", - "properties" : { - "version" : { - "type" : "integer", - "description" : "The version stamp for the current object, used for optimistic locking. When saving, the same version as previously received needs to be passed back. If no one else has saved the object, the version will match and the object will be updated. However, if someone other has saved the object, the version will no longer match, and an error will be raised. This is used to prevent multiple users (or processes) from updating the same object and unwilingly overridding the property values, leading to data loss." + { + "type": "object", + "properties": { + "amountRange": { + "description": "The minimum / maximum amount. For bought vouchers, is the voucher amount. For redeemed vouchers, is the redeem amount.", + "type": "array", + "items": { + "type": "string", + "format": "number" + } + }, + "kinds": { + "description": "The kind of the voucher transaction.", + "type": "array", + "items": { + "$ref": "#/components/schemas/VoucherTransactionKind" + } + }, + "kind": { + "description": "Use `kinds` instead.", + "deprecated": true, + "x-remove-version": 4.18, + "$ref": "#/components/schemas/VoucherTransactionKind" + }, + "datePeriod": { + "description": "The minimum / maximum voucher transaction date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "types": { + "description": "The ids or internal names of voucher types", + "type": "array", + "items": { + "type": "string" + } + }, + "by": { + "description": "The user who performed the voucher transaction. A user identification value, such as id, username, e-mail, phone, etc. Id is always allowed, others depend on Cyclos configuration. Note that a valid numeric value is always considered as id. For example, when using another identification method that can be numeric only, prefix the value with a single quote (like in Excel spreadsheets), for example, `'1234567890`;", + "type": "string" + } } } - } ] + ] }, - "UserExternalPaymentsPermissions" : { - "description" : "Permissions for external payments over a user", - "type" : "object", - "properties" : { - "view" : { - "description" : "Can the authenticated administrator or broker view external payments of the given user?", - "type" : "boolean" - }, - "performAsSelf" : { - "description" : "Only if authenticated as this user. Indicates whether an external payment can be performed.", - "type" : "boolean" + "UserVouchersDataForSearch": { + "description": "Contains configuration data for searching vouchers of a user", + "allOf": [ + { + "$ref": "#/components/schemas/BaseVouchersDataForSearch" }, - "performAsUser" : { - "description" : "Can the authenticated administrator or broker perform an external payment in behalf of the given user to other users?", - "type" : "boolean" + { + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/User" + }, + "canRedeem": { + "description": "Indicates whether the authenticated user can redeem vouchers in behalf of this user", + "type": "boolean" + }, + "canBuy": { + "description": "Indicates whether the authenticated user can buy vouchers in behalf of this user", + "type": "boolean" + }, + "canSend": { + "description": "Indicates whether the authenticated user can send vouchers in behalf of this user", + "type": "boolean" + }, + "canSendImport": { + "description": "Indicates whether the authenticated user can send batch vouchers via imports in behalf of this user", + "type": "boolean" + }, + "operators": { + "description": "When searching for redeemed vouchers, the operators of the redeemer.", + "type": "array", + "items": { + "$ref": "#/components/schemas/User" + } + }, + "query": { + "$ref": "#/components/schemas/UserVouchersQueryFilters" + }, + "exportFormats": { + "description": "The formats which the search results can be exported.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExportFormat" + } + } + } + } + ] + }, + "UserVouchersPermissions": { + "description": "Permissions over a user vouchers", + "type": "object", + "properties": { + "view": { + "description": "Can view owned vouchers?", + "type": "boolean" + }, + "buy": { + "description": "Can buy vouchers?", + "type": "boolean" + }, + "send": { + "description": "Can send digital vouchers by e-mail?", + "type": "boolean" + }, + "viewTransactions": { + "description": "Can view voucher transactions?", + "type": "boolean" + }, + "redeem": { + "description": "Can redeem vouchers?", + "type": "boolean" + }, + "topUp": { + "description": "Can top-up vouchers?", + "type": "boolean" + }, + "topUpEnabled": { + "description": "Indicates whether there is a voucher configuration supporting top-up which is enabled for this user and visible for the authenticated user. This flag is not related to the top-up permission.", + "type": "boolean" + }, + "viewRedeemed": { + "deprecated": true, + "x-remove-version": 4.17, + "description": "Use `view` instead.", + "type": "boolean" + }, + "viewBought": { + "deprecated": true, + "x-remove-version": 4.17, + "description": "Use `viewTransactions` instead.", + "type": "boolean" + } + } + }, + "UserVouchersQueryFilters": { + "description": "Definitions for searching vouchers of a user", + "allOf": [ + { + "$ref": "#/components/schemas/BaseVouchersQueryFilters" + }, + { + "type": "object", + "properties": { + "relation": { + "deprecated": true, + "x-remove-version": 4.17, + "description": "For redeemed, or starting with 4.15, voucher transactions, use `GET /voucher-transactions` instead.", + "allOf": [ + { + "$ref": "#/components/schemas/VoucherRelationEnum" + } + ] + }, + "redeemPeriod": { + "deprecated": true, + "x-remove-version": 4.17, + "description": "For redeemed, or starting with 4.15, voucher transactions, use `GET /voucher-transactions` instead.\n\n\nThe minimum / maximum voucher transaction date. Only used when searching for redeemed, not bought vouchers. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "redeemBy": { + "description": "For redeemed, or starting with 4.15, voucher transactions, use `GET /voucher-transactions` instead.\n\n\nThe user who perform the transaction action. Only used when searching for redeemed, not bought vouchers. A user identification value, such as id, username, e-mail, phone, etc. Id is always allowed, others depend on Cyclos configuration. Note that a valid numeric value is always considered as id. For example, when using another identification method that can be numeric only, prefix the value with a single quote (like in Excel spreadsheets), for example, `'1234567890`;", + "type": "string" + } + } } - } + ] }, - "UserGroupPermissions" : { - "description" : "Permissions regarding the group membership of a given user", - "type" : "object", - "properties" : { - "view" : { - "description" : "Can the authenticated user view the group membership of a given user?", - "type" : "boolean" + "UserWebshopPermissions": { + "description": "Permissions over webshop asd of a specific user", + "allOf": [ + { + "$ref": "#/components/schemas/UserBaseAdPermissions" + }, + { + "type": "object", + "properties": { + "viewPurchases": { + "description": "Can view the purchases? Only returned if there is an authenticated user.", + "type": "boolean" + }, + "viewSales": { + "description": "Can view the sales? Only returned if there is an authenticated user.", + "type": "boolean" + }, + "viewSettings": { + "description": "Can view the webshop settings? Only returned if there is an authenticated user.", + "type": "boolean" + }, + "manageSettings": { + "description": "Can manage the webshop settings? Only returned if there is an authenticated user.", + "type": "boolean" + } + } } - } + ] }, - "UserIdentityProvider" : { - "description" : "A link between a user an an identity provider", - "allOf" : [ { - "$ref" : "#/components/schemas/Entity" - }, { - "type" : "object", - "properties" : { - "identityProvider" : { - "$ref" : "#/components/schemas/IdentityProvider" - }, - "status" : { - "$ref" : "#/components/schemas/UserIdentityProviderStatusEnum" - }, - "linkDate" : { - "description" : "The date the link was created. Only if `status` is `linked`.", - "type" : "string", - "format" : "date-time" - }, - "name" : { - "description" : "The display name of the user in the identity provider. Only if `status` is `linked`.", - "type" : "string" - }, - "email" : { - "description" : "The e-mail name of the user in the identity provider Only if `status` is `linked` and if the provider has disclosed the user's e-mail.", - "type" : "string" + "UserWithBalanceResult": { + "description": "Result of a user search with balance", + "allOf": [ + { + "$ref": "#/components/schemas/UserResult" + }, + { + "type": "object", + "properties": { + "balance": { + "description": "The raw account balance", + "type": "string", + "format": "number" + }, + "negativeSince": { + "description": "The date since the account has been negative", + "type": "string", + "format": "date-time" + }, + "balanceLevel": { + "$ref": "#/components/schemas/BalanceLevelEnum" + } } } - } ] + ] }, - "UserIdentityProvidersListData" : { - "description" : "Contains, besides the user's identity provider links, additional data for its management", - "type" : "object", - "properties" : { - "user" : { - "$ref" : "#/components/schemas/User" + "UsersPermissions": { + "description": "Permissions over other users", + "type": "object", + "properties": { + "search": { + "description": "Permission to search other users", + "type": "boolean" }, - "canLink" : { - "description" : "Indicates whether a new identity provider can be linked to the user", - "type" : "boolean" + "viewProfile": { + "description": "General permission to view the profile of other users. A fine-grained permission over specific groups can be configured. When attempting to view the profile of a user without permission, only very basic information is returned instead.", + "type": "boolean" }, - "canEdit" : { - "description" : "Indicates whether existing links can be edited", - "type" : "boolean" + "map": { + "description": "Permission to view the user map directory", + "type": "boolean" }, - "identityProviders" : { - "description" : "The identity provider links", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/UserIdentityProvider" - } - } - } - }, - "UserIdentityProvidersPermissions" : { - "description" : "Permissions over the identity provider links", - "type" : "object", - "properties" : { - "view" : { - "description" : "Can view the relationships to identity providers?", - "type" : "boolean" + "registerAsAdmin": { + "description": "Is the authenticated user an administrator that can register users?", + "type": "boolean" + }, + "registerAsBroker": { + "description": "Is the authenticated user a broker that can register users?", + "type": "boolean" + }, + "registerAsMember": { + "description": "Is the authenticated user a user that can register other users?", + "type": "boolean" + }, + "viewPending": { + "description": "Permission to view the users in status `pending`", + "type": "boolean" + }, + "managePending": { + "description": "Permission to manage the users in status `pending`", + "type": "boolean" } } }, - "UserLocale" : { - "description" : "Defines the user's language and region", - "allOf" : [ { - "$ref" : "#/components/schemas/NamedEntity" - }, { - "type" : "object", - "properties" : { - "code" : { - "type" : "string", - "description" : "Locale code used to specify user's language" - } - } - } ] - }, - "UserManage" : { - "x-abstract" : true, - "description" : "Contains the fields for either creating or modifying a user", - "allOf" : [ { - "$ref" : "#/components/schemas/BasicUserManage" - }, { - "type" : "object", - "properties" : { - "hiddenFields" : { - "type" : "array", - "items" : { - "type" : "string" + "UsersWithBalanceQueryFilters": { + "description": "Parameters for searching users with their balances", + "allOf": [ + { + "$ref": "#/components/schemas/BasicUserQueryFilters" + }, + { + "type": "object", + "required": [ + "accountType" + ], + "properties": { + "accountType": { + "x-in": "path", + "description": "The account type", + "type": "string" + }, + "balanceRange": { + "description": "The minimum and / or maximum balance for users to be returned. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "type": "array", + "items": { + "type": "string", + "format": "number" + } + }, + "negativeSincePeriod": { + "description": "The minimum / maximum negative-since date for users to be returned. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "mediumBalanceRange": { + "description": "An array with 2 elements, describing the lower and upper medium balance bounds. Both of them need to be set as 2 element in the array, or it won't be considered.", + "type": "array", + "items": { + "type": "integer" + } }, - "description" : "An array with the internal names of either the basic or custom fields that should be hidden from other users. Currently the only basic profile field that can be hidden is email. Any other will be considered a custom field, and should be the same key as used in the 'customValues' property." + "orderBy": { + "$ref": "#/components/schemas/UsersWithBalanceOrderByEnum" + } } } - } ] + ] }, - "UserMarketplacePermissions" : { - "description" : "Permissions over a user marketplace", - "type" : "object", - "properties" : { - "simple" : { - "description" : "Permissions over simple advertisements", - "$ref" : "#/components/schemas/UserBaseAdPermissions" + "UsersWithBalanceSummary": { + "description": "Contains summarized information about balances per range, plus the total", + "type": "object", + "properties": { + "low": { + "description": "Summary of low balances. Is only returned when a medium balance range is defined, either in the account type or in the query parameters.", + "allOf": [ + { + "$ref": "#/components/schemas/AmountSummary" + } + ] }, - "webshop" : { - "description" : "Permissions over webshop ads", - "$ref" : "#/components/schemas/UserWebshopPermissions" + "medium": { + "description": "Summary of medium balances. Is only returned when a medium balance range is defined, either in the account type or in the query parameters.", + "allOf": [ + { + "$ref": "#/components/schemas/AmountSummary" + } + ] }, - "viewInterests" : { - "description" : "Can view ad interests? Only returned if there is an authenticated user.", - "type" : "boolean" + "high": { + "description": "Summary of high balances. Is only returned when a medium balance range is defined, either in the account type or in the query parameters.", + "allOf": [ + { + "$ref": "#/components/schemas/AmountSummary" + } + ] }, - "manageInterests" : { - "description" : "Can manage ad interests? Only returned if there is an authenticated user.", - "type" : "boolean" + "total": { + "description": "Summary of all balances.", + "allOf": [ + { + "$ref": "#/components/schemas/AmountSummary" + } + ] } } }, - "UserMessagesPermissions" : { - "description" : "Permissions regarding to the messaging of a given user", - "type" : "object", - "properties" : { - "send" : { - "description" : "Can the authenticated user send a message to a given user?", - "type" : "boolean" + "VersionedEntity": { + "description": "Basic definition of a persistent entity which has a version", + "allOf": [ + { + "$ref": "#/components/schemas/Entity" + }, + { + "type": "object", + "properties": { + "version": { + "type": "integer", + "description": "The version stamp for the current object, used for optimistic locking. When saving, the same version as previously received needs to be passed back. If no one else has saved the object, the version will match and the object will be updated. However, if someone other has saved the object, the version will no longer match, and an error will be raised. This is used to prevent multiple users (or processes) from updating the same object and unwilingly overridding the property values, leading to data loss." + } + } + } + ] + }, + "VersionedEntityReference": { + "description": "Represents an entity that is being referenced from another one, without caring about the type of the referenced entity. Also carries on the entity version", + "x-final": true, + "allOf": [ + { + "$ref": "#/components/schemas/InternalNamedEntity" + }, + { + "type": "object", + "properties": { + "version": { + "type": "integer", + "description": "The version stamp for the current object, used for optimistic locking. When saving, the same version as previously received needs to be passed back. If no one else has saved the object, the version will match and the object will be updated. However, if someone other has saved the object, the version will no longer match, and an error will be raised. This is used to prevent multiple users (or processes) from updating the same object and unwilingly overridding the property values, leading to data loss." + } + } } - } + ] }, - "UserNew" : { - "description" : "Contains data used to register a user. All basic profile fields (full name, login name, e-mail, phones, addresses and image) can be enabled or disabled on Cyclos, via products. Also, the available custom fields and whether they can be hidden depend on the products the selected group has.", - "x-implements" : "IBasicUserNew", - "allOf" : [ { - "$ref" : "#/components/schemas/UserManage" - }, { - "type" : "object", - "properties" : { - "group" : { - "type" : "string", - "description" : "The initial user group" - }, - "broker" : { - "type" : "string", - "description" : "Either the identifier or other identification value (login name, e-mail, etc) of the broker for the new user. Only allowed if logged-in as administrator with permission." - }, - "mobilePhones" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PhoneNew" + "Voucher": { + "description": "A voucher is a token which can be used to buy at places that accept payments in Cyclos. Even users which are not members can get a printed token (or scratch card, ticket, etc) and buy in such places.", + "allOf": [ + { + "$ref": "#/components/schemas/Entity" + }, + { + "type": "object", + "properties": { + "token": { + "description": "The voucher token", + "type": "string" }, - "description" : "Mobile phones to be registered together with the user" - }, - "landLinePhones" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PhoneNew" + "status": { + "$ref": "#/components/schemas/VoucherStatusEnum" }, - "description" : "Land-line phones to be registered together with the user" - }, - "passwords" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PasswordRegistration" + "amount": { + "description": "The voucher amount. Only returned when the voucher had a fixed amount when generated.", + "type": "string", + "format": "number" }, - "description" : "The initial passwords of the user" - }, - "skipActivationEmail" : { - "type" : "boolean", - "description" : "When set to true, the activation e-mail is not sent to the registered user. Can only be used when an administrator / broker is registering a user, and ignored on public registrations (the e-mail is always sent on public registrations)." - }, - "identityProviderRequestId" : { - "type" : "string", - "description" : "When using an [external identity provider](https://wiki4.cyclos.org/index.php/External_identity_providers), this is the request id used to complete the registration process after filling up the registration form." - }, - "addresses" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/AddressNew" + "balance": { + "description": "The voucher balance.", + "type": "string", + "format": "number" }, - "description" : "Addresses to be registered together with the user" - }, - "contactInfos" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ContactInfoNew" + "email": { + "description": "The e-mail to which the voucher was sent or which receives notifications.", + "type": "string" }, - "description" : "Additional contacts to be registered together with the user" - }, - "images" : { - "type" : "array", - "items" : { - "type" : "string" + "expirationDate": { + "description": "The date the voucher expires", + "type": "string", + "format": "date-time" }, - "description" : "The ids of previously uploaded user temporary images to be initially used as profile images" - }, - "captcha" : { - "type" : "object", - "description" : "The captcha response is required on public registrations, and ignored when administrators / brokers register another user.", - "allOf" : [ { - "$ref" : "#/components/schemas/CaptchaResponse" - } ] - }, - "acceptAgreement" : { - "type" : "boolean", - "description" : "When there are agreements that need to be accepted for registration, either this property should be set to `true`, indicating that all agreements are accepted, or the `accepteAgreements` array must be set indicating which ones are agreed." - }, - "acceptAgreements" : { - "type" : "array", - "items" : { - "type" : "string" + "type": { + "$ref": "#/components/schemas/VoucherType" }, - "description" : "Either ids or internal names of agreements to accept. When there are agreements, either the `accepteAgreement` flag should be sent, indicating that all agreements are accepted, or this array should be sent indicating which agreements are accepted. All required agreements must be sent, or a validation error is returned. Optional agreements can be sent or not." - }, - "asMember" : { - "type" : "boolean", - "description" : "Flag required only when the authenticated user is a broker, in that case we need to distingish between registering as member or broker. If true then the new user will be registered without a brokering relationship. Otherwise the authenticated user will be set as the broker of the new user." - }, - "securityQuestion" : { - "type" : "string", - "description" : "If the server is configured to use security question, is the `internalName` of the question present in the result of `data-for-new`, in the `securityQuestions` property. Is optional and only used in public registration." - }, - "securityAnswer" : { - "type" : "string", - "description" : "If a `securityQuestion` is informed, this is the answer. Required in this case. Only used in public registration." - }, - "nfcToken" : { - "type" : "object", - "description" : "If not null then the given NFC token parameters will be used to personalize a tag for the user.", - "allOf" : [ { - "$ref" : "#/components/schemas/NfcTokenWithChallengeParameter" - } ] - }, - "inviteToken" : { - "type" : "string", - "description" : "A token generated by sending an invitation for new users. When given, the e-mail will be pre-filled, and if the same e-mail address is used, it won't need to be validated, because the token was previously sent to that e-mail address. Also, if the link was sent by a broker, that broker will be immediately assigned to the the newly registered user. Only used for public registrations." + "creationType": { + "$ref": "#/components/schemas/VoucherCreationTypeEnum" + }, + "gift": { + "description": "Indicates whether this voucher was bought as a gift. Only returned when `creationType` is `bought`.", + "type": "boolean" + } } } - } ] - }, - "UserNotificationSettingsPermissions" : { - "description" : "Permissions regarding the notification settings of a given user", - "type" : "object", - "properties" : { - "view" : { - "description" : "Can the authenticated user view the notification settings of a given user?", - "type" : "boolean" - } - } + ] }, - "UserOperatorGroupsListData" : { - "description" : "Contains, besides the user's operator groups, additional data for their management", - "type" : "object", - "properties" : { - "user" : { - "$ref" : "#/components/schemas/User" + "VoucherBasicData": { + "description": "Contains common data for voucher actions", + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/User" }, - "canEdit" : { - "description" : "Indicates whether the operator groups can be edited by the authenticated user", - "type" : "boolean" + "type": { + "$ref": "#/components/schemas/VoucherTypeDetailed" }, - "canCreate" : { - "description" : "Indicates whether the authenticated user can create a new operator groups for this user", - "type" : "boolean" + "paymentCustomFields": { + "description": "The payment custom fields associated with this voucher type", + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldDetailed" + } }, - "operatorGroups" : { - "description" : "The operator groups list", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/EntityReference" + "customFields": { + "deprecated": true, + "x-remove-version": 4.17, + "description": "Use `paymentCustomFields` instead.", + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldDetailed" } } } }, - "UserOperatorsDataForSearch" : { - "type" : "object", - "properties" : { - "user" : { - "$ref" : "#/components/schemas/User" - }, - "canCreateNew" : { - "description" : "Indicates whether the authenticated user can create more operators for the specified user.", - "type" : "boolean" - }, - "groups" : { - "description" : "The operator groups this user owns", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/EntityReference" - } - }, - "fieldsInList" : { - "description" : "The internal names of either basic or custom profile fields that are configured to be shown on the list. This actually defines the fields that will be loaded on the result. It is possible that no fields are configured to be returned on list. In this case, the result objects will have the 'display' property loaded with what is configured to be the user formatting field(s).", - "type" : "array", - "items" : { - "type" : "string" - } + "VoucherBasicDataForTransaction": { + "description": "Contains common data for either redeeming or topping-up a voucher", + "allOf": [ + { + "$ref": "#/components/schemas/VoucherBasicData" }, - "basicFields" : { - "description" : "The basic profile fields in the result list", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/BasicProfileFieldInput" + { + "type": "object", + "properties": { + "kind": { + "$ref": "#/components/schemas/VoucherTransactionKind" + }, + "token": { + "description": "The formatted voucher token.", + "type": "string" + }, + "amount": { + "description": "The voucher amount. Maybe null. Vouchers can be generated without a fixed amount, and be topped-up later on.", + "type": "string", + "format": "number" + }, + "shouldPreview": { + "description": "Indicates whether the user should be taken to a preview page before actually confirming the operation.", + "type": "boolean" + } } - }, - "customFields" : { - "description" : "The custom profile fields in the result list", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/CustomFieldDetailed" + } + ] + }, + "VoucherBoughtResult": { + "description": "Result of buying vouchers", + "type": "object", + "properties": { + "vouchers": { + "description": "The identifiers of all bought vouchers.", + "type": "array", + "items": { + "type": "string" } }, - "query" : { - "description" : "Default query filters to search a user's operators", - "allOf" : [ { - "$ref" : "#/components/schemas/UserOperatorsQueryFilters" - } ] + "voucherStatus": { + "description": "The status of all bought vouchers.", + "allOf": [ + { + "$ref": "#/components/schemas/VoucherStatusEnum" + } + ] } } }, - "UserOperatorsPermissions" : { - "description" : "Permissions regarding the user's operators and operator groups", - "type" : "object", - "properties" : { - "viewOperators" : { - "description" : "Can the authenticated user view the operators of this user?", - "type" : "boolean" + "VoucherBuyingPreview": { + "description": "Preview information of a voucher buying.", + "allOf": [ + { + "$ref": "#/components/schemas/BaseVoucherBuyingPreview" }, - "viewGroups" : { - "description" : "Can the authenticated user view the operator groups of this user?", - "type" : "boolean" + { + "type": "object", + "properties": { + "totalAmount": { + "description": "The total amount vouchers being bought. Is `count * amount`.", + "type": "string", + "format": "number" + }, + "buyVoucher": { + "description": "The parameters object that should be re-posted", + "allOf": [ + { + "$ref": "#/components/schemas/BuyVoucher" + } + ] + } + } } - } + ] }, - "UserOperatorsQueryFilters" : { - "description" : "Definitions for a user's operators search filters", - "allOf" : [ { - "$ref" : "#/components/schemas/BasicOperatorQueryFilters" - }, { - "type" : "object", - "properties" : { - "ignoreProfileFieldsInList" : { - "type" : "boolean", - "description" : "When set to `true`, instead of returning users with corresponding profile fields set on list, will return them with `display`." - }, - "operatorGroups" : { - "description" : "An array of operator group ids", - "type" : "array", - "items" : { - "type" : "string" + "VoucherCategory": { + "description": "Reference to a voucher category", + "allOf": [ + { + "$ref": "#/components/schemas/InternalNamedEntity" + }, + { + "type": "object", + "properties": { + "image": { + "$ref": "#/components/schemas/Image" } } } - } ] + ] }, - "UserOrderResult" : { - "description" : "Data of an order as returned on list associated to an user.", - "allOf" : [ { - "$ref" : "#/components/schemas/OrderResult" - }, { - "type" : "object", - "properties" : { - "relatedUser" : { - "description" : "The other related user, i.e if we're listing the sales of a user then it represents the buyer. Otherwise (purchases) the seller.", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] + "VoucherConfiguration": { + "description": "Reference to a voucher configuration", + "allOf": [ + { + "$ref": "#/components/schemas/InternalNamedEntity" + }, + { + "type": "object", + "properties": { + "currency": { + "$ref": "#/components/schemas/Currency" + } } } - } ] + ] }, - "UserPasswordsPermissions" : { - "description" : "Permissions over passwords of a given user", - "type" : "object", - "properties" : { - "manage" : { - "description" : "Can the authenticated administrator or broker manage the password(s) of the given user?", - "type" : "boolean" + "VoucherCreateData": { + "description": "Contains common data for voucher creation", + "allOf": [ + { + "$ref": "#/components/schemas/VoucherBasicData" }, - "resetSecurityQuestion" : { - "description" : "Can the authenticated administrator or broker reset the user's security question, so that the user can set it again?", - "type" : "boolean" + { + "type": "object", + "properties": { + "account": { + "description": "The account from which the buy will be debited", + "allOf": [ + { + "$ref": "#/components/schemas/AccountWithStatus" + } + ] + }, + "minimumTimeToRedeem": { + "description": "Returned if there is a minimum time to be elapsed before bought vouchers can be redeemed", + "allOf": [ + { + "$ref": "#/components/schemas/TimeInterval" + } + ] + }, + "expirationDate": { + "description": "The date the voucher expires", + "type": "string", + "format": "date-time" + }, + "redeemAfterDate": { + "description": "The date after which a voucher can be redeemed, it is calculated based on `minimumTimeToRedeem`", + "type": "string", + "format": "date-time" + }, + "redeemOnWeekDays": { + "description": "The days of the week a voucher can be redeemed. Only returned when the voucher status is neither `redeemed` nor `canceled`. Also not returned when searching for redeemed vouchers of a specific user.", + "type": "array", + "items": { + "$ref": "#/components/schemas/WeekDayEnum" + } + } + } } - } + ] }, - "UserPaymentFeedbacksPermissions" : { - "description" : "Permissions over payment feedbacks of an user", - "type" : "object", - "properties" : { - "view" : { - "description" : "Can view other payment feedback's references?", - "type" : "boolean" + "VoucherDataForBuy": { + "description": "If a type is not specified when requesting this data only the given user data and the list of types the authenticated user can buy for it (could be himself) is returned.", + "allOf": [ + { + "$ref": "#/components/schemas/VoucherCreateData" + }, + { + "type": "object", + "properties": { + "canBuyMultiple": { + "description": "If user can buy multiple vouchers at same time", + "type": "boolean" + }, + "fixedAmount": { + "description": "Returned if there is a fixed amount for bought vouchers. Is kept for backwards compatibility, because the `amountRange` is enough to return this information (when `min` and `max` are the same amount)", + "type": "string", + "format": "number" + }, + "amountRange": { + "description": "Returned if there is a minimum / maximum amount for buying", + "allOf": [ + { + "$ref": "#/components/schemas/DecimalRange" + } + ] + }, + "categories": { + "description": "The list of voucher categories applicable to the possible types. Returned only if no type parameter is given.", + "type": "array", + "items": { + "$ref": "#/components/schemas/VoucherCategory" + } + }, + "types": { + "description": "The list of voucher types the authenticated user can buy to another user (or himself). Returned only if no type parameter is given.", + "type": "array", + "items": { + "$ref": "#/components/schemas/VoucherTypeDetailed" + } + }, + "voucherCustomFields": { + "description": "The list of available voucher custom fields associated with this voucher type for the authenticated user.", + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldDetailed" + } + }, + "confirmationPasswordInput": { + "deprecated": true, + "x-remove-version": 4.17, + "description": "The buying / sending should use a preview. So, call the preview operation and the confirmation password input will be returned on it", + "allOf": [ + { + "$ref": "#/components/schemas/PasswordInput" + } + ] + } + } } - } + ] }, - "UserPaymentLimitsPermissions" : { - "description" : "Permissions regarding the account payment limits of a given user", - "type" : "object", - "properties" : { - "view" : { - "description" : "Can the authenticated user view the payment limits of the user?", - "type" : "boolean" + "VoucherDataForGenerate": { + "description": "Returns the data to generate vouchers. If a type is not specified when requesting this data only the given user data and the list of types the authenticated user can generate is returned.", + "allOf": [ + { + "$ref": "#/components/schemas/VoucherCreateData" + }, + { + "type": "object", + "properties": { + "generationStatus": { + "$ref": "#/components/schemas/VoucherGenerationStatusEnum" + }, + "generationAmount": { + "$ref": "#/components/schemas/VoucherGenerationAmountEnum" + }, + "generateVoucher": { + "description": "The object that can be altered and posted back to generate the vouchers", + "allOf": [ + { + "$ref": "#/components/schemas/GenerateVoucher" + } + ] + }, + "categories": { + "description": "The list of voucher categories applicable to the possible types. Returned only if no type parameter is given.", + "type": "array", + "items": { + "$ref": "#/components/schemas/VoucherCategory" + } + }, + "types": { + "description": "The list of voucher types the authenticated user can generate. Returned only if no type parameter is given.", + "type": "array", + "items": { + "$ref": "#/components/schemas/VoucherTypeDetailed" + } + }, + "user": { + "$ref": "#/components/schemas/User" + }, + "confirmationPasswordInput": { + "description": "If a confirmation password is used, contains the definitions on how to request that password from the user. This confirmation password is required when performing sensible actions. Sometimes this is dynamic, for example, the confirmation might be configured to be used only once per session, or operations like payments may have a limit per day to be without confirmation (pinless).", + "allOf": [ + { + "$ref": "#/components/schemas/PasswordInput" + } + ] + }, + "voucherCustomFields": { + "description": "The list of available voucher custom fields associated with this voucher type for the authenticated user", + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldDetailed" + } + } + } } - } + ] }, - "UserPaymentPermissions" : { - "description" : "Permissions for payments regarding a user", - "type" : "object", - "properties" : { - "selfToSelf" : { - "description" : "Only if authenticated as this user. Indicates whether a self payment can be performed.", - "type" : "boolean" - }, - "selfToSystem" : { - "description" : "Only if authenticated as this user. Indicates whether a payment to system can be performed.", - "type" : "boolean" - }, - "selfToUser" : { - "description" : "Only if authenticated as this user. Indicates whether a payment to another user can be performed.", - "type" : "boolean" - }, - "asUserToSelf" : { - "description" : "Can the authenticated administrator or broker perform a payment in behalf of this user to another account belonging to the same user?", - "type" : "boolean" + "VoucherDataForRedeem": { + "description": "Data used to redeem a voucher", + "allOf": [ + { + "$ref": "#/components/schemas/VoucherBasicDataForTransaction" }, - "asUserToSystem" : { - "description" : "Can the authenticated administrator or broker perform a payment in behalf of this user to a system account?", - "type" : "boolean" - }, - "asUserToUser" : { - "description" : "Can the authenticated administrator or broker perform a payment in behalf of this user to another user?", - "type" : "boolean" - }, - "systemToUser" : { - "description" : "Can the authenticated administrator perform a payment from a system account to this user?", - "type" : "boolean" - }, - "userToUser" : { - "description" : "Can the authenticated member perform a payment from an himself to this user?", - "type" : "boolean" + { + "type": "object", + "properties": { + "balance": { + "description": "The voucher remaining balance. Is not returned when the voucher has a dynamic amount.", + "type": "string", + "format": "number" + }, + "pinInput": { + "description": "Is returned when this redeem requires a PIN to be entered. Contains the definitions for the voucher PIN.", + "allOf": [ + { + "$ref": "#/components/schemas/PasswordInput" + } + ] + }, + "buyer": { + "description": "The voucher buyer, if any and visible", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "canSendPin": { + "description": "Returns if there is any medium to send the Voucher PIN to the client", + "type": "boolean" + } + } } - } + ] }, - "UserPaymentRequestsPermissions" : { - "description" : "Permissions for payment requests over a user", - "type" : "object", - "properties" : { - "view" : { - "description" : "Can the authenticated administrator or broker view payment requests of the given user?", - "type" : "boolean" - }, - "sendSelfToSystem" : { - "description" : "Only if authenticated as this user. Indicates whether the user can send a payment request to system.", - "type" : "boolean" - }, - "sendSelfToUser" : { - "description" : "Only if authenticated as this user. Indicates whether the user can send a payment request to another user.", - "type" : "boolean" - }, - "sendFromSystem" : { - "description" : "Can the authenticated administrator send a payment request from system to the given user?", - "type" : "boolean" - }, - "sendFromUser" : { - "description" : "Can the authenticated user send a payment request to the given user?", - "type" : "boolean" - }, - "sendAsUserToUser" : { - "description" : "Can the authenticated administrator or broker send payment requests in behalf of the given user to other users?", - "type" : "boolean" + "VoucherDataForTopUp": { + "description": "Data used to top-up or activate a voucher", + "allOf": [ + { + "$ref": "#/components/schemas/VoucherBasicDataForTransaction" }, - "sendAsUserToSystem" : { - "description" : "Can the authenticated administrator or broker send payment requests in behalf of the given user to system?", - "type" : "boolean" + { + "type": "object", + "properties": { + "isActivation": { + "description": "Indicates whether this top-up will activate the voucher. This means the voucher status is currently `inactive`.", + "type": "boolean" + }, + "confirmationPasswordInput": { + "description": "If a confirmation password is used, contains the definitions on how to request that password from the user. This confirmation password is required when performing sensible actions. Sometimes this is dynamic, for example, the confirmation might be configured to be used only once per session, or operations like payments may have a limit per day to be without confirmation (pinless).", + "allOf": [ + { + "$ref": "#/components/schemas/PasswordInput" + } + ] + }, + "generationAmount": { + "$ref": "#/components/schemas/VoucherGenerationAmountEnum" + }, + "pinOnActivation": { + "$ref": "#/components/schemas/VoucherPinOnActivationEnum" + }, + "phoneConfiguration": { + "description": "Configuration for input of the mobile phone used to either send the PIN or voucher notifications. Only returned if `isActivation` is true and SMS sending is enabled.", + "allOf": [ + { + "$ref": "#/components/schemas/PhoneConfiguration" + } + ] + }, + "emailInput": { + "description": "Indicates if and how the e-mail should be entered on activation.\n\n- `disabled` when `isActivation` is false; - `optional` when the voucher\n configuration's `pinOnActivation` is not\n `send`, or when it is\n `send` and both e-mail and\n SMS are possible send mediums for the PIN;\n- `required` when the voucher\n configuration's `pinOnActivation` is\n `send` and the e-mail is the\n only possible send medium for the PIN;", + "allOf": [ + { + "$ref": "#/components/schemas/AvailabilityEnum" + } + ] + }, + "pinInput": { + "description": "Configuration for input of the new voucher PIN. Only returned if `pinOnActivation` is `input`.", + "allOf": [ + { + "$ref": "#/components/schemas/PasswordInput" + } + ] + }, + "voucherCustomFields": { + "description": "The list of available voucher custom fields associated with this voucher type for the authenticated user", + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldDetailed" + } + } + } } - } + ] }, - "UserPermissions" : { - "description" : "Determines permission the authenticated have over a specific user", - "allOf" : [ { - "$ref" : "#/components/schemas/UserTransactionPermissions" - }, { - "type" : "object", - "properties" : { - "profile" : { - "$ref" : "#/components/schemas/UserProfilePermissions" - }, - "passwords" : { - "$ref" : "#/components/schemas/UserPasswordsPermissions" - }, - "products" : { - "$ref" : "#/components/schemas/UserProductsPermissions" - }, - "validation" : { - "$ref" : "#/components/schemas/UserValidationPermissions" - }, - "contact" : { - "$ref" : "#/components/schemas/UserContactPermissions" - }, - "brokering" : { - "$ref" : "#/components/schemas/UserBrokeringPermissions" - }, - "operators" : { - "$ref" : "#/components/schemas/UserOperatorsPermissions" - }, - "marketplace" : { - "$ref" : "#/components/schemas/UserMarketplacePermissions" - }, - "group" : { - "$ref" : "#/components/schemas/UserGroupPermissions" - }, - "references" : { - "$ref" : "#/components/schemas/UserReferencesPermissions" - }, - "paymentFeedbacks" : { - "$ref" : "#/components/schemas/UserPaymentFeedbacksPermissions" - }, - "status" : { - "$ref" : "#/components/schemas/UserStatusPermissions" - }, - "accounts" : { - "description" : "Accounts which can be viewed by the authenticated user", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/AccountWithCurrency" - } - }, - "accountVisibilitySettings" : { - "$ref" : "#/components/schemas/UserAccountVisibilitySettingsPermissions" - }, - "balanceLimits" : { - "$ref" : "#/components/schemas/UserBalanceLimitsPermissions" - }, - "paymentLimits" : { - "$ref" : "#/components/schemas/UserPaymentLimitsPermissions" - }, - "identityProviders" : { - "$ref" : "#/components/schemas/UserIdentityProvidersPermissions" - }, - "records" : { - "description" : "Records types the authenticated user can view over the given user", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/OwnerRecordPermissions" - } - }, - "documents" : { - "$ref" : "#/components/schemas/UserDocumentsPermissions" - }, - "session" : { - "$ref" : "#/components/schemas/UserSessionPermissions" - }, - "operations" : { - "description" : "Custom operations the authenticated user can run over the given user", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Operation" - } - }, - "wizards" : { - "description" : "Custom wizards the authenticated user can run over the given user", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Wizard" + "VoucherInfo": { + "description": "Contains information visible as guest in the application to get information about a voucher.", + "type": "object", + "properties": { + "token": { + "description": "The voucher token", + "type": "string" + }, + "pinInput": { + "description": "Is returned when the voucher requires a PIN to be entered. Contains the definitions for the voucher PIN.", + "allOf": [ + { + "$ref": "#/components/schemas/PasswordInput" } - }, - "tokens" : { - "description" : "Permissions over tokens of each visible type.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TokenPermissions" + ] + }, + "blockedGiftBy": { + "description": "Only returned for gift vouchers with PIN that weren't activated yet. Is the display of the user that issued the voucher", + "type": "string" + }, + "forgotPinCaptchaInput": { + "description": "Whenever a `pinInput` is returned a captcha input is also returned. Used to request a forgot pin.", + "allOf": [ + { + "$ref": "#/components/schemas/CaptchaInput" } - }, - "vouchers" : { - "$ref" : "#/components/schemas/UserVouchersPermissions" - }, - "notificationSettings" : { - "$ref" : "#/components/schemas/UserNotificationSettingsPermissions" - }, - "privacySettings" : { - "$ref" : "#/components/schemas/UserPrivacySettingsPermissions" - }, - "agreements" : { - "$ref" : "#/components/schemas/AgreementsPermissions" - }, - "messages" : { - "$ref" : "#/components/schemas/UserMessagesPermissions" + ] + }, + "forgotPinSendMediums": { + "description": "The allowed mediums used to send the pin when a forgot pin request is performed.", + "type": "array", + "items": { + "$ref": "#/components/schemas/SendMediumEnum" } - } - } ] - }, - "UserPhonesListData" : { - "description" : "Contains information for a list of phones", - "type" : "object", - "properties" : { - "user" : { - "description" : "The user which owns this phones", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] }, - "canEdit" : { - "description" : "Can the authenticated user edit phones of this user?", - "type" : "boolean" + "type": { + "$ref": "#/components/schemas/VoucherType" }, - "canCreateLandLine" : { - "description" : "Can the authenticated user create new land-line phones for this user?", - "type" : "boolean" + "status": { + "$ref": "#/components/schemas/VoucherStatusEnum" }, - "canCreateMobile" : { - "description" : "Can the authenticated user create new mobile phones for this user?", - "type" : "boolean" + "personal": { + "description": "When returned, indicates that this voucher is meant for personal use of this user", + "type": "string" }, - "enablePrivacy" : { - "description" : "Indicates whether phone privacy can be used for this user", - "type" : "boolean" + "amount": { + "description": "The voucher amount. Only returned if the voucher has a fixed amount defined on generation.", + "type": "string", + "format": "number" }, - "smsEnabled" : { - "description" : "Indicates whether outbound SMS is enabled in Cyclos", - "type" : "boolean" + "balance": { + "description": "The voucher balance.", + "type": "string", + "format": "number" }, - "canVerify" : { - "description" : "Can the authenticated user verify mobile phones of this user?", - "type" : "boolean" + "email": { + "description": "The optional contact e-mail for this voucher. In case the voucher was sent this property is never null.", + "type": "string" }, - "canEnableForSms" : { - "description" : "Can the authenticated user enable / disable mobile phones of this user to send / receive SMS?", - "type" : "boolean" + "mobilePhone": { + "description": "The optional contact mobile phone for this voucher. Only applies if the voucher was not sent.", + "type": "string" }, - "maxMobilePhones" : { - "description" : "Indicates the maximum number of mobile phones this user can have. Is only returned when `canManage` is `true`.", - "type" : "integer" + "notificationsEnabled": { + "description": "Whether the notifications are enabled or not.", + "type": "boolean" }, - "maxLandLinePhones" : { - "description" : "Indicates the maximum number of land line (fixed) phones this user can have. Is only returned when `canManage` is `true`.", - "type" : "integer" + "creationDate": { + "description": "The date the voucher was created.", + "type": "string", + "format": "date-time" }, - "phones" : { - "description" : "The list of (visible) phones", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PhoneResult" - } + "creationType": { + "$ref": "#/components/schemas/VoucherCreationTypeEnum" }, - "landLineAvailability" : { - "$ref" : "#/components/schemas/AvailabilityEnum" + "redeemAfterDate": { + "description": "The date after which voucher can be redeemed.", + "type": "string", + "format": "date-time" }, - "mobileAvailability" : { - "$ref" : "#/components/schemas/AvailabilityEnum" - } - } - }, - "UserPrivacySettingsPermissions" : { - "description" : "Permissions regarding the privacy settings of other users", - "type" : "object", - "properties" : { - "view" : { - "description" : "Can the current user view the privacy settings of other users?", - "type" : "boolean" - } - } - }, - "UserProductAssignmentData" : { - "description" : "Contains the current user individually assigned products, as well as other information", - "type" : "object", - "properties" : { - "user" : { - "$ref" : "#/components/schemas/User" + "redeemAfterDateReached": { + "description": "Indicates whether the voucher can already be redeemed.", + "type": "boolean" }, - "group" : { - "$ref" : "#/components/schemas/Group" + "expirationDate": { + "description": "The date the voucher expires.", + "type": "string", + "format": "date-time" }, - "userProducts" : { - "description" : "Products currently assigned to this individual user", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ProductWithUserAccount" - } + "canChangePin": { + "description": "Indicates whether the voucher pin can be changed or not. The flag is true only if pin is used for this voucher.", + "type": "boolean" }, - "groupProducts" : { - "description" : "Products currently assigned to the user's group", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ProductWithUserAccount" - } + "canChangeNotificationSettings": { + "description": "Indicates whether the notification settings for this voucher can be changed or not. The flag is true only if pin is used for this voucher and it was generated `inactive` or the voucher was sent.", + "type": "boolean" }, - "groupSetProducts" : { - "description" : "Products currently assigned to the user's group set", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ProductWithUserAccount" - } + "phoneConfiguration": { + "description": "Configuration for input of the mobile phone, if changing the voucher notification settings. Only returned when `canChangeNotificationSettings` is true, indicating a mobile phone can be used. When `canChangeNotificationSettings` is true and `phoneConfiguration` is null, SMS sending is disabled.", + "allOf": [ + { + "$ref": "#/components/schemas/PhoneConfiguration" + } + ] }, - "assignable" : { - "description" : "If the authenticated user can assign more products to the user, this is the list of possible products to assign to the user.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ProductWithUserAccount" + "redeemOnWeekDays": { + "description": "The days of the week a voucher can be redeemed.", + "type": "array", + "items": { + "$ref": "#/components/schemas/WeekDayEnum" } }, - "unassignable" : { - "description" : "Either internal names or ids of currently assigned products that the logged user can unassign from the user.", - "type" : "array", - "items" : { - "type" : "string" - } + "singleRedeem": { + "description": "This is only returned for vouchers that cannot be partially redeemed, if the status is `redeemed`.", + "allOf": [ + { + "$ref": "#/components/schemas/VoucherTransaction" + } + ] }, - "history" : { - "description" : "Contains the history entries for all product assignment changes", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ProductAssignmentLog" + "hasTransactions": { + "description": "Indicates whether the voucher has transactions, that means, if there are any redeems of top-ups for this voucher. If so, a separated request to `GET /vouchers/{key}/transactions` should be performed in order to fetch them. Note that if `redeemDate` is returned, it means the voucher cannot be partially redeemed and was already fully redeemed. In this case, there are no more transactions to show, and this flag will be false.", + "type": "boolean" + }, + "customValues": { + "description": "The list of custom field values this voucher has", + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldValue" } } } }, - "UserProductsPermissions" : { - "description" : "Permissions over products of a given user", - "type" : "object", - "properties" : { - "view" : { - "description" : "Can the authenticated user view assigned products?", - "type" : "boolean" - }, - "individual" : { - "description" : "The individual products assigned to the user", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/EntityReference" - } - }, - "group" : { - "description" : "The products assigned to the user's group", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/EntityReference" - } + "VoucherInitialDataForTransaction": { + "description": "Initial data used to perform a voucher transaction", + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/User" }, - "groupSet" : { - "description" : "The products assigned to the user's group set", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/EntityReference" - } + "mask": { + "description": "The voucher token mask. When there are multiple configurations, the mask is only returned if all the configurations share the same mask.", + "type": "string" } } }, - "UserProfilePermissions" : { - "description" : "Permissions over a user profile", - "type" : "object", - "properties" : { - "editProfile" : { - "description" : "Can edit the user profile?", - "type" : "boolean" + "VoucherPermissions": { + "description": "Permissions over vouchers", + "type": "object", + "properties": { + "configuration": { + "$ref": "#/components/schemas/VoucherConfiguration" }, - "manageAddresses" : { - "description" : "Can manage addresses?", - "type" : "boolean" + "cancel": { + "description": "Whether the logged user can cancel vouchers of types belonging to this configuration. Only if the authenticated user is an admin. Otherwise `false`.", + "type": "boolean" }, - "manageAddressesPrivacy" : { - "type" : "boolean", - "description" : "Can manage the addresses privacy?" + "changeExpirationDate": { + "description": "Whether the logged user can change the expiration date of vouchers of types belonging to this configuration. Only if the authenticated user is an admin. Otherwise `false`.", + "type": "boolean" }, - "managePhones" : { - "description" : "Can manage phones?", - "type" : "boolean" + "generate": { + "description": "Whether the logged user can generate vouchers of types belonging to this configuration. Only if the authenticated user is an admin. Otherwise `false`.", + "type": "boolean" }, - "managePhonesPrivacy" : { - "type" : "boolean", - "description" : "Can manage the phones privacy?" + "view": { + "description": "Whether the logged administrator can view all vouchers belonging to this configuration.", + "type": "boolean" }, - "manageImages" : { - "description" : "Can manage profile images?", - "type" : "boolean" + "enabled": { + "description": "Whether the logged user has enabled the types belonging to this configuration. Only if the authenticated user is a member. Otherwise `false`.", + "type": "boolean" }, - "manageContactInfos" : { - "description" : "Can manage additional contact informations?", - "type" : "boolean" + "viewVouchers": { + "description": "Whether the logged user can view vouchers of types belonging to this configuration.", + "type": "boolean" }, - "canCreateAddress" : { - "description" : "Will be true if the authenticated user can manage addresses and the user for which we are viewing its profile has not reached the maximum allowed addresses. Only if `manageAddresses` is true.", - "type" : "boolean" + "buy": { + "description": "Whether the logged user can buy vouchers of types belonging to this configuration.", + "type": "boolean" }, - "canCreateLandLine" : { - "description" : "Will be true if the authenticated user can manage phones and the user for whom we are viewing its profile has not reached the maximum allowed landline phones. Only if `managePhones` is true.", - "type" : "boolean" + "send": { + "description": "Whether the logged user can send by e-mail vouchers of types belonging to this configuration.", + "type": "boolean" }, - "canCreateMobile" : { - "description" : "Will be true if the authenticated user can manage phones and the user for whom we are viewing its profile has not reached the maximum allowed mobile phones. Only if `managePhones` is true.", - "type" : "boolean" + "refund": { + "description": "Whether the logged user can refund vouchers of types belonging to this configuration.", + "type": "boolean" }, - "canCreateImage" : { - "description" : "Will be true if the authenticated user can manage images and the user for whom we are viewing its profile has not reached the maximum allowed profile images. Only if `manageImages` is true.", - "type" : "boolean" + "viewTransactions": { + "description": "Whether the logged user can view transactions (redeems / top-ups) of vouchers whose types belong to this configuration.", + "type": "boolean" }, - "canCreateContactInfo" : { - "description" : "Will be true if the authenticated user can manage additional contact informations and the user for whom we are viewing its profile has not reached the maximum allowed additional contact informations. Only if `manageContactInfos` is true.", - "type" : "boolean" + "redeem": { + "description": "Whether the logged user can redeem vouchers of types belonging to this configuration.", + "type": "boolean" }, - "maxAddresses" : { - "description" : "The maximum number of addresses the user can own. Only if `manageAddresses` is true", - "type" : "integer" + "topUp": { + "description": "Whether the logged user can top-up or activate vouchers.", + "type": "boolean" }, - "maxMobiles" : { - "description" : "The maximum number of mobile phones the user can own. Only if `managePhones` is true.", - "type" : "integer" + "viewBought": { + "deprecated": true, + "x-remove-version": 4.17, + "description": "Use `viewVouchers` instead.", + "type": "boolean" }, - "maxLandLines" : { - "description" : "The maximum number of land-line phones the user can own. Only if `managePhones` is true.", - "type" : "integer" + "viewRedeemed": { + "deprecated": true, + "x-remove-version": 4.17, + "description": "Use `viewTransactions` instead.", + "type": "boolean" + } + } + }, + "VoucherRedeemPreview": { + "description": "Preview information of a voucher redeem", + "allOf": [ + { + "$ref": "#/components/schemas/VoucherTransactionPreview" }, - "maxImages" : { - "description" : "The maximum number of profile images the user can own. Only if `manageImages` is true.", - "type" : "integer" - }, - "maxContactInfos" : { - "description" : "The maximum number of additional contacts the user can own.\n Only if `manageContactInfos` is true.", - "type" : "integer" - }, - "addressAvailability" : { - "description" : "The availability for addresses. Only if `manageAddresses` is true", - "allOf" : [ { - "$ref" : "#/components/schemas/AvailabilityEnum" - } ] - }, - "mobileAvailability" : { - "description" : "The availability for mobile phones Only if `managePhones` is true", - "allOf" : [ { - "$ref" : "#/components/schemas/AvailabilityEnum" - } ] - }, - "landLineAvailability" : { - "description" : "The availability for land-line phones Only if `managePhones` is true", - "allOf" : [ { - "$ref" : "#/components/schemas/AvailabilityEnum" - } ] - }, - "profileImageAvailability" : { - "description" : "The availability for profile images Only if `manageImages` is true", - "allOf" : [ { - "$ref" : "#/components/schemas/AvailabilityEnum" - } ] - }, - "contactInfoAvailability" : { - "description" : "The availability for additional contacts Only if `manageContactInfos` is true", - "allOf" : [ { - "$ref" : "#/components/schemas/AvailabilityEnum" - } ] - } - } - }, - "UserQueryFilters" : { - "description" : "Parameters for searching users", - "allOf" : [ { - "$ref" : "#/components/schemas/BasicUserQueryFilters" - }, { - "type" : "object", - "properties" : { - "contactsOwner" : { - "type" : "string", - "description" : "Indicates the (managed) user to exclude contacts when `excludecontacts` is set. Defaults to the logged user." - }, - "excludeContacts" : { - "type" : "boolean", - "description" : "When set to `true` will not return any user that is already a contact of the user indicated on `contactsOwner` (the logged user if not set)." - }, - "fromMenu" : { - "type" : "boolean", - "description" : "When set to true the search will be restricted to those groups defined for the user search menu, if false then for those defined in the 'Search users on groups' product setting (or in the configuration in case of guests)." - }, - "roles" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/RoleEnum" + { + "type": "object", + "properties": { + "redeem": { + "$ref": "#/components/schemas/RedeemVoucher" + }, + "pinInput": { + "description": "Is returned when this redeem requires a PIN to be entered. Contains the definitions for the voucher PIN.", + "allOf": [ + { + "$ref": "#/components/schemas/PasswordInput" + } + ] + }, + "canSendPin": { + "description": "Returns if there is any medium to send the Voucher PIN to the client", + "type": "boolean" } - }, - "orderBy" : { - "$ref" : "#/components/schemas/UserOrderByEnum" - } - } - } ] - }, - "UserRecords" : { - "description" : "Data over user records for a given owner and type", - "type" : "object", - "properties" : { - "count" : { - "description" : "The current number of records of this type for this owner", - "type" : "integer" - } - } - }, - "UserReferenceDataForSearch" : { - "description" : "Data for searching references of a given user", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseReferenceDataForSearch" - }, { - "type" : "object", - "properties" : { - "query" : { - "description" : "Default query filters", - "allOf" : [ { - "$ref" : "#/components/schemas/UserReferenceQueryFilters" - } ] - }, - "set" : { - "description" : "Can the authenticated user set a reference to the given user?", - "type" : "boolean" - }, - "current" : { - "description" : "The current reference, if any, from the authenticated user to the given user", - "allOf" : [ { - "$ref" : "#/components/schemas/Reference" - } ] - } - } - } ] - }, - "UserReferenceQueryFilters" : { - "description" : "Query filters for a user's references", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseReferenceQueryFilters" - } ] - }, - "UserReferenceResult" : { - "description" : "Result of searching references of a given user", - "allOf" : [ { - "$ref" : "#/components/schemas/Reference" - }, { - "type" : "object", - "properties" : { - "relatedUser" : { - "description" : "The user that either gave to or received from the user specified in the path variable.", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "direction" : { - "description" : "Whether this reference was given to or received from the user specified in the path variable.", - "allOf" : [ { - "$ref" : "#/components/schemas/ReferenceDirectionEnum" - } ] } } - } ] + ] }, - "UserReferences" : { - "description" : "Information about general references for a user", - "type" : "object", - "properties" : { - "count" : { - "description" : "The current number of received references", - "type" : "integer" + "VoucherRedeemResult": { + "description": "Result when performing a voucher redeem", + "allOf": [ + { + "$ref": "#/components/schemas/VoucherTransactionResult" }, - "score" : { - "description" : "From 1 to 5 represents the average score of received references", - "type" : "number" - } - } - }, - "UserReferencesPermissions" : { - "description" : "Permissions over general references of an user", - "type" : "object", - "properties" : { - "view" : { - "description" : "Can view other user's references?", - "type" : "boolean" + { + "type": "object", + "properties": { + "paymentId": { + "deprecated": true, + "x-remove-version": 4.17, + "description": "Use `payment.id` instead (handling the case when it can be null).", + "type": "string" + } + } } - } + ] }, - "UserRegistrationPrincipal" : { - "description" : "Contains information about a principal (user identification) and the channels that can be accessed using it", - "type" : "object", - "properties" : { - "value" : { - "description" : "The principal value", - "type" : "string" - }, - "type" : { - "$ref" : "#/components/schemas/PrincipalType" + "VoucherResult": { + "description": "Result of a voucher search", + "allOf": [ + { + "$ref": "#/components/schemas/Voucher" }, - "channels" : { - "description" : "The channels that can be accessed using this principal", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/EntityReference" + { + "type": "object", + "properties": { + "owner": { + "description": "The user a generated voucher was assigned to, if any.", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "buyer": { + "description": "The voucher buyer. Is not returned when the voucher was generated or when searching for bought vouchers of a user.", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "creationDate": { + "description": "The date a voucher was generated or bought", + "type": "string", + "format": "date-time" + }, + "redeemAfterDate": { + "description": "The date after which a voucher can be redeemed. Only returned when the voucher status is neither `redeemed` nor `canceled`. Also not returned when searching for redeemed vouchers of a specific user.", + "type": "string", + "format": "date-time" + }, + "redeemOnWeekDays": { + "description": "The days of the week a voucher can be redeemed. Only returned when the voucher status is neither `redeemed` nor `canceled`. Also not returned when searching for redeemed vouchers of a specific user.", + "type": "array", + "items": { + "$ref": "#/components/schemas/WeekDayEnum" + } + }, + "redeemer": { + "deprecated": true, + "x-remove-version": 4.17, + "description": "This field doesn't belong to the voucher itself, but to the transaction. Search for voucher transactions instead.", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "redeemBy": { + "deprecated": true, + "x-remove-version": 4.17, + "description": "This field doesn't belong to the voucher itself, but to the transaction. Search for voucher transactions instead.", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "redeemDate": { + "deprecated": true, + "x-remove-version": 4.17, + "description": "This field doesn't belong to the voucher itself, but to the transaction. Search for voucher transactions instead.", + "type": "string", + "format": "date-time" + } + } + } + ] + }, + "VoucherSendingPreview": { + "description": "Preview information of a voucher sending.", + "allOf": [ + { + "$ref": "#/components/schemas/BaseVoucherBuyingPreview" + }, + { + "type": "object", + "properties": { + "owner": { + "description": "If the `email` to which the voucher will be sent matches the e-mail of an existing user, the voucher will be assigned to that user.", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "sendVoucher": { + "description": "The parameters object that should be re-posted.", + "allOf": [ + { + "$ref": "#/components/schemas/SendVoucher" + } + ] + } } } - } + ] }, - "UserRegistrationResult" : { - "description" : "Result of a user registration", - "type" : "object", - "properties" : { - "user" : { - "description" : "The user that has just been registered", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "generatedPasswords" : { - "description" : "The types of passwords that were generated", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/EntityReference" - } - }, - "rootUrl" : { - "description" : "The root URL that can be used to access the web interface", - "type" : "string" + "VoucherTopUpPreview": { + "description": "Preview information of a voucher top-up", + "allOf": [ + { + "$ref": "#/components/schemas/VoucherTransactionPreview" }, - "principals" : { - "description" : "Contains information about each user principal (identification) and the channels that can be accessed using it", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/UserRegistrationPrincipal" + { + "type": "object", + "properties": { + "formattedMobilePhone": { + "description": "Only returned when sending the PIN via SMS to a phone. Is that same mobile phone number, but formatted.", + "type": "string" + }, + "owner": { + "description": "When an e-mail address or mobile phone is given, the a matching user is found in the system which can have this voucher assigned, is the reference for that user.", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "topUp": { + "$ref": "#/components/schemas/TopUpVoucher" + }, + "confirmationPasswordInput": { + "description": "If a confirmation password is used, contains the definitions on how to request that password from the user. This confirmation password is required when performing sensible actions. Sometimes this is dynamic, for example, the confirmation might be configured to be used only once per session, or operations like payments may have a limit per day to be without confirmation (pinless).", + "allOf": [ + { + "$ref": "#/components/schemas/PasswordInput" + } + ] + }, + "voucherCustomValues": { + "description": "The values of each custom field", + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldValue" + } + } } - }, - "status" : { - "$ref" : "#/components/schemas/UserRegistrationStatusEnum" } - } + ] }, - "UserResult" : { - "description" : "Data returned from user search", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - }, { - "type" : "object", - "x-implements" : "IUser", - "properties" : { - "name" : { - "type" : "string", - "description" : "The user's full name" - }, - "username" : { - "type" : "string", - "description" : "The user's login name" - }, - "email" : { - "type" : "string", - "description" : "The user's e-mail" - }, - "address" : { - "description" : "Address to be placed on map. Is only returned when the search result type is `map`.", - "allOf" : [ { - "$ref" : "#/components/schemas/Address" - } ] - }, - "distance" : { - "description" : "Only returned when there is a base location to calculate the distance from. The unit (kilometers or miles) depends on configuration.", - "type" : "number", - "format" : "double" - }, - "customValues" : { - "type" : "object", - "description" : "Holds the values for custom fields, keyed by field internal name or id. The format of the value depends on the custom field type. Example: `{..., \"customValues\": {\"gender\": \"male\", \"birthDate\": \"1980-10-27\"}}`", - "additionalProperties" : { - "type" : "string" + "VoucherTransaction": { + "description": "Details of a voucher transaction", + "allOf": [ + { + "$ref": "#/components/schemas/Entity" + }, + { + "type": "object", + "properties": { + "kind": { + "$ref": "#/components/schemas/VoucherTransactionKind" + }, + "date": { + "description": "The transaction date.", + "type": "string", + "format": "date-time" + }, + "amount": { + "description": "The transaction amount.", + "type": "string", + "format": "number" + }, + "payment": { + "description": "The payment generated by the transaction. Only returned if visible", + "allOf": [ + { + "$ref": "#/components/schemas/Transaction" + } + ] + }, + "user": { + "description": "The user over which the transaction was performed. For redeems, is generatlly the same as payment's to account user, but the voucher type may be configured in such a way that a fixed user is the one that gets paid regardless of the redeemer.", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] + }, + "by": { + "description": "The admin / broker / user / operator that was logged-in when the transaction was performed.", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] } - }, - "phone" : { - "type" : "string", - "description" : "First phone number, used when phone is marked on products to be returned on user list" - }, - "accountNumber" : { - "type" : "string", - "description" : "First account number, used when account number is marked on products to be returned on user list" - }, - "group" : { - "description" : "The user group. Only returned when the `includeGroup` parameter is set to `true` and the current user can see other users' groups.", - "allOf" : [ { - "$ref" : "#/components/schemas/EntityReference" - } ] - }, - "groupSet" : { - "description" : "The user group. Only returned when the `includeGroupSet` parameter is set to `true` and the current user can see other users' group set.", - "allOf" : [ { - "$ref" : "#/components/schemas/EntityReference" - } ] } } - } ] - }, - "UserScheduledPaymentsPermissions" : { - "description" : "Permissions for scheduled payments over a user", - "type" : "object", - "properties" : { - "view" : { - "description" : "Can the authenticated administrator or broker view scheduled payments of the given user?", - "type" : "boolean" - } - } - }, - "UserSessionPermissions" : { - "description" : "Permissions regarding the login session of a given user", - "type" : "object", - "properties" : { - "disconnect" : { - "description" : "Can the authenticated admin disconnect this user?", - "type" : "boolean" - } - } + ] }, - "UserStatusData" : { - "description" : "Contains the current user status, as well as other information", - "type" : "object", - "properties" : { - "user" : { - "$ref" : "#/components/schemas/User" + "VoucherTransactionPreview": { + "description": "Common data returned when previewing a voucher transaction", + "type": "object", + "properties": { + "kind": { + "$ref": "#/components/schemas/VoucherTransactionKind" }, - "status" : { - "$ref" : "#/components/schemas/UserStatusEnum" - }, - "possibleNewStatuses" : { - "description" : "If the authenticated user can manage the given user's status, contains the list of statuses that can be assigned.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/UserStatusEnum" - } + "user": { + "description": "The user over which the transaction will be performed.", + "allOf": [ + { + "$ref": "#/components/schemas/User" + } + ] }, - "history" : { - "description" : "Contains the history entries for all status changes", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/UserStatusLog" - } - } - } - }, - "UserStatusLog" : { - "description" : "Information regarding a specific status change", - "type" : "object", - "properties" : { - "by" : { - "$ref" : "#/components/schemas/User" + "type": { + "description": "The voucher type.", + "allOf": [ + { + "$ref": "#/components/schemas/VoucherTypeDetailed" + } + ] }, - "status" : { - "$ref" : "#/components/schemas/UserStatusEnum" + "token": { + "description": "The masked voucher token", + "type": "string" }, - "period" : { - "description" : "The begin and end date the for this status. The current status has no end date.", - "allOf" : [ { - "$ref" : "#/components/schemas/DatePeriod" - } ] + "amount": { + "description": "The transaction amount", + "type": "string", + "format": "number" }, - "comment" : { - "description" : "Comments supplied by the manager that performed the status change", - "type" : "string" - } - } - }, - "UserStatusPermissions" : { - "description" : "Permissions regarding the status of a given user", - "type" : "object", - "properties" : { - "view" : { - "description" : "Can the authenticated user view the status and history of a given user?", - "type" : "boolean" - } - } - }, - "UserTicketsPermissions" : { - "description" : "Permissions for tickets over a user", - "type" : "object", - "properties" : { - "view" : { - "description" : "Can the authenticated administrator or broker view tickets of the given user?", - "type" : "boolean" + "paymentCustomValues": { + "description": "The values of each payment custom field", + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldValue" + } } } }, - "UserTokensListData" : { - "description" : "Data for tokens of a specific type and user", - "allOf" : [ { - "$ref" : "#/components/schemas/TokenPermissions" - }, { - "type" : "object", - "properties" : { - "user" : { - "$ref" : "#/components/schemas/User" - }, - "tokens" : { - "description" : "The tokens for this type and user.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TokenResult" + "VoucherTransactionResult": { + "description": "Result of a voucher transactions search", + "allOf": [ + { + "$ref": "#/components/schemas/VoucherTransaction" + }, + { + "type": "object", + "properties": { + "type": { + "description": "The voucher type.", + "allOf": [ + { + "$ref": "#/components/schemas/VoucherType" + } + ] + }, + "token": { + "description": "The (maybe masked) voucher token.", + "type": "string" + }, + "voucherId": { + "description": "The voucher id. Only returned if the voucher itself is visible by the currently authenticated user", + "type": "string" + }, + "customValues": { + "description": "The list of custom field values which were filled in the activation process. Only returned if this transaction is the first top-up for the voucher.", + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldValue" + } } } } - } ] + ] }, - "UserTransactionPermissions" : { - "description" : "Permissions over transactions of a specific user", - "type" : "object", - "properties" : { - "payment" : { - "$ref" : "#/components/schemas/UserPaymentPermissions" - }, - "scheduledPayments" : { - "$ref" : "#/components/schemas/UserScheduledPaymentsPermissions" - }, - "paymentRequests" : { - "$ref" : "#/components/schemas/UserPaymentRequestsPermissions" + "VoucherTransactionView": { + "description": "Details of a voucher transaction", + "allOf": [ + { + "$ref": "#/components/schemas/VoucherTransactionResult" }, - "authorizedPayments" : { - "$ref" : "#/components/schemas/UserAuthorizedPaymentsPermissions" - }, - "tickets" : { - "$ref" : "#/components/schemas/UserTicketsPermissions" - }, - "externalPayments" : { - "$ref" : "#/components/schemas/UserExternalPaymentsPermissions" + { + "type": "object", + "properties": { + "chargebackOf": { + "description": "When this voucher transaction is a chargeback, is a reference to the voucher transaction that was charged back.", + "allOf": [ + { + "$ref": "#/components/schemas/VoucherTransaction" + } + ] + }, + "chargedBackBy": { + "description": "When this voucher transaction was charged back, is a reference to the corresponding chargeback transaction.", + "allOf": [ + { + "$ref": "#/components/schemas/VoucherTransaction" + } + ] + }, + "exportFormats": { + "description": "The formats which the data can be exported", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExportFormat" + } + } + } } - } + ] }, - "UserValidationPermissions" : { - "description" : "Permissions over the registration / email change validations of a given user", - "type" : "object", - "properties" : { - "validateRegistration" : { - "description" : "Can the authenticated administrator or broker manually mark a pending user as validated?", - "type" : "boolean" - }, - "resendRegistrationValidation" : { - "description" : "Can the authenticated administrator or broker re-send the e-mail to confirm the registration of the given user?", - "type" : "boolean" - }, - "validateEmailChange" : { - "description" : "Can the authenticated administrator or broker manually mark a pending e-mail change as validated for the given user?", - "type" : "boolean" + "VoucherType": { + "description": "Reference to a voucher type", + "allOf": [ + { + "$ref": "#/components/schemas/InternalNamedEntity" }, - "resendEmailChange" : { - "description" : "Can the authenticated administrator or broker re-send the e-mail to confirm the e-mail change of the given user?", - "type" : "boolean" + { + "type": "object", + "properties": { + "configuration": { + "$ref": "#/components/schemas/VoucherConfiguration" + }, + "voucherTitle": { + "description": "The voucher title", + "type": "string" + }, + "category": { + "$ref": "#/components/schemas/VoucherCategory" + }, + "image": { + "$ref": "#/components/schemas/Image" + } + } } - } + ] }, - "UserView" : { - "description" : "Represents a user with all data for viewing the profile", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - }, { - "type" : "object", - "x-implements" : "IUser", - "properties" : { - "name" : { - "type" : "string", - "description" : "The user's full name" - }, - "username" : { - "type" : "string", - "description" : "The user's login name" - }, - "email" : { - "type" : "string", - "description" : "The user's e-mail" - }, - "nameLabel" : { - "description" : "The label used for the name of users", - "type" : "string" - }, - "emailPendingValidation" : { - "description" : "Returned for managers / own user when the user has changed his e-mail but hasn't yet validated the new e-mail. The e-mail change validation is a configuration in Cyclos.", - "type" : "string" - }, - "enabledProfileFields" : { - "description" : "The internal names of profile fields enabled for this user. For example, the user might have no phones, but it might be because he is not allowed to have phones or because there are currently no phones. Same for addresses, images and optional profile fields.", - "type" : "array", - "items" : { - "type" : "string" - } - }, - "customValues" : { - "description" : "The list of custom field values this user has", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/UserCustomFieldValue" - } - }, - "group" : { - "description" : "Reference to the user group. Is only returned if the authenticated user has permission to see groups.", - "allOf" : [ { - "$ref" : "#/components/schemas/EntityReference" - } ] - }, - "groupSet" : { - "description" : "Reference to the user group set. Is only returned if the authenticated user has permission to see group sets and the user group is in a group set.", - "allOf" : [ { - "$ref" : "#/components/schemas/EntityReference" - } ] - }, - "status" : { - "description" : "The user status. Only returned if the authenticated user has permission to view the user status.", - "allOf" : [ { - "$ref" : "#/components/schemas/UserStatusEnum" - } ] - }, - "additionalImages" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Image" + "VoucherTypeDetailed": { + "description": "Reference to a voucher type and add extra information.", + "allOf": [ + { + "$ref": "#/components/schemas/VoucherType" + }, + { + "type": "object", + "properties": { + "voucherDescription": { + "description": "The voucher description", + "type": "string" }, - "description" : "Holds the images other than the primary image, which is returned in the `image` field" - }, - "addresses" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/AddressView" + "gift": { + "$ref": "#/components/schemas/VoucherGiftEnum" }, - "description" : "Visible addresses" - }, - "phones" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PhoneView" + "redeemAllowedGroups": { + "description": "The list of goups allowed as redeemers. And empty list means all groups with permissions are allowed. Only this list or the `redeemAllowedUsers` list can be not null at the same time.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Group" + } }, - "description" : "Visible phones" - }, - "contactInfos" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ContactInfoDetailed" + "redeemAllowedUsers": { + "description": "The list of users allowed as redeemers. An empty list means all users with permissions are allowed. Only this list or the `redeemAllowedGroups` list can be not null at the same time.", + "type": "array", + "items": { + "$ref": "#/components/schemas/User" + } }, - "description" : "Visible additional contact information" - }, - "contact" : { - "description" : "When this user is in the contact list of the currently logged user, returns data about the contact relation. When not returned, this user is no in the logged user's contact list.", - "allOf" : [ { - "$ref" : "#/components/schemas/ContactView" - } ] - }, - "registrationDate" : { - "type" : "string", - "format" : "date-time", - "description" : "The date the user was registered. Only returned if the logged user manages the given used." - }, - "activationDate" : { - "type" : "string", - "format" : "date-time", - "description" : "The date the user was made active the first time. Only returned if the logged user manages the given used." - }, - "online" : { - "type" : "boolean", - "description" : "Indicates whether the given user is logged-in to the system. Only returned if the logged user manages the given used." - }, - "lastLogin" : { - "type" : "string", - "format" : "date-time", - "description" : "The last time the user logged in, or null if never logged in. Only returned if the logged user manages the given used." - }, - "firstLogin" : { - "type" : "string", - "format" : "date-time", - "description" : "The first time the user logged in, or null if never logged in. Only returned if the logged user manages the given used." - }, - "invitedBy" : { - "description" : "Reference to the user that invited this user to register, if any. Only returned when a manager of the user (not the user himself or other users) is viewing the profile.", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "references" : { - "description" : "User general reference activities like score and total count.", - "allOf" : [ { - "$ref" : "#/components/schemas/UserReferences" - } ] - }, - "paymentFeedbacks" : { - "description" : "User payment feedbacks activities like score and total count.", - "allOf" : [ { - "$ref" : "#/components/schemas/UserReferences" - } ] - }, - "permissions" : { - "description" : "Permissions the authenticated user has over this other user. If both are the same, only the `permissions.profile` property will have information, the other permissions will be set to false, for this case, we advise you to use the permissions from the `GET /auth` operation.", - "allOf" : [ { - "$ref" : "#/components/schemas/UserPermissions" - } ] - }, - "brokers" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/BrokerView" + "allowPartialRedeems": { + "description": "Indicates whether partial redeems can occur, that is, a redeem with an amount which is not the total voucher amount.", + "type": "boolean" }, - "description" : "Visible brokers" - }, - "role" : { - "$ref" : "#/components/schemas/RoleEnum" - }, - "relationship" : { - "$ref" : "#/components/schemas/UserRelationshipEnum" - }, - "records" : { - "description" : "Records data, keyed by record type id or internal name.", - "type" : "object", - "additionalProperties" : { - "$ref" : "#/components/schemas/UserRecords" - } - }, - "documents" : { - "$ref" : "#/components/schemas/UserDocuments" - }, - "accounts" : { - "description" : "The list of accounts with status", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/AccountWithStatus" + "maxVouchersPerBuy": { + "description": "Indicates the maximum vouchers the user can buy.", + "type": "integer" } } } - } ] + ] }, - "UserVoucherTransactionsDataForSearch" : { - "description" : "Contains configuration data for searching voucher transactions of a user", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseVouchersDataForSearch" - }, { - "type" : "object", - "properties" : { - "user" : { - "$ref" : "#/components/schemas/User" - }, - "canRedeem" : { - "description" : "Indicates whether the authenticated user can redeem vouchers in behalf of this user", - "type" : "boolean" - }, - "canTopUp" : { - "description" : "Indicates whether the authenticated user can top-up vouchers in behalf of this user", - "type" : "boolean" - }, - "operators" : { - "description" : "When searching for redeemed vouchers, the operators of the redeemer.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/User" - } - }, - "topUpEnabled" : { - "description" : "Indicates whether there is a voucher configuration supporting top-up which is enabled for this user and visible for the authenticated user. This flag is not related to the top-up permission.", - "type" : "boolean" - }, - "query" : { - "$ref" : "#/components/schemas/UserVoucherTransactionsQueryFilters" - } - } - } ] - }, - "UserVoucherTransactionsQueryFilters" : { - "description" : "Definitions for searching voucher transactions of a user", - "allOf" : [ { - "$ref" : "#/components/schemas/QueryFilters" - }, { - "type" : "object", - "properties" : { - "amountRange" : { - "description" : "The minimum / maximum amount. For bought vouchers, is the voucher amount. For redeemed vouchers, is the redeem amount.", - "type" : "array", - "items" : { - "type" : "string", - "format" : "number" - } - }, - "kind" : { - "$ref" : "#/components/schemas/VoucherTransactionKind" - }, - "datePeriod" : { - "description" : "The minimum / maximum voucher transaction date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "type" : "array", - "items" : { - "type" : "string", - "format" : "date-time" - } - }, - "types" : { - "description" : "The ids or internal names of voucher types", - "type" : "array", - "items" : { - "type" : "string" - } - }, - "by" : { - "description" : "The user who performed the voucher transaction. A user identification value, such as id, username, e-mail, phone, etc. Id is always allowed, others depend on Cyclos configuration. Note that a valid numeric value is always considered as id. For example, when using another identification method that can be numeric only, prefix the value with a single quote (like in Excel spreadsheets), for example, `'1234567890`;", - "type" : "string" - } - } - } ] - }, - "UserVouchersDataForSearch" : { - "description" : "Contains configuration data for searching vouchers of a user", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseVouchersDataForSearch" - }, { - "type" : "object", - "properties" : { - "user" : { - "$ref" : "#/components/schemas/User" - }, - "canRedeem" : { - "description" : "Indicates whether the authenticated user can redeem vouchers in behalf of this user", - "type" : "boolean" - }, - "canBuy" : { - "description" : "Indicates whether the authenticated user can buy vouchers in behalf of this user", - "type" : "boolean" - }, - "canSend" : { - "description" : "Indicates whether the authenticated user can send vouchers in behalf of this user", - "type" : "boolean" - }, - "operators" : { - "description" : "When searching for redeemed vouchers, the operators of the redeemer.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/User" - } - }, - "query" : { - "$ref" : "#/components/schemas/UserVouchersQueryFilters" - }, - "exportFormats" : { - "description" : "The formats which the search results can be exported.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ExportFormat" - } - } - } - } ] - }, - "UserVouchersPermissions" : { - "description" : "Permissions over a user vouchers", - "type" : "object", - "properties" : { - "view" : { - "description" : "Can view owned vouchers?", - "type" : "boolean" - }, - "buy" : { - "description" : "Can buy vouchers?", - "type" : "boolean" - }, - "send" : { - "description" : "Can send digital vouchers by e-mail?", - "type" : "boolean" - }, - "viewTransactions" : { - "description" : "Can view voucher transactions?", - "type" : "boolean" - }, - "redeem" : { - "description" : "Can redeem vouchers?", - "type" : "boolean" - }, - "topUp" : { - "description" : "Can top-up vouchers?", - "type" : "boolean" - }, - "topUpEnabled" : { - "description" : "Indicates whether there is a voucher configuration supporting top-up which is enabled for this user and visible for the authenticated user. This flag is not related to the top-up permission.", - "type" : "boolean" - }, - "viewRedeemed" : { - "deprecated" : true, - "x-remove-version" : 4.17, - "description" : "Use `view` instead.", - "type" : "boolean" - }, - "viewBought" : { - "deprecated" : true, - "x-remove-version" : 4.17, - "description" : "Use `viewTransactions` instead.", - "type" : "boolean" - } - } - }, - "UserVouchersQueryFilters" : { - "description" : "Definitions for searching vouchers of a user", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseVouchersQueryFilters" - }, { - "type" : "object", - "properties" : { - "relation" : { - "deprecated" : true, - "x-remove-version" : 4.17, - "description" : "For redeemed, or starting with 4.15, voucher transactions, use `GET /voucher-transactions` instead.", - "allOf" : [ { - "$ref" : "#/components/schemas/VoucherRelationEnum" - } ] - }, - "redeemPeriod" : { - "deprecated" : true, - "x-remove-version" : 4.17, - "description" : "For redeemed, or starting with 4.15, voucher transactions, use `GET /voucher-transactions` instead.\n\n\nThe minimum / maximum voucher transaction date. Only used when searching for redeemed, not bought vouchers. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "type" : "array", - "items" : { - "type" : "string", - "format" : "date-time" - } - }, - "redeemBy" : { - "description" : "For redeemed, or starting with 4.15, voucher transactions, use `GET /voucher-transactions` instead.\n\n\nThe user who perform the transaction action. Only used when searching for redeemed, not bought vouchers. A user identification value, such as id, username, e-mail, phone, etc. Id is always allowed, others depend on Cyclos configuration. Note that a valid numeric value is always considered as id. For example, when using another identification method that can be numeric only, prefix the value with a single quote (like in Excel spreadsheets), for example, `'1234567890`;", - "type" : "string" - } - } - } ] - }, - "UserWebshopPermissions" : { - "description" : "Permissions over webshop asd of a specific user", - "allOf" : [ { - "$ref" : "#/components/schemas/UserBaseAdPermissions" - }, { - "type" : "object", - "properties" : { - "viewPurchases" : { - "description" : "Can view the purchases? Only returned if there is an authenticated user.", - "type" : "boolean" - }, - "viewSales" : { - "description" : "Can view the sales? Only returned if there is an authenticated user.", - "type" : "boolean" - }, - "viewSettings" : { - "description" : "Can view the webshop settings? Only returned if there is an authenticated user.", - "type" : "boolean" - }, - "manageSettings" : { - "description" : "Can manage the webshop settings? Only returned if there is an authenticated user.", - "type" : "boolean" - } - } - } ] - }, - "UserWithBalanceResult" : { - "description" : "Result of a user search with balance", - "allOf" : [ { - "$ref" : "#/components/schemas/UserResult" - }, { - "type" : "object", - "properties" : { - "balance" : { - "description" : "The raw account balance", - "type" : "string", - "format" : "number" - }, - "negativeSince" : { - "description" : "The date since the account has been negative", - "type" : "string", - "format" : "date-time" - }, - "balanceLevel" : { - "$ref" : "#/components/schemas/BalanceLevelEnum" - } - } - } ] - }, - "UsersPermissions" : { - "description" : "Permissions over other users", - "type" : "object", - "properties" : { - "search" : { - "description" : "Permission to search other users", - "type" : "boolean" - }, - "viewProfile" : { - "description" : "General permission to view the profile of other users. A fine-grained permission over specific groups can be configured. When attempting to view the profile of a user without permission, only very basic information is returned instead.", - "type" : "boolean" - }, - "map" : { - "description" : "Permission to view the user map directory", - "type" : "boolean" - }, - "registerAsAdmin" : { - "description" : "Is the authenticated user an administrator that can register users?", - "type" : "boolean" - }, - "registerAsBroker" : { - "description" : "Is the authenticated user a broker that can register users?", - "type" : "boolean" - }, - "registerAsMember" : { - "description" : "Is the authenticated user a user that can register other users?", - "type" : "boolean" - } - } - }, - "UsersWithBalanceQueryFilters" : { - "description" : "Parameters for searching users with their balances", - "allOf" : [ { - "$ref" : "#/components/schemas/BasicUserQueryFilters" - }, { - "type" : "object", - "required" : [ "accountType" ], - "properties" : { - "accountType" : { - "x-in" : "path", - "description" : "The account type", - "type" : "string" - }, - "balanceRange" : { - "description" : "The minimum and / or maximum balance for users to be returned. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "type" : "array", - "items" : { - "type" : "string", - "format" : "number" - } - }, - "negativeSincePeriod" : { - "description" : "The minimum / maximum negative-since date for users to be returned. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "type" : "array", - "items" : { - "type" : "string", - "format" : "date-time" - } - }, - "mediumBalanceRange" : { - "description" : "An array with 2 elements, describing the lower and upper medium balance bounds. Both of them need to be set as 2 element in the array, or it won't be considered.", - "type" : "array", - "items" : { - "type" : "integer" + "VoucherView": { + "description": "Details of a voucher", + "allOf": [ + { + "$ref": "#/components/schemas/VoucherResult" + }, + { + "type": "object", + "properties": { + "title": { + "description": "The voucher title when it was created.", + "type": "string" + }, + "description": { + "description": "The voucher description when it was created.", + "type": "string" + }, + "sendMessage": { + "description": "The message from the user that sent the voucher. Only for sent vouchers.", + "type": "string" + }, + "buy": { + "description": "The transaction which bought this voucher, if any and visible.", + "allOf": [ + { + "$ref": "#/components/schemas/Transaction" + } + ] + }, + "redeemAllowedGroups": { + "description": "The list of goups allowed as redeemers. And empty list means all groups with permissions are allowed. Only this list or the `redeemAllowedUsers` list can be not null at the same time.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Group" + } + }, + "redeemAllowedUsers": { + "description": "The list of users allowed as redeemers. An empty list means all users with permissions are allowed. Only this list or the `redeemAllowedGroups` list can be not null at the same time.", + "type": "array", + "items": { + "$ref": "#/components/schemas/User" + } + }, + "allowPartialRedeems": { + "description": "Indicates whether partial redeems can occur, that is, a redeem with an amount which is not the total voucher amount.", + "type": "boolean" + }, + "pinStatusForRedeem": { + "$ref": "#/components/schemas/VoucherPinStatusForRedeemEnum" + }, + "pin": { + "description": "The voucher pin used for redeeming. Only visible for admins or buyer / owner, and when the voucher is initially active.", + "type": "string" + }, + "email": { + "description": "The contact e-mail for this voucher.", + "type": "string" + }, + "mobilePhone": { + "description": "The contact mobile phone for this voucher.", + "type": "string" + }, + "enableNotifications": { + "description": "Whether notifications are enabled for this voucher.", + "type": "boolean" + }, + "canAssign": { + "description": "Can the authenticated admin assign the voucher to a user? Only applies to generated vouchers.", + "type": "boolean" + }, + "canChangeExpirationDate": { + "description": "Can the authenticated user change this voucher's expiration date?", + "type": "boolean" + }, + "canChangeNotificationSettings": { + "description": "Can the authenticated user change this voucher's notification settings, including the e-mail the voucher was sent to?", + "type": "boolean" + }, + "phoneConfiguration": { + "description": "Configuration for input of the mobile phone, if changing the voucher notification settings. Only returned when `canChangeNotificationSettings` is true, indicating a mobile phone can be used. When `canChangeNotificationSettings` is true and `phoneConfiguration` is null, SMS sending is disabled.", + "allOf": [ + { + "$ref": "#/components/schemas/PhoneConfiguration" + } + ] + }, + "canResendEmail": { + "description": "Can the authenticated user re-send the voucher by e-mail? Only applies to sent vouchers.", + "type": "boolean" + }, + "canUnblockPin": { + "description": "Can the authenticated user unblock the voucher PIN? Is only returned if the voucher PIN is actually blocked and the authenticated user has permission to unblock it.", + "type": "boolean" + }, + "canManageNotificationSettings": { + "description": "Can the authenticated user manage notification settings of this voucher? Is only returned for vouchers that have notifications on its own (generated inactive or sent) and the authenticated user has permission to manage the settings.", + "type": "boolean" + }, + "canChangePin": { + "description": "Can the authenticated change the voucher PIN? Is only returned if the voucher is open, uses PIN and the authenticated user has permission to change it.", + "type": "boolean" + }, + "requireOldPinForChange": { + "description": "In case `canChangePin` is true, indicates whether the old PIN should be entered by the user. This is the case when the authenticated user is the voucher owner and the `pin` value is not returned", + "type": "boolean" + }, + "pinInput": { + "description": "In case `canChangePin` is true, contains information of the PIN", + "allOf": [ + { + "$ref": "#/components/schemas/PasswordInput" + } + ] + }, + "showConfiguration": { + "description": "Should the voucher configuration be shown to the logged user? This flag is `true` only for admins, and only if there are multiple visible configurations.", + "type": "boolean" + }, + "showType": { + "description": "Should the voucher type be shown to the logged users? This flag is `true` only for admins.", + "type": "boolean" + }, + "showQrCode": { + "description": "Should the voucher token be shown as QR-code for users?", + "type": "boolean" + }, + "redeemAfterDateReached": { + "description": "Should the voucher be available to be redeemed?", + "type": "boolean" + }, + "expirationDateComments": { + "description": "Administration comments regarding expiration date change.", + "type": "string" + }, + "creationType": { + "$ref": "#/components/schemas/VoucherCreationTypeEnum" + }, + "cancelAction": { + "$ref": "#/components/schemas/VoucherCancelActionEnum" + }, + "refund": { + "description": "The transaction which refunds this voucher, if any and visible.", + "allOf": [ + { + "$ref": "#/components/schemas/Transaction" + } + ] + }, + "refundDate": { + "description": "The date the voucher was refunded, if any", + "type": "string", + "format": "date-time" + }, + "singleRedeem": { + "description": "This is only returned for vouchers that cannot be partially redeemed, if the status is `redeemed`.", + "allOf": [ + { + "$ref": "#/components/schemas/VoucherTransaction" + } + ] + }, + "hasTransactions": { + "description": "Indicates whether the voucher has transactions, that means, if there are any redeems of top-ups for this voucher. If so, a separated request to `GET /vouchers/{key}/transactions` should be performed in order to fetch them. Note that if `redeemDate` is returned, it means the voucher cannot be partially redeemed and was already fully redeemed. In this case, there are no more transactions to show, and this flag will be false.", + "type": "boolean" + }, + "exportFormats": { + "description": "The formats which the data can be exported", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExportFormat" + } + }, + "confirmationPasswordInput": { + "description": "If a confirmation password is used, contains the definitions on how to request that password from the user. This confirmation password is required when performing sensible actions. Sometimes this is dynamic, for example, the confirmation might be configured to be used only once per session, or operations like payments may have a limit per day to be without confirmation (pinless).", + "allOf": [ + { + "$ref": "#/components/schemas/PasswordInput" + } + ] + }, + "customValues": { + "description": "The list of custom field values this voucher has.", + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldValue" + } + }, + "topUpEnabled": { + "description": "Indicates whether the voucher configuration supports top-up. This flag is not related to the top-up permission.", + "type": "boolean" + }, + "redeemDate": { + "deprecated": true, + "x-remove-version": 4.17, + "description": "Use `singleRedeem.date` instead.", + "type": "string", + "format": "date-time" + }, + "redeem": { + "deprecated": true, + "x-remove-version": 4.17, + "description": "Use `singleRedeem.payment` instead.", + "allOf": [ + { + "$ref": "#/components/schemas/Transaction" + } + ] } - }, - "orderBy" : { - "$ref" : "#/components/schemas/UsersWithBalanceOrderByEnum" - } - } - } ] - }, - "UsersWithBalanceSummary" : { - "description" : "Contains summarized information about balances per range, plus the total", - "type" : "object", - "properties" : { - "low" : { - "description" : "Summary of low balances. Is only returned when a medium balance range is defined, either in the account type or in the query parameters.", - "allOf" : [ { - "$ref" : "#/components/schemas/AmountSummary" - } ] - }, - "medium" : { - "description" : "Summary of medium balances. Is only returned when a medium balance range is defined, either in the account type or in the query parameters.", - "allOf" : [ { - "$ref" : "#/components/schemas/AmountSummary" - } ] - }, - "high" : { - "description" : "Summary of high balances. Is only returned when a medium balance range is defined, either in the account type or in the query parameters.", - "allOf" : [ { - "$ref" : "#/components/schemas/AmountSummary" - } ] - }, - "total" : { - "description" : "Summary of all balances.", - "allOf" : [ { - "$ref" : "#/components/schemas/AmountSummary" - } ] - } - } - }, - "VersionedEntity" : { - "description" : "Basic definition of a persistent entity which has a version", - "allOf" : [ { - "$ref" : "#/components/schemas/Entity" - }, { - "type" : "object", - "properties" : { - "version" : { - "type" : "integer", - "description" : "The version stamp for the current object, used for optimistic locking. When saving, the same version as previously received needs to be passed back. If no one else has saved the object, the version will match and the object will be updated. However, if someone other has saved the object, the version will no longer match, and an error will be raised. This is used to prevent multiple users (or processes) from updating the same object and unwilingly overridding the property values, leading to data loss." - } - } - } ] - }, - "VersionedEntityReference" : { - "description" : "Represents an entity that is being referenced from another one, without caring about the type of the referenced entity. Also carries on the entity version", - "x-final" : true, - "allOf" : [ { - "$ref" : "#/components/schemas/InternalNamedEntity" - }, { - "type" : "object", - "properties" : { - "version" : { - "type" : "integer", - "description" : "The version stamp for the current object, used for optimistic locking. When saving, the same version as previously received needs to be passed back. If no one else has saved the object, the version will match and the object will be updated. However, if someone other has saved the object, the version will no longer match, and an error will be raised. This is used to prevent multiple users (or processes) from updating the same object and unwilingly overridding the property values, leading to data loss." - } - } - } ] - }, - "Voucher" : { - "description" : "A voucher is a token which can be used to buy at places that accept payments in Cyclos. Even users which are not members can get a printed token (or scratch card, ticket, etc) and buy in such places.", - "allOf" : [ { - "$ref" : "#/components/schemas/Entity" - }, { - "type" : "object", - "properties" : { - "token" : { - "description" : "The voucher token", - "type" : "string" - }, - "status" : { - "$ref" : "#/components/schemas/VoucherStatusEnum" - }, - "amount" : { - "description" : "The voucher amount. Only returned when the voucher had a fixed amount when generated.", - "type" : "string", - "format" : "number" - }, - "balance" : { - "description" : "The voucher balance.", - "type" : "string", - "format" : "number" - }, - "email" : { - "description" : "The e-mail to which the voucher was sent or which receives notifications.", - "type" : "string" - }, - "expirationDate" : { - "description" : "The date the voucher expires", - "type" : "string", - "format" : "date-time" - }, - "type" : { - "$ref" : "#/components/schemas/VoucherType" - }, - "creationType" : { - "$ref" : "#/components/schemas/VoucherCreationTypeEnum" - }, - "gift" : { - "description" : "Indicates whether this voucher was bought as a gift. Only returned when `creationType` is `bought`.", - "type" : "boolean" } } - } ] + ] }, - "VoucherBasicData" : { - "description" : "Contains common data for voucher actions", - "type" : "object", - "properties" : { - "user" : { - "$ref" : "#/components/schemas/User" - }, - "type" : { - "$ref" : "#/components/schemas/VoucherTypeDetailed" + "VouchersPermissions": { + "description": "Permissions over voucher configurations", + "type": "object", + "properties": { + "vouchers": { + "description": "Permissions over each voucher configuration", + "type": "array", + "items": { + "$ref": "#/components/schemas/VoucherPermissions" + } + } + } + }, + "VouchersQueryFilters": { + "description": "Definitions for searching vouchers as admin", + "allOf": [ + { + "$ref": "#/components/schemas/BaseVouchersQueryFilters" }, - "paymentCustomFields" : { - "description" : "The payment custom fields associated with this voucher type", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/CustomFieldDetailed" + { + "type": "object", + "properties": { + "email": { + "description": "The e-mail to which vouchers were either sent or had the PIN sent", + "type": "string" + }, + "mobilePhone": { + "description": "The mobile phone to which vouchers had the PIN sent via SMS", + "type": "string" + }, + "printed": { + "description": "If it is passed, filter if the voucher was printed or not.", + "type": "boolean" + }, + "buyer": { + "description": "The buyer of the voucher. A user identification value, such as id, username, e-mail, phone, etc. Id is always allowed, others depend on Cyclos configuration. Note that a valid numeric value is always considered as id. For example, when using another identification method that can be numeric only, prefix the value with a single quote (like in Excel spreadsheets), for example, `'1234567890`;", + "type": "string" + }, + "buyerGroups": { + "description": "The ids or internal names of buyers groups", + "type": "array", + "items": { + "type": "string" + } + }, + "transactionUser": { + "description": "A user that has performed at least one redeem or top-up for the voucher. A user identification value, such as id, username, e-mail, phone, etc. Id is always allowed, others depend on Cyclos configuration. Note that a valid numeric value is always considered as id. For example, when using another identification method that can be numeric only, prefix the value with a single quote (like in Excel spreadsheets), for example, `'1234567890`;", + "type": "string" + }, + "transactionUserGroups": { + "description": "The ids or internal names of groups of users that performed at least one redeem or top-up for the voucher.", + "type": "array", + "items": { + "type": "string" + } + }, + "transactionPeriod": { + "description": "The minimum / maximum date for a transaction in this voucher. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "customFields": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Voucher custom field values used as filters. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by : (colon). For example, `customFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, customFields=field1:valueA|valueB. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `customFields=tradeType:offer|search,extraDate:2000-01-01|2001-12-31` would match results whose custom field with internal name `tradeType` is either `offer` or `search`, and whose `extraDate` is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `customFields=extraDate:|2001-12-31`.\nA note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `customFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `customFields=dynamic:'business`." + }, + "redeemer": { + "deprecated": true, + "x-remove-version": 4.17, + "description": "Use `transactionUser` instead.", + "type": "string" + }, + "redeemerGroups": { + "deprecated": true, + "x-remove-version": 4.17, + "description": "Use `transactionUserGroups` instead.", + "type": "array", + "items": { + "type": "string" + } + }, + "redeemPeriod": { + "deprecated": true, + "x-remove-version": 4.17, + "description": "Use `transactionPeriod` instead", + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } } + } + ] + }, + "WebshopAd": { + "description": "An Ad with its status information.", + "allOf": [ + { + "$ref": "#/components/schemas/BaseAdDetailed" }, - "customFields" : { - "deprecated" : true, - "x-remove-version" : 4.17, - "description" : "Use `paymentCustomFields` instead.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/CustomFieldDetailed" + { + "type": "object", + "properties": { + "allowDecimalQuantity": { + "description": "Indicates if the webshop ad allow enter a decimal value for the quantity.", + "type": "boolean" + }, + "minAllowedInCart": { + "description": "The minimum quantity allowed to be added in the shopping cart.", + "type": "string", + "format": "number" + }, + "maxAllowedInCart": { + "description": "The maximum quantity allowed to be added in the shopping cart.", + "type": "string", + "format": "number" + }, + "stockQuantity": { + "description": "The stock disponibility. Only if `unlimitedStock` is false and the 'Stock type' was not marked as 'Not available' (through the web interface).", + "type": "string", + "format": "number" + }, + "unlimitedStock": { + "description": "If true then it means there is always disponibility of the webshop ad.", + "type": "boolean" + } } } + ] + }, + "WebshopSettings": { + "description": "Base Settings for a user's webshop", + "type": "object", + "properties": { + "productNumberGenerated": { + "type": "boolean", + "description": "Whether the product number, which is required for webshop advertisements, will be generated (true) or manual (false)." + }, + "productNumberMask": { + "type": "string", + "description": "A mask that indicates the format of product numbers. The following characters are accepted:\n- `?`, `_`: Any character; - `#`, `0`, `9`: A digit; - `A`, `a`: A letter (regardless the case); - `L`, `l`: A lowercase letter; - `U`, `u`: An uppercase letter; - `C`, `c`: A capitalized letter; - `\\` folowed by any character, or any character not in the list\n above: A literal character.", + "example": "UUU-####" + } } }, - "VoucherBasicDataForTransaction" : { - "description" : "Contains common data for either redeeming or topping-up a voucher", - "allOf" : [ { - "$ref" : "#/components/schemas/VoucherBasicData" - }, { - "type" : "object", - "properties" : { - "kind" : { - "$ref" : "#/components/schemas/VoucherTransactionKind" - }, - "token" : { - "description" : "The formatted voucher token.", - "type" : "string" - }, - "amount" : { - "description" : "The voucher amount. Maybe null. Vouchers can be generated without a fixed amount, and be topped-up later on.", - "type" : "string", - "format" : "number" - }, - "shouldPreview" : { - "description" : "Indicates whether the user should be taken to a preview page before actually confirming the operation.", - "type" : "boolean" - } - } - } ] - }, - "VoucherBoughtResult" : { - "description" : "Result of buying vouchers", - "type" : "object", - "properties" : { - "vouchers" : { - "description" : "The identifiers of all bought vouchers.", - "type" : "array", - "items" : { - "type" : "string" - } - }, - "voucherStatus" : { - "description" : "The status of all bought vouchers.", - "allOf" : [ { - "$ref" : "#/components/schemas/VoucherStatusEnum" - } ] - } - } - }, - "VoucherBuyingPreview" : { - "description" : "Preview information of a voucher buying.", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseVoucherBuyingPreview" - }, { - "type" : "object", - "properties" : { - "totalAmount" : { - "description" : "The total amount vouchers being bought. Is `count * amount`.", - "type" : "string", - "format" : "number" - }, - "buyVoucher" : { - "description" : "The parameters object that should be re-posted", - "allOf" : [ { - "$ref" : "#/components/schemas/BuyVoucher" - } ] - } - } - } ] - }, - "VoucherCategory" : { - "description" : "Reference to a voucher category", - "allOf" : [ { - "$ref" : "#/components/schemas/InternalNamedEntity" - }, { - "type" : "object", - "properties" : { - "image" : { - "$ref" : "#/components/schemas/Image" - } - } - } ] - }, - "VoucherConfiguration" : { - "description" : "Reference to a voucher configuration", - "allOf" : [ { - "$ref" : "#/components/schemas/InternalNamedEntity" - }, { - "type" : "object", - "properties" : { - "currency" : { - "$ref" : "#/components/schemas/Currency" - } - } - } ] - }, - "VoucherCreateData" : { - "description" : "Contains common data for voucher creation", - "allOf" : [ { - "$ref" : "#/components/schemas/VoucherBasicData" - }, { - "type" : "object", - "properties" : { - "account" : { - "description" : "The account from which the buy will be debited", - "allOf" : [ { - "$ref" : "#/components/schemas/AccountWithStatus" - } ] - }, - "minimumTimeToRedeem" : { - "description" : "Returned if there is a minimum time to be elapsed before bought vouchers can be redeemed", - "allOf" : [ { - "$ref" : "#/components/schemas/TimeInterval" - } ] - }, - "expirationDate" : { - "description" : "The date the voucher expires", - "type" : "string", - "format" : "date-time" - }, - "redeemAfterDate" : { - "description" : "The date after which a voucher can be redeemed, it is calculated based on `minimumTimeToRedeem`", - "type" : "string", - "format" : "date-time" - }, - "redeemOnWeekDays" : { - "description" : "The days of the week a voucher can be redeemed. Only returned when the voucher status is neither `redeemed` nor `canceled`. Also not returned when searching for redeemed vouchers of a specific user.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/WeekDayEnum" - } - } - } - } ] - }, - "VoucherDataForBuy" : { - "description" : "If a type is not specified when requesting this data only the given user data and the list of types the authenticated user can buy for it (could be himself) is returned.", - "allOf" : [ { - "$ref" : "#/components/schemas/VoucherCreateData" - }, { - "type" : "object", - "properties" : { - "canBuyMultiple" : { - "description" : "If user can buy multiple vouchers at same time", - "type" : "boolean" - }, - "fixedAmount" : { - "description" : "Returned if there is a fixed amount for bought vouchers. Is kept for backwards compatibility, because the `amountRange` is enough to return this information (when `min` and `max` are the same amount)", - "type" : "string", - "format" : "number" - }, - "amountRange" : { - "description" : "Returned if there is a minimum / maximum amount for buying", - "allOf" : [ { - "$ref" : "#/components/schemas/DecimalRange" - } ] - }, - "categories" : { - "description" : "The list of voucher categories applicable to the possible types. Returned only if no type parameter is given.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/VoucherCategory" + "WebshopSettingsDetailed": { + "description": "Settings for a user's webshop", + "allOf": [ + { + "$ref": "#/components/schemas/WebshopSettings" + }, + { + "type": "object", + "properties": { + "customOrderNumberFormat": { + "type": "boolean", + "description": "Whether orders will have a custom format for assigned numbers. When set, the number will be generated from a given prefix, inner length and suffix. When false, a numeric string will be used." + }, + "orderNumberPrefix": { + "type": "string", + "description": "The order number prefix. You can generate a date part by using a [Java date pattern](https://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html) between sharp (#) characters.", + "example": "#yyyyMM#-" + }, + "orderNumberInnerLength": { + "type": "integer", + "description": "The size of the numerical part of the order number." + }, + "orderNumberSuffix": { + "type": "string", + "description": "The order number suffix. You can generate a date part by using a [Java date pattern](https://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html) between sharp (#) characters." } - }, - "types" : { - "description" : "The list of voucher types the authenticated user can buy to another user (or himself). Returned only if no type parameter is given.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/VoucherTypeDetailed" + } + } + ] + }, + "WebshopSettingsView": { + "description": "Details of a user webshop settings", + "allOf": [ + { + "$ref": "#/components/schemas/WebshopSettingsDetailed" + }, + { + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/User" + }, + "canEdit": { + "description": "-> True if the authenticated user can edit the settings for the given user and also if the given user has its webshop enable, otherwise false.", + "type": "boolean" } - }, - "voucherCustomFields" : { - "description" : "The list of available voucher custom fields associated with this voucher type for the authenticated user.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/CustomFieldDetailed" + } + } + ] + }, + "Wizard": { + "description": "A custom wizard", + "allOf": [ + { + "$ref": "#/components/schemas/InternalNamedEntity" + }, + { + "type": "object", + "properties": { + "kind": { + "$ref": "#/components/schemas/WizardKind" + }, + "svgIcon": { + "description": "The name of the SVG icon. The content of the icon can be obtained with `GET /images/svg-icons/{name}.svg`", + "type": "string" + }, + "icon": { + "description": "The character that represents the icon in the Cyclos font. Only used by the mobile application.", + "type": "string" + }, + "customIconContent": { + "description": "The content of the custom SVG icon. Used only by the mobile application.", + "type": "string" + }, + "label": { + "description": "A representative label about the wizard", + "type": "string" + }, + "adminMenu": { + "description": "In which administration menu the wizard shows up.", + "allOf": [ + { + "$ref": "#/components/schemas/AdminMenuEnum" + } + ] + }, + "userMenu": { + "description": "In which user menu the operation shows up.", + "allOf": [ + { + "$ref": "#/components/schemas/UserMenuEnum" + } + ] + }, + "userProfileSection": { + "description": "In which user profile section the operation shows up.", + "allOf": [ + { + "$ref": "#/components/schemas/UserProfileSectionEnum" + } + ] } - }, - "confirmationPasswordInput" : { - "deprecated" : true, - "x-remove-version" : 4.17, - "description" : "The buying / sending should use a preview. So, call the preview operation and the confirmation password input will be returned on it", - "allOf" : [ { - "$ref" : "#/components/schemas/PasswordInput" - } ] - } - } - } ] - }, - "VoucherDataForGenerate" : { - "description" : "Returns the data to generate vouchers. If a type is not specified when requesting this data only the given user data and the list of types the authenticated user can generate is returned.", - "allOf" : [ { - "$ref" : "#/components/schemas/VoucherCreateData" - }, { - "type" : "object", - "properties" : { - "generationStatus" : { - "$ref" : "#/components/schemas/VoucherGenerationStatusEnum" - }, - "generationAmount" : { - "$ref" : "#/components/schemas/VoucherGenerationAmountEnum" - }, - "generateVoucher" : { - "description" : "The object that can be altered and posted back to generate the vouchers", - "allOf" : [ { - "$ref" : "#/components/schemas/GenerateVoucher" - } ] - }, - "categories" : { - "description" : "The list of voucher categories applicable to the possible types. Returned only if no type parameter is given.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/VoucherCategory" + } + } + ] + }, + "WizardExecutionData": { + "description": "Information for executing a custom wizard in a given step", + "type": "object", + "properties": { + "key": { + "description": "The execution identifier", + "type": "string" + }, + "wizard": { + "description": "The wizard being executed.", + "allOf": [ + { + "$ref": "#/components/schemas/Wizard" } - }, - "types" : { - "description" : "The list of voucher types the authenticated user can generate. Returned only if no type parameter is given.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/VoucherTypeDetailed" + ] + }, + "user": { + "description": "The user over which the wizard is being executed.", + "allOf": [ + { + "$ref": "#/components/schemas/User" } - }, - "user" : { - "$ref" : "#/components/schemas/User" - }, - "confirmationPasswordInput" : { - "description" : "If a confirmation password is used, contains the definitions on how to request that password from the user. This confirmation password is required when performing sensible actions. Sometimes this is dynamic, for example, the confirmation might be configured to be used only once per session, or operations like payments may have a limit per day to be without confirmation (pinless).", - "allOf" : [ { - "$ref" : "#/components/schemas/PasswordInput" - } ] - }, - "voucherCustomFields" : { - "description" : "The list of available voucher custom fields associated with this voucher type for the authenticated user", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/CustomFieldDetailed" - } - } - } - } ] - }, - "VoucherDataForRedeem" : { - "description" : "Data used to redeem a voucher", - "allOf" : [ { - "$ref" : "#/components/schemas/VoucherBasicDataForTransaction" - }, { - "type" : "object", - "properties" : { - "balance" : { - "description" : "The voucher remaining balance. Is not returned when the voucher has a dynamic amount.", - "type" : "string", - "format" : "number" - }, - "pinInput" : { - "description" : "Is returned when this redeem requires a PIN to be entered. Contains the definitions for the voucher PIN.", - "allOf" : [ { - "$ref" : "#/components/schemas/PasswordInput" - } ] - }, - "buyer" : { - "description" : "The voucher buyer, if any and visible", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - } - } - } ] - }, - "VoucherDataForTopUp" : { - "description" : "Data used to top-up or activate a voucher", - "allOf" : [ { - "$ref" : "#/components/schemas/VoucherBasicDataForTransaction" - }, { - "type" : "object", - "properties" : { - "isActivation" : { - "description" : "Indicates whether this top-up will activate the voucher. This means the voucher status is currently `inactive`.", - "type" : "boolean" - }, - "confirmationPasswordInput" : { - "description" : "If a confirmation password is used, contains the definitions on how to request that password from the user. This confirmation password is required when performing sensible actions. Sometimes this is dynamic, for example, the confirmation might be configured to be used only once per session, or operations like payments may have a limit per day to be without confirmation (pinless).", - "allOf" : [ { - "$ref" : "#/components/schemas/PasswordInput" - } ] - }, - "generationAmount" : { - "$ref" : "#/components/schemas/VoucherGenerationAmountEnum" - }, - "pinOnActivation" : { - "$ref" : "#/components/schemas/VoucherPinOnActivationEnum" - }, - "phoneConfiguration" : { - "description" : "Configuration for input of the mobile phone used to either send the PIN or voucher notifications. Only returned if `isActivation` is true and SMS sending is enabled.", - "allOf" : [ { - "$ref" : "#/components/schemas/PhoneConfiguration" - } ] - }, - "emailInput" : { - "description" : "Indicates if and how the e-mail should be entered on activation.\n\n- `disabled` when `isActivation` is false; - `optional` when the voucher\n configuration's `pinOnActivation` is not\n `send`, or when it is\n `send` and both e-mail and\n SMS are possible send mediums for the PIN;\n- `required` when the voucher\n configuration's `pinOnActivation` is\n `send` and the e-mail is the\n only possible send medium for the PIN;", - "allOf" : [ { - "$ref" : "#/components/schemas/AvailabilityEnum" - } ] - }, - "pinInput" : { - "description" : "Configuration for input of the new voucher PIN. Only returned if `pinOnActivation` is `input`.", - "allOf" : [ { - "$ref" : "#/components/schemas/PasswordInput" - } ] - }, - "voucherCustomFields" : { - "description" : "The list of available voucher custom fields associated with this voucher type for the authenticated user", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/CustomFieldDetailed" - } - } - } - } ] - }, - "VoucherInfo" : { - "description" : "Contains information visible as guest in the application to get information about a voucher.", - "type" : "object", - "properties" : { - "token" : { - "description" : "The voucher token", - "type" : "string" - }, - "pinInput" : { - "description" : "Is returned when the voucher requires a PIN to be entered. Contains the definitions for the voucher PIN.", - "allOf" : [ { - "$ref" : "#/components/schemas/PasswordInput" - } ] - }, - "blockedGiftBy" : { - "description" : "Only returned for gift vouchers with PIN that weren't activated yet. Is the display of the user that issued the voucher", - "type" : "string" - }, - "forgotPinCaptchaInput" : { - "description" : "Whenever a `pinInput` is returned a captcha input is also returned. Used to request a forgot pin.", - "allOf" : [ { - "$ref" : "#/components/schemas/CaptchaInput" - } ] + ] }, - "forgotPinSendMediums" : { - "description" : "The allowed mediums used to send the pin when a forgot pin request is performed.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/SendMediumEnum" - } - }, - "type" : { - "$ref" : "#/components/schemas/VoucherType" - }, - "status" : { - "$ref" : "#/components/schemas/VoucherStatusEnum" + "menuItem": { + "description": "The menu item used to start this execution", + "allOf": [ + { + "$ref": "#/components/schemas/EntityReference" + } + ] }, - "personal" : { - "description" : "When returned, indicates that this voucher is meant for personal use of this user", - "type" : "string" + "path": { + "description": "Contains each previously executed step. The current step is not included.", + "type": "array", + "items": { + "$ref": "#/components/schemas/WizardStep" + } }, - "amount" : { - "description" : "The voucher amount. Only returned if the voucher has a fixed amount defined on generation.", - "type" : "string", - "format" : "number" + "step": { + "description": "Contains detailed information of the current step, including which fields should be displayed.", + "allOf": [ + { + "$ref": "#/components/schemas/WizardStepDetailed" + } + ] }, - "balance" : { - "description" : "The voucher balance.", - "type" : "string", - "format" : "number" + "stepNumber": { + "description": "When the wizard contains a static set of steps, returns the number (1-based) of the current step.", + "type": "integer" }, - "email" : { - "description" : "The optional contact e-mail for this voucher. In case the voucher was sent this property is never null.", - "type" : "string" + "stepCount": { + "description": "When the wizard contains a static set of steps, returns the total number of steps in this wizard. When displaying to users, the displaying of the wizard results should also be counted as a step. For the user it will probably be displayed as the final step, but in Cyclos, there's no such step - only the result is returned.", + "type": "integer" }, - "mobilePhone" : { - "description" : "The optional contact mobile phone for this voucher. Only applies if the voucher was not sent.", - "type" : "string" + "action": { + "$ref": "#/components/schemas/WizardActionEnum" }, - "notificationsEnabled" : { - "description" : "Whether the notifications are enabled or not.", - "type" : "boolean" + "transitions": { + "description": "The possible transitions between the current step and other steps", + "type": "array", + "items": { + "$ref": "#/components/schemas/WizardStepTransition" + } }, - "creationDate" : { - "description" : "The date the voucher was created.", - "type" : "string", - "format" : "date-time" + "notificationLevel": { + "description": "Indicates that a notification should be displayed in this step.", + "allOf": [ + { + "$ref": "#/components/schemas/NotificationLevelEnum" + } + ] }, - "creationType" : { - "$ref" : "#/components/schemas/VoucherCreationTypeEnum" + "notification": { + "description": "A notification that was sent to this step. Only sent if `notificationLevel` is present.", + "type": "string" }, - "redeemAfterDate" : { - "description" : "The date after which voucher can be redeemed.", - "type" : "string", - "format" : "date-time" + "resultType": { + "description": "Only returned when the wizard is finished. Indicates how clients should interpret the result.", + "allOf": [ + { + "$ref": "#/components/schemas/WizardResultTypeEnum" + } + ] }, - "redeemAfterDateReached" : { - "description" : "Indicates whether the voucher can already be redeemed.", - "type" : "boolean" + "result": { + "description": "Only returned when the wizard is finished. Contains the execution result when `resultType` is either `plainText` or `richText`.", + "type": "string" }, - "expirationDate" : { - "description" : "The date the voucher expires.", - "type" : "string", - "format" : "date-time" + "resultTitle": { + "description": "Only returned when the wizard is finished. Contains the title that should be displayed together with the `result`. Only returned for menu wizards (not on registration wizards).", + "type": "string" }, - "canChangePin" : { - "description" : "Indicates whether the voucher pin can be changed or not. The flag is true only if pin is used for this voucher.", - "type" : "boolean" + "registrationResult": { + "description": "Only returned when the wizard is finished. Contains the execution result when `resultType` is `registration`", + "allOf": [ + { + "$ref": "#/components/schemas/UserRegistrationResult" + } + ] }, - "canChangeNotificationSettings" : { - "description" : "Indicates whether the notification settings for this voucher can be changed or not. The flag is true only if pin is used for this voucher and it was generated `inactive` or the voucher was sent.", - "type" : "boolean" + "params": { + "description": "Contains each of the parameters filled-in so far. Only returned when the wizard isn't finished yet (`resultType` is null).", + "allOf": [ + { + "$ref": "#/components/schemas/WizardTransitionParams" + } + ] }, - "phoneConfiguration" : { - "description" : "Configuration for input of the mobile phone, if changing the voucher notification settings. Only returned when `canChangeNotificationSettings` is true, indicating a mobile phone can be used. When `canChangeNotificationSettings` is true and `phoneConfiguration` is null, SMS sending is disabled.", - "allOf" : [ { - "$ref" : "#/components/schemas/PhoneConfiguration" - } ] - }, - "redeemOnWeekDays" : { - "description" : "The days of the week a voucher can be redeemed.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/WeekDayEnum" - } + "binaryValues": { + "description": "Holds the current values for file / image custom fields as lists of `StoredFile`s / `Image`s.", + "allOf": [ + { + "$ref": "#/components/schemas/CustomFieldBinaryValues" + } + ] }, - "singleRedeem" : { - "description" : "This is only returned for vouchers that cannot be partially redeemed, if the status is `redeemed`.", - "allOf" : [ { - "$ref" : "#/components/schemas/VoucherTransaction" - } ] + "codeSentToEmail": { + "description": "The email address to which the verification code was sent. Only returned for email verification steps.", + "type": "string" }, - "hasTransactions" : { - "description" : "Indicates whether the voucher has transactions, that means, if there are any redeems of top-ups for this voucher. If so, a separated request to `GET /vouchers/{key}/transactions` should be performed in order to fetch them. Note that if `redeemDate` is returned, it means the voucher cannot be partially redeemed and was already fully redeemed. In this case, there are no more transactions to show, and this flag will be false.", - "type" : "boolean" - }, - "customValues" : { - "description" : "The list of custom field values this voucher has", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/CustomFieldValue" - } + "codeSentToPhone": { + "description": "The (formatted )mobile phone number to which the verification code was sent. Only returned for phone verification steps.", + "type": "string" } } - }, - "VoucherInitialDataForTransaction" : { - "description" : "Initial data used to perform a voucher transaction", - "type" : "object", - "properties" : { - "user" : { - "$ref" : "#/components/schemas/User" - }, - "mask" : { - "description" : "The voucher token mask. When there are multiple configurations, the mask is only returned if all the configurations share the same mask.", - "type" : "string" - } - } - }, - "VoucherPermissions" : { - "description" : "Permissions over vouchers", - "type" : "object", - "properties" : { - "configuration" : { - "$ref" : "#/components/schemas/VoucherConfiguration" - }, - "cancel" : { - "description" : "Whether the logged user can cancel vouchers of types belonging to this configuration. Only if the authenticated user is an admin. Otherwise `false`.", - "type" : "boolean" - }, - "changeExpirationDate" : { - "description" : "Whether the logged user can change the expiration date of vouchers of types belonging to this configuration. Only if the authenticated user is an admin. Otherwise `false`.", - "type" : "boolean" - }, - "generate" : { - "description" : "Whether the logged user can generate vouchers of types belonging to this configuration. Only if the authenticated user is an admin. Otherwise `false`.", - "type" : "boolean" - }, - "view" : { - "description" : "Whether the logged administrator can view all vouchers belonging to this configuration.", - "type" : "boolean" - }, - "enabled" : { - "description" : "Whether the logged user has enabled the types belonging to this configuration. Only if the authenticated user is a member. Otherwise `false`.", - "type" : "boolean" - }, - "viewVouchers" : { - "description" : "Whether the logged user can view vouchers of types belonging to this configuration.", - "type" : "boolean" - }, - "buy" : { - "description" : "Whether the logged user can buy vouchers of types belonging to this configuration.", - "type" : "boolean" - }, - "send" : { - "description" : "Whether the logged user can send by e-mail vouchers of types belonging to this configuration.", - "type" : "boolean" - }, - "refund" : { - "description" : "Whether the logged user can refund vouchers of types belonging to this configuration.", - "type" : "boolean" - }, - "viewTransactions" : { - "description" : "Whether the logged user can view transactions (redeems / top-ups) of vouchers whose types belong to this configuration.", - "type" : "boolean" - }, - "redeem" : { - "description" : "Whether the logged user can redeem vouchers of types belonging to this configuration.", - "type" : "boolean" - }, - "topUp" : { - "description" : "Whether the logged user can top-up or activate vouchers.", - "type" : "boolean" - }, - "viewBought" : { - "deprecated" : true, - "x-remove-version" : 4.17, - "description" : "Use `viewVouchers` instead.", - "type" : "boolean" + }, + "WizardPermissions": { + "description": "Permissions over a specific custom wizard", + "type": "object", + "properties": { + "wizard": { + "$ref": "#/components/schemas/Wizard" }, - "viewRedeemed" : { - "deprecated" : true, - "x-remove-version" : 4.17, - "description" : "Use `viewTransactions` instead.", - "type" : "boolean" + "run": { + "description": "Can run this wizard?", + "type": "boolean" } } }, - "VoucherRedeemPreview" : { - "description" : "Preview information of a voucher redeem", - "allOf" : [ { - "$ref" : "#/components/schemas/VoucherTransactionPreview" - }, { - "type" : "object", - "properties" : { - "redeem" : { - "$ref" : "#/components/schemas/RedeemVoucher" - }, - "pinInput" : { - "description" : "Is returned when this redeem requires a PIN to be entered. Contains the definitions for the voucher PIN.", - "allOf" : [ { - "$ref" : "#/components/schemas/PasswordInput" - } ] - } - } - } ] - }, - "VoucherRedeemResult" : { - "description" : "Result when performing a voucher redeem", - "allOf" : [ { - "$ref" : "#/components/schemas/VoucherTransactionResult" - }, { - "type" : "object", - "properties" : { - "paymentId" : { - "deprecated" : true, - "x-remove-version" : 4.17, - "description" : "Use `payment.id` instead (handling the case when it can be null).", - "type" : "string" - } - } - } ] - }, - "VoucherResult" : { - "description" : "Result of a voucher search", - "allOf" : [ { - "$ref" : "#/components/schemas/Voucher" - }, { - "type" : "object", - "properties" : { - "owner" : { - "description" : "The user a generated voucher was assigned to, if any.", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "buyer" : { - "description" : "The voucher buyer. Is not returned when the voucher was generated or when searching for bought vouchers of a user.", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "creationDate" : { - "description" : "The date a voucher was generated or bought", - "type" : "string", - "format" : "date-time" - }, - "redeemAfterDate" : { - "description" : "The date after which a voucher can be redeemed. Only returned when the voucher status is neither `redeemed` nor `canceled`. Also not returned when searching for redeemed vouchers of a specific user.", - "type" : "string", - "format" : "date-time" - }, - "redeemOnWeekDays" : { - "description" : "The days of the week a voucher can be redeemed. Only returned when the voucher status is neither `redeemed` nor `canceled`. Also not returned when searching for redeemed vouchers of a specific user.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/WeekDayEnum" - } - }, - "redeemer" : { - "deprecated" : true, - "x-remove-version" : 4.17, - "description" : "This field doesn't belong to the voucher itself, but to the transaction. Search for voucher transactions instead.", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "redeemBy" : { - "deprecated" : true, - "x-remove-version" : 4.17, - "description" : "This field doesn't belong to the voucher itself, but to the transaction. Search for voucher transactions instead.", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "redeemDate" : { - "deprecated" : true, - "x-remove-version" : 4.17, - "description" : "This field doesn't belong to the voucher itself, but to the transaction. Search for voucher transactions instead.", - "type" : "string", - "format" : "date-time" - } - } - } ] - }, - "VoucherSendingPreview" : { - "description" : "Preview information of a voucher sending.", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseVoucherBuyingPreview" - }, { - "type" : "object", - "properties" : { - "owner" : { - "description" : "If the `email` to which the voucher will be sent matches the e-mail of an existing user, the voucher will be assigned to that user.", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "sendVoucher" : { - "description" : "The parameters object that should be re-posted.", - "allOf" : [ { - "$ref" : "#/components/schemas/SendVoucher" - } ] - } - } - } ] - }, - "VoucherTopUpPreview" : { - "description" : "Preview information of a voucher top-up", - "allOf" : [ { - "$ref" : "#/components/schemas/VoucherTransactionPreview" - }, { - "type" : "object", - "properties" : { - "formattedMobilePhone" : { - "description" : "Only returned when sending the PIN via SMS to a phone. Is that same mobile phone number, but formatted.", - "type" : "string" - }, - "owner" : { - "description" : "When an e-mail address or mobile phone is given, the a matching user is found in the system which can have this voucher assigned, is the reference for that user.", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "topUp" : { - "$ref" : "#/components/schemas/TopUpVoucher" - }, - "confirmationPasswordInput" : { - "description" : "If a confirmation password is used, contains the definitions on how to request that password from the user. This confirmation password is required when performing sensible actions. Sometimes this is dynamic, for example, the confirmation might be configured to be used only once per session, or operations like payments may have a limit per day to be without confirmation (pinless).", - "allOf" : [ { - "$ref" : "#/components/schemas/PasswordInput" - } ] - }, - "voucherCustomValues" : { - "description" : "The values of each custom field", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/CustomFieldValue" + "WizardStep": { + "description": "A custom wizard step", + "allOf": [ + { + "$ref": "#/components/schemas/InternalNamedEntity" + }, + { + "type": "object", + "properties": { + "kind": { + "$ref": "#/components/schemas/WizardStepKind" } } } - } ] + ] }, - "VoucherTransaction" : { - "description" : "Details of a voucher transaction", - "allOf" : [ { - "$ref" : "#/components/schemas/Entity" - }, { - "type" : "object", - "properties" : { - "kind" : { - "$ref" : "#/components/schemas/VoucherTransactionKind" - }, - "date" : { - "description" : "The transaction date.", - "type" : "string", - "format" : "date-time" - }, - "amount" : { - "description" : "The transaction amount.", - "type" : "string", - "format" : "number" - }, - "payment" : { - "description" : "The payment generated by the transaction. Only returned if visible", - "allOf" : [ { - "$ref" : "#/components/schemas/Transaction" - } ] - }, - "user" : { - "description" : "The user over which the transaction was performed. For redeems, is generatlly the same as payment's to account user, but the voucher type may be configured in such a way that a fixed user is the one that gets paid regardless of the redeemer.", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "by" : { - "description" : "The admin / broker / user / operator that was logged-in when the transaction was performed.", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - } - } - } ] - }, - "VoucherTransactionPreview" : { - "description" : "Common data returned when previewing a voucher transaction", - "type" : "object", - "properties" : { - "kind" : { - "$ref" : "#/components/schemas/VoucherTransactionKind" - }, - "user" : { - "description" : "The user over which the transaction will be performed.", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "type" : { - "description" : "The voucher type.", - "allOf" : [ { - "$ref" : "#/components/schemas/VoucherTypeDetailed" - } ] - }, - "token" : { - "description" : "The masked voucher token", - "type" : "string" - }, - "amount" : { - "description" : "The transaction amount", - "type" : "string", - "format" : "number" - }, - "paymentCustomValues" : { - "description" : "The values of each payment custom field", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/CustomFieldValue" - } - } - } - }, - "VoucherTransactionResult" : { - "description" : "Result of a voucher transactions search", - "allOf" : [ { - "$ref" : "#/components/schemas/VoucherTransaction" - }, { - "type" : "object", - "properties" : { - "type" : { - "description" : "The voucher type.", - "allOf" : [ { - "$ref" : "#/components/schemas/VoucherType" - } ] - }, - "token" : { - "description" : "The (maybe masked) voucher token.", - "type" : "string" - }, - "voucherId" : { - "description" : "The voucher id. Only returned if the voucher itself is visible by the currently authenticated user", - "type" : "string" - }, - "customValues" : { - "description" : "The list of custom field values which were filled in the activation process. Only returned if this transaction is the first top-up for the voucher.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/CustomFieldValue" - } - } - } - } ] - }, - "VoucherTransactionView" : { - "description" : "Details of a voucher transaction", - "allOf" : [ { - "$ref" : "#/components/schemas/VoucherTransactionResult" - }, { - "type" : "object", - "properties" : { - "chargebackOf" : { - "description" : "When this voucher transaction is a chargeback, is a reference to the voucher transaction that was charged back.", - "allOf" : [ { - "$ref" : "#/components/schemas/VoucherTransaction" - } ] - }, - "chargedBackBy" : { - "description" : "When this voucher transaction was charged back, is a reference to the corresponding chargeback transaction.", - "allOf" : [ { - "$ref" : "#/components/schemas/VoucherTransaction" - } ] - }, - "exportFormats" : { - "description" : "The formats which the data can be exported", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ExportFormat" + "WizardStepDetailed": { + "description": "A custom wizard step with detailed information", + "allOf": [ + { + "$ref": "#/components/schemas/WizardStep" + }, + { + "type": "object", + "properties": { + "title": { + "description": "The title that should be displayed for users on this step.", + "type": "string" + }, + "informationText": { + "description": "Descriptive text that should be displayed in this wizard step.", + "type": "string" + }, + "groups": { + "description": "Groups that can be used for registration. Only returned if `kind` is `group`.", + "type": "array", + "items": { + "$ref": "#/components/schemas/GroupForRegistration" + } + }, + "identityProviders": { + "description": "The identity providers available for registering. Only returned if `kind` is `identityProvider`.", + "type": "array", + "items": { + "$ref": "#/components/schemas/IdentityProvider" + } + }, + "dataForNew": { + "description": "Contains the `UserDataForNew` for the new user registration. Only returned if `kind` is `formFields` and the wizard kind is `registration`. The returned object contains a subset of the fields, according to what should be displayed in this step. For example, even if the full profile contains several fields, if this step is configured to show only the full name and e-mail, only those profile fields are returned in `profileFieldActions`, and the `phoneConfiguration`, `passwordTypes`, etc, will all be empty.", + "allOf": [ + { + "$ref": "#/components/schemas/UserDataForNew" + } + ] + }, + "verifiedEmail": { + "description": "If an e-mail address was already verified, contains that address. Only returned if `kind` is `formFields` and the wizard kind is `registration`.", + "type": "string" + }, + "verifiedSms": { + "description": "If a mobile phone number was was already verified by SMS, contains that number. Only returned if `kind` is `formFields` and the wizard kind is `registration`.", + "type": "string" + }, + "verificationCodeSeconds": { + "description": "The number of seconds a verification code may be requested again.", + "type": "integer" + }, + "customFields": { + "description": "The custom fields defined in this wizard that should be displayed. Only returned if `kind` is `formFields`.", + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldDetailed" + } + }, + "fields": { + "description": "Contains the fields ordered in the way they should be displayed, well as some additional information per field. Fields that represents custom profile fields or wizard custom fields contain the field internal name. The field data itself should be looked up in either `dataForNew.customFields` (for user custom fields) or `customFields` (for wazard custom fields).", + "type": "array", + "items": { + "$ref": "#/components/schemas/WizardStepField" + } + }, + "validateEmail": { + "deprecated": true, + "x-remove-version": 4.18, + "description": "Lookup the `requireVerification` property in `fields` array for the object with `basicProfileField` = `email`.", + "type": "boolean" + }, + "validateSms": { + "deprecated": true, + "x-remove-version": 4.18, + "description": "Lookup the `requireVerification` property in `fields` array for the object with `phoneKind` = `mobile`.", + "type": "boolean" } } } - } ] + ] }, - "VoucherType" : { - "description" : "Reference to a voucher type", - "allOf" : [ { - "$ref" : "#/components/schemas/InternalNamedEntity" - }, { - "type" : "object", - "properties" : { - "configuration" : { - "$ref" : "#/components/schemas/VoucherConfiguration" - }, - "voucherTitle" : { - "description" : "The voucher title", - "type" : "string" - }, - "category" : { - "$ref" : "#/components/schemas/VoucherCategory" - }, - "image" : { - "$ref" : "#/components/schemas/Image" - } - } - } ] - }, - "VoucherTypeDetailed" : { - "description" : "Reference to a voucher type and add extra information.", - "allOf" : [ { - "$ref" : "#/components/schemas/VoucherType" - }, { - "type" : "object", - "properties" : { - "voucherDescription" : { - "description" : "The voucher description", - "type" : "string" - }, - "gift" : { - "$ref" : "#/components/schemas/VoucherGiftEnum" - }, - "redeemAllowedGroups" : { - "description" : "The list of goups allowed as redeemers. And empty list means all groups with permissions are allowed. Only this list or the `redeemAllowedUsers` list can be not null at the same time.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Group" - } - }, - "redeemAllowedUsers" : { - "description" : "The list of users allowed as redeemers. An empty list means all users with permissions are allowed. Only this list or the `redeemAllowedGroups` list can be not null at the same time.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/User" - } - }, - "allowPartialRedeems" : { - "description" : "Indicates whether partial redeems can occur, that is, a redeem with an amount which is not the total voucher amount.", - "type" : "boolean" - } - } - } ] - }, - "VoucherView" : { - "description" : "Details of a voucher", - "allOf" : [ { - "$ref" : "#/components/schemas/VoucherResult" - }, { - "type" : "object", - "properties" : { - "title" : { - "description" : "The voucher title when it was created.", - "type" : "string" - }, - "description" : { - "description" : "The voucher description when it was created.", - "type" : "string" - }, - "buy" : { - "description" : "The transaction which bought this voucher, if any and visible.", - "allOf" : [ { - "$ref" : "#/components/schemas/Transaction" - } ] - }, - "redeemAllowedGroups" : { - "description" : "The list of goups allowed as redeemers. And empty list means all groups with permissions are allowed. Only this list or the `redeemAllowedUsers` list can be not null at the same time.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Group" - } - }, - "redeemAllowedUsers" : { - "description" : "The list of users allowed as redeemers. An empty list means all users with permissions are allowed. Only this list or the `redeemAllowedGroups` list can be not null at the same time.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/User" - } - }, - "pinStatusForRedeem" : { - "$ref" : "#/components/schemas/VoucherPinStatusForRedeemEnum" - }, - "pin" : { - "description" : "The voucher pin used for redeeming. Only visible for admins or buyer / owner, and when the voucher is initially active.", - "type" : "string" - }, - "email" : { - "description" : "The contact e-mail for this voucher.", - "type" : "string" - }, - "mobilePhone" : { - "description" : "The contact mobile phone for this voucher.", - "type" : "string" - }, - "enableNotifications" : { - "description" : "Whether notifications are enabled for this voucher.", - "type" : "boolean" - }, - "canAssign" : { - "description" : "Can the authenticated admin assign the voucher to a user? Only applies to generated vouchers.", - "type" : "boolean" - }, - "canChangeExpirationDate" : { - "description" : "Can the authenticated user change this voucher's expiration date?", - "type" : "boolean" - }, - "canChangeNotificationSettings" : { - "description" : "Can the authenticated user change this voucher's notification settings, including the e-mail the voucher was sent to?", - "type" : "boolean" - }, - "phoneConfiguration" : { - "description" : "Configuration for input of the mobile phone, if changing the voucher notification settings. Only returned when `canChangeNotificationSettings` is true, indicating a mobile phone can be used. When `canChangeNotificationSettings` is true and `phoneConfiguration` is null, SMS sending is disabled.", - "allOf" : [ { - "$ref" : "#/components/schemas/PhoneConfiguration" - } ] - }, - "canResendEmail" : { - "description" : "Can the authenticated user re-send the voucher by e-mail? Only applies to sent vouchers.", - "type" : "boolean" - }, - "canUnblockPin" : { - "description" : "Can the authenticated user unblock the voucher PIN? Is only returned if the voucher PIN is actually blocked and the authenticated user has permission to unblock it.", - "type" : "boolean" - }, - "canManageNotificationSettings" : { - "description" : "Can the authenticated user manage notification settings of this voucher? Is only returned for vouchers that have notifications on its own (generated inactive or sent) and the authenticated user has permission to manage the settings.", - "type" : "boolean" - }, - "canChangePin" : { - "description" : "Can the authenticated change the voucher PIN? Is only returned if the voucher is open, uses PIN and the authenticated user has permission to change it.", - "type" : "boolean" - }, - "requireOldPinForChange" : { - "description" : "In case `canChangePin` is true, indicates whether the old PIN should be entered by the user. This is the case when the authenticated user is the voucher owner and the `pin` value is not returned", - "type" : "boolean" - }, - "pinInput" : { - "description" : "In case `canChangePin` is true, contains information of the PIN", - "allOf" : [ { - "$ref" : "#/components/schemas/PasswordInput" - } ] - }, - "showConfiguration" : { - "description" : "Should the voucher configuration be shown to the logged user? This flag is `true` only for admins, and only if there are multiple visible configurations.", - "type" : "boolean" - }, - "showType" : { - "description" : "Should the voucher type be shown to the logged users? This flag is `true` only for admins.", - "type" : "boolean" - }, - "showQrCode" : { - "description" : "Should the voucher token be shown as QR-code for users?", - "type" : "boolean" - }, - "redeemAfterDateReached" : { - "description" : "Should the voucher be available to be redeemed?", - "type" : "boolean" - }, - "expirationDateComments" : { - "description" : "Administration comments regarding expiration date change.", - "type" : "string" - }, - "creationType" : { - "$ref" : "#/components/schemas/VoucherCreationTypeEnum" - }, - "cancelAction" : { - "$ref" : "#/components/schemas/VoucherCancelActionEnum" - }, - "refund" : { - "description" : "The transaction which refunds this voucher, if any and visible.", - "allOf" : [ { - "$ref" : "#/components/schemas/Transaction" - } ] - }, - "refundDate" : { - "description" : "The date the voucher was refunded, if any", - "type" : "string", - "format" : "date-time" - }, - "singleRedeem" : { - "description" : "This is only returned for vouchers that cannot be partially redeemed, if the status is `redeemed`.", - "allOf" : [ { - "$ref" : "#/components/schemas/VoucherTransaction" - } ] - }, - "hasTransactions" : { - "description" : "Indicates whether the voucher has transactions, that means, if there are any redeems of top-ups for this voucher. If so, a separated request to `GET /vouchers/{key}/transactions` should be performed in order to fetch them. Note that if `redeemDate` is returned, it means the voucher cannot be partially redeemed and was already fully redeemed. In this case, there are no more transactions to show, and this flag will be false.", - "type" : "boolean" - }, - "exportFormats" : { - "description" : "The formats which the data can be exported", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ExportFormat" - } - }, - "confirmationPasswordInput" : { - "description" : "If a confirmation password is used, contains the definitions on how to request that password from the user. This confirmation password is required when performing sensible actions. Sometimes this is dynamic, for example, the confirmation might be configured to be used only once per session, or operations like payments may have a limit per day to be without confirmation (pinless).", - "allOf" : [ { - "$ref" : "#/components/schemas/PasswordInput" - } ] - }, - "customValues" : { - "description" : "The list of custom field values this voucher has.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/CustomFieldValue" - } - }, - "topUpEnabled" : { - "description" : "Indicates whether the voucher configuration supports top-up. This flag is not related to the top-up permission.", - "type" : "boolean" - }, - "redeemDate" : { - "deprecated" : true, - "x-remove-version" : 4.17, - "description" : "Use `singleRedeem.date` instead.", - "type" : "string", - "format" : "date-time" - }, - "redeem" : { - "deprecated" : true, - "x-remove-version" : 4.17, - "description" : "Use `singleRedeem.payment` instead.", - "allOf" : [ { - "$ref" : "#/components/schemas/Transaction" - } ] - } - } - } ] - }, - "VouchersPermissions" : { - "description" : "Permissions over voucher configurations", - "type" : "object", - "properties" : { - "vouchers" : { - "description" : "Permissions over each voucher configuration", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/VoucherPermissions" - } - } - } - }, - "VouchersQueryFilters" : { - "description" : "Definitions for searching vouchers as admin", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseVouchersQueryFilters" - }, { - "type" : "object", - "properties" : { - "email" : { - "description" : "The e-mail to which vouchers were either sent or had the PIN sent", - "type" : "string" - }, - "mobilePhone" : { - "description" : "The mobile phone to which vouchers had the PIN sent via SMS", - "type" : "string" - }, - "printed" : { - "description" : "If it is passed, filter if the voucher was printed or not.", - "type" : "boolean" - }, - "buyer" : { - "description" : "The buyer of the voucher. A user identification value, such as id, username, e-mail, phone, etc. Id is always allowed, others depend on Cyclos configuration. Note that a valid numeric value is always considered as id. For example, when using another identification method that can be numeric only, prefix the value with a single quote (like in Excel spreadsheets), for example, `'1234567890`;", - "type" : "string" - }, - "buyerGroups" : { - "description" : "The ids or internal names of buyers groups", - "type" : "array", - "items" : { - "type" : "string" - } - }, - "transactionUser" : { - "description" : "A user that has performed at least one redeem or top-up for the voucher. A user identification value, such as id, username, e-mail, phone, etc. Id is always allowed, others depend on Cyclos configuration. Note that a valid numeric value is always considered as id. For example, when using another identification method that can be numeric only, prefix the value with a single quote (like in Excel spreadsheets), for example, `'1234567890`;", - "type" : "string" - }, - "transactionUserGroups" : { - "description" : "The ids or internal names of groups of users that performed at least one redeem or top-up for the voucher.", - "type" : "array", - "items" : { - "type" : "string" - } - }, - "transactionPeriod" : { - "description" : "The minimum / maximum date for a transaction in this voucher. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.", - "type" : "array", - "items" : { - "type" : "string", - "format" : "date-time" - } - }, - "customFields" : { - "type" : "array", - "items" : { - "type" : "string" - }, - "description" : "Voucher custom field values used as filters. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by : (colon). For example, `customFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, customFields=field1:valueA|valueB. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `customFields=tradeType:offer|search,extraDate:2000-01-01|2001-12-31` would match results whose custom field with internal name `tradeType` is either `offer` or `search`, and whose `extraDate` is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `customFields=extraDate:|2001-12-31`.\nA note for dynamic custom fields: If a script is used to generate possible values for search, the list will be returned in the corresponding data, and it is sent as a pipe-separated list of values (not labels). For example: `customFields=dynamic:a|b|c`. However, it is also possible to perform a keywords-like (full-text) search using the dynamic value label. In this case a single value, prefixed by single quotes should be used. For example: `customFields=dynamic:'business`." - }, - "redeemer" : { - "deprecated" : true, - "x-remove-version" : 4.17, - "description" : "Use `transactionUser` instead.", - "type" : "string" - }, - "redeemerGroups" : { - "deprecated" : true, - "x-remove-version" : 4.17, - "description" : "Use `transactionUserGroups` instead.", - "type" : "array", - "items" : { - "type" : "string" - } - }, - "redeemPeriod" : { - "deprecated" : true, - "x-remove-version" : 4.17, - "description" : "Use `transactionPeriod` instead", - "type" : "array", - "items" : { - "type" : "string", - "format" : "date-time" - } - } - } - } ] - }, - "WebshopAd" : { - "description" : "An Ad with its status information.", - "allOf" : [ { - "$ref" : "#/components/schemas/BaseAdDetailed" - }, { - "type" : "object", - "properties" : { - "allowDecimalQuantity" : { - "description" : "Indicates if the webshop ad allow enter a decimal value for the quantity.", - "type" : "boolean" - }, - "minAllowedInCart" : { - "description" : "The minimum quantity allowed to be added in the shopping cart.", - "type" : "string", - "format" : "number" - }, - "maxAllowedInCart" : { - "description" : "The maximum quantity allowed to be added in the shopping cart.", - "type" : "string", - "format" : "number" - }, - "stockQuantity" : { - "description" : "The stock disponibility. Only if `unlimitedStock` is false and the 'Stock type' was not marked as 'Not available' (through the web interface).", - "type" : "string", - "format" : "number" - }, - "unlimitedStock" : { - "description" : "If true then it means there is always disponibility of the webshop ad.", - "type" : "boolean" - } - } - } ] - }, - "WebshopSettings" : { - "description" : "Base Settings for a user's webshop", - "type" : "object", - "properties" : { - "productNumberGenerated" : { - "type" : "boolean", - "description" : "Whether the product number, which is required for webshop advertisements, will be generated (true) or manual (false)." - }, - "productNumberMask" : { - "type" : "string", - "description" : "A mask that indicates the format of product numbers. The following characters are accepted:\n- `?`, `_`: Any character; - `#`, `0`, `9`: A digit; - `A`, `a`: A letter (regardless the case); - `L`, `l`: A lowercase letter; - `U`, `u`: An uppercase letter; - `C`, `c`: A capitalized letter; - `\\` folowed by any character, or any character not in the list\n above: A literal character.", - "example" : "UUU-####" - } - } - }, - "WebshopSettingsDetailed" : { - "description" : "Settings for a user's webshop", - "allOf" : [ { - "$ref" : "#/components/schemas/WebshopSettings" - }, { - "type" : "object", - "properties" : { - "customOrderNumberFormat" : { - "type" : "boolean", - "description" : "Whether orders will have a custom format for assigned numbers. When set, the number will be generated from a given prefix, inner length and suffix. When false, a numeric string will be used." - }, - "orderNumberPrefix" : { - "type" : "string", - "description" : "The order number prefix. You can generate a date part by using a [Java date pattern](https://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html) between sharp (#) characters.", - "example" : "#yyyyMM#-" - }, - "orderNumberInnerLength" : { - "type" : "integer", - "description" : "The size of the numerical part of the order number." - }, - "orderNumberSuffix" : { - "type" : "string", - "description" : "The order number suffix. You can generate a date part by using a [Java date pattern](https://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html) between sharp (#) characters." - } - } - } ] - }, - "WebshopSettingsView" : { - "description" : "Details of a user webshop settings", - "allOf" : [ { - "$ref" : "#/components/schemas/WebshopSettingsDetailed" - }, { - "type" : "object", - "properties" : { - "user" : { - "$ref" : "#/components/schemas/User" - }, - "canEdit" : { - "description" : "-> True if the authenticated user can edit the settings for the given user and also if the given user has its webshop enable, otherwise false.", - "type" : "boolean" - } - } - } ] - }, - "Wizard" : { - "description" : "A custom wizard", - "allOf" : [ { - "$ref" : "#/components/schemas/InternalNamedEntity" - }, { - "type" : "object", - "properties" : { - "kind" : { - "$ref" : "#/components/schemas/WizardKind" - }, - "svgIcon" : { - "description" : "The name of the SVG icon. The content of the icon can be obtained with `GET /images/svg/{name}.svg`", - "type" : "string" - }, - "icon" : { - "description" : "The character that represents the icon in the Cyclos font", - "type" : "string" - }, - "label" : { - "description" : "A representative label about the wizard", - "type" : "string" - }, - "adminMenu" : { - "description" : "In which administration menu the wizard shows up.", - "allOf" : [ { - "$ref" : "#/components/schemas/AdminMenuEnum" - } ] - }, - "userMenu" : { - "description" : "In which user menu the operation shows up.", - "allOf" : [ { - "$ref" : "#/components/schemas/UserMenuEnum" - } ] - }, - "userProfileSection" : { - "description" : "In which user profile section the operation shows up.", - "allOf" : [ { - "$ref" : "#/components/schemas/UserProfileSectionEnum" - } ] - } - } - } ] - }, - "WizardExecutionData" : { - "description" : "Information for executing a custom wizard in a given step", - "type" : "object", - "properties" : { - "key" : { - "description" : "The execution identifier", - "type" : "string" - }, - "wizard" : { - "description" : "The wizard being executed.", - "allOf" : [ { - "$ref" : "#/components/schemas/Wizard" - } ] - }, - "user" : { - "description" : "The user over which the wizard is being executed.", - "allOf" : [ { - "$ref" : "#/components/schemas/User" - } ] - }, - "menuItem" : { - "description" : "The menu item used to start this execution", - "allOf" : [ { - "$ref" : "#/components/schemas/EntityReference" - } ] - }, - "path" : { - "description" : "Contains each previously executed step. The current step is not included.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/WizardStep" - } - }, - "step" : { - "description" : "Contains detailed information of the current step, including which fields should be displayed.", - "allOf" : [ { - "$ref" : "#/components/schemas/WizardStepDetailed" - } ] - }, - "stepNumber" : { - "description" : "When the wizard contains a static set of steps, returns the number (1-based) of the current step.", - "type" : "integer" - }, - "stepCount" : { - "description" : "When the wizard contains a static set of steps, returns the total number of steps in this wizard. When displaying to users, the displaying of the wizard results should also be counted as a step. For the user it will probably be displayed as the final step, but in Cyclos, there's no such step - only the result is returned.", - "type" : "integer" - }, - "action" : { - "$ref" : "#/components/schemas/WizardActionEnum" - }, - "transitions" : { - "description" : "The possible transitions between the current step and other steps", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/WizardStepTransition" - } - }, - "notificationLevel" : { - "description" : "Indicates that a notification should be displayed in this step.", - "allOf" : [ { - "$ref" : "#/components/schemas/NotificationLevelEnum" - } ] - }, - "notification" : { - "description" : "A notification that was sent to this step. Only sent if `notificationLevel` is present.", - "type" : "string" - }, - "resultType" : { - "description" : "Only returned when the wizard is finished. Indicates how clients should interpret the result.", - "allOf" : [ { - "$ref" : "#/components/schemas/WizardResultTypeEnum" - } ] - }, - "result" : { - "description" : "Only returned when the wizard is finished. Contains the execution result when `resultType` is either `plainText` or `richText`.", - "type" : "string" - }, - "resultTitle" : { - "description" : "Only returned when the wizard is finished. Contains the title that should be displayed together with the `result`. Only returned for menu wizards (not on registration wizards).", - "type" : "string" - }, - "registrationResult" : { - "description" : "Only returned when the wizard is finished. Contains the execution result when `resultType` is `registration`", - "allOf" : [ { - "$ref" : "#/components/schemas/UserRegistrationResult" - } ] - }, - "params" : { - "description" : "Contains each of the parameters filled-in so far. Only returned when the wizard isn't finished yet (`resultType` is null).", - "allOf" : [ { - "$ref" : "#/components/schemas/WizardTransitionParams" - } ] - }, - "binaryValues" : { - "description" : "Holds the current values for file / image custom fields as lists of `StoredFile`s / `Image`s.", - "allOf" : [ { - "$ref" : "#/components/schemas/CustomFieldBinaryValues" - } ] - } - } - }, - "WizardPermissions" : { - "description" : "Permissions over a specific custom wizard", - "type" : "object", - "properties" : { - "wizard" : { - "$ref" : "#/components/schemas/Wizard" - }, - "run" : { - "description" : "Can run this wizard?", - "type" : "boolean" - } - } - }, - "WizardStep" : { - "description" : "A custom wizard step", - "allOf" : [ { - "$ref" : "#/components/schemas/InternalNamedEntity" - }, { - "type" : "object", - "properties" : { - "kind" : { - "$ref" : "#/components/schemas/WizardStepKind" - } - } - } ] - }, - "WizardStepDetailed" : { - "description" : "A custom wizard step with detailed information", - "allOf" : [ { - "$ref" : "#/components/schemas/WizardStep" - }, { - "type" : "object", - "properties" : { - "title" : { - "description" : "The title that should be displayed for users on this step.", - "type" : "string" - }, - "informationText" : { - "description" : "Descriptive text that should be displayed in this wizard step.", - "type" : "string" - }, - "groups" : { - "description" : "Groups that can be used for registration. Only returned if `kind` is `group`.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/GroupForRegistration" + "WizardStepField": { + "description": "Information about a field displayed in a wizard execution step.", + "type": "object", + "properties": { + "kind": { + "$ref": "#/components/schemas/WizardStepFieldKind" + }, + "basicProfileField": { + "description": "Which basic profile field is represented by this field. Only if `kind` is `basicProfileField`.", + "allOf": [ + { + "$ref": "#/components/schemas/BasicProfileFieldEnum" } - }, - "identityProviders" : { - "description" : "The identity providers available for registering. Only returned if `kind` is `identityProvider`.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/IdentityProvider" + ] + }, + "phoneKind": { + "description": "Which phone kind is represented by this field. Only if `kind` is `basicProfileField` and `basicProfileField` is `phone`.", + "allOf": [ + { + "$ref": "#/components/schemas/PhoneKind" } - }, - "dataForNew" : { - "description" : "Contains the `UserDataForNew` for the new user registration. Only returned if `kind` is `formFields` and the wizard kind is `registration`. The returned object contains a subset of the fields, according to what should be displayed in this step. For example, even if the full profile contains several fields, if this step is configured to show only the full name and e-mail, only those profile fields are returned in `profileFieldActions`, and the `phoneConfiguration`, `passwordTypes`, etc, will all be empty.", - "allOf" : [ { - "$ref" : "#/components/schemas/UserDataForNew" - } ] - }, - "validateEmail" : { - "description" : "Indicates, in case the e-mail is shown, if it must be validated by sending a code to the given e-mail address. Only returned if `kind` is `formFields` and the wizard kind is `registration`.", - "type" : "boolean" - }, - "verifiedEmail" : { - "description" : "If an e-mail address was already verified, contains that address. Only returned if `kind` is `formFields` and the wizard kind is `registration`.", - "type" : "string" - }, - "validateSms" : { - "description" : "Indicates, in case the mobile phone is shown, if it must be validated by sending a code via SMS. Only returned if `kind` is `formFields` and the wizard kind is `registration`.", - "type" : "boolean" - }, - "verifiedSms" : { - "description" : "If a mobile phone number was was already verified by SMS, contains that number. Only returned if `kind` is `formFields` and the wizard kind is `registration`.", - "type" : "string" - }, - "customFields" : { - "description" : "The custom fields defined in this wizard that should be displayed. Only returned if `kind` is `formFields`.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/CustomFieldDetailed" + ] + }, + "customProfileField": { + "description": "Which custom profile field is represented by this field. Is the internal name. The actual field should be looked up in the root data object, in `dataForNew.customFields`. Only if `kind` is `customProfileField`.", + "type": "string" + }, + "wizardField": { + "description": "Which wizard custom field is represented by this field. Is the internal name. The actual field should be looked up in the root data object, in `customFields`. Only if `kind` is `wizardField`.", + "type": "string" + }, + "readOnly": { + "description": "Indicates whether the field should be displayed as read-only.", + "type": "boolean" + }, + "requireVerification": { + "description": "Indicates whether the field should be verified before advancing to the next step. The only fields that support verification are email and mobile phone.", + "type": "boolean" + }, + "readOnlyValue": { + "description": "When a value was entered in a previous step and this step is set to be read-only, contains the field value previously entered.", + "allOf": [ + { + "$ref": "#/components/schemas/CustomFieldValue" } - } + ] } - } ] + } }, - "WizardStepTransition" : { - "description" : "A possible transition between the current and a next step", - "type" : "object", - "properties" : { - "id" : { - "description" : "The transition id", - "type" : "string" + "WizardStepTransition": { + "description": "A possible transition between the current and a next step", + "type": "object", + "properties": { + "id": { + "description": "The transition id", + "type": "string" }, - "label" : { - "description" : "The transition label", - "type" : "string" + "label": { + "description": "The transition label", + "type": "string" }, - "step" : { - "description" : "The step to which this transition leads", - "allOf" : [ { - "$ref" : "#/components/schemas/WizardStep" - } ] + "step": { + "description": "The step to which this transition leads", + "allOf": [ + { + "$ref": "#/components/schemas/WizardStep" + } + ] } } }, - "WizardTransitionParams" : { - "description" : "Parameters for a transition between steps", - "type" : "object", - "properties" : { - "group" : { - "description" : "The selected registration group. Only used if the current step kind is `group`.", - "type" : "string" + "WizardTransitionParams": { + "description": "Parameters for a transition between steps", + "type": "object", + "properties": { + "group": { + "description": "The selected registration group. Only used if the current step kind is `group`.", + "type": "string" }, - "user" : { - "description" : "Partial parameters of the user being registered. Only the fields in this step are considered. Others are ignored.", - "allOf" : [ { - "$ref" : "#/components/schemas/UserNew" - } ] + "user": { + "description": "Partial parameters of the user being registered. Only the fields in this step are considered. Others are ignored.", + "allOf": [ + { + "$ref": "#/components/schemas/UserNew" + } + ] }, - "emailVerification" : { - "type" : "string", - "description" : "When the step requires the e-mail to be verified, is the code that is sent to the informed e-mail address." + "emailVerification": { + "type": "string", + "description": "When the step requires the e-mail to be verified, is the code that is sent to the informed e-mail address." }, - "smsVerification" : { - "type" : "string", - "description" : "When the step requires the the mobile phone number to be verified, is the code that is sent via SMS to that phone." + "smsVerification": { + "type": "string", + "description": "When the step requires the the mobile phone number to be verified, is the code that is sent via SMS to that phone." }, - "customValues" : { - "type" : "object", - "description" : "Holds the custom wizard field values, keyed by field internal name or id. The format of the value depends on the custom field type. Only used if the current step kind is `formFields`", - "additionalProperties" : { - "type" : "string" + "customValues": { + "type": "object", + "description": "Holds the custom wizard field values, keyed by field internal name or id. The format of the value depends on the custom field type. Only used if the current step kind is `formFields`", + "additionalProperties": { + "type": "string" } } } }, - "WizardVerificationCodeParams" : { - "description" : "Parameters to send a verification code", - "type" : "object", - "properties" : { - "medium" : { - "description" : "Indicates what to verify - either email or mobile via SMS.", - "allOf" : [ { - "$ref" : "#/components/schemas/SendMediumEnum" - } ] + "WizardVerificationCodeParams": { + "description": "Parameters to send a verification code", + "type": "object", + "properties": { + "medium": { + "description": "Indicates what to verify - either email or mobile via SMS.", + "allOf": [ + { + "$ref": "#/components/schemas/SendMediumEnum" + } + ] }, - "to" : { - "description" : "Either the email address or mobile phone number to verify.", - "type" : "string" + "to": { + "description": "Either the email address or mobile phone number to verify.", + "type": "string" } } }, - "WizardsPermissions" : { - "description" : "Permissions over custom wizards", - "type" : "object", - "properties" : { - "my" : { - "description" : "Permissions over custom wizards the user can run over self.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/WizardPermissions" + "WizardsPermissions": { + "description": "Permissions over custom wizards", + "type": "object", + "properties": { + "my": { + "description": "Permissions over custom wizards the user can run over self.", + "type": "array", + "items": { + "$ref": "#/components/schemas/WizardPermissions" } }, - "system" : { - "description" : "Permissions over system custom wizards.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/WizardPermissions" + "system": { + "description": "Permissions over system custom wizards.", + "type": "array", + "items": { + "$ref": "#/components/schemas/WizardPermissions" } } } } } } -} \ No newline at end of file +} diff --git a/test/person-place.spec.ts b/test/person-place.spec.ts index 401e99c..d7140b4 100644 --- a/test/person-place.spec.ts +++ b/test/person-place.spec.ts @@ -26,7 +26,7 @@ describe('Generation tests using person-place.json', () => { const ts = gen.templates.apply('model', entity); const parser = new TypescriptParser(); parser.parseSource(ts).then(ast => { - expect(ast.imports.find(i => i.libraryName === './pp-id-model')).withContext('id import').toBeDefined(); + expect(ast.imports.find(i => i.libraryName.endsWith('/pp-id-model'))).withContext('id import').toBeDefined(); expect(ast.declarations.length).toBe(1); expect(ast.declarations[0]).toEqual(jasmine.any(InterfaceDeclaration)); const decl = ast.declarations[0] as InterfaceDeclaration; @@ -44,8 +44,8 @@ describe('Generation tests using person-place.json', () => { const ts = gen.templates.apply('model', person); const parser = new TypescriptParser(); parser.parseSource(ts).then(ast => { - expect(ast.imports.find(i => i.libraryName === './pp-entity-model')).withContext('entity import').toBeDefined(); - expect(ast.imports.find(i => i.libraryName === './pp-person-place-model')).withContext('person-place import').toBeDefined(); + expect(ast.imports.find(i => i.libraryName.endsWith('/pp-entity-model'))).withContext('entity import').toBeDefined(); + expect(ast.imports.find(i => i.libraryName.endsWith('/pp-person-place-model'))).withContext('person-place import').toBeDefined(); expect(ast.declarations.length).toBe(1); expect(ast.declarations[0]).toEqual(jasmine.any(TypeAliasDeclaration)); const decl = ast.declarations[0] as TypeAliasDeclaration; @@ -62,7 +62,7 @@ describe('Generation tests using person-place.json', () => { const ts = gen.templates.apply('model', place); const parser = new TypescriptParser(); parser.parseSource(ts).then(ast => { - expect(ast.imports.find(i => i.libraryName === './pp-entity-model')).withContext('entity import').toBeDefined(); + expect(ast.imports.find(i => i.libraryName.endsWith('/pp-entity-model'))).withContext('entity import').toBeDefined(); expect(ast.declarations.length).toBe(1); expect(ast.declarations[0]).toEqual(jasmine.any(TypeAliasDeclaration)); const decl = ast.declarations[0] as TypeAliasDeclaration; @@ -79,7 +79,7 @@ describe('Generation tests using person-place.json', () => { const ts = gen.templates.apply('model', person); const parser = new TypescriptParser(); parser.parseSource(ts).then(ast => { - expect(ast.imports.find(i => i.libraryName === './pp-place-model')).withContext('place import').toBeDefined(); + expect(ast.imports.find(i => i.libraryName.endsWith('/pp-place-model'))).withContext('place import').toBeDefined(); expect(ast.declarations.length).toBe(1); expect(ast.declarations[0]).toEqual(jasmine.any(InterfaceDeclaration)); const decl = ast.declarations[0] as InterfaceDeclaration; diff --git a/test/petstore.spec.ts b/test/petstore.spec.ts index 10d8789..b536db4 100644 --- a/test/petstore.spec.ts +++ b/test/petstore.spec.ts @@ -25,32 +25,27 @@ describe('Generation tests using petstore.json', () => { const cls = ast.declarations[0] as ClassDeclaration; const listPets = cls.methods.find(m => m.name === 'listPets'); - expect(listPets).withContext(`listPets`).toBeDefined(); + expect(listPets).withContext('listPets').toBeDefined(); if (listPets) { expect(listPets.parameters.length).toBe(2); const type = listPets.parameters[0].type; - expect(type).toContain('limit?: number'); + expect(type).toEqual('ListPets$Params'); } const createPets = cls.methods.find(m => m.name === 'createPets'); - expect(createPets).withContext(`createPets`).toBeDefined(); + expect(createPets).withContext('createPets').toBeDefined(); if (createPets) { expect(createPets.parameters.length).toBe(2); const type = createPets.parameters[0].type; - // single optional parameters - expect(type).toBeDefined(); - expect(type!.replace(/(\r\n|\n|\r| )/gm, '')).toBe('{}'); + expect(type).toEqual('CreatePets$Params'); } const showPetById = cls.methods.find(m => m.name === 'showPetById'); - expect(showPetById).withContext(`showPetById`).toBeDefined(); + expect(showPetById).withContext('showPetById').toBeDefined(); if (showPetById) { expect(showPetById.parameters.length).toBe(2); const type = showPetById.parameters[0].type; - expect(type).toContain('petId: string'); - - const text = ts.substring(showPetById.parameters[0].start || 0, showPetById.parameters[0].end || ts.length); - expect(text).toContain('* Pet\'s id to retrieve'); + expect(type).toEqual('ShowPetById$Params'); } done(); @@ -88,7 +83,7 @@ describe('Generation tests using petstore.json', () => { const ts = gen.templates.apply('model', pets); const parser = new TypescriptParser(); parser.parseSource(ts).then(ast => { - expect(ast.imports.find(i => i.libraryName === './petstore-pet-model')).withContext('pet import').toBeDefined(); + expect(ast.imports.find(i => i.libraryName.endsWith('/petstore-pet-model'))).withContext('pet import').toBeDefined(); expect(ast.declarations.length).toBe(1); expect(ast.declarations[0]).toEqual(jasmine.any(TypeAliasDeclaration)); const decl = ast.declarations[0] as TypeAliasDeclaration; diff --git a/test/self-ref.spec.ts b/test/self-ref.spec.ts index d39e4a7..5ad12c8 100644 --- a/test/self-ref.spec.ts +++ b/test/self-ref.spec.ts @@ -37,7 +37,7 @@ describe('Generation tests using self-ref.json', () => { const object = decl.properties.find(p => p.name === 'objectProperty'); expect(object).withContext('objectProperty property').toBeDefined(); if (object) { - expect(object.type).toBe(`{\n'nestedArray': Array;\n'nestedRef': Baz;\n}`); + expect(object.type).toBe('{\n\'nestedArray\': Array;\n\'nestedRef\': Baz;\n}'); } done(); diff --git a/test/templates/service.handlebars b/test/templates/service.handlebars index 0cb05d1..ed9f419 100644 --- a/test/templates/service.handlebars +++ b/test/templates/service.handlebars @@ -10,7 +10,7 @@ import { Observable } from 'rxjs'; import { map } from 'rxjs/operators/map'; import { filter } from 'rxjs/operators/filter'; -{{#imports}}import { {{{typeName}}}{{#useAlias}} as {{{qualifiedName}}}{{/useAlias}} } from '{{{file}}}'; +{{#imports}}import { {{{typeName}}}{{#useAlias}} as {{{qualifiedName}}}{{/useAlias}} } from '{{{@root.pathToRoot}}}{{{fullPath}}}'; {{/imports}} {{{tsComments}}}@Injectable({