2.0info: 5.2.0 filter_service description: Service that provides filter fields for other services. x-senior-domain: platform x-senior-domain-path: platform x-senior-service-path: filter_service contact: name: Senior X Platform url: https://dev.senior.com.br email: seniorx-dev@senior.com.brhost: platform.senior.com.br /t/senior.com.br/bridge/1.0/rest/platformsecurityDefinitions: APIKeyHeader: type: apiKey in: header name: Authorizationsecurity: – APIKeyHeader: [] – application/json – application/jsonpaths: /filter_service/queries/healthcheck: post: description: Request to verify if the project is running tags: – Queries x-senior-visibility: PRIVATE responses: 200: description: Ok schema: type: object required: – status – checks properties: status: type: string allOf: – #/definitions/healthCheckStatus description: Healthcheck general status checks: type: array items: type: object allOf: – #/definitions/checkDTO minimum: 1 description: Verified items in healthcheck 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError get: description: Request to verify if the project is running tags: – Queries x-senior-visibility: PRIVATE responses: 200: description: Ok schema: type: object required: – status – checks properties: status: type: string allOf: – #/definitions/healthCheckStatus description: Healthcheck general status checks: type: array items: type: object allOf: – #/definitions/checkDTO minimum: 1 description: Verified items in healthcheck 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /filter_service/queries/getContexts: post: description: Retrieves a list of contexts for a list of domains and services. The tenant is the current. tags: – Queries x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object required: – services properties: services: type: array items: type: object allOf: – #/definitions/serviceDef minimum: 1 description: A list of domains an services to get contexts. responses: 200: description: Ok schema: type: object properties: serviceContexts: type: array items: type: object allOf: – #/definitions/serviceContextDef description: The output list of domain and service and contexts with id and translated label. 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /filter_service/queries/getFilters: post: description: Retrieves a list of filter fields where each filter has a list of service context where that filter may be shown.\nThe filters might have a value if it has been saved previously for the user.\nNote: The user and tenant will be the current.\n tags: – Queries x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object required: – serviceContexts properties: serviceContexts: type: array items: type: object allOf: – #/definitions/serviceContextDef minimum: 1 description: A list of domain and services and contexts to get filters. responses: 200: description: Ok schema: type: object properties: filters: type: array items: type: object allOf: – #/definitions/filterDef description: Returns a list of filter fields or an empty list if there are not filter fields for the input parameters.\nEach field has a metadata and might have a value. 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /filter_service/queries/getFiltersByTicket: post: description: Retrieve the filters with values stored previously with a given ticket. tags: – Queries x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object required: – ticket properties: ticket: type: string description: The ticket linked with the filters. domain: type: string description: A domain. service: type: string description: A service; responses: 200: description: Ok schema: type: object required: – filters properties: filters: type: array items: type: object allOf: – #/definitions/tickedFilterDef minimum: 1 description: A filter list with values. 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError get: description: Retrieve the filters with values stored previously with a given ticket. tags: – Queries x-senior-visibility: PRIVATE parameters: – name: ticket description: The ticket linked with the filters. in: query required: true type: string – name: domain description: A domain. in: query type: string – name: service description: A service; in: query type: string responses: 200: description: Ok schema: type: object required: – filters properties: filters: type: array items: type: object allOf: – #/definitions/tickedFilterDef minimum: 1 description: A filter list with values. 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /filter_service/queries/getMetadata: post: description: Default getMetadata query. Every service must handle this command and return metadata in the format requested. tags: – Queries x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object properties: metadataFormat: type: string description: responses: 200: description: Ok schema: type: object required: – metadata properties: metadata: type: string description: 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError get: description: Default getMetadata query. Every service must handle this command and return metadata in the format requested. tags: – Queries x-senior-visibility: PRIVATE parameters: – name: metadataFormat description: in: query type: string responses: 200: description: Ok schema: type: object required: – metadata properties: metadata: type: string description: 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /filter_service/queries/getDependencies: post: description: Returns a list with all dependencies from this service, along with their respective versions tags: – Queries x-senior-visibility: PRIVATE responses: 200: description: Ok schema: type: object required: – dependencies properties: dependencies: type: array items: type: object allOf: – #/definitions/dependency minimum: 1 description: List with this service dependencies 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError get: description: Returns a list with all dependencies from this service, along with their respective versions tags: – Queries x-senior-visibility: PRIVATE responses: 200: description: Ok schema: type: object required: – dependencies properties: dependencies: type: array items: type: object allOf: – #/definitions/dependency minimum: 1 description: List with this service dependencies 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /filter_service/actions/saveUserFilters: post: description: It saves a list of filter values for a current user.\nThis endpoint SHOULD BE called by the front end filter component to save filter values for a specific user.\nThis values will be returned when the getFilters will be called by the same user on the same domain.\n tags: – Actions x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object required: – filters properties: filters: type: array items: type: object allOf: – #/definitions/userFilterDef minimum: 1 description: The filters to be saved for the current user. responses: 200: description: Ok schema: type: object 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /filter_service/actions/setTicketFilters: post: description: It stores temporarily a list of applied filters for services linked by a ticket (uuid) to be used immediately by services. tags: – Actions x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object required: – filters properties: ticket: type: string description: An existing ticket to be linked with these filters. filters: type: array items: type: object allOf: – #/definitions/serviceFilterDef minimum: 1 description: A filter list to be stored temporarily. responses: 200: description: Ok schema: type: object required: – ticket properties: ticket: type: string description: Returns a new ticket generated by this request and linked with the given filters,\nor returns the same ticket if one has been given. 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /filter_service/signals/refreshMetadata: post: description: Forçar atualização dos metadados do filtro, chamada somente é executada por um usuário que tenha permissão e o tenant corrente for master. tags: – Signals parameters: – name: input in: body required: true schema: type: object required: – domain – service properties: tenant: type: string description: Tenant que será atualizado os metadados domain: type: string description: Domínio do serviço que será atualizado service: type: string description: Nome do serviço que será atualizado responses: 202: description: Accepted default: description: Error response schema: #/definitions/genericErrordefinitions: healthCheckStatus: description: Healthcheck status type: string enum: – UP – DOWN filterScope: description: Filter scope to be shown. type: string enum: – DOMAIN – SERVICE filterType: description: Filter field supported types. type: string enum: – STRING – BOOLEAN – INTEGER – DOUBLE – DATE – DATETIME – TIME – MONEY – ENUMERATION – SEARCH searchOperator: description: Operators supported between filter clauses. type: string enum: – AND – OR searchType: description: Supported search types type: string enum: – BASIC – ENTITY userNotificationKind: description: User notification kind. type: string enum: – Operational – Management – News userNotificationPriority: description: User notification priority. type: string enum: – Error – Alert – None eventEmailFormat: description: Format of the email type: string enum: – HTML – PLAIN_TEXT checkDTO: description: Verified item in healthcheck type: object required: – name – status properties: name: type: string description: Item name status: type: string allOf: – #/definitions/healthCheckStatus description: Health status serviceDef: description: Service definition. discriminator: _discriminator type: object required: – _discriminator properties: domain: type: string description: Domain name. service: type: string description: Service name. _discriminator: type: string description: serviceContextDef: description: Service context definition. allOf: – #/definitions/serviceDef – type: object required: – contextId properties: contextId: type: string description: Context unique id. contextLabel: type: string description: Context label. serviceFilterDef: description: Represents a service valued filter definition. allOf: – #/definitions/serviceDef – type: object required: – name properties: name: type: string description: Filter name, e.g. orderNumber. value: type: string description: Filter value, e.g. 1080. tickedFilterDef: description: Represents a ticked filter definition. allOf: – #/definitions/serviceDef – type: object required: – name properties: name: type: string description: Filter name, e.g. orderNumber. value: type: array items: type: string description: Filter value, e.g. 10. userFilterDef: description: Represents a user valued filter definition. allOf: – #/definitions/serviceDef – type: object required: – name properties: name: type: string description: Filter name, e.g. orderNumber. value: type: string description: Filter value, e.g. 1080. contexts: type: array items: type: string description: Contexts filterDef: description: A filter field output structure definition. type: object required: – name – type – scope – required – label – domain – services – contexts properties: name: type: string description: Filter name, e.g. companyName. value: type: string description: The filter value. The default value is null, that is, without value.\nIf a string value is assigned, this value should be casted to the respective configured type. defaultValue: type: string description: The filter default value. The default value is used when the user clears the applied filters on the front-end component.\nIf a string value is assigned, this value should be casted to the respective configured type. type: type: string allOf: – #/definitions/filterType description: Filter field type, e.g. STRING. enumItems: type: array items: type: object allOf: – #/definitions/enumItemDef description: An enumeration filter field. This field only will be set when type=ENUMERATION. search: type: object allOf: – #/definitions/searchDef description: A lookup filter field to search one or more values from other data source.\nThis field only will be set when type=LOOKUP. scope: type: string allOf: – #/definitions/filterScope description: The filter field scope.\nWhen DOMAIN, this filter field will be returned in the response for every service of this domain. Only exclusion contexts are considered.\nWhen SERVICE, this filter field will be returned in the response only for this service requests. required: type: boolean description: If the filter field is mandatory (true) or not (false). The default value is not mandatory (false). tabIndex: type: integer format: int64 description: The suggested tab index for this filter field when it is displayed in a front end. The default value is -1 (not assigned). minValue: type: number format: double description: The minimum allowed value for this filter field when it is a numeric value.\nSHOULD BE validated at the front end. The defaultValue is validated at the back end. maxValue: type: number format: double description: The maximum allowed value for this filter field when it is a numeric value.\nSHOULD BE validated at the front end. The defaultValue is validated at the back end. dependsOn: type: array items: type: object allOf: – #/definitions/dependsOnDef description: A list of filter fields that this filter field depends on. The defined order MUST BE respected. mask: type: string description: A mask for this filter field, e.g. MM/YYYY for month and year. The front end SHOULD understand the mask pattern. regExp: type: string description: A regular expression for this filter field, e.g. d+ for numbers only. The front end SHOULD understand the regular expression pattern. label: type: string description: The label translated for this filter field. domain: type: string description: Domain that owns this filter. services: type: array items: type: string minimum: 1 description: A list of services where this filter may be shown. contexts: type: array items: type: string minimum: 1 description: A list of contexts ids where this filter may be shown. dependsOnDef: description: Represents a depends on filter. type: object required: – filterName – required properties: filterName: type: string description: The filter name. required: type: boolean description: If this depends on filter is mandatory. comparator: type: object allOf: – #/definitions/comparator description: Defines a comparator to be used on the dependency criteria entityAttribute: type: string description: Defines the entity attribute to be used along the value of the dependency filter in the filter clause. e.g. company.id will result in domain / service /entities/ entityName ?filter=company.id eq dependency entity value .\nThis attribute is REQUIRED if the filter is of the type entity search. entityOperator: type: string allOf: – #/definitions/searchOperator description: Defines the operator to be used with the entity attribute. Could be AND or OR.\nThis attribute is REQUIRED if the filter is of the type entity search. comparator: description: Represents a comparator to be used on a dependency evaluation type: object required: – value – operator properties: value: type: string description: The expected value for the comparison operator: type: string description: The operator to be used on the comparison searchDef: description: A search definition for a filter. type: object properties: type: type: string allOf: – #/definitions/searchType description: The type of the search, could be BASIC or ENTITY. basicSearch: type: object allOf: – #/definitions/basicSearchDef description: A basic search definition. entitySearch: type: object allOf: – #/definitions/entitySearchDef description: A entity search definition. basicSearchDef: description: A lookup search and search result structure. type: object required: – input – output properties: input: type: object allOf: – #/definitions/basicSearchInputDef description: The search parameters. output: type: object allOf: – #/definitions/basicSearchOutputDef description: The search result parameters. basicSearchInputDef: description: A lookup search structure. type: object required: – url – queryParam – pageNumberParam – pageSizeParam properties: url: type: string description: The lookup end point url, e.g. /my_domain/my_service/queries/foo. queryParam: type: string description: The lookup query parameter, e.g. q, will be /my_domain/my_service/queries/foo?q= search content .\nIf there are depends on filter fields, they MUST BE also inferred in search content , e.g.\n/my_domain/my_service/queries/foo?q=abc&companyId=1&employeeId=101, where companyId and employeeId are depends on filter fields.\n pageNumberParam: type: string description: The url page number parameter name to retrieve records in a lookup search. pageSizeParam: type: string description: The url page size (number of records) parameter name to retrieve in a lookup search. basicSearchOutputDef: description: The result rows MUST BE in the format: keyField | diplayField_1 | diplayField_2 | diplayField_n\nwhere keyField is the user choose result field value and diplayFields are the friendly fields displayed to the user for choose. type: object required: – displayFields – keyFields – resultDataJsonPath – maxSelectedItems properties: displayFields: type: array items: type: string minimum: 1 description: The list of display fields with its values returned by the lookup end point. This fields SHOULD BE displayed concatenated. keyFields: type: array items: type: string minimum: 1 description: The list of key fields and its value returned by the lookup end point. resultDataJsonPath: type: string description: The JSON path to the data result JSON attribute. maxSelectedItems: type: integer format: int64 description: The number of returned rows that the user can select. The default value is 1, a single value.\nIf the value is greater than one it means that it is multiple selections with at most this value.\nIf the value is equal -1, means that the user can select all items.\nWARNING: This configuration can overcome the browser query parameters, should be used with care, for a well known small collection.\n displayFieldConcatToken: type: string description: This value will be used to separate displayFields concatenation, where a blank space is the default value. entitySearchDef: description: A entity lookup search and search result structure. type: object required: – input – output properties: input: type: object allOf: – #/definitions/entitySearchInputDef description: The search parameters. output: type: object allOf: – #/definitions/entitySearchOutputDef description: The search result parameters. entitySearchInputDef: description: A entity lookup search structure. type: object required: – domainName – serviceName – entityName – attributes properties: domainName: type: string description: The domain name of the entities provider. serviceName: type: string description: The service name of the entities provider. entityName: type: string description: The entity name to be used on the search clause. attributes: type: array items: type: object allOf: – #/definitions/entityAttributeDef minimum: 1 description: The entity attributes to be used on the filter clause. operator: type: string allOf: – #/definitions/searchOperator description: The operator to be used between the filters, could be AND or OR entityAttributeDef: description: A entity attribute name and corresponding operator to be used on the filter clause. type: object required: – name – comparator properties: name: type: string description: The name of the attribute comparator: type: string description: The operator to be used on the search clause, could be =, !=, , , =, = or contains. entitySearchOutputDef: description: The result rows MUST BE in the format: keyField | diplayField_1 | diplayField_2 | diplayField_n\nwhere keyField is the user choose result field value and diplayFields are the friendly fields displayed to the user for choose. type: object required: – displayFields – keyFields – resultDataJsonPath – maxSelectedItems properties: displayFields: type: array items: type: string minimum: 1 description: The list of display fields with its values returned by the lookup end point. This fields SHOULD BE displayed concatenated. keyFields: type: array items: type: string minimum: 1 description: The list of key fields and its value returned by the lookup end point. resultDataJsonPath: type: string description: The JSON path to the data result JSON attribute. maxSelectedItems: type: integer format: int64 description: The number of returned rows that the user can select. The default value is 1, a single value.\nIf the value is greater than one it means that it is multiple selections with at most this value.\nIf the value is equal -1, means that the user can select all items.\nWARNING: This configuration can overcome the browser query parameters, should be used with care, for a well known small collection.\n displayFieldConcatToken: type: string description: This value will be used to separate displayFields concatenation, where a blank space is the default value. enumItemDef: description: An enumeration item structure. type: object required: – value – label properties: value: type: string description: The value of an enumeration item, e.g. SATURDAY, for a days of the week enumeration. label: type: string description: The label translated for this enumeration item. notifyUserEventPayload: description: Represents a regular user event notification payload discriminator: _discriminator type: object required: – notificationKind – notificationPriority – notificationSubject – notificationContent – sourceDomain – sourceService – destinationUser – _discriminator properties: notificationClass: type: string description: Class of notification notificationOrigin: type: string description: Origin of notification. Free text. Optional. notificationKind: type: string allOf: – #/definitions/userNotificationKind description: Notification kind. notificationPriority: type: string allOf: – #/definitions/userNotificationPriority description: Notification priority. notificationSubject: type: string description: Notification subject. notificationContent: type: string description: Notification content. sourceDomain: type: string description: Domain that generates the notification. sourceService: type: string description: Service that generates the notification. destinationUser: type: string description: Username of the destination user. link: type: string description: Notification link _discriminator: type: string description: emailNotifyUserEventPayload: description: Represents an email notification payload allOf: – #/definitions/notifyUserEventPayload – type: object required: – from properties: from: type: string description: Email sender address sendTo: type: array items: type: string description: Additional recipients to send the email to format: type: string allOf: – #/definitions/eventEmailFormat description: Email format pushNotifyUserEventPayload: description: Represents a push notification payload allOf: – #/definitions/notifyUserEventPayload – type: object required: – applicationId properties: applicationId: type: string description: Apple/Google application id blobReference: description: Default blob reference type. Every service defines its own. type: object required: – targetObjectId properties: domainName: type: string description: The domain the blob belongs to. serviceName: type: string description: The service the blob belongs to. targetObjectId: type: string description: The basic id of the blob. targetCopyId: type: string description: The id of the blob copy. basicErrorPayload: description: Default error payload type. Every service defines its own. type: object properties: message: type: string description: The user-facing error message, if any. errorCode: type: string description: The program-accessible (and service-specific) error code. dependency: description: Represents a service dependency type: object required: – domain – service – version properties: domain: type: string description: Domain of the dependency service service: type: string description: Name of the dependency service type: string description: Version of the dependency service genericError: properties: message: type: string description: Messaging describing the error. reason: type: string description: A symbolic code identifying the category of the reason of the error. enum: – BAD_REQUEST – UNAUTHORIZED – PAYMENT_REQUIRED – FORBIDDEN – OBJECT_NOT_FOUND – REQUEST_TIMEOUT – GONE – UNPROCESSABLE – INTERNAL_ERROR – NOT_IMPLEMENTED – SERVICE_UNAVAILABLE – INSUFFICIENT_STORAGE