diff --git a/docs/health-api-specs/contracts/location-capture.yaml b/docs/health-api-specs/contracts/location-capture.yaml new file mode 100644 index 00000000000..232a54cd9f2 --- /dev/null +++ b/docs/health-api-specs/contracts/location-capture.yaml @@ -0,0 +1,348 @@ +openapi: 3.0.1 +info: + title: User Location System + version: v1.6 +servers: + - url: https://unified-dev.digit.org + description: Development server url +paths: + /project/user-location/v1/_create: + post: + tags: + - Location Capture + summary: Bulk create location capture tasks + description: Receives a bulk request to create location capture tasks and processes the data. Sends the request to a Kafka topic for asynchronous handling. + operationId: locationCaptureTaskV1BulkCreatePost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UserActionBulkRequest' + required: true + responses: + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ResponseInfo' + /project/user-location/v1/_search: + post: + tags: + - Location Capture + summary: Search location capture tasks + description: Searches for location capture tasks based on the provided search criteria. Returns matching results along with the total count. + operationId: locationCaptureTaskV2SearchPost + requestBody: + content: + application/json: + schema: + type: object + properties: + urlParams: + $ref: '#/components/schemas/URLParams' + locationCaptureSearchRequest: + $ref: '#/components/schemas/UserActionSearchRequest' + required: true + responses: + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/UserActionBulkResponse' +components: + schemas: + URLParams: + required: + - limit + - offset + - tenantId + type: object + properties: + urlparams: + $ref: '#/components/schemas/URLParams' + limit: + maximum: 1000 + minimum: 0 + type: integer + format: int32 + offset: + minimum: 0 + type: integer + format: int32 + tenantId: + type: string + lastChangedSince: + type: integer + format: int64 + includeDeleted: + type: boolean + PlainAccessRequest: + type: object + properties: + recordId: + type: string + plainRequestFields: + type: array + items: + type: string + RequestInfo: + type: object + properties: + apiId: + type: string + ver: + type: string + ts: + type: integer + format: int64 + action: + type: string + did: + type: string + key: + type: string + msgId: + type: string + authToken: + type: string + correlationId: + type: string + plainAccessRequest: + $ref: '#/components/schemas/PlainAccessRequest' + userInfo: + $ref: '#/components/schemas/User' + Role: + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + code: + type: string + tenantId: + type: string + User: + type: object + properties: + id: + type: integer + format: int64 + userName: + type: string + name: + type: string + type: + type: string + mobileNumber: + type: string + emailId: + type: string + roles: + type: array + items: + $ref: '#/components/schemas/Role' + tenantId: + type: string + uuid: + type: string + UserActionSearch: + type: object + properties: + id: + type: array + items: + type: string + clientReferenceId: + type: array + items: + type: string + createdBy: + type: string + projectId: + type: string + beneficiaryTag: + type: string + resourceTag: + type: string + boundaryCode: + type: string + UserActionSearchRequest: + required: + - RequestInfo + - UserAction + type: object + properties: + RequestInfo: + $ref: '#/components/schemas/RequestInfo' + UserAction: + $ref: '#/components/schemas/UserActionSearch' + AdditionalFields: + type: object + properties: + schema: + maxLength: 64 + minLength: 2 + type: string + version: + minimum: 1 + type: integer + format: int32 + fields: + type: array + items: + $ref: '#/components/schemas/Field' + AuditDetails: + type: object + properties: + createdBy: + type: string + lastModifiedBy: + type: string + createdTime: + type: integer + format: int64 + lastModifiedTime: + type: integer + format: int64 + Field: + required: + - key + - value + type: object + properties: + key: + maxLength: 64 + minLength: 2 + type: string + value: + maxLength: 10000 + minLength: 1 + type: string + ResponseInfo: + type: object + properties: + apiId: + type: string + ver: + type: string + ts: + type: integer + format: int64 + resMsgId: + type: string + msgId: + type: string + status: + type: string + UserAction: + required: + - action + - boundaryCode + - latitude + - locationAccuracy + - longitude + - projectId + - tenantId + type: object + properties: + id: + maxLength: 64 + minLength: 2 + type: string + tenantId: + maxLength: 1000 + minLength: 2 + type: string + source: + type: string + rowVersion: + type: integer + format: int32 + applicationId: + type: string + hasErrors: + type: boolean + additionalFields: + $ref: '#/components/schemas/AdditionalFields' + auditDetails: + $ref: '#/components/schemas/AuditDetails' + clientReferenceId: + maxLength: 64 + minLength: 2 + type: string + clientAuditDetails: + $ref: '#/components/schemas/AuditDetails' + projectId: + maxLength: 64 + minLength: 2 + type: string + latitude: + maximum: 90 + exclusiveMaximum: false + minimum: -90 + exclusiveMinimum: false + type: number + format: double + longitude: + maximum: 180 + exclusiveMaximum: false + minimum: -180 + exclusiveMinimum: false + type: number + format: double + locationAccuracy: + minimum: 0 + exclusiveMinimum: false + type: number + format: double + boundaryCode: + type: string + action: + type: string + enum: + - CLOSED_HOUSEHOLD + - LOCATION_CAPTURE + - OTHER + beneficiaryTag: + maxLength: 64 + minLength: 2 + type: string + resourceTag: + maxLength: 64 + minLength: 2 + type: string + isDeleted: + type: boolean + UserActionBulkResponse: + required: + - ResponseInfo + - UserActions + type: object + properties: + ResponseInfo: + $ref: '#/components/schemas/ResponseInfo' + TotalCount: + type: integer + format: int64 + UserActions: + type: array + items: + $ref: '#/components/schemas/UserAction' + UserActionBulkRequest: + required: + - RequestInfo + - UserActions + type: object + properties: + RequestInfo: + $ref: '#/components/schemas/RequestInfo' + UserActions: + maxItems: 2147483647 + minItems: 1 + type: array + items: + $ref: '#/components/schemas/UserAction' diff --git a/docs/health-api-specs/contracts/project-resource.yaml b/docs/health-api-specs/contracts/project-resource.yaml new file mode 100644 index 00000000000..0532507e5a8 --- /dev/null +++ b/docs/health-api-specs/contracts/project-resource.yaml @@ -0,0 +1,433 @@ +openapi: 3.0.1 +info: + title: OpenAPI definition + version: v1.6 +servers: + - url: https://unified-dev.digit.org + description: Development server url +paths: + + /project/resource/v1/_create: + post: + tags: + - Project Resource + summary: Create a project resource + description: Captures the linkage between a project and its resources. Creates a new project resource and returns the created resource details. + operationId: resourceV1CreatePost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectResourceRequest' + required: true + responses: + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ProjectResourceResponse' + /project/resource/v1/bulk/_create: + post: + tags: + - Project Resource + summary: Bulk create project resources + description: Captures the linkage between a project and multiple resources. Processes a bulk request to create project resources. + operationId: resourceV1BulkCreatePost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectResourceBulkRequest' + required: true + responses: + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ResponseInfo' + /project/resource/v1/_update: + post: + tags: + - Project Resource + summary: Update a project resource + description: Updates the linkage details between a project and a resource. Returns the updated resource details. + operationId: resourceV1UpdatePost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectResourceRequest' + required: true + responses: + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ProjectResourceResponse' + /project/resource/v1/bulk/_update: + post: + tags: + - Project Resource + summary: Bulk update project resources + description: Updates the linkage details between a project and multiple resources. Processes a bulk update request. + operationId: resourceV1BulkUpdatePost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectResourceBulkRequest' + required: true + responses: + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ResponseInfo' + /project/resource/v1/bulk/_delete: + post: + tags: + - Project Resource + summary: Bulk delete project resources + description: Deletes the linkage details between a project and multiple resources. Processes a bulk delete request. + operationId: resourceV1BulkDeletePost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectResourceBulkRequest' + required: true + responses: + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ResponseInfo' + /project/resource/v1/_delete: + post: + tags: + - Project Resource + summary: Delete a project resource + description: Deletes the linkage between a project and a resource. Returns the details of the deleted resource. + operationId: resourceV1DeletePost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectResourceRequest' + required: true + responses: + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ProjectResourceResponse' + /project/resource/v1/_search: + post: + tags: + - Project Resource + summary: Search project resources + description: Searches for resources linked to a project based on the provided search criteria. Returns matching resources and their total count. + operationId: resourceV1SearchPost + requestBody: + content: + application/json: + schema: + type: object + properties: + urlParams: + $ref: '#/components/schemas/URLParams' + projectResourceSearchRequest: + $ref: '#/components/schemas/ProjectResourceSearchRequest' + required: true + responses: + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ProjectResourceBulkResponse' +components: + schemas: + AdditionalFields: + type: object + properties: + schema: + maxLength: 64 + minLength: 2 + type: string + version: + minimum: 1 + type: integer + format: int32 + fields: + type: array + items: + $ref: '#/components/schemas/Field' + AuditDetails: + type: object + properties: + createdBy: + type: string + lastModifiedBy: + type: string + createdTime: + type: integer + format: int64 + lastModifiedTime: + type: integer + format: int64 + Field: + required: + - key + - value + type: object + properties: + key: + maxLength: 64 + minLength: 2 + type: string + value: + maxLength: 10000 + minLength: 1 + type: string + PlainAccessRequest: + type: object + properties: + recordId: + type: string + plainRequestFields: + type: array + items: + type: string + ProjectProductVariant: + required: + - productVariantId + type: object + properties: + productVariantId: + type: string + type: + type: string + isBaseUnitVariant: + type: boolean + ProjectResource: + required: + - projectId + - resource + - tenantId + type: object + properties: + id: + maxLength: 64 + minLength: 2 + type: string + tenantId: + maxLength: 1000 + minLength: 2 + type: string + source: + type: string + rowVersion: + type: integer + format: int32 + applicationId: + type: string + hasErrors: + type: boolean + additionalFields: + $ref: '#/components/schemas/AdditionalFields' + auditDetails: + $ref: '#/components/schemas/AuditDetails' + projectId: + maxLength: 64 + minLength: 2 + type: string + resource: + $ref: '#/components/schemas/ProjectProductVariant' + isDeleted: + type: boolean + startDate: + type: integer + format: int64 + endDate: + type: integer + format: int64 + ProjectResourceBulkRequest: + required: + - ProjectResources + - RequestInfo + type: object + properties: + RequestInfo: + $ref: '#/components/schemas/RequestInfo' + ProjectResources: + maxItems: 2147483647 + minItems: 1 + type: array + items: + $ref: '#/components/schemas/ProjectResource' + RequestInfo: + type: object + properties: + apiId: + type: string + ver: + type: string + ts: + type: integer + format: int64 + action: + type: string + did: + type: string + key: + type: string + msgId: + type: string + authToken: + type: string + correlationId: + type: string + plainAccessRequest: + $ref: '#/components/schemas/PlainAccessRequest' + userInfo: + $ref: '#/components/schemas/User' + Role: + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + code: + type: string + tenantId: + type: string + User: + type: object + properties: + id: + type: integer + format: int64 + userName: + type: string + name: + type: string + type: + type: string + mobileNumber: + type: string + emailId: + type: string + roles: + type: array + items: + $ref: '#/components/schemas/Role' + tenantId: + type: string + uuid: + type: string + ResponseInfo: + type: object + properties: + apiId: + type: string + ver: + type: string + ts: + type: integer + format: int64 + resMsgId: + type: string + msgId: + type: string + status: + type: string + ProjectResourceRequest: + required: + - ProjectResource + - RequestInfo + type: object + properties: + RequestInfo: + $ref: '#/components/schemas/RequestInfo' + ProjectResource: + $ref: '#/components/schemas/ProjectResource' + ProjectResourceResponse: + required: + - ProjectResource + - ResponseInfo + type: object + properties: + ResponseInfo: + $ref: '#/components/schemas/ResponseInfo' + ProjectResource: + $ref: '#/components/schemas/ProjectResource' + URLParams: + required: + - limit + - offset + - tenantId + type: object + properties: + urlparams: + $ref: '#/components/schemas/URLParams' + limit: + maximum: 1000 + minimum: 0 + type: integer + format: int32 + offset: + minimum: 0 + type: integer + format: int32 + tenantId: + type: string + lastChangedSince: + type: integer + format: int64 + includeDeleted: + type: boolean + ProjectResourceSearch: + type: object + properties: + id: + type: array + items: + type: string + projectId: + type: array + items: + type: string + ProjectResourceSearchRequest: + required: + - ProjectResource + - RequestInfo + type: object + properties: + RequestInfo: + $ref: '#/components/schemas/RequestInfo' + ProjectResource: + $ref: '#/components/schemas/ProjectResourceSearch' + ProjectResourceBulkResponse: + required: + - ProjectResources + - ResponseInfo + type: object + properties: + ResponseInfo: + $ref: '#/components/schemas/ResponseInfo' + ProjectResources: + type: array + items: + $ref: '#/components/schemas/ProjectResource' + TotalCount: + type: integer + format: int64 diff --git a/docs/health-api-specs/contracts/project.yml b/docs/health-api-specs/contracts/project.yml index 7f61b66324e..7718b580c00 100644 --- a/docs/health-api-specs/contracts/project.yml +++ b/docs/health-api-specs/contracts/project.yml @@ -1,2222 +1,1844 @@ -swagger: '2.0' +openapi: 3.0.1 info: - version: 1.0.0 title: Project Management System + version: v1.6 contact: name: egovernments foundation email: info@egovernments.org -schemes: - - https -x-common-path: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-0-0.yml +servers: + - url: https://unified-dev.digit.org + description: Development server url + paths: /project/v1/_create: post: - summary: >- - Create a new Project - description: >- - Create a new Project - parameters: - - name: Project - in: body - description: Details for the new Project. - required: true - schema: - $ref: '#/definitions/ProjectRequest' tags: - Project + summary: Create a new Project + description: Create a new Project + operationId: createProject + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectRequest' + required: true responses: - '202': - description: Project request accepted for creation. - schema: - $ref: '#/definitions/ProjectResponse' - '400': - description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ProjectResponse' /project/v1/_update: post: - summary: >- - Update the details of a existing Project - description: >- - Update the details of a existing Project - parameters: - - name: Project - in: body - description: Details for the new Project. - required: true - schema: - $ref: '#/definitions/ProjectRequest' tags: - Project + summary: Update the details of a existing Project + description: Updates the details of an existing project and returns the updated project details. + operationId: updateProject + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectRequest' + required: true responses: - '202': - description: Employee request accepted for creation. - schema: - $ref: '#/definitions/ProjectResponse' - '400': - description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ProjectResponse' /project/v1/_search: post: - summary: >- - Search for existing project - description: >- - Search for existing project - parameters: - - name: Project - in: body - description: Details for the project. - required: true - schema: - $ref: '#/definitions/ProjectRequest' - - $ref: '#/parameters/limit' - - $ref: '#/parameters/offset' - - $ref: '#/parameters/tenantId' - - $ref: '#/parameters/lastChangedSince' - - $ref: '#/parameters/includeDeleted' - - $ref: '#/parameters/includeAncestors' - - $ref: '#/parameters/includeDescendants' - - $ref: '#/parameters/createdFrom' - - $ref: '#/parameters/createdTo' tags: - Project - responses: - '200': - description: Projects. - schema: - $ref: '#/definitions/ProjectResponse' - '400': - description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - - /project/beneficiary/v1/_create: - post: - summary: >- - Add beneficiary for project - description: >- - Add beneficiary for project + summary: Search for existing project + description: Searches for projects based on criteria. + operationId: searchProject parameters: - - name: Beneficiary - in: body - description: Capture details of benificiary type. + - name: limit + in: query required: true schema: - $ref: '#/definitions/BeneficiaryRequest' - tags: - - Project Beneficiary - responses: - '202': - description: add beneficiary request has been accepted for creation. - schema: - $ref: '#/definitions/BeneficiaryResponse' - '400': - description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - - /project/beneficiary/v1/bulk/_create: - post: - summary: >- - Add beneficiaries for project - description: >- - Add beneficiaries for project - parameters: - - name: Beneficiary - in: body - description: Capture details of beneficiary type. + maximum: 1000 + minimum: 0 + type: integer + format: int32 + - name: offset + in: query required: true schema: - $ref: '#/definitions/BeneficiaryBulkRequest' - tags: - - Project Beneficiary - responses: - '202': - description: add beneficiary request has been accepted for creation. - schema: - $ref: '#/definitions/BulkAcceptedResponse' - '400': - description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - - /project/beneficiary/v1/_update: - post: - summary: >- - Update beneficiary registration for project - description: >- - Update beneficiary registration for project - parameters: - - name: Beneficiary - in: body - description: Project Beneficiary Registration. + minimum: 0 + type: integer + format: int32 + - name: tenantId + in: query required: true schema: - $ref: '#/definitions/BeneficiaryRequest' - - $ref: '#/parameters/echoResource' - tags: - - Project Beneficiary + type: string + - name: lastChangedSince + in: query + required: false + schema: + type: integer + format: int64 + - name: includeDeleted + in: query + required: false + schema: + type: boolean + default: false + - name: includeAncestors + in: query + required: false + schema: + type: boolean + default: false + - name: includeDescendants + in: query + required: false + schema: + type: boolean + default: false + - name: createdFrom + in: query + required: false + schema: + type: integer + format: int64 + - name: createdTo + in: query + required: false + schema: + type: integer + format: int64 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectRequest' + required: true responses: - '202': - description: Project Beneficiary request has been accepted. - schema: - $ref: '#/definitions/BeneficiaryResponse' - '400': - description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - - - /project/beneficiary/v1/bulk/_update: - post: - summary: >- - Update beneficiaries registration for project - description: >- - Update beneficiaries registration for project - parameters: - - name: Beneficiary - in: body - description: Project Beneficiary Registration. - required: true - schema: - $ref: '#/definitions/BeneficiaryBulkRequest' - - $ref: '#/parameters/echoResource' - tags: - - Project Beneficiary - responses: - '202': - description: Project Beneficiary request has been accepted. - schema: - $ref: '#/definitions/BulkAcceptedResponse' - '400': - description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - - /project/beneficiary/v1/_delete: - post: - summary: >- - Soft delete beneficiary registration for project - description: >- - Soft delete registration for project - parameters: - - name: Beneficiary - in: body - description: Soft Delete Project Beneficiary Registration. - required: true - schema: - $ref: '#/definitions/BeneficiaryRequest' - - $ref: '#/parameters/echoResource' - tags: - - Project Beneficiary - responses: - '202': - description: Project Beneficiary request has been accepted. - schema: - $ref: '#/definitions/BeneficiaryResponse' - '400': - description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - - /project/beneficiary/v1/bulk/_delete: - post: - summary: >- - Update beneficiaries registration for project - description: >- - Update beneficiaries registration for project - parameters: - - name: Beneficiary - in: body - description: Project Beneficiary Registration. - required: true - schema: - $ref: '#/definitions/BeneficiaryBulkRequest' - - $ref: '#/parameters/echoResource' - tags: - - Project Beneficiary - responses: - '202': - description: Project Beneficiary request has been accepted. - schema: - $ref: '#/definitions/BulkAcceptedResponse' - '400': - description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - - /project/beneficiary/v1/_search: + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ProjectResponse' + /project/v2/_search: post: - summary: >- - Search beneficiary registration for Project - description: >- - Search beneficiary registration for Project - parameters: - - name: Beneficiary - in: body - description: Project Beneficiary Search. - required: true - schema: - $ref: '#/definitions/BeneficiarySearchRequest' - - $ref: '#/parameters/limit' - - $ref: '#/parameters/offset' - - $ref: '#/parameters/tenantId' - - $ref: '#/parameters/lastChangedSince' - - $ref: '#/parameters/includeDeleted' - tags: - - Project Beneficiary + - Project + summary: Search for existing project (v2) + description: Searches for projects based on detailed criteria and returns the matching projects along with the total count. + operationId: searchV2Project + requestBody: + content: + application/json: + schema: + type: object + properties: + urlParams: + $ref: '#/components/schemas/ProjectSearchURLParams' + projectSearchRequest: + $ref: '#/components/schemas/ProjectSearchRequest' + required: true responses: '200': - description: Project Beneficaries. - schema: - $ref: '#/definitions/BeneficiaryBulkResponse' - '400': - description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ProjectResponse' /project/task/v1/_create: post: - summary: >- - Create task for the project - description: >- - Create task for the project - parameters: - - name: Task - in: body - description: Capture details of Task - required: true - schema: - $ref: '#/definitions/TaskRequest' tags: - Project Task + summary: Create task for the project + description: Creates a new task for a project. + operationId: projectTaskV1CreatePost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TaskRequest' + required: true responses: - '202': - description: Create task request has been accepted for creation. - schema: - $ref: '#/definitions/TaskResponse' - '400': - description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/TaskResponse' /project/task/v1/bulk/_create: post: - summary: >- - Create tasks for the project in bulk - description: >- - Create tasks for the project in bulk - parameters: - - name: Task - in: body - description: Capture details of Task - required: true - schema: - $ref: '#/definitions/TaskBulkRequest' tags: - Project Task + summary: Create tasks for the project in bulk + description: Creates multiple tasks in bulk. + operationId: projectTaskBulkV1CreatePost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TaskBulkRequest' + required: true responses: - '202': - description: Create task request has been accepted for creation. - schema: - $ref: '#/definitions/BulkAcceptedResponse' - '400': - description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ResponseInfo' /project/task/v1/_update: post: - summary: >- - Task Request - description: >- - Task Request - parameters: - - name: Task - in: body - description: Capture details of Existing task - required: true - schema: - $ref: '#/definitions/TaskRequest' tags: - Project Task + summary: Update a task + description: Updates details of an existing task. + operationId: projectTaskV1UpdatePost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TaskRequest' + required: true responses: - '202': - description: update task request has been accepted for update. - schema: - $ref: '#/definitions/TaskResponse' - '400': - description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/TaskResponse' /project/task/v1/bulk/_update: post: - summary: >- - Task Request in bulk for a project - description: >- - Task Request in bulk for a project - parameters: - - name: Task - in: body - description: Capture details of Existing tasks - required: true - schema: - $ref: '#/definitions/TaskBulkRequest' tags: - Project Task + summary: Bulk update tasks + description: Updates multiple tasks in bulk. + operationId: projectTaskV1BulkUpdatePost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TaskBulkRequest' + required: true responses: - '202': - description: update tasks bulk request has been accepted for update. - schema: - $ref: '#/definitions/BulkAcceptedResponse' - '400': - description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ResponseInfo' /project/task/v1/_delete: post: - summary: >- - Soft delete Task for a project - description: >- - Soft delete Task for a project - parameters: - - name: Task - in: body - description: Capture details of Existing task - required: true - schema: - $ref: '#/definitions/TaskRequest' tags: - Project Task + summary: Soft delete Task for a project + description: Deletes a task from a project. + operationId: projectTaskV1DeletePost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TaskRequest' + required: true responses: - '202': - description: delete task request has been accepted for deletion. - schema: - $ref: '#/definitions/TaskResponse' - '400': - description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/TaskResponse' /project/task/v1/bulk/_delete: post: - summary: >- - Soft delete Tasks for a project - description: >- - Soft delete Tasks for a project - parameters: - - name: Task - in: body - description: Capture details of Existing task - required: true - schema: - $ref: '#/definitions/TaskBulkRequest' tags: - Project Task + summary: Soft delete Tasks for a project + description: Deletes multiple tasks in bulk. + operationId: projectTaskV1BulkDeletePost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TaskBulkRequest' + required: true responses: - '202': - description: delete bulk task request has been accepted for deletion. - schema: - $ref: '#/definitions/BulkAcceptedResponse' - '400': - description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ResponseInfo' /project/task/v1/_search: post: - summary: >- - Search task for Project - description: >- - Search task for Project - parameters: - - name: Task - in: body - description: Project Task Search. - required: true - schema: - $ref: '#/definitions/TaskSearchRequest' - - $ref: '#/parameters/limit' - - $ref: '#/parameters/offset' - - $ref: '#/parameters/tenantId' - - $ref: '#/parameters/lastChangedSince' - - $ref: '#/parameters/includeDeleted' tags: - Project Task + summary: Search task for Project + description: Searches for tasks based on criteria. + operationId: projectTaskV1SearchPost + requestBody: + content: + application/json: + schema: + type: object + properties: + urlParams: + $ref: '#/components/schemas/URLParams' + taskSearchRequest: + $ref: '#/components/schemas/TaskSearchRequest' + required: true responses: '200': - description: Project Tasks. - schema: - $ref: '#/definitions/TaskBulkResponse' - '400': - description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - - + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/TaskBulkResponse' /project/staff/v1/_create: post: - summary: >- - Link Staff users to Project for a certain time period - description: >- - Link Staff users to Project for a certain time period - parameters: - - name: ProjectStaff - in: body - description: Capture linkage of Project and staff user. - required: true - schema: - $ref: '#/definitions/ProjectStaffRequest' tags: - Project Staff + summary: Link Staff users to Project for a certain time period + description: Creates a new linkage between a project and staff user. + operationId: projectStaffV1CreatePost_1 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectStaffRequest' + required: true responses: - '202': - description: Project Staff request has been accepted. - schema: - $ref: '#/definitions/ProjectStaffResponse' - '400': - description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ProjectStaffResponse' /project/staff/v1/bulk/_create: post: - summary: >- - Link bulk Staff users to Project for a certain time period - description: >- - Link bulk Staff users to Project for a certain time period - parameters: - - name: ProjectStaff - in: body - description: Capture linkage of Project and staff users. - required: true - schema: - $ref: '#/definitions/ProjectStaffBulkRequest' tags: - Project Staff + summary: Link bulk Staff users to Project for a certain time period + description: Creates multiple staff linkages in bulk. + operationId: projectStaffV1CreatePost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectStaffBulkRequest' + required: true responses: - '202': - description: Project Staff request has been accepted. - schema: - $ref: '#/definitions/BulkAcceptedResponse' - '400': - description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ResponseInfo' /project/staff/v1/_update: post: - summary: >- - Update Project Staff users - description: >- - Update Project Staff users - parameters: - - name: ProjectStaff - in: body - description: Capture linkage of Project and staff user. - required: true - schema: - $ref: '#/definitions/ProjectStaffRequest' tags: - Project Staff + summary: Update Project Staff users + description: Updates a single staff linkage record. + operationId: projectStaffV1UpdatePost_1 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectStaffRequest' + required: true responses: - '202': - description: Project Staff request has been accepted for updation. - schema: - $ref: '#/definitions/ProjectStaffResponse' - '400': - description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ProjectStaffResponse' /project/staff/v1/bulk/_update: post: - summary: >- - Update Project Staff users using bulk payload - description: >- - Update Project Staff users using bulk payload - parameters: - - name: ProjectStaff - in: body - description: Capture linkage of Project and staff user. - required: true - schema: - $ref: '#/definitions/ProjectStaffBulkRequest' tags: - Project Staff + summary: Update Project Staff users using bulk payload + description: Updates multiple staff linkage records in bulk. + operationId: projectStaffV1UpdatePost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectStaffBulkRequest' + required: true responses: - '202': - description: Project Staff bulk request has been accepted for update. - schema: - $ref: '#/definitions/BulkAcceptedResponse' - '400': - description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ResponseInfo' /project/staff/v1/_delete: post: - summary: >- - Soft delete linkage of Project Staff users with project - description: >- - Soft delete linkage of Project Staff users with project - parameters: - - name: ProjectStaff - in: body - description: Capture linkage of Project and staff user. - required: true - schema: - $ref: '#/definitions/ProjectStaffRequest' tags: - Project Staff + summary: Soft delete linkage of Project Staff users with project + description: Deletes a staff record from a project. + operationId: projectStaffV1DeletePost_1 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectStaffRequest' + required: true responses: - '202': - description: Project Staff request has been accepted for deletion. - schema: - $ref: '#/definitions/ProjectStaffResponse' - '400': - description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ProjectStaffResponse' /project/staff/v1/bulk/_delete: post: - summary: >- - Soft delete linkage of Project Staff users with project in bulk - description: >- - Soft delete linkage of Project Staff users with project in bulk - parameters: - - name: ProjectStaff - in: body - description: Capture linkage of Project and staff user. - required: true - schema: - $ref: '#/definitions/ProjectStaffBulkRequest' tags: - Project Staff + summary: Soft delete linkage of Project Staff users with project in bulk + description: Deletes staff records in bulk. + operationId: projectStaffV1DeletePost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectStaffBulkRequest' + required: true responses: - '202': - description: Project Staff request has been accepted for deletion. - schema: - $ref: '#/definitions/BulkAcceptedResponse' - '400': - description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ResponseInfo' /project/staff/v1/_search: post: - summary: >- - Search Project Staff users - description: >- - Search Project Staff users - parameters: - - name: ProjectStaff - in: body - description: Capture linkage of Project and staff user. - required: true - schema: - $ref: '#/definitions/ProjectStaffSearchRequest' - - $ref: '#/parameters/limit' - - $ref: '#/parameters/offset' - - $ref: '#/parameters/tenantId' - - $ref: '#/parameters/lastChangedSince' - - $ref: '#/parameters/includeDeleted' tags: - Project Staff + summary: Search Project Staff users + description: Searches for staff records based on criteria. + operationId: projectStaffV1SearchPost + requestBody: + content: + application/json: + schema: + type: object + properties: + urlParams: + $ref: '#/components/schemas/URLParams' + projectStaffSearchRequest: + $ref: '#/components/schemas/ProjectStaffSearchRequest' + required: true responses: '200': - description: Project Staff. - schema: - $ref: '#/definitions/ProjectStaffBulkResponse' - '400': - description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - - - + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ProjectStaffBulkResponse' /project/facility/v1/_create: post: - summary: >- - Link Facility to Project - description: >- - Link Facility to Project - parameters: - - name: ProjectFacility - in: body - description: Capture linkage of Project and facility. - required: true - schema: - $ref: '#/definitions/ProjectFacilityRequest' tags: - Project Facility + summary: Link Facility to Project + description: Creates a linkage between a project and facility. + operationId: projectFacilityV1CreatePost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectFacilityRequest' + required: true responses: - '202': - description: Project Staff request has been accepted. - schema: - $ref: '#/definitions/ProjectFacilityResponse' - '400': - description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ProjectFacilityResponse' /project/facility/v1/bulk/_create: post: - summary: >- - Link Facilities to Project - description: >- - Link Facilities to Project - parameters: - - name: ProjectFacility - in: body - description: Capture linkage of Project and facility. - required: true - schema: - $ref: '#/definitions/ProjectFacilityBulkRequest' tags: - Project Facility + summary: Link Facilities to Project + description: Creates multiple facility linkages in bulk. + operationId: projectFacilityV1BulkCreatePost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectFacilityBulkRequest' + required: true responses: - '202': - description: Project Staff request has been accepted. - schema: - $ref: '#/definitions/BulkAcceptedResponse' - '400': - description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ResponseInfo' /project/facility/v1/_update: post: - summary: >- - Update Project Facilities - description: >- - Update Project Facilities - parameters: - - name: ProjectFacility - in: body - description: Capture linkage of Project and facility. - required: true - schema: - $ref: '#/definitions/ProjectFacilityRequest' tags: - Project Facility + summary: Update Project Facilities + description: Updates a single facility linkage record. + operationId: projectFacilityV1UpdatePost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectFacilityRequest' + required: true responses: - '202': - description: Project Facility request has been accepted - schema: - $ref: '#/definitions/ProjectFacilityResponse' - '400': - description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ProjectFacilityResponse' /project/facility/v1/bulk/_update: post: - summary: >- - Update Project Facilities - description: >- - Update Project Facilities - parameters: - - name: ProjectFacility - in: body - description: Capture linkage of Project and facility. - required: true - schema: - $ref: '#/definitions/ProjectFacilityBulkRequest' tags: - Project Facility + summary: Bulk update Project Facilities + description: Updates multiple facility linkage records in bulk. + operationId: projectFacilityV1BulkUpdatePost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectFacilityBulkRequest' + required: true responses: - '202': - description: Project Facility request has been accepted - schema: - $ref: '#/definitions/BulkAcceptedResponse' - '400': - description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ResponseInfo' /project/facility/v1/_delete: post: - summary: >- - Soft delete Project Facility - description: >- - Soft delete Project Facility - parameters: - - name: ProjectFacility - in: body - description: Capture linkage of Project and facility. - required: true - schema: - $ref: '#/definitions/ProjectFacilityRequest' tags: - Project Facility + summary: Soft delete Project Facility + description: Deletes a facility record from a project. + operationId: projectFacilityV1DeletePost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectFacilityRequest' + required: true responses: - '202': - description: Project Facility delete request has been accepted - schema: - $ref: '#/definitions/ProjectFacilityResponse' - '400': - description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ProjectFacilityResponse' /project/facility/v1/bulk/_delete: post: - summary: >- - Soft delete Project Facilities in bulk - description: >- - Soft delete Project Facilities in bulk - parameters: - - name: ProjectFacility - in: body - description: Capture linkage of Project and facility. - required: true - schema: - $ref: '#/definitions/ProjectFacilityBulkRequest' tags: - Project Facility + summary: Soft delete Project Facilities in bulk + description: Deletes facility records in bulk. + operationId: projectFacilityV1BulkDeletePost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectFacilityBulkRequest' + required: true responses: - '202': - description: Project Facility delete request has been accepted - schema: - $ref: '#/definitions/BulkAcceptedResponse' - '400': - description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ResponseInfo' /project/facility/v1/_search: post: - summary: >- - Search Project Facilities - description: >- - Search Project Facilities - parameters: - - name: ProjectFacility - in: body - description: Capture linkage of Project and facility. - required: true - schema: - $ref: '#/definitions/ProjectFacilitySearchRequest' - - $ref: '#/parameters/limit' - - $ref: '#/parameters/offset' - - $ref: '#/parameters/tenantId' - - $ref: '#/parameters/lastChangedSince' - - $ref: '#/parameters/includeDeleted' tags: - Project Facility + summary: Search Project Facilities + description: Searches for facility records based on criteria. + operationId: projectFacilityV2SearchPost + requestBody: + content: + application/json: + schema: + type: object + properties: + urlParams: + $ref: '#/components/schemas/URLParams' + projectFacilitySearchRequest: + $ref: '#/components/schemas/ProjectFacilitySearchRequest' + required: true responses: '200': - description: Project Facilities - schema: - $ref: '#/definitions/ProjectFacilityBulkResponse' - '400': - description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - - /project/resource/v1/_create: + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ProjectFacilityBulkResponse' + /project/beneficiary/v1/_create: post: - summary: >- - Link Resources to Project - description: >- - Link Resources to Project - parameters: - - name: ProjectResource - in: body - description: Capture linkage of Project and resources. - required: true - schema: - $ref: '#/definitions/ProjectResourceRequest' tags: - - Project Resource + - Project Beneficiary + summary: Add beneficiary for project + description: Creates a new project beneficiary and returns the created beneficiary details. + operationId: projectBeneficiaryV1CreatePost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BeneficiaryRequest' + required: true responses: - '202': - description: Project Resource request has been accepted. - schema: - $ref: '#/definitions/ProjectResourceResponse' - '400': - description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - /project/resource/v1/bulk/_create: + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/BeneficiaryResponse' + /project/beneficiary/v1/bulk/_create: post: - summary: >- - Link Resources to Project in bulk - description: >- - Link Resources to Project - parameters: - - name: ProjectResource - in: body - description: Capture linkage of Project and resources. - required: true - schema: - $ref: '#/definitions/ProjectResourceBulkRequest' tags: - - Project Resource + - Project Beneficiary + summary: Add beneficiaries for project + description: Creates multiple beneficiaries in bulk. + operationId: projectBeneficiaryV1BulkCreatePost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BeneficiaryBulkRequest' + required: true responses: - '202': - description: Project Resource request has been accepted. - schema: - $ref: '#/definitions/BulkAcceptedResponse' - '400': - description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - /project/resource/v1/_update: + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ResponseInfo' + /project/beneficiary/v1/_update: post: - summary: >- - Update Project Resource linkage - description: >- - Update Project Resource linkage - parameters: - - name: ProjectResource - in: body - description: Capture linkage of Project and Resource. - required: true - schema: - $ref: '#/definitions/ProjectResourceRequest' tags: - - Project Resource + - Project Beneficiary + summary: Update beneficiary registration for project + description: Updates a single beneficiary. + operationId: projectBeneficiaryV1UpdatePost + parameters: + - name: echoResource + in: query + required: false + schema: + type: boolean + default: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BeneficiaryRequest' + required: true responses: - '202': - description: Project Resource request has been accepted - schema: - $ref: '#/definitions/ProjectResourceResponse' - '400': - description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - /project/resource/v1/bulk/_update: + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/BeneficiaryResponse' + /project/beneficiary/v1/bulk/_update: post: - summary: >- - Update Project Resource linkage in bulk - description: >- - Update Project Resource linkage in bulk - parameters: - - name: ProjectResource - in: body - description: Capture linkage of Project and Resource. - required: true - schema: - $ref: '#/definitions/ProjectResourceBulkRequest' tags: - - Project Resource + - Project Beneficiary + summary: Update beneficiaries registration for project + description: Updates multiple beneficiaries in bulk. + operationId: projectBeneficiaryV1BulkUpdatePost + parameters: + - name: echoResource + in: query + required: false + schema: + type: boolean + default: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BeneficiaryBulkRequest' + required: true responses: - '202': - description: Project Resource request has been accepted - schema: - $ref: '#/definitions/BulkAcceptedResponse' - '400': - description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - /project/resource/v1/_delete: + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ResponseInfo' + /project/beneficiary/v1/_delete: post: - summary: >- - Delete Project Resource linkage - description: >- - Delete Project Resource linkage - parameters: - - name: ProjectResource - in: body - description: Delete linkage of Project and Resource. - required: true - schema: - $ref: '#/definitions/ProjectResourceRequest' tags: - - Project Resource + - Project Beneficiary + summary: Soft delete beneficiary registration for project + description: Deletes a single beneficiary + operationId: projectBeneficiaryV1DeletePost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BeneficiaryRequest' + required: true responses: - '202': - description: Project Resource deletion request has been accepted - schema: - $ref: '#/definitions/ProjectResourceResponse' - '400': - description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - /project/resource/v1/bulk/_delete: + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/BeneficiaryResponse' + /project/beneficiary/v1/bulk/_delete: post: - summary: >- - Delete Project Resource linkage in bulk - description: >- - Delete Project Resource linkage in bulk - parameters: - - name: ProjectResource - in: body - description: Delete linkage of Project and Resource. - required: true - schema: - $ref: '#/definitions/ProjectResourceBulkRequest' tags: - - Project Resource + - Project Beneficiary + summary: Soft delete beneficiary registrations for project + description: Deletes beneficiaries in bulk. + operationId: projectBeneficiaryV1BulkDeletePost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BeneficiaryBulkRequest' + required: true responses: - '202': - description: Project Resource deletion request has been accepted - schema: - $ref: '#/definitions/BulkAcceptedResponse' - '400': - description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - /project/resource/v1/_search: + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ResponseInfo' + /project/beneficiary/v1/_search: post: - summary: >- - Search Project Resources - description: >- - Search Project Resources - parameters: - - name: ProjectResource - in: body - description: Search linkage of Project and resource. - required: true - schema: - $ref: '#/definitions/ProjectResourceSearchRequest' - - $ref: '#/parameters/limit' - - $ref: '#/parameters/offset' - - $ref: '#/parameters/tenantId' - - $ref: '#/parameters/lastChangedSince' - - $ref: '#/parameters/includeDeleted' tags: - - Project Resource + - Project Beneficiary + summary: Search beneficiary registration for Project + description: Searches for beneficiaries based on criteria. + operationId: projectBeneficiaryV2SearchPost + requestBody: + content: + application/json: + schema: + type: object + properties: + urlParams: + $ref: '#/components/schemas/URLParams' + beneficiarySearchRequest: + $ref: '#/components/schemas/BeneficiarySearchRequest' + required: true responses: '200': - description: Project Resources - schema: - $ref: '#/definitions/ProjectResourceBulkResponse' - '400': - description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - - -parameters: - #TODO is tenantId required as a query param if it can be determine from requestInfo->userInfo - tenantId: - name: tenantId - in: query - description: Unique id for a tenant. - required: true - type: string - format: varchar - - lastChangedSince: - name: lastChangedSince - description: | - epoch of the time since when the changes on the object should be picked up. Search results from this parameter should include both newly created objects since this time as well as any modified objects since this time. This criterion is included to help polling clients to get the changes in system since a last time they synchronized with the platform. - in: query - required: false - type: integer - format: int64 - - echoResource: - name: echoResource - in: query - type: boolean - required: false - default: true - description: Client can specify if the resource in request body needs to be sent back in the response. This is being used to limit amount of data that needs to flow back from the server to the client in low bandwidth scenarios. Server will always send the server generated id for validated requests. - - serverHandlesErrors: - name: serverHandlesErrors - in: query - type: boolean - required: false - default: false - description: Client can specify that it is incapable of handling any errors with the requests and server should route these for manual intervention if required. - - limit: - name: limit - description: Pagination - limit records in response - in: query - type: integer - minimum: 0 - maximum: 1000 #TODO review - required: true - - offset: - name: offset - description: Pagination - offset from which records should be returned in response - in: query - type: integer - minimum: 0 - required: true - - includeDeleted: - name: includeDeleted - description: Used in search APIs to specify if (soft) deleted records should be included in search results. - in: query - type: boolean - default: false - required: false - - includeEnded: - name: includeEnded - description: Used in project search API to specify if records past end date should be included in search results. - in: query - type: boolean - default: false - required: false - - includeAncestors: - name: includeAncestors - description: Used in project search API to specify if response should include project elements that are in the preceding hierarchy of matched projects. - in: query - type: boolean - default: false - required: false - - includeDescendants: - name: includeDescendants - description: Used in project search API to specify if response should include project elements that are in the following hierarchy of matched projects. - in: query - type: boolean - default: false - required: false - - createdFrom: - name: createdFrom - description: | - Used in project search API to limit the search results to only those projects whose creation date is after the specified 'createdFrom' date. - in: query - required: false - type: integer - format: int64 - - createdTo: - name: createdTo - description: | - Used in project search API to limit the search results to only those projects whose creation date is before the specified 'createdTo' date. - in: query - required: false - type: integer - format: int64 - -definitions: - boundaryCode: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/boundaryCode' - id: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/id' - idForSearch: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/idForSearch' - clientReferenceIdForSearch: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/clientReferenceIdForSearch' - clientReferenceId: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/clientReferenceId' - tenantId: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/tenantId' - eventTimestamp: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/eventTimestamp' - isDeleted: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/isDeleted' - rowVersion: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/rowVersion' - apiOperation: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/apiOperation' - additionalFields: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/additionalFields' - Address: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/Address' - projectTypeId: - type: string - description: Unique id of Project type from master data - minLength: 2 - maxLength: 64 - subProjectTypeId: - type: string - description: Unique id of subproject type from master data - minLength: 2 - maxLength: 64 - ProjectType: - description: This is the master data to capture the metadata of Project - type: object - properties: - id: - $ref: '#/definitions/id' - tenantId: - $ref: '#/definitions/tenantId' - name: - type: string - description: Name of Project type - minLength: 2 - maxLength: 64 - example: 'LLIN 2022' - code: - type: string - description: Unique code of Project type - example: 'LLIN' - minLength: 2 - maxLength: 64 - group: - type: string - minLength: 2 - maxLength: 64 - example: 'MALARIA' - beneficiaryType: - type: string - description: beneficiary type - # enum: - # - HOUSEHOLD - # - INDIVIDUAL - # - STRUCTURE - eligibilityCriteria: - type: array - items: - type: string - maxItems: 10 - description: Capture intructions for eligibility criteria - example: 'INSTRUCTIONS' - # isRegistrationAndDeliveryCombined: - # type: boolean - # example: true - # deliveryStrategy: - # type: string - # enum: - # - FIXED - # - MOBILE - # example: 'FIXED' - taskProcedure: - type: array - items: - type: string - maxItems: 10 - description: Capture instructions for Task - example: Delivery instruction for health usecase - # isRecurring: - # type: boolean - # default: false - # noOfRounds: - # type: integer - # default: 1 - # description: Applicable only if isRecurring is true - # durationBetweenRounds: - # type: integer - # default: 0 - # description: Applicable only if isRecurring is true the defalut unit is days - resources: - #Default products and variants used by projects using this type are specified here. Can override at the project level using /project/resource - type: array - items: - $ref: '#/definitions/ProjectProductVariant' - # $ref: '#/definitions/ProductVariant' - # $ref: '#/definitions/Resource' - auditDetails: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/AuditDetails - - - Project: - description: The purpose of this object to define the Project for a geography and period - type: object - properties: - id: - type: string - minLength: 2 - maxLength: 64 - description: Unique system generated GUID - readOnly: True - tenantId: - type: string - minLength: 2 - maxLength: 64 - description: Unique tenant of the system - example: 'tenantA' - name: - type: string - description: Name of project - minLength: 2 - projectNumber: - type: string - description: 'The unique identifier of the project number the custom formatting.' - example: 'PR/2022-23/010' - readOnly: true - projectType: - type: string - description: Unique ID of project type from master data - minLength: 2 - maxLength: 64 - projectSubType: - type: string - description: Unique ID of subproject type from master data - minLength: 2 - maxLength: 64 - department: - type: string - description: Unique department ID as defined in master data - minLength: 2 - maxLength: 64 - description: - type: string - description: Description of project - minLength: 2 - referenceID: - type: string - description: Reference number to a physical file or docket or some other artifact of which this project is representative of. - minLength: 2 - maxLength: 100 - #documents: - # type: array - # description: Reference to physical documents that have been attached via file upload - # items: - # $ref: 'https://raw.githubusercontent.com/egovernments/DIGIT-OSS/master/core-services/docs/common-contract.yml#/definitions/Document' - natureOfWork: - type: string - description: Specifies nature of work for Project - minLength: 2 - maxLength: 64 - projectHierarchy: - type: "string" - description: "Materialized Path of the hierarchy that this project element belongs to" - readOnly: true - ancestors: - $ref: '#/definitions/Project' - description: "Materialized Path of the hierarchy that this project element belongs to" - address: - $ref: '#/definitions/Address' - startDate: - type: integer - format: int64 - description: Project start date - endDate: - type: integer - format: int64 - description: Project end date - isTaskEnabled: - type: boolean - default: false - description: Task can be created if this is 'True' - parent: - type: string - minLength: 2 - maxLength: 64 - description: Parent Project id - targets: - type: array - items: - $ref: '#/definitions/Target' - additionalDetails: - type: object - description: Any additional details of the register - isDeleted: - $ref: '#/definitions/isDeleted' - rowVersion: - $ref: '#/definitions/rowVersion' - auditDetails: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/AuditDetails - - ProjectSearch: - type: object - properties: - id: - $ref: '#/definitions/idForSearch' - startDate: - type: integer - format: int64 - description: Project start date - endDate: - type: integer - format: int64 - description: Project end date - isTaskEnabled: - type: boolean - default: false - description: Task can be created if this is 'True' - parent: - type: string - minLength: 2 - maxLength: 64 - description: Parent Project id - projectTypeId: - $ref: '#/definitions/projectTypeId' - subProjectTypeId: - $ref: '#/definitions/subProjectTypeId' - department: - type: string - description: Unique department ID as defined in master data - minLength: 2 - maxLength: 64 - referenceId: - type: string - description: Reference number to a physical file or docket or some other artifact of which this project is representative of. - minLength: 2 - maxLength: 100 - boundaryCode: - $ref: '#/definitions/boundaryCode' - - ProjectBeneficiary: - description: A representation of the registration of an entity to a Project. - type: object - required: - - tenantId - - projectId - - beneficiaryId - properties: - id: - $ref: '#/definitions/id' - clientReferenceId: - $ref: '#/definitions/clientReferenceId' - tenantId: - $ref: '#/definitions/tenantId' - projectId: - type: string - minLength: 2 - maxLength: 64 - description: Unique ID of Project - beneficiaryId: - type: string - minLength: 2 - maxLength: 64 - description: Unique ID of Household/Individual being added as beneficiary - beneficiaryClientReferenceId: - type: string - minLength: 2 - maxLength: 64 - description: Client maintained unique ID of Household/Individual being added as beneficiary - tag: - type: string - maxLength: 1000 - description: Beneficiary Voucher Tag - dateOfRegistration: - $ref: '#/definitions/eventTimestamp' - additionalFields: - $ref: '#/definitions/additionalFields' - isDeleted: - $ref: '#/definitions/isDeleted' - rowVersion: - $ref: '#/definitions/rowVersion' - auditDetails: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/AuditDetails - - ProjectBeneficiarySearch: - description: Search model for project beneficiary. - type: object - properties: - id: - $ref: '#/definitions/idForSearch' - clientReferenceId: - $ref: '#/definitions/clientReferenceIdForSearch' - projectId: - type: array - items: - type: string - minLength: 2 - maxLength: 64 - description: Unique ID form Project - beneficiaryId: - type: array - items: - type: string - minLength: 2 - maxLength: 64 - description: Unique ID of Household/Individual being added as beneficiary - dateOfRegistration: - $ref: '#/definitions/eventTimestamp' - - Task: - type: object - required: - - tenantId - - projectId - - projectBeneficiaryId - - resources - properties: - id: - $ref: '#/definitions/id' - clientReferenceId: - $ref: '#/definitions/clientReferenceId' - tenantId: - $ref: '#/definitions/tenantId' - projectId: - type: string - minLength: 2 - maxLength: 64 - description: Unique ProjectId - projectBeneficiaryId: - type: string - example: "R-ID-1" - description: Unique Beneficiary Id - projectBeneficiaryClientReferenceId: - type: string - example: "R-ID-1" - description: Unique client maintained Beneficiary Id - resources: - type: array - items: - $ref: '#/definitions/TaskResource' - plannedStartDate: - type: integer - format: int64 - description: Task planned start date - plannedEndDate: - type: integer - format: int64 - description: Task planned end date - actualStartDate: - type: integer - format: int64 - description: Task actual start date - actualEndDate: - type: integer - format: int64 - description: Task actual end date - createdBy: - type: string - example: "UUID" - createdDate: - type: integer - format: int64 - example: 1663218161 - address: - $ref: '#/definitions/Address' - #roundNo: - # type: integer - #description: Increse the count with each sucessfull delivery if it is multi round Project - # example: 1 - # default: 1 - additionalFields: - $ref: '#/definitions/additionalFields' - isDeleted: - $ref: '#/definitions/isDeleted' - rowVersion: - $ref: '#/definitions/rowVersion' - auditDetails: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/AuditDetails - status: - type: string - description: It is a master data from mdms - example: 'DELIVERED' - - TaskSearch: - type: object - properties: - id: - $ref: '#/definitions/idForSearch' - clientReferenceId: - $ref: '#/definitions/clientReferenceIdForSearch' - projectId: - type: array - items: - type: string - minLength: 2 - maxLength: 64 - description: Unique ProjectId - projectBeneficiaryId: - type: array - items: - type: string - example: "R-ID-1" - plannedStartDate: - type: integer - format: int64 - description: Task planned start date - plannedEndDate: - type: integer - format: int64 - description: Task planned end date - actualStartDate: - type: integer - format: int64 - description: Task planned start date - actualEndDate: - type: integer - format: int64 - description: Task planned end date - createdBy: - type: string - example: "UUID" - status: - type: string - description: It is a master data from mdms - example: 'DELIVERED' - boundaryCode: - $ref: '#/definitions/boundaryCode' - - ProjectStaff: - description: This object defines the mapping of a system staff user to a project for a certain period. - type: object - required: - - tenantId - - userId - - projectId - properties: - id: - type: string - minLength: 2 - maxLength: 64 - description: Unique system generated GUID - readOnly: True - tenantId: - $ref: '#/definitions/tenantId' - userId: - type: string - description: Unique userId defined using user service - minLength: 2 - maxLength: 64 - projectId: - type: string - description: Project Id - minLength: 2 - maxLength: 64 - #TODO: What happens when this period falls outside the period for the project - #TODO: Could be multiple periods when the user needs to be active for a certain location - #TODO: User could have different active periods in different locations - startDate: - type: integer - format: int64 - description: Start date of user operations against this project - endDate: - type: integer - format: int64 - description: End date of user operations against this project - channel: - type: string - minLength: 2 - maxLength: 64 - isDeleted: - $ref: '#/definitions/isDeleted' - rowVersion: - $ref: '#/definitions/rowVersion' - auditDetails: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/AuditDetails - - ProjectStaffSearch: - description: This object defines the mapping of a system staff user to a project for a certain period. - type: object - properties: - id: - $ref: '#/definitions/idForSearch' - staffId: - type: array - items: - type: string - description: Unique userId defined using user service - minLength: 2 - maxLength: 64 - projectId: - type: array - items: - type: string - description: Project Id - minLength: 2 - maxLength: 64 - startDate: - type: integer - format: int64 - description: Start date of user operations against this project - endDate: - type: integer - format: int64 - description: End date of user operations against this project - - ProjectFacility: - description: This object defines the mapping of a facility to a project. - type: object - required: - - tenantId - - facilityId - - projectId - properties: - id: - $ref: '#/definitions/id' - tenantId: - $ref: '#/definitions/tenantId' - facilityId: - type: string - description: Unique facilityId defined using facility service - minLength: 2 - maxLength: 64 - projectId: - type: string - description: Project Id - minLength: 2 - maxLength: 64 - isDeleted: - $ref: '#/definitions/isDeleted' - rowVersion: - $ref: '#/definitions/rowVersion' - auditDetails: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/AuditDetails - - ProjectFacilitySearch: - description: This object defines the mapping of a facility to a project. - type: object - properties: - id: - $ref: '#/definitions/idForSearch' - facilityId: - $ref: '#/definitions/idForSearch' - description: Unique facilityId defined using facility service - projectId: - $ref: '#/definitions/idForSearch' - - ProjectResource: - description: This object defines the mapping of a resource to a project. - type: object - required: - - tenantId - - projectId - - resources - properties: - id: - $ref: '#/definitions/id' - tenantId: - $ref: '#/definitions/tenantId' - projectId: - type: string - description: Unique Project Id defined in Project Service - minLength: 2 - maxLength: 64 - resource: - type: object - - $ref: '#/definitions/ProjectProductVariant' - # type: string - # description: Unique productVariantId defined in Product service - # minLength: 2 - # maxLength: 64 - startDate: - type: integer - format: int64 - description: Projectresource start date - endDate: - type: integer - format: int64 - description: Projectresource end date - isDeleted: - $ref: '#/definitions/isDeleted' - rowVersion: - $ref: '#/definitions/rowVersion' - auditDetails: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/AuditDetails - - ProjectResourceSearch: - description: This object defines the mapping of a resource to a project. - type: object - properties: - id: - $ref: '#/definitions/idForSearch' - projectId: - type: array - items: - type: string - description: Unique Project Id defined in Project Service - minLength: 2 - maxLength: 64 - - - ProjectProductVariant: - #Master Data MDMS - #Required to map projects to product variants and define the type and if the variant is considered as a base unit within this project - type: object - required: - - productVariantId - properties: - productVariantId: - type: string - description: Reference to id in ProductVariant - type: - type: string - description: Type of resource i.e. Human, Product in the context of the project - isBaseUnitVariant: - type: boolean - description: Denotes if a variant is a base unit variant. Useful to filter variants applicable for tasks within a project. - - TaskResource: - type: object - required: - - tenantId - - productVariantId - - quantity - - isDelivered - properties: - id: - type: string - minLength: 2 - maxLength: 64 - description: Unique system generated GUID - readOnly: true - tenantId: - $ref: '#/definitions/tenantId' - productVariantId: - type: string - minLength: 2 - maxLength: 64 - example: 'ID-1' - quantity: - type: integer - format: int64 - isDelivered: - type: boolean - example: true - deliveryComment: - type: string - minLength: 0 - maxLength: 1000 - isDeleted: - $ref: '#/definitions/isDeleted' - auditDetails: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/AuditDetails - - - Target: - type: object - required: - - beneficiaryType - - baseline - - target - properties: - id: - type: string - minLength: 2 - maxLength: 64 - description: Unique system generated GUID - readOnly: true - beneficiaryType: - type: string - minLength: 2 - maxLength: 64 - example: 'HOUSEHOLD' - baseline: - type: integer - target: - type: integer - isDeleted: - $ref: '#/definitions/isDeleted' - auditDetails: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/AuditDetails - - ProjectRequest: - type: object - properties: - RequestInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/RequestInfo - Projects: - type: array - minItems: 1 - items: - $ref: '#/definitions/Project' - apiOperation: - $ref: '#/definitions/apiOperation' - required: - - RequestInfo - - Project - ProjectSearchRequest: - type: object - properties: - RequestInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/RequestInfo - Project: - $ref: '#/definitions/ProjectSearch' - required: - - RequestInfo - - Project - ProjectResponse: - type: object - properties: - ResponseInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ResponseInfo - Projects: - type: array - items: - $ref: '#/definitions/Project' - required: - - ResponseInfo - - Project - - - ############################################################### - - - BeneficiaryRequest: - type: object - properties: - RequestInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/RequestInfo - ProjectBeneficiary: - type: object - $ref: '#/definitions/ProjectBeneficiary' - required: - - RequestInfo - - Beneficiary - - BeneficiaryBulkRequest: - type: object - properties: - RequestInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/RequestInfo - ProjectBeneficiaries: - type: array - minItems: 1 - items: - $ref: '#/definitions/ProjectBeneficiary' - required: - - RequestInfo - - Beneficiary - - BeneficiarySearchRequest: - type: object - properties: - RequestInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/RequestInfo - ProjectBeneficiary: - $ref: '#/definitions/ProjectBeneficiarySearch' - required: - - RequestInfo - - Beneficiary - - BeneficiaryResponse: - type: object - properties: - ResponseInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ResponseInfo - ProjectBeneficiary: - type: object - $ref: '#/definitions/ProjectBeneficiary' - required: - - ResponseInfo - - Beneficiary - - - BeneficiaryBulkResponse: - type: object - properties: - ResponseInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ResponseInfo - ProjectBeneficiaries: - type: array - items: - $ref: '#/definitions/ProjectBeneficiary' - required: - - ResponseInfo - - Beneficiary - - ################################################################### - TaskRequest: - type: object - properties: - RequestInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/RequestInfo - Task: - type: object - $ref: '#/definitions/Task' - required: - - RequestInfo - - Task - - TaskBulkRequest: - type: object - properties: - RequestInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/RequestInfo - Tasks: - type: array - minItems: 1 - items: - $ref: '#/definitions/Task' - required: - - RequestInfo - - Task - - TaskSearchRequest: - type: object - properties: - RequestInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/RequestInfo - Task: - $ref: '#/definitions/TaskSearch' - required: - - RequestInfo - - Task - TaskResponse: - type: object - properties: - ResponseInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ResponseInfo - Task: - type: object - $ref: '#/definitions/Task' - required: - - ResponseInfo - - Task - - TaskBulkResponse: - type: object - properties: - ResponseInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ResponseInfo - Tasks: - type: array - items: - $ref: '#/definitions/Task' - required: - - ResponseInfo - - Task - - ProjectStaffRequest: - type: object - properties: - RequestInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/RequestInfo - ProjectStaff: - type: object - $ref: '#/definitions/ProjectStaff' - required: - - RequestInfo - - ProjectStaff - - ProjectStaffBulkRequest: - type: object - properties: - RequestInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/RequestInfo - ProjectStaff: - type: array - minItems: 1 - items: - $ref: '#/definitions/ProjectStaff' - required: - - RequestInfo - - ProjectStaff - - ProjectStaffSearchRequest: - type: object - properties: - RequestInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/RequestInfo - ProjectStaff: - $ref: '#/definitions/ProjectStaffSearch' - required: - - RequestInfo - - ProjectStaff - ProjectStaffResponse: - type: object - properties: - ResponseInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ResponseInfo - ProjectStaff: - type: object - $ref: '#/definitions/ProjectStaff' - required: - - ResponseInfo - - ProjectStaff - - - ProjectStaffBulkResponse: - type: object - properties: - ResponseInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ResponseInfo - ProjectStaff: - type: array - items: - $ref: '#/definitions/ProjectStaff' - required: - - ResponseInfo - - ProjectStaff - - ProjectFacilityRequest: - type: object - properties: - RequestInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/RequestInfo - ProjectFacility: - type: object - $ref: '#/definitions/ProjectFacility' - apiOperation: - $ref: '#/definitions/apiOperation' - required: - - RequestInfo - - ProjectFacility - - ProjectFacilityBulkRequest: - type: object - properties: - RequestInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/RequestInfo - ProjectFacilities: - type: array - minItems: 1 - items: - $ref: '#/definitions/ProjectFacility' - apiOperation: - $ref: '#/definitions/apiOperation' - required: - - RequestInfo - - ProjectFacility - ProjectFacilitySearchRequest: - type: object - properties: - RequestInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/RequestInfo - ProjectFacility: - $ref: '#/definitions/ProjectFacilitySearch' - required: - - RequestInfo - - ProjectFacility - ProjectFacilityResponse: - type: object - properties: - ResponseInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ResponseInfo - ProjectFacility: - type: object - $ref: '#/definitions/ProjectFacility' - required: - - ResponseInfo - - ProjectFacility - - ProjectFacilityBulkResponse: - type: object - properties: - ResponseInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ResponseInfo - ProjectFacilities: - type: array - items: - $ref: '#/definitions/ProjectFacility' - required: - - ResponseInfo - - ProjectFacility - - ProjectResourceRequest: - type: object - properties: - RequestInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/RequestInfo - ProjectResource: - type: object - $ref: '#/definitions/ProjectResource' - required: - - RequestInfo - - ProjectResource - ProjectResourceBulkRequest: - type: object - properties: - RequestInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/RequestInfo - ProjectResources: - type: array - minItems: 1 - items: - $ref: '#/definitions/ProjectResource' - required: - - RequestInfo - - ProjectResource - ProjectResourceSearchRequest: - type: object - properties: - RequestInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/RequestInfo - ProjectResource: - $ref: '#/definitions/ProjectResourceSearch' - required: - - RequestInfo - - ProjectResource - ProjectResourceResponse: - type: object - properties: - ResponseInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ResponseInfo - ProjectResource: - type: object - $ref: '#/definitions/ProjectResource' - required: - - ResponseInfo - - ProjectResource - ProjectResourceBulkResponse: - type: object - properties: - ResponseInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ResponseInfo - ProjectResources: - type: array - items: - $ref: '#/definitions/ProjectResource' - required: - - ResponseInfo - - ProjectResource - - BulkAcceptedResponse: - type: object - properties: - ResponseInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ResponseInfo - required: - - ResponseInfo + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/BeneficiaryBulkResponse' + +components: + schemas: + ProjectSearchURLParams: + required: + - limit + - offset + - tenantId + type: object + properties: + urlparams: + $ref: '#/components/schemas/URLParams' + limit: + maximum: 1000 + minimum: 0 + type: integer + format: int32 + offset: + minimum: 0 + type: integer + format: int32 + tenantId: + type: string + lastChangedSince: + type: integer + format: int64 + includeDeleted: + type: boolean + includeAncestors: + type: boolean + includeDescendants: + type: boolean + createdFrom: + type: integer + format: int64 + createdTo: + type: integer + format: int64 + URLParams: + required: + - limit + - offset + - tenantId + type: object + properties: + urlparams: + $ref: '#/components/schemas/URLParams' + limit: + maximum: 1000 + minimum: 0 + type: integer + format: int32 + offset: + minimum: 0 + type: integer + format: int32 + tenantId: + type: string + lastChangedSince: + type: integer + format: int64 + includeDeleted: + type: boolean + PlainAccessRequest: + type: object + properties: + recordId: + type: string + plainRequestFields: + type: array + items: + type: string + ProjectSearch: + type: object + properties: + urlparams: + $ref: '#/components/schemas/ProjectSearchURLParams' + id: + type: array + items: + type: string + startDate: + type: integer + format: int64 + endDate: + type: integer + format: int64 + isTaskEnabled: + type: boolean + parent: + maxLength: 64 + minLength: 2 + type: string + projectTypeId: + type: string + subProjectTypeId: + type: string + department: + maxLength: 64 + minLength: 2 + type: string + referenceId: + maxLength: 100 + minLength: 2 + type: string + boundaryCode: + type: string + includeAncestors: + type: boolean + includeDescendants: + type: boolean + createdFrom: + type: integer + format: int64 + createdTo: + type: integer + format: int64 + name: + type: string + ProjectSearchRequest: + required: + - Project + - RequestInfo + type: object + properties: + RequestInfo: + $ref: '#/components/schemas/RequestInfo' + Project: + $ref: '#/components/schemas/ProjectSearch' + RequestInfo: + type: object + properties: + apiId: + type: string + ver: + type: string + ts: + type: integer + format: int64 + action: + type: string + did: + type: string + key: + type: string + msgId: + type: string + authToken: + type: string + correlationId: + type: string + plainAccessRequest: + $ref: '#/components/schemas/PlainAccessRequest' + userInfo: + $ref: '#/components/schemas/User' + Role: + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + code: + type: string + tenantId: + type: string + User: + type: object + properties: + id: + type: integer + format: int64 + userName: + type: string + name: + type: string + type: + type: string + mobileNumber: + type: string + emailId: + type: string + roles: + type: array + items: + $ref: '#/components/schemas/Role' + tenantId: + type: string + uuid: + type: string + Address: + required: + - type + type: object + properties: + id: + maxLength: 64 + minLength: 2 + type: string + tenantId: + type: string + clientReferenceId: + maxLength: 64 + minLength: 2 + type: string + doorNo: + maxLength: 64 + minLength: 2 + type: string + latitude: + maximum: 90 + exclusiveMaximum: false + minimum: -90 + exclusiveMinimum: false + type: number + format: double + longitude: + maximum: 180 + exclusiveMaximum: false + minimum: -180 + exclusiveMinimum: false + type: number + format: double + locationAccuracy: + minimum: 0 + exclusiveMinimum: false + type: number + format: double + type: + type: string + enum: + - PERMANENT + - CORRESPONDENCE + - OTHER + addressLine1: + maxLength: 256 + minLength: 2 + type: string + addressLine2: + maxLength: 256 + minLength: 2 + type: string + landmark: + maxLength: 256 + minLength: 2 + type: string + city: + maxLength: 256 + minLength: 2 + type: string + pincode: + maxLength: 64 + minLength: 2 + type: string + buildingName: + maxLength: 256 + minLength: 2 + type: string + street: + maxLength: 256 + minLength: 2 + type: string + boundaryType: + type: string + boundary: + type: string + locality: + $ref: '#/components/schemas/Boundary' + AuditDetails: + type: object + properties: + createdBy: + type: string + lastModifiedBy: + type: string + createdTime: + type: integer + format: int64 + lastModifiedTime: + type: integer + format: int64 + Boundary: + required: + - code + type: object + properties: + id: + type: string + tenantId: + type: string + code: + type: string + geometry: + $ref: '#/components/schemas/JsonNode' + auditDetails: + $ref: '#/components/schemas/AuditDetails' + additionalDetails: + $ref: '#/components/schemas/JsonNode' + Document: + required: + - documentType + - fileStoreId + - tenantId + type: object + properties: + id: + maxLength: 64 + minLength: 2 + type: string + tenantId: + maxLength: 128 + minLength: 2 + type: string + documentType: + maxLength: 64 + minLength: 2 + type: string + fileStoreId: + maxLength: 64 + minLength: 2 + type: string + documentUid: + maxLength: 64 + minLength: 2 + type: string + fileStore: + type: string + status: + type: string + additionalDetails: + type: object + auditDetails: + $ref: '#/components/schemas/AuditDetails' + JsonNode: + type: object + Project: + type: object + properties: + id: + type: string + tenantId: + type: string + projectNumber: + type: string + name: + type: string + projectType: + type: string + projectSubType: + type: string + department: + type: string + description: + type: string + referenceID: + type: string + projectTypeId: + type: string + documents: + type: array + items: + $ref: '#/components/schemas/Document' + address: + $ref: '#/components/schemas/Address' + startDate: + type: integer + format: int64 + endDate: + type: integer + format: int64 + isTaskEnabled: + type: boolean + parent: + type: string + projectHierarchy: + type: string + natureOfWork: + type: string + ancestors: + type: array + items: + $ref: '#/components/schemas/Project' + descendants: + type: array + items: + $ref: '#/components/schemas/Project' + targets: + type: array + items: + $ref: '#/components/schemas/Target' + additionalDetails: + type: object + isDeleted: + type: boolean + rowVersion: + type: integer + format: int32 + auditDetails: + $ref: '#/components/schemas/AuditDetails' + ProjectResponse: + required: + - Project + - ResponseInfo + type: object + properties: + ResponseInfo: + $ref: '#/components/schemas/ResponseInfo' + Project: + type: array + items: + $ref: '#/components/schemas/Project' + TotalCount: + type: integer + format: int32 + ResponseInfo: + type: object + properties: + apiId: + type: string + ver: + type: string + ts: + type: integer + format: int64 + resMsgId: + type: string + msgId: + type: string + status: + type: string + Target: + type: object + properties: + id: + type: string + beneficiaryType: + type: string + totalNo: + type: integer + format: int32 + targetNo: + type: integer + format: int32 + isDeleted: + type: boolean + auditDetails: + $ref: '#/components/schemas/AuditDetails' + ProjectRequest: + required: + - Projects + - RequestInfo + type: object + properties: + RequestInfo: + $ref: '#/components/schemas/RequestInfo' + Projects: + maxItems: 2147483647 + minItems: 1 + type: array + items: + $ref: '#/components/schemas/Project' + isCascadingProjectDateUpdate: + type: boolean + apiOperation: + type: string + enum: + - CREATE + - UPDATE + - DELETE + AdditionalFields: + type: object + properties: + schema: + maxLength: 64 + minLength: 2 + type: string + version: + minimum: 1 + type: integer + format: int32 + fields: + type: array + items: + $ref: '#/components/schemas/Field' + Field: + required: + - key + - value + type: object + properties: + key: + maxLength: 64 + minLength: 2 + type: string + value: + maxLength: 10000 + minLength: 1 + type: string + Task: + required: + - projectId + - status + - tenantId + type: object + properties: + id: + maxLength: 64 + minLength: 2 + type: string + tenantId: + maxLength: 1000 + minLength: 2 + type: string + source: + type: string + rowVersion: + type: integer + format: int32 + applicationId: + type: string + hasErrors: + type: boolean + additionalFields: + $ref: '#/components/schemas/AdditionalFields' + auditDetails: + $ref: '#/components/schemas/AuditDetails' + clientReferenceId: + maxLength: 64 + minLength: 2 + type: string + clientAuditDetails: + $ref: '#/components/schemas/AuditDetails' + projectId: + maxLength: 64 + minLength: 2 + type: string + projectBeneficiaryId: + maxLength: 64 + minLength: 2 + type: string + projectBeneficiaryClientReferenceId: + maxLength: 64 + minLength: 2 + type: string + resources: + type: array + items: + $ref: '#/components/schemas/TaskResource' + plannedStartDate: + type: integer + format: int64 + plannedEndDate: + type: integer + format: int64 + actualStartDate: + type: integer + format: int64 + actualEndDate: + type: integer + format: int64 + createdBy: + type: string + createdDate: + type: integer + format: int64 + address: + $ref: '#/components/schemas/Address' + isDeleted: + type: boolean + status: + type: string + enum: + - ADMINISTRATION_FAILED + - ADMINISTRATION_SUCCESS + - BENEFICIARY_REFUSED + - CLOSED_HOUSEHOLD + - DELIVERED + - NOT_ADMINISTERED + TaskBulkRequest: + required: + - RequestInfo + - Tasks + type: object + properties: + RequestInfo: + $ref: '#/components/schemas/RequestInfo' + Tasks: + maxItems: 2147483647 + minItems: 1 + type: array + items: + $ref: '#/components/schemas/Task' + TaskResource: + required: + - isDelivered + - productVariantId + - quantity + - tenantId + type: object + properties: + id: + maxLength: 64 + minLength: 2 + type: string + tenantId: + type: string + clientReferenceId: + maxLength: 64 + minLength: 2 + type: string + taskId: + maxLength: 64 + minLength: 2 + type: string + productVariantId: + maxLength: 64 + minLength: 2 + type: string + quantity: + type: number + format: double + isDelivered: + type: boolean + deliveryComment: + maxLength: 1000 + minLength: 0 + type: string + isDeleted: + type: boolean + auditDetails: + $ref: '#/components/schemas/AuditDetails' + additionalFields: + $ref: '#/components/schemas/AdditionalFields' + TaskRequest: + required: + - RequestInfo + - Task + type: object + properties: + RequestInfo: + $ref: '#/components/schemas/RequestInfo' + Task: + $ref: '#/components/schemas/Task' + TaskResponse: + required: + - ResponseInfo + - Task + type: object + properties: + ResponseInfo: + $ref: '#/components/schemas/ResponseInfo' + Task: + $ref: '#/components/schemas/Task' + TaskSearch: + type: object + properties: + id: + type: array + items: + type: string + clientReferenceId: + type: array + items: + type: string + projectId: + type: array + items: + type: string + projectBeneficiaryId: + type: array + items: + type: string + projectBeneficiaryClientReferenceId: + type: array + items: + type: string + plannedStartDate: + type: integer + format: int64 + plannedEndDate: + type: integer + format: int64 + actualStartDate: + type: integer + format: int64 + actualEndDate: + type: integer + format: int64 + createdBy: + type: string + status: + type: string + boundaryCode: + type: string + TaskSearchRequest: + required: + - RequestInfo + - Task + type: object + properties: + RequestInfo: + $ref: '#/components/schemas/RequestInfo' + Task: + $ref: '#/components/schemas/TaskSearch' + TaskBulkResponse: + required: + - ResponseInfo + - Tasks + type: object + properties: + ResponseInfo: + $ref: '#/components/schemas/ResponseInfo' + TotalCount: + type: integer + format: int64 + Tasks: + type: array + items: + $ref: '#/components/schemas/Task' + ProjectStaff: + required: + - projectId + - tenantId + - userId + type: object + properties: + id: + maxLength: 64 + minLength: 2 + type: string + tenantId: + maxLength: 1000 + minLength: 2 + type: string + source: + type: string + rowVersion: + type: integer + format: int32 + applicationId: + type: string + hasErrors: + type: boolean + additionalFields: + $ref: '#/components/schemas/AdditionalFields' + auditDetails: + $ref: '#/components/schemas/AuditDetails' + userId: + maxLength: 64 + minLength: 2 + type: string + projectId: + maxLength: 64 + minLength: 2 + type: string + startDate: + type: integer + format: int64 + endDate: + type: integer + format: int64 + channel: + maxLength: 64 + minLength: 2 + type: string + isDeleted: + type: boolean + ProjectStaffBulkRequest: + required: + - ProjectStaff + - RequestInfo + type: object + properties: + RequestInfo: + $ref: '#/components/schemas/RequestInfo' + ProjectStaff: + maxItems: 2147483647 + minItems: 1 + type: array + items: + $ref: '#/components/schemas/ProjectStaff' + ProjectStaffRequest: + required: + - ProjectStaff + - RequestInfo + type: object + properties: + RequestInfo: + $ref: '#/components/schemas/RequestInfo' + ProjectStaff: + $ref: '#/components/schemas/ProjectStaff' + ProjectStaffResponse: + required: + - ProjectStaff + - ResponseInfo + type: object + properties: + ResponseInfo: + $ref: '#/components/schemas/ResponseInfo' + ProjectStaff: + $ref: '#/components/schemas/ProjectStaff' + ProjectStaffSearch: + type: object + properties: + id: + type: array + items: + type: string + staffId: + type: array + items: + type: string + projectId: + type: array + items: + type: string + startDate: + type: integer + format: int64 + endDate: + type: integer + format: int64 + ProjectStaffSearchRequest: + required: + - ProjectStaff + - RequestInfo + type: object + properties: + RequestInfo: + $ref: '#/components/schemas/RequestInfo' + ProjectStaff: + $ref: '#/components/schemas/ProjectStaffSearch' + ProjectStaffBulkResponse: + required: + - ProjectStaff + - ResponseInfo + type: object + properties: + ResponseInfo: + $ref: '#/components/schemas/ResponseInfo' + ProjectStaff: + type: array + items: + $ref: '#/components/schemas/ProjectStaff' + TotalCount: + type: integer + format: int64 + ProjectFacility: + required: + - facilityId + - projectId + - tenantId + type: object + properties: + id: + maxLength: 64 + minLength: 2 + type: string + tenantId: + maxLength: 1000 + minLength: 2 + type: string + source: + type: string + rowVersion: + type: integer + format: int32 + applicationId: + type: string + hasErrors: + type: boolean + additionalFields: + $ref: '#/components/schemas/AdditionalFields' + auditDetails: + $ref: '#/components/schemas/AuditDetails' + facilityId: + maxLength: 64 + minLength: 2 + type: string + projectId: + maxLength: 64 + minLength: 2 + type: string + isDeleted: + type: boolean + ProjectFacilityBulkRequest: + required: + - ProjectFacilities + - RequestInfo + type: object + properties: + RequestInfo: + $ref: '#/components/schemas/RequestInfo' + ProjectFacilities: + maxItems: 2147483647 + minItems: 1 + type: array + items: + $ref: '#/components/schemas/ProjectFacility' + ProjectFacilityRequest: + required: + - ProjectFacility + - RequestInfo + type: object + properties: + RequestInfo: + $ref: '#/components/schemas/RequestInfo' + ProjectFacility: + $ref: '#/components/schemas/ProjectFacility' + ProjectFacilityResponse: + required: + - ProjectFacility + - ResponseInfo + type: object + properties: + ResponseInfo: + $ref: '#/components/schemas/ResponseInfo' + ProjectFacility: + $ref: '#/components/schemas/ProjectFacility' + ProjectFacilitySearch: + type: object + properties: + id: + type: array + items: + type: string + facilityId: + type: array + items: + type: string + projectId: + type: array + items: + type: string + ProjectFacilitySearchRequest: + required: + - ProjectFacility + - RequestInfo + type: object + properties: + RequestInfo: + $ref: '#/components/schemas/RequestInfo' + ProjectFacility: + $ref: '#/components/schemas/ProjectFacilitySearch' + ProjectFacilityBulkResponse: + required: + - ProjectFacilities + - ResponseInfo + type: object + properties: + ResponseInfo: + $ref: '#/components/schemas/ResponseInfo' + TotalCount: + type: integer + format: int64 + ProjectFacilities: + type: array + items: + $ref: '#/components/schemas/ProjectFacility' + BeneficiaryBulkRequest: + required: + - ProjectBeneficiaries + - RequestInfo + type: object + properties: + RequestInfo: + $ref: '#/components/schemas/RequestInfo' + ProjectBeneficiaries: + maxItems: 2147483647 + minItems: 1 + type: array + items: + $ref: '#/components/schemas/ProjectBeneficiary' + ProjectBeneficiary: + required: + - projectId + - tenantId + type: object + properties: + id: + maxLength: 64 + minLength: 2 + type: string + tenantId: + maxLength: 1000 + minLength: 2 + type: string + source: + type: string + rowVersion: + type: integer + format: int32 + applicationId: + type: string + hasErrors: + type: boolean + additionalFields: + $ref: '#/components/schemas/AdditionalFields' + auditDetails: + $ref: '#/components/schemas/AuditDetails' + clientReferenceId: + maxLength: 64 + minLength: 2 + type: string + clientAuditDetails: + $ref: '#/components/schemas/AuditDetails' + projectId: + maxLength: 64 + minLength: 2 + type: string + beneficiaryId: + maxLength: 64 + minLength: 2 + type: string + dateOfRegistration: + minimum: 0 + type: integer + format: int64 + beneficiaryClientReferenceId: + maxLength: 64 + minLength: 2 + type: string + isDeleted: + type: boolean + tag: + type: string + BeneficiaryRequest: + required: + - ProjectBeneficiary + - RequestInfo + type: object + properties: + RequestInfo: + $ref: '#/components/schemas/RequestInfo' + ProjectBeneficiary: + $ref: '#/components/schemas/ProjectBeneficiary' + BeneficiaryResponse: + required: + - ResponseInfo + type: object + properties: + ResponseInfo: + $ref: '#/components/schemas/ResponseInfo' + ProjectBeneficiary: + $ref: '#/components/schemas/ProjectBeneficiary' + BeneficiarySearchRequest: + required: + - RequestInfo + type: object + properties: + RequestInfo: + $ref: '#/components/schemas/RequestInfo' + ProjectBeneficiary: + $ref: '#/components/schemas/ProjectBeneficiarySearch' + ProjectBeneficiarySearch: + type: object + properties: + id: + type: array + items: + type: string + clientReferenceId: + type: array + items: + type: string + projectId: + type: array + items: + type: string + beneficiaryId: + type: array + items: + type: string + dateOfRegistration: + type: integer + format: int64 + tag: + type: array + items: + type: string + BeneficiaryBulkResponse: + required: + - ResponseInfo + type: object + properties: + ResponseInfo: + $ref: '#/components/schemas/ResponseInfo' + TotalCount: + type: integer + format: int64 + ProjectBeneficiaries: + type: array + items: + $ref: '#/components/schemas/ProjectBeneficiary' diff --git a/docs/health-api-specs/contracts/referral-management.yml b/docs/health-api-specs/contracts/referral-management.yml index af73191c0e1..56f49f321dd 100644 --- a/docs/health-api-specs/contracts/referral-management.yml +++ b/docs/health-api-specs/contracts/referral-management.yml @@ -1,810 +1,1891 @@ -swagger: '2.0' +openapi: 3.0.1 info: - version: 1.0.0 - title: Referral Management System - contact: - name: egovernments foundation - email: info@egovernments.org -schemes: - - https -x-common-path: https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-0-0.yml + title: Referral Management System + version: v1.6 +servers: + - url: https://unified-dev.digit.org + description: Development server url paths: /referralmanagement/beneficiary-downsync/v1/_get: post: + tags: + - Beneficiary Downsync summary: Downsync beneficiary details for a Project description: when data created by a different registar needs to be downsynced by another registar/device, this api will serve as a one point search for benefeiciary details - parameters: - - name: Downsync - in: body - description: Downsync of registry based on area. - required: true - schema: - $ref: '#/definitions/DownsyncRequest' + operationId: getBeneficaryData + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DownsyncRequest' + required: true + responses: + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/DownsyncResponse' + '400': + description: Invalid Input body. + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + + /referralmanagement/v1/_create: + post: tags: - - Beneficiary Downsync + - Referral + summary: Create referral for the project beneficiary + description: Create referral for the project benefiaciary + operationId: referralV1CreatePost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ReferralRequest' + required: true + responses: + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ReferralResponse' + '400': + description: Invalid Input body. + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + /referralmanagement/v1/bulk/_create: + post: + tags: + - Referral + summary: Create referrals for the project beneficiary in bulk + description: Create referrals for the project beneficiary in bulk + operationId: referralBulkV1CreatePost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ReferralBulkRequest' + required: true + responses: + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ResponseInfo' + '400': + description: Invalid Input body. + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + /referralmanagement/v1/_update: + post: + tags: + - Referral + summary: Referral Update + description: Referral Update + operationId: referralV1UpdatePost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ReferralRequest' + required: true + responses: + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ReferralResponse' + '400': + description: Invalid Input body. + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + /referralmanagement/v1/bulk/_update: + post: + tags: + - Referral + summary: Referral Update in bulk for a project beneficiary + description: Referral Update in bulk for a project beneficiary + operationId: referralV1BulkUpdatePost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ReferralBulkRequest' + required: true + responses: + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ResponseInfo' + '400': + description: Invalid Input body. + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + /referralmanagement/v1/_delete: + post: + tags: + - Referral + summary: Soft delete Referral for a project beneficiary + description: Soft delete Referral for a project beneficiary + operationId: referralV1DeletePost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ReferralRequest' + required: true + responses: + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ReferralResponse' + '400': + description: Invalid Input body. + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + /referralmanagement/v1/bulk/_delete: + post: + tags: + - Referral + summary: Soft delete Referrals for a project beneficiary + description: Soft delete Referrals for a project beneficiary + operationId: referralV1BulkDeletePost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ReferralBulkRequest' + required: true responses: '200': - description: Downsync. - schema: - $ref: '#/definitions/DownsyncResponse' + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ResponseInfo' '400': description: Invalid Input body. - schema: - $ref: https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + /referralmanagement/v1/_search: + post: + tags: + - Referral + summary: Search Referral for Project + description: Search Referral for Project + operationId: referralV1SearchPost + requestBody: + content: + application/json: + schema: + type: object + properties: + urlParams: + $ref: '#/components/schemas/URLParams' + referralSearchRequest: + $ref: '#/components/schemas/ReferralSearchRequest' + required: true + responses: + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ReferralBulkResponse' + '400': + description: Invalid Input body. + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes /referralmanagement/side-effect/v1/_create: post: - summary: Create side effect for the project - description: Create side effect for the project - parameters: - - name: SideEffect - in: body - description: Capture details of Side Effect - required: true - schema: - $ref: '#/definitions/SideEffectRequest' tags: - Side Effect + summary: Create side effect for the project + description: Create side effect for the project + operationId: sideEffectV1CreatePost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SideEffectRequest' + required: true responses: - '202': - description: Create side effect request has been accepted for creation. - schema: - $ref: '#/definitions/SideEffectResponse' + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/SideEffectResponse' '400': description: Invalid Input body. - schema: - $ref: https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes /referralmanagement/side-effect/v1/bulk/_create: post: - summary: Create side effects for the project in bulk - description: Create side effects for the project in bulk - parameters: - - name: SideEffect - in: body - description: Capture details of Task - required: true - schema: - $ref: '#/definitions/SideEffectBulkRequest' tags: - Side Effect + summary: Create side effects for the project in bulk + description: Create side effects for the project in bulk + operationId: sideEffectBulkV1CreatePost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SideEffectBulkRequest' + required: true responses: - '202': - description: Create side effect request has been accepted for creation. - schema: - $ref: '#/definitions/BulkAcceptedResponse' + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ResponseInfo' '400': description: Invalid Input body. - schema: - $ref: https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes /referralmanagement/side-effect/v1/_update: post: - summary: Side Effect Request - description: Side Effect Request - parameters: - - name: SideEffect - in: body - description: Capture details of Existing side effect - required: true - schema: - $ref: '#/definitions/SideEffectRequest' tags: - Side Effect + summary: Side Effect Request + description: Side Effect Request + operationId: sideEffectV1UpdatePost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SideEffectRequest' + required: true responses: - '202': - description: update side effect request has been accepted for update. - schema: - $ref: '#/definitions/SideEffectResponse' + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/SideEffectResponse' '400': description: Invalid Input body. - schema: - $ref: https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes /referralmanagement/side-effect/v1/bulk/_update: post: - summary: Side Effect Request in bulk for a project - description: Side Effect Request in bulk for a project - parameters: - - name: SideEffect - in: body - description: Capture details of Existing Side Effects - required: true - schema: - $ref: '#/definitions/SideEffectBulkRequest' tags: - Side Effect + summary: Side Effect Request in bulk for a project + description: Side Effect Request in bulk for a project + operationId: sideEffectV1BulkUpdatePost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SideEffectBulkRequest' + required: true responses: - '202': - description: update Side Effects bulk request has been accepted for update. - schema: - $ref: '#/definitions/BulkAcceptedResponse' + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ResponseInfo' '400': description: Invalid Input body. - schema: - $ref: https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes /referralmanagement/side-effect/v1/_delete: post: - summary: Soft delete Side Effect for a project - description: Soft delete Side Effect for a project - parameters: - - name: SideEffect - in: body - description: Capture details of Existing Side Effect - required: true - schema: - $ref: '#/definitions/SideEffectRequest' tags: - Side Effect + summary: Soft delete Side Effect for a project + description: Soft delete Side Effect for a project + operationId: sideEffectV1DeletePost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SideEffectRequest' + required: true responses: - '202': - description: delete Side Effect request has been accepted for deletion. - schema: - $ref: '#/definitions/SideEffectResponse' + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/SideEffectResponse' '400': description: Invalid Input body. - schema: - $ref: https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes /referralmanagement/side-effect/v1/bulk/_delete: post: - summary: Soft delete Side Effects for a project - description: Soft delete Side Effects for a project - parameters: - - name: SideEffect - in: body - description: Capture details of Existing Side Effect - required: true - schema: - $ref: '#/definitions/SideEffectRequest' tags: - Side Effect + summary: Soft delete Side Effects for a project + description: Soft delete Side Effects for a project + operationId: sideEffectV1BulkDeletePost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SideEffectBulkRequest' + required: true responses: - '202': - description: delete bulk Side Effect request has been accepted for deletion. - schema: - $ref: '#/definitions/BulkAcceptedResponse' + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ResponseInfo' '400': description: Invalid Input body. - schema: - $ref: https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes /referralmanagement/side-effect/v1/_search: post: - summary: Search Side Effect for Project - description: Search Side Effect for Project - parameters: - - name: SideEffect - in: body - description: Side Effect Search. - required: true - schema: - $ref: '#/definitions/SideEffectSearchRequest' - - $ref: '#/parameters/limit' - - $ref: '#/parameters/offset' - - $ref: '#/parameters/tenantId' - - $ref: '#/parameters/lastChangedSince' - - $ref: '#/parameters/includeDeleted' tags: - Side Effect + summary: Search Side Effect for Project + description: Search Side Effect for Project + operationId: sideEffectV1SearchPost + requestBody: + content: + application/json: + schema: + type: object + properties: + urlParams: + $ref: '#/components/schemas/URLParams' + request: + $ref: '#/components/schemas/SideEffectSearchRequest' + required: true responses: '200': - description: Side Effects. - schema: - $ref: '#/definitions/SideEffectBulkResponse' + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/SideEffectBulkResponse' '400': description: Invalid Input body. - schema: - $ref: https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - /referralmanagement/v1/_create: + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + /referralmanagement/hf-referral/v1/_create: post: - summary: Create referral for the project beneficiary - description: Create referral for the project benefiaciary - parameters: - - name: Referral - in: body - description: Capture details of Referral - required: true - schema: - $ref: '#/definitions/ReferralRequest' tags: - - Referral + - HF Refferal + summary: Create a new Health Facility Referral + description: API to create a new health facility referral for individuals. + operationId: referralV1CreatePost_1 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/HFReferralRequest' + required: true responses: - '202': - description: Create referral request has been accepted for creation. - schema: - $ref: '#/definitions/ReferralResponse' + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/HFReferralResponse' '400': description: Invalid Input body. - schema: - $ref: https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - /referralmanagement/v1/bulk/_create: + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + /referralmanagement/hf-referral/v1/bulk/_create: post: - summary: Create referrals for the project beneficiary in bulk - description: Create referrals for the project beneficiary in bulk - parameters: - - name: Referral - in: body - description: Capture details of Task - required: true - schema: - $ref: '#/definitions/ReferralBulkRequest' tags: - - Referral + - HF Refferal + summary: Create multiple Health Facility Referrals + description: API to bulk create health facility referrals. + operationId: referralBulkV1CreatePost_1 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/HFReferralBulkRequest' + required: true responses: - '202': - description: Create referral request has been accepted for creation. - schema: - $ref: '#/definitions/BulkAcceptedResponse' + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ResponseInfo' '400': description: Invalid Input body. - schema: - $ref: https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - /referralmanagement/v1/_update: + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + /referralmanagement/hf-referral/v1/_update: post: - summary: Referral Request - description: Referral Request - parameters: - - name: Referral - in: body - description: Capture details of Existing referral - required: true - schema: - $ref: '#/definitions/ReferralRequest' tags: - - Referral + - HF Refferal + summary: Update a Health Facility Referral + description: API to update details of an existing health facility referral. + operationId: referralV1UpdatePost_1 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/HFReferralRequest' + required: true responses: - '202': - description: update referral request has been accepted for update. - schema: - $ref: '#/definitions/ReferralResponse' + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/HFReferralResponse' '400': description: Invalid Input body. - schema: - $ref: https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - /referralmanagement/v1/bulk/_update: + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + /referralmanagement/hf-referral/v1/bulk/_update: post: - summary: Referral Request in bulk for a project beneficiary - description: Referral Request in bulk for a project beneficiary - parameters: - - name: Referral - in: body - description: Capture details of Existing Referrals - required: true - schema: - $ref: '#/definitions/ReferralBulkRequest' tags: - - Referral + - HF Refferal + summary: Update multiple Health Facility Referrals + description: API to bulk update health facility referrals. + operationId: referralV1BulkUpdatePost_1 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/HFReferralBulkRequest' + required: true responses: - '202': - description: update Referrals bulk request has been accepted for update. - schema: - $ref: '#/definitions/BulkAcceptedResponse' + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ResponseInfo' '400': description: Invalid Input body. - schema: - $ref: https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - /referralmanagement/v1/_delete: + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + /referralmanagement/hf-referral/v1/_delete: post: - summary: Soft delete Referral for a project beneficiary - description: Soft delete Referral for a project beneficiary - parameters: - - name: Referral - in: body - description: Capture details of Existing Referral - required: true - schema: - $ref: '#/definitions/ReferralRequest' tags: - - Referral + - HF Refferal + summary: Delete a Health Facility Referral + description: API to delete an existing health facility referral. + operationId: referralV1DeletePost_1 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/HFReferralRequest' + required: true responses: - '202': - description: delete Referral request has been accepted for deletion. - schema: - $ref: '#/definitions/ReferralResponse' + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/HFReferralResponse' '400': description: Invalid Input body. - schema: - $ref: https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - /referralmanagement/v1/bulk/_delete: + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + + /referralmanagement/hf-referral/v1/bulk/_delete: post: - summary: Soft delete Referrals for a project beneficiary - description: Soft delete Referrals for a project beneficiary - parameters: - - name: Referral - in: body - description: Capture details of Existing Referral - required: true - schema: - $ref: '#/definitions/ReferralRequest' tags: - - Referral + - HF Refferal + summary: Delete multiple Health Facility Referrals + description: API to bulk delete health facility referrals. + operationId: referralV1BulkDeletePost_1 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/HFReferralBulkRequest' + required: true responses: - '202': - description: delete bulk Referral request has been accepted for deletion. - schema: - $ref: '#/definitions/BulkAcceptedResponse' + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ResponseInfo' '400': description: Invalid Input body. - schema: - $ref: https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - /referralmanagement/v1/_search: + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + /referralmanagement/hf-referral/v1/_search: post: - summary: Search Referral for Project - description: Search Referral for Project - parameters: - - name: Referral - in: body - description: Referral Search. - required: true - schema: - $ref: '#/definitions/ReferralSearchRequest' - - $ref: '#/parameters/limit' - - $ref: '#/parameters/offset' - - $ref: '#/parameters/tenantId' - - $ref: '#/parameters/lastChangedSince' - - $ref: '#/parameters/includeDeleted' tags: - - Referral + - HF Refferal + summary: Search Health Facility Referrals + description: API to search for health facility referrals based on given criteria. + operationId: referralV1SearchPost_1 + requestBody: + content: + application/json: + schema: + type: object + properties: + urlParams: + $ref: '#/components/schemas/URLParams' + request: + $ref: '#/components/schemas/HFReferralSearchRequest' + required: true responses: '200': - description: Referrals. - schema: - $ref: '#/definitions/ReferralBulkResponse' + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/HFReferralBulkResponse' '400': description: Invalid Input body. - schema: - $ref: https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - -parameters: - tenantId: - name: tenantId - in: query - description: Unique id for a tenant. - required: true - type: string - format: varchar - lastChangedSince: - name: lastChangedSince - description: | - epoch of the time since when the changes on the object should be picked up. Search results from this parameter should include both newly created objects since this time as well as any modified objects since this time. This criterion is included to help polling clients to get the changes in system since a last time they synchronized with the platform. - in: query - required: false - type: integer - format: int64 - echoResource: - name: echoResource - in: query - type: boolean - required: false - default: true - description: Client can specify if the resource in request body needs to be sent back in the response. This is being used to limit amount of data that needs to flow back from the server to the client in low bandwidth scenarios. Server will always send the server generated id for validated requests. - serverHandlesErrors: - name: serverHandlesErrors - in: query - type: boolean - required: false - default: false - description: Client can specify that it is incapable of handling any errors with the requests and server should route these for manual intervention if required. - limit: - name: limit - description: Pagination - limit records in response - in: query - type: integer - minimum: 0 - maximum: 1000 - required: true - offset: - name: offset - description: Pagination - offset from which records should be returned in response - in: query - type: integer - minimum: 0 - required: true - includeDeleted: - name: includeDeleted - description: Used in search APIs to specify if (soft) deleted records should be included in search results. - in: query - type: boolean - default: false - required: false - includeEnded: - name: includeEnded - description: Used in project search API to specify if records past end date should be included in search results. - in: query - type: boolean - default: false - required: false - includeAncestors: - name: includeAncestors - description: Used in project search API to specify if response should include project elements that are in the preceding hierarchy of matched projects. - in: query - type: boolean - default: false - required: false - includeDescendants: - name: includeDescendants - description: Used in project search API to specify if response should include project elements that are in the following hierarchy of matched projects. - in: query - type: boolean - default: false - required: false - createdFrom: - name: createdFrom - description: | - Used in project search API to limit the search results to only those projects whose creation date is after the specified 'createdFrom' date. - in: query - required: false - type: integer - format: int64 - createdTo: - name: createdTo - description: | - Used in project search API to limit the search results to only those projects whose creation date is before the specified 'createdTo' date. - in: query - required: false - type: integer - format: int64 -definitions: - boundaryCode: - $ref: https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/boundaryCode - id: - $ref: https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/id - idForSearch: - $ref: https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/idForSearch - clientReferenceIdForSearch: - $ref: https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/clientReferenceIdForSearch - clientReferenceId: - $ref: https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/clientReferenceId - tenantId: - $ref: https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/tenantId - eventTimestamp: - $ref: https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/eventTimestamp - isDeleted: - $ref: https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/isDeleted - rowVersion: - $ref: https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/rowVersion - apiOperation: - $ref: https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/apiOperation - additionalFields: - $ref: https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/additionalFields - Address: - $ref: https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/Address - SideEffect: - type: object - required: - - tenantId - - taskId - - symptoms - properties: - id: - $ref: '#/definitions/id' - clientReferenceId: - $ref: '#/definitions/clientReferenceId' - tenantId: - $ref: '#/definitions/tenantId' - taskId: - type: string - minLength: 2 - maxLength: 64 - description: Unique TaskId - taskClientReferenceId: - type: string - example: R-ID-1 - description: Unique Task Client Reference Id - projectBeneficiaryId: - type: string - minLength: 2 - maxLength: 64 - description: Project Beneficiary Id - projectBeneficiaryClientReferenceId: - type: string - minLength: 2 - maxLength: 64 - description: Project Beneficiary Client Reference Id - symptoms: - type: array - items: - type: string - additionalFields: - $ref: '#/definitions/additionalFields' - isDeleted: - $ref: '#/definitions/isDeleted' - rowVersion: - $ref: '#/definitions/rowVersion' - auditDetails: - $ref: https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/AuditDetails - clientAuditDetails: - $ref: https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/AuditDetails - SideEffectRequest: - type: object - properties: - RequestInfo: - $ref: https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/RequestInfo - SideEffect: - type: object - $ref: '#/definitions/SideEffect' - required: - - RequestInfo - - SideEffect - SideEffectBulkRequest: - type: object - properties: - RequestInfo: - $ref: https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/RequestInfo - SideEffects: - type: array - minItems: 1 - items: - $ref: '#/definitions/SideEffect' - required: - - RequestInfo - - SideEffects - SideEffectSearch: - type: object - properties: - id: - $ref: '#/definitions/idForSearch' - clientReferenceId: - $ref: '#/definitions/clientReferenceIdForSearch' - taskId: - type: array - items: - type: string - minLength: 2 - maxLength: 64 - description: Unique TaskId - taskClientReferenceId: - type: array - items: - type: string - example: R-ID-1 - SideEffectSearchRequest: - type: object - properties: - RequestInfo: - $ref: https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/RequestInfo - SideEffect: - $ref: '#/definitions/SideEffectSearch' - required: - - RequestInfo - - SideEffect - SideEffectResponse: - type: object - properties: - ResponseInfo: - $ref: https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ResponseInfo - SideEffect: - type: object - $ref: '#/definitions/SideEffect' - required: - - ResponseInfo - - SideEffect - SideEffectBulkResponse: - type: object - properties: - ResponseInfo: - $ref: https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ResponseInfo - SideEffects: - type: array - items: - $ref: '#/definitions/SideEffect' - required: - - ResponseInfo - - SideEffects - Referral: - type: object - required: - - tenantId - properties: - id: - $ref: '#/definitions/id' - clientReferenceId: - $ref: '#/definitions/clientReferenceId' - tenantId: - $ref: '#/definitions/tenantId' - projectBeneficiaryId: - type: string - minLength: 2 - maxLength: 64 - description: Project Beneficiary Id - projectBeneficiaryClientReferenceId: - type: string - minLength: 2 - maxLength: 64 - description: Project Beneficiary Client Reference Id - referrerId: - type: string - minLength: 2 - maxLength: 64 - description: Worker Id that is referring the Beneficiary - recipientId: - type: string - minLength: 2 - maxLength: 64 - description: Individual or Facility Id whom the Beneficiary is referred to. - recipientType: - type: string - description: Individual or Facility - reasons: - type: array - items: - type: string - sideEffect: - $ref: '#/definitions/SideEffect' - additionalFields: - $ref: '#/definitions/additionalFields' - isDeleted: - $ref: '#/definitions/isDeleted' - rowVersion: - $ref: '#/definitions/rowVersion' - auditDetails: - $ref: https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/AuditDetails - clientAuditDetails: - $ref: https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/AuditDetails - ReferralRequest: - type: object - properties: - RequestInfo: - $ref: https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/RequestInfo - Referral: - type: object - $ref: '#/definitions/Referral' - required: - - RequestInfo - - Referral - ReferralBulkRequest: - type: object - properties: - RequestInfo: - $ref: https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/RequestInfo - Referrals: - type: array - minItems: 1 - items: - $ref: '#/definitions/Referral' - required: - - RequestInfo - - Referrals - ReferralSearch: - type: object - properties: - id: - $ref: '#/definitions/idForSearch' - clientReferenceId: - $ref: '#/definitions/clientReferenceIdForSearch' - projectBeneficiaryId: - type: array - items: - type: string - projectBeneficiaryClientReferenceId: - type: array - items: - type: string - sideEffectId: - type: array - items: - type: string - sideEffectClientReferenceId: - type: array - items: - type: string - referrerId: - type: array - items: - type: string - recipientId: - type: array - items: - type: string - - - ReferralSearchRequest: - type: object - properties: - RequestInfo: - $ref: https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/RequestInfo - Referral: - $ref: '#/definitions/ReferralSearch' - required: - - RequestInfo - - Referral - ReferralResponse: - type: object - properties: - ResponseInfo: - $ref: https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ResponseInfo - Referral: - type: object - $ref: '#/definitions/Referral' - required: - - ResponseInfo - - Referral - ReferralBulkResponse: - type: object - properties: - ResponseInfo: - $ref: https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ResponseInfo - Referrals: - type: array - items: - $ref: '#/definitions/Referral' - required: - - ResponseInfo - - Referrals - BulkAcceptedResponse: - type: object - properties: - ResponseInfo: - $ref: https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ResponseInfo - required: - - ResponseInfo - - DownsyncRequest: - type: object - properties: - RequestInfo: - $ref: https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/RequestInfo - DownsyncCriteria: - $ref: '#/definitions/DownsyncCriteria' - required: - - RequestInfo - - DownsyncCriteria - DownsyncResponse: - type: object - properties: - ResponseInfo: - $ref: https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ResponseInfo - Downsync: - $ref: '#/definitions/Downsync' - required: - - ResponseInfo - - Downsync - DownsyncCriteria: - type: object - properties: - locality: - type: string - description: locality/boundary code from which all beneficiary has to be downloaded - totalCount: - type: [null,long] - description: totalCount - tenantId: - $ref: '#/parameters/tenantId' - offset: - $ref: '#/parameters/offset' - limit: - $ref: '#/parameters/limit' - lastSyncedTime: - $ref: '#/parameters/lastChangedSince' - includeDeleted: - $ref: '#/parameters/includeDeleted' - Downsync: - type: object - properties: - DownsyncCriteria: - $ref: '#/definitions/DownsyncCriteria' - Households: - type: array - items: - $ref: https://raw.githubusercontent.com/egovernments/health-api-specs/main/contracts/registries/household.yml#/definitions/Household - HouseholdMembers: - type: array - items: - $ref: https://raw.githubusercontent.com/egovernments/health-api-specs/main/contracts/registries/household.yml#/definitions/HouseholdMember - Individuals: - type: array - items: - $ref: https://raw.githubusercontent.com/egovernments/health-api-specs/main/contracts/registries/individual.yml#/definitions/Individual - ProjectBeneficiaries: - type: array - items: - $ref: https://raw.githubusercontent.com/egovernments/health-api-specs/main/contracts/project.yml#/definitions/ProjectBeneficiary - Tasks: - type: array - items: - $ref: https://raw.githubusercontent.com/egovernments/health-api-specs/main/contracts/project.yml#/definitions/Task - SideEffects: - type: array - items: - $ref: '#/definitions/SideEffect' - Referrals: - type: array - items: - $ref: '#/definitions/Referral' + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes +components: + schemas: + AdditionalFields: + type: object + properties: + schema: + maxLength: 64 + minLength: 2 + type: string + version: + minimum: 1 + type: integer + format: int32 + fields: + type: array + items: + $ref: '#/components/schemas/Field' + AuditDetails: + type: object + properties: + createdBy: + type: string + lastModifiedBy: + type: string + createdTime: + type: integer + format: int64 + lastModifiedTime: + type: integer + format: int64 + Field: + required: + - key + - value + type: object + properties: + key: + maxLength: 64 + minLength: 2 + type: string + value: + maxLength: 10000 + minLength: 1 + type: string + PlainAccessRequest: + type: object + properties: + recordId: + type: string + plainRequestFields: + type: array + items: + type: string + Referral: + required: + - reasons + - tenantId + type: object + properties: + id: + maxLength: 64 + minLength: 2 + type: string + tenantId: + maxLength: 1000 + minLength: 2 + type: string + source: + type: string + rowVersion: + type: integer + format: int32 + applicationId: + type: string + hasErrors: + type: boolean + additionalFields: + $ref: '#/components/schemas/AdditionalFields' + auditDetails: + $ref: '#/components/schemas/AuditDetails' + clientReferenceId: + maxLength: 64 + minLength: 2 + type: string + clientAuditDetails: + $ref: '#/components/schemas/AuditDetails' + projectBeneficiaryId: + maxLength: 64 + minLength: 2 + type: string + projectBeneficiaryClientReferenceId: + maxLength: 64 + minLength: 2 + type: string + referrerId: + maxLength: 64 + minLength: 2 + type: string + recipientType: + type: string + recipientId: + maxLength: 64 + minLength: 2 + type: string + reasons: + maxItems: 2147483647 + minItems: 1 + type: array + items: + type: string + referralCode: + maxLength: 100 + minLength: 0 + type: string + sideEffect: + $ref: '#/components/schemas/SideEffect' + isDeleted: + type: boolean + ReferralBulkRequest: + required: + - Referrals + - RequestInfo + type: object + properties: + RequestInfo: + $ref: '#/components/schemas/RequestInfo' + Referrals: + maxItems: 2147483647 + minItems: 1 + type: array + items: + $ref: '#/components/schemas/Referral' + RequestInfo: + type: object + properties: + apiId: + type: string + ver: + type: string + ts: + type: integer + format: int64 + action: + type: string + did: + type: string + key: + type: string + msgId: + type: string + authToken: + type: string + correlationId: + type: string + plainAccessRequest: + $ref: '#/components/schemas/PlainAccessRequest' + userInfo: + $ref: '#/components/schemas/User' + Role: + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + code: + type: string + tenantId: + type: string + SideEffect: + required: + - symptoms + - taskClientReferenceId + - tenantId + type: object + properties: + id: + maxLength: 64 + minLength: 2 + type: string + tenantId: + maxLength: 1000 + minLength: 2 + type: string + source: + type: string + rowVersion: + type: integer + format: int32 + applicationId: + type: string + hasErrors: + type: boolean + additionalFields: + $ref: '#/components/schemas/AdditionalFields' + auditDetails: + $ref: '#/components/schemas/AuditDetails' + clientReferenceId: + maxLength: 64 + minLength: 2 + type: string + clientAuditDetails: + $ref: '#/components/schemas/AuditDetails' + taskId: + maxLength: 64 + minLength: 2 + type: string + taskClientReferenceId: + maxLength: 64 + minLength: 2 + type: string + projectBeneficiaryId: + maxLength: 64 + minLength: 2 + type: string + projectBeneficiaryClientReferenceId: + maxLength: 64 + minLength: 2 + type: string + symptoms: + maxItems: 2147483647 + minItems: 1 + type: array + items: + type: string + isDeleted: + type: boolean + User: + type: object + properties: + id: + type: integer + format: int64 + userName: + type: string + name: + type: string + type: + type: string + mobileNumber: + type: string + emailId: + type: string + roles: + type: array + items: + $ref: '#/components/schemas/Role' + tenantId: + type: string + uuid: + type: string + ResponseInfo: + type: object + properties: + apiId: + type: string + ver: + type: string + ts: + type: integer + format: int64 + resMsgId: + type: string + msgId: + type: string + status: + type: string + ReferralRequest: + required: + - Referral + - RequestInfo + type: object + properties: + RequestInfo: + $ref: '#/components/schemas/RequestInfo' + Referral: + $ref: '#/components/schemas/Referral' + ReferralResponse: + required: + - Referral + - ResponseInfo + type: object + properties: + ResponseInfo: + $ref: '#/components/schemas/ResponseInfo' + Referral: + $ref: '#/components/schemas/Referral' + URLParams: + required: + - limit + - offset + - tenantId + type: object + properties: + urlparams: + $ref: '#/components/schemas/URLParams' + limit: + maximum: 1000 + minimum: 0 + type: integer + format: int32 + offset: + minimum: 0 + type: integer + format: int32 + tenantId: + type: string + lastChangedSince: + type: integer + format: int64 + includeDeleted: + type: boolean + ReferralSearch: + type: object + properties: + id: + type: array + items: + type: string + clientReferenceId: + type: array + items: + type: string + projectBeneficiaryId: + type: array + items: + type: string + projectBeneficiaryClientReferenceId: + type: array + items: + type: string + sideEffectId: + type: array + items: + type: string + sideEffectClientReferenceId: + type: array + items: + type: string + referrerId: + type: array + items: + type: string + recipientId: + type: array + items: + type: string + ReferralSearchRequest: + required: + - RequestInfo + type: object + properties: + RequestInfo: + $ref: '#/components/schemas/RequestInfo' + Referral: + $ref: '#/components/schemas/ReferralSearch' + ReferralBulkResponse: + required: + - Referrals + - ResponseInfo + type: object + properties: + ResponseInfo: + $ref: '#/components/schemas/ResponseInfo' + TotalCount: + type: integer + format: int64 + Referrals: + type: array + items: + $ref: '#/components/schemas/Referral' + SideEffectBulkRequest: + required: + - RequestInfo + - SideEffects + type: object + properties: + RequestInfo: + $ref: '#/components/schemas/RequestInfo' + SideEffects: + maxItems: 2147483647 + minItems: 1 + type: array + items: + $ref: '#/components/schemas/SideEffect' + SideEffectRequest: + required: + - RequestInfo + - SideEffect + type: object + properties: + RequestInfo: + $ref: '#/components/schemas/RequestInfo' + SideEffect: + $ref: '#/components/schemas/SideEffect' + SideEffectResponse: + required: + - ResponseInfo + - SideEffect + type: object + properties: + ResponseInfo: + $ref: '#/components/schemas/ResponseInfo' + SideEffect: + $ref: '#/components/schemas/SideEffect' + SideEffectSearch: + type: object + properties: + id: + type: array + items: + type: string + clientReferenceId: + type: array + items: + type: string + taskId: + type: array + items: + type: string + taskClientReferenceId: + type: array + items: + type: string + SideEffectSearchRequest: + required: + - RequestInfo + type: object + properties: + RequestInfo: + $ref: '#/components/schemas/RequestInfo' + SideEffect: + $ref: '#/components/schemas/SideEffectSearch' + SideEffectBulkResponse: + required: + - ResponseInfo + - SideEffects + type: object + properties: + ResponseInfo: + $ref: '#/components/schemas/ResponseInfo' + TotalCount: + type: integer + format: int64 + SideEffects: + type: array + items: + $ref: '#/components/schemas/SideEffect' + HFReferral: + required: + - symptom + - tenantId + type: object + properties: + id: + maxLength: 64 + minLength: 2 + type: string + tenantId: + maxLength: 1000 + minLength: 2 + type: string + source: + type: string + rowVersion: + type: integer + format: int32 + applicationId: + type: string + hasErrors: + type: boolean + additionalFields: + $ref: '#/components/schemas/AdditionalFields' + auditDetails: + $ref: '#/components/schemas/AuditDetails' + clientReferenceId: + maxLength: 64 + minLength: 2 + type: string + clientAuditDetails: + $ref: '#/components/schemas/AuditDetails' + projectId: + maxLength: 64 + minLength: 2 + type: string + projectFacilityId: + maxLength: 64 + minLength: 2 + type: string + symptom: + maxLength: 256 + minLength: 2 + type: string + symptomSurveyId: + maxLength: 100 + minLength: 2 + type: string + beneficiaryId: + maxLength: 100 + minLength: 0 + type: string + referralCode: + maxLength: 100 + minLength: 0 + type: string + nationalLevelId: + maxLength: 100 + minLength: 0 + type: string + isDeleted: + type: boolean + HFReferralBulkRequest: + required: + - HFReferrals + - RequestInfo + type: object + properties: + RequestInfo: + $ref: '#/components/schemas/RequestInfo' + HFReferrals: + maxItems: 2147483647 + minItems: 1 + type: array + items: + $ref: '#/components/schemas/HFReferral' + HFReferralRequest: + required: + - HFReferral + - RequestInfo + type: object + properties: + RequestInfo: + $ref: '#/components/schemas/RequestInfo' + HFReferral: + $ref: '#/components/schemas/HFReferral' + HFReferralResponse: + required: + - HFReferral + - ResponseInfo + type: object + properties: + ResponseInfo: + $ref: '#/components/schemas/ResponseInfo' + HFReferral: + $ref: '#/components/schemas/HFReferral' + HFReferralSearch: + type: object + properties: + id: + type: array + items: + type: string + clientReferenceId: + type: array + items: + type: string + facilityId: + type: array + items: + type: string + projectId: + type: string + symptom: + type: array + items: + type: string + symptomSurveyId: + type: array + items: + type: string + beneficiaryId: + type: array + items: + type: string + referralCode: + type: array + items: + type: string + nationalLevelId: + type: array + items: + type: string + HFReferralSearchRequest: + required: + - RequestInfo + type: object + properties: + RequestInfo: + $ref: '#/components/schemas/RequestInfo' + HFReferral: + $ref: '#/components/schemas/HFReferralSearch' + HFReferralBulkResponse: + required: + - HFReferrals + - ResponseInfo + type: object + properties: + ResponseInfo: + $ref: '#/components/schemas/ResponseInfo' + HFReferrals: + type: array + items: + $ref: '#/components/schemas/HFReferral' + TotalCount: + type: integer + format: int64 + DownsyncCriteria: + required: + - locality + - projectId + - tenantId + type: object + properties: + locality: + type: string + lastSyncedTime: + type: integer + format: int64 + projectId: + type: string + tenantId: + type: string + includeDeleted: + type: boolean + offset: + type: integer + format: int32 + limit: + type: integer + format: int32 + totalCount: + type: integer + format: int64 + householdId: + type: string + DownsyncRequest: + type: object + properties: + RequestInfo: + $ref: '#/components/schemas/RequestInfo' + DownsyncCriteria: + $ref: '#/components/schemas/DownsyncCriteria' + Address: + required: + - type + type: object + properties: + id: + maxLength: 64 + minLength: 2 + type: string + tenantId: + type: string + clientReferenceId: + maxLength: 64 + minLength: 2 + type: string + doorNo: + maxLength: 64 + minLength: 2 + type: string + latitude: + maximum: 90 + exclusiveMaximum: false + minimum: -90 + exclusiveMinimum: false + type: number + format: double + longitude: + maximum: 180 + exclusiveMaximum: false + minimum: -180 + exclusiveMinimum: false + type: number + format: double + locationAccuracy: + minimum: 0 + exclusiveMinimum: false + type: number + format: double + type: + type: string + enum: + - PERMANENT + - CORRESPONDENCE + - OTHER + addressLine1: + maxLength: 256 + minLength: 2 + type: string + addressLine2: + maxLength: 256 + minLength: 2 + type: string + landmark: + maxLength: 256 + minLength: 2 + type: string + city: + maxLength: 256 + minLength: 2 + type: string + pincode: + maxLength: 64 + minLength: 2 + type: string + buildingName: + maxLength: 256 + minLength: 2 + type: string + street: + maxLength: 256 + minLength: 2 + type: string + boundaryType: + type: string + boundary: + type: string + locality: + $ref: '#/components/schemas/Boundary' + Boundary: + required: + - code + type: object + properties: + id: + type: string + tenantId: + type: string + code: + type: string + geometry: + $ref: '#/components/schemas/JsonNode' + auditDetails: + $ref: '#/components/schemas/AuditDetails' + additionalDetails: + $ref: '#/components/schemas/JsonNode' + Downsync: + type: object + properties: + Households: + type: array + items: + $ref: '#/components/schemas/Household' + HouseholdMembers: + type: array + items: + $ref: '#/components/schemas/HouseholdMember' + Individuals: + type: array + items: + $ref: '#/components/schemas/Individual' + ProjectBeneficiaries: + type: array + items: + $ref: '#/components/schemas/ProjectBeneficiary' + Tasks: + type: array + items: + $ref: '#/components/schemas/Task' + SideEffects: + type: array + items: + $ref: '#/components/schemas/SideEffect' + Referrals: + type: array + items: + $ref: '#/components/schemas/Referral' + DownsyncCriteria: + $ref: '#/components/schemas/DownsyncCriteria' + DownsyncResponse: + type: object + properties: + ResponseInfo: + $ref: '#/components/schemas/ResponseInfo' + Downsync: + $ref: '#/components/schemas/Downsync' + Household: + required: + - memberCount + - tenantId + type: object + properties: + id: + maxLength: 64 + minLength: 2 + type: string + tenantId: + maxLength: 1000 + minLength: 2 + type: string + source: + type: string + rowVersion: + type: integer + format: int32 + applicationId: + type: string + hasErrors: + type: boolean + additionalFields: + $ref: '#/components/schemas/AdditionalFields' + auditDetails: + $ref: '#/components/schemas/AuditDetails' + clientReferenceId: + maxLength: 64 + minLength: 2 + type: string + clientAuditDetails: + $ref: '#/components/schemas/AuditDetails' + memberCount: + type: integer + format: int32 + address: + $ref: '#/components/schemas/Address' + householdType: + type: string + enum: + - FAMILY + - COMMUNITY + - OTHER + isDeleted: + type: boolean + HouseholdMember: + required: + - tenantId + type: object + properties: + id: + maxLength: 64 + minLength: 2 + type: string + tenantId: + maxLength: 1000 + minLength: 2 + type: string + source: + type: string + rowVersion: + type: integer + format: int32 + applicationId: + type: string + hasErrors: + type: boolean + additionalFields: + $ref: '#/components/schemas/AdditionalFields' + auditDetails: + $ref: '#/components/schemas/AuditDetails' + clientReferenceId: + maxLength: 64 + minLength: 2 + type: string + clientAuditDetails: + $ref: '#/components/schemas/AuditDetails' + householdId: + maxLength: 64 + minLength: 2 + type: string + householdClientReferenceId: + maxLength: 64 + minLength: 2 + type: string + individualId: + maxLength: 64 + minLength: 2 + type: string + individualClientReferenceId: + maxLength: 64 + minLength: 2 + type: string + isHeadOfHousehold: + type: boolean + isDeleted: + type: boolean + Identifier: + required: + - identifierId + - identifierType + type: object + properties: + id: + maxLength: 64 + minLength: 2 + type: string + clientReferenceId: + maxLength: 64 + minLength: 2 + type: string + individualId: + maxLength: 64 + minLength: 2 + type: string + identifierType: + maxLength: 64 + minLength: 2 + type: string + identifierId: + maxLength: 64 + minLength: 2 + type: string + isDeleted: + type: boolean + auditDetails: + $ref: '#/components/schemas/AuditDetails' + Individual: + required: + - name + - tenantId + type: object + properties: + id: + maxLength: 64 + minLength: 2 + type: string + tenantId: + maxLength: 1000 + minLength: 2 + type: string + source: + type: string + rowVersion: + type: integer + format: int32 + applicationId: + type: string + hasErrors: + type: boolean + additionalFields: + $ref: '#/components/schemas/AdditionalFields' + auditDetails: + $ref: '#/components/schemas/AuditDetails' + clientReferenceId: + maxLength: 64 + minLength: 2 + type: string + clientAuditDetails: + $ref: '#/components/schemas/AuditDetails' + individualId: + maxLength: 64 + minLength: 2 + type: string + userId: + type: string + userUuid: + type: string + name: + $ref: '#/components/schemas/Name' + dateOfBirth: + type: string + format: date-time + gender: + type: string + enum: + - MALE + - FEMALE + - OTHER + - TRANSGENDER + bloodGroup: + type: string + enum: + - B+ + - B- + - A+ + - A- + - AB+ + - AB- + - O- + - O+ + mobileNumber: + maxLength: 20 + minLength: 0 + type: string + altContactNumber: + maxLength: 16 + minLength: 0 + type: string + email: + maxLength: 200 + minLength: 5 + type: string + address: + maxItems: 3 + minItems: 0 + type: array + items: + $ref: '#/components/schemas/Address' + fatherName: + maxLength: 100 + minLength: 0 + type: string + husbandName: + maxLength: 100 + minLength: 0 + type: string + relationship: + maxLength: 100 + minLength: 1 + type: string + identifiers: + type: array + items: + $ref: '#/components/schemas/Identifier' + skills: + type: array + items: + $ref: '#/components/schemas/Skill' + photo: + type: string + isDeleted: + type: boolean + isSystemUser: + type: boolean + isSystemUserActive: + type: boolean + userDetails: + $ref: '#/components/schemas/UserDetails' + JsonNode: + type: object + Name: + type: object + properties: + givenName: + maxLength: 200 + minLength: 2 + type: string + familyName: + maxLength: 200 + minLength: 2 + type: string + otherNames: + maxLength: 200 + minLength: 0 + type: string + ProjectBeneficiary: + required: + - projectId + - tenantId + type: object + properties: + id: + maxLength: 64 + minLength: 2 + type: string + tenantId: + maxLength: 1000 + minLength: 2 + type: string + source: + type: string + rowVersion: + type: integer + format: int32 + applicationId: + type: string + hasErrors: + type: boolean + additionalFields: + $ref: '#/components/schemas/AdditionalFields' + auditDetails: + $ref: '#/components/schemas/AuditDetails' + clientReferenceId: + maxLength: 64 + minLength: 2 + type: string + clientAuditDetails: + $ref: '#/components/schemas/AuditDetails' + projectId: + maxLength: 64 + minLength: 2 + type: string + beneficiaryId: + maxLength: 64 + minLength: 2 + type: string + dateOfRegistration: + minimum: 0 + type: integer + format: int64 + beneficiaryClientReferenceId: + maxLength: 64 + minLength: 2 + type: string + isDeleted: + type: boolean + tag: + type: string + Skill: + required: + - type + type: object + properties: + id: + maxLength: 64 + minLength: 2 + type: string + clientReferenceId: + maxLength: 64 + minLength: 2 + type: string + individualId: + maxLength: 64 + minLength: 2 + type: string + type: + maxLength: 64 + minLength: 2 + type: string + level: + maxLength: 64 + minLength: 2 + type: string + experience: + maxLength: 64 + minLength: 2 + type: string + isDeleted: + type: boolean + auditDetails: + $ref: '#/components/schemas/AuditDetails' + Task: + required: + - projectId + - status + - tenantId + type: object + properties: + id: + maxLength: 64 + minLength: 2 + type: string + tenantId: + maxLength: 1000 + minLength: 2 + type: string + source: + type: string + rowVersion: + type: integer + format: int32 + applicationId: + type: string + hasErrors: + type: boolean + additionalFields: + $ref: '#/components/schemas/AdditionalFields' + auditDetails: + $ref: '#/components/schemas/AuditDetails' + clientReferenceId: + maxLength: 64 + minLength: 2 + type: string + clientAuditDetails: + $ref: '#/components/schemas/AuditDetails' + projectId: + maxLength: 64 + minLength: 2 + type: string + projectBeneficiaryId: + maxLength: 64 + minLength: 2 + type: string + projectBeneficiaryClientReferenceId: + maxLength: 64 + minLength: 2 + type: string + resources: + type: array + items: + $ref: '#/components/schemas/TaskResource' + plannedStartDate: + type: integer + format: int64 + plannedEndDate: + type: integer + format: int64 + actualStartDate: + type: integer + format: int64 + actualEndDate: + type: integer + format: int64 + createdBy: + type: string + createdDate: + type: integer + format: int64 + address: + $ref: '#/components/schemas/Address' + isDeleted: + type: boolean + status: + type: string + enum: + - ADMINISTRATION_FAILED + - ADMINISTRATION_SUCCESS + - BENEFICIARY_REFUSED + - CLOSED_HOUSEHOLD + - DELIVERED + - NOT_ADMINISTERED + TaskResource: + required: + - isDelivered + - productVariantId + - quantity + - tenantId + type: object + properties: + id: + maxLength: 64 + minLength: 2 + type: string + tenantId: + type: string + clientReferenceId: + maxLength: 64 + minLength: 2 + type: string + taskId: + maxLength: 64 + minLength: 2 + type: string + productVariantId: + maxLength: 64 + minLength: 2 + type: string + quantity: + type: number + format: double + isDelivered: + type: boolean + deliveryComment: + maxLength: 1000 + minLength: 0 + type: string + isDeleted: + type: boolean + auditDetails: + $ref: '#/components/schemas/AuditDetails' + additionalFields: + $ref: '#/components/schemas/AdditionalFields' + UserDetails: + type: object + properties: + username: + maxLength: 180 + minLength: 0 + type: string + password: + maxLength: 64 + minLength: 0 + type: string + tenantId: + maxLength: 1000 + minLength: 2 + type: string + roles: + type: array + items: + $ref: '#/components/schemas/Role' + type: + maxLength: 50 + minLength: 0 + type: string + enum: + - CITIZEN + - EMPLOYEE + - SYSTEM + - BUSINESS diff --git a/docs/health-api-specs/contracts/registries/facility.yml b/docs/health-api-specs/contracts/registries/facility.yml index 316338220e4..cc7c16438cb 100644 --- a/docs/health-api-specs/contracts/registries/facility.yml +++ b/docs/health-api-specs/contracts/registries/facility.yml @@ -1,404 +1,644 @@ -swagger: '2.0' +openapi: 3.0.1 info: - version: 1.0.0 title: Facility Registry - description: > - This module facilitates maintenance of a Facility registry. - contact: - name: Digit - email: info@egovernments.org -schemes: - - https -x-common-path: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-0-0.yml + version: v1.6 +servers: + - url: https://unified-dev.digit.org + description: Development server url paths: /facility/v1/_create: post: - summary: >- - Create/Add a new facility - description: >- - Create a new facility - parameters: - - name: Facility - in: body - description: Capture details of Facility. - required: true - schema: - $ref: '#/definitions/FacilityRequest' tags: - Facility + summary: Create/Add a new facility + description: Create a new facility + operationId: facilityV1CreatePost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FacilityRequest' + required: true responses: - '202': - description: Facility request has been accepted. - schema: - $ref: '#/definitions/FacilityResponse' + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/FacilityResponse' '400': description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes /facility/v1/bulk/_create: post: - summary: >- - Create/Add new facilities in bulk - description: >- - Create a new facilities in bulk - parameters: - - name: Facility - in: body - description: Capture details of Facility. - required: true - schema: - $ref: '#/definitions/FacilityBulkRequest' tags: - Facility + summary: Create/Add new facilities in bulk + description: Create a new facilities in bulk + operationId: facilityV1BulkCreatePost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FacilityBulkRequest' + required: true responses: - '202': - description: Facility request has been accepted. - schema: - $ref: '#/definitions/BulkAcceptedResponse' + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ResponseInfo' '400': description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes /facility/v1/_update: post: - summary: >- - Update the details of a existing facility - description: >- - Update the details of a existing facility - parameters: - - name: Facility - in: body - description: Details for existing facility. - required: true - schema: - $ref: '#/definitions/FacilityRequest' tags: - Facility + summary: Update the details of an existing facility + description: Update the details of an existing facility + operationId: facilityV1UpdatePost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FacilityRequest' + required: true responses: - '202': - description: Facility request accepted. - schema: - $ref: '#/definitions/FacilityResponse' + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/FacilityResponse' '400': description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes /facility/v1/bulk/_update: post: - summary: >- - Update the details of existing facilities in bulk - description: >- - Update the details of a existing facilities in bulk - parameters: - - name: Facility - in: body - description: Details for existing facility. - required: true - schema: - $ref: '#/definitions/FacilityBulkRequest' tags: - Facility + summary: Update the details of existing facilities in bulk + description: Update the details of existing facilities in bulk + operationId: facilityV1BulkUpdatePost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FacilityBulkRequest' + required: true responses: - '202': - description: Facility request accepted. - schema: - $ref: '#/definitions/BulkAcceptedResponse' + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ResponseInfo' '400': description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes /facility/v1/_delete: post: - summary: >- - Soft delete details of an existing facility - description: >- - Soft delete details of an existing facility - parameters: - - name: Facility - in: body - description: Details for existing facility. - required: true - schema: - $ref: '#/definitions/FacilityRequest' tags: - Facility + summary: Soft delete details of an existing facility + description: Soft delete details of an existing facility + operationId: facilityV1DeletePost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FacilityRequest' + required: true responses: - '202': - description: Facility request accepted. - schema: - $ref: '#/definitions/FacilityResponse' + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/FacilityResponse' '400': description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes /facility/v1/bulk/_delete: post: - summary: >- - Soft delete details of existing facilities in bulk - description: >- - Soft delete details of an existing facilities in bulk - parameters: - - name: Facility - in: body - description: Details for existing facility. - required: true - schema: - $ref: '#/definitions/FacilityBulkRequest' tags: - Facility + summary: Soft delete details of existing facilities in bulk + description: Soft delete details of existing facilities in bulk + operationId: facilityV1BulkDeletePost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FacilityBulkRequest' + required: true responses: - '202': - description: Facility request accepted. - schema: - $ref: '#/definitions/BulkAcceptedResponse' + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ResponseInfo' '400': description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes /facility/v1/_search: post: - summary: >- - Search existing facility - description: >- - Search existing facility - parameters: - - name: Facility - in: body - description: Details for existing facility. - required: true - schema: - $ref: '#/definitions/FacilitySearchRequest' - - $ref: '#/parameters/limit' - - $ref: '#/parameters/offset' - - $ref: '#/parameters/tenantId' - - $ref: '#/parameters/lastChangedSince' - - $ref: '#/parameters/includeDeleted' tags: - Facility + summary: Search existing facility + description: Search existing facility + operationId: facilityV1SearchPost + parameters: + - $ref: "#/components/parameters/limit" + - $ref: "#/components/parameters/offset" + - $ref: "#/components/parameters/tenantId" + - $ref: "#/components/parameters/lastChangedSince" + - $ref: "#/components/parameters/includeDeleted" + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FacilitySearchRequest' + required: true responses: '200': - description: Facilities. - schema: - $ref: '#/definitions/FacilityBulkResponse' + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/FacilityBulkResponse' '400': description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - -parameters: - #TODO is tenantId required as a query param if it can be determine from requestInfo->userInfo - tenantId: - name: tenantId - in: query - description: Unique id for a tenant. - required: true - type: string - format: varchar - - lastChangedSince: - name: lastChangedSince - description: | - epoch of the time since when the changes on the object should be picked up. Search results from this parameter should include both newly created objects since this time as well as any modified objects since this time. This criterion is included to help polling clients to get the changes in system since a last time they synchronized with the platform. - in: query - required: false - type: integer - format: int64 - - echoResource: - name: echoResource - in: query - type: boolean - required: false - default: true - description: Client can specify if the resource in request body needs to be sent back in the response. This is being used to limit amount of data that needs to flow back from the server to the client in low bandwidth scenarios. Server will always send the server generated id for validated requests. - - serverHandlesErrors: - name: serverHandlesErrors - in: query - type: boolean - required: false - default: false - description: Client can specify that it is incapable of handling any errors with the requests and server should route these for manual intervention if required. - - limit: - name: limit - description: Pagination - limit records in response - in: query - type: integer - minimum: 0 - maximum: 1000 - required: true - - offset: - name: offset - description: Pagination - offset from which records should be returned in response - in: query - type: integer - minimum: 0 - required: true - - includeDeleted: - name: includeDeleted - description: Used in search APIs to specify if (soft) deleted records should be included in search results. - in: query - type: boolean - default: false - required: false - -definitions: - id: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/id' - idForSearch: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/idForSearch' - boundaryCode: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/boundaryCode' - tenantId: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/tenantId' - eventTimestamp: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/eventTimestamp' - isDeleted: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/isDeleted' - rowVersion: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/rowVersion' - apiOperation: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/apiOperation' - additionalFields: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/additionalFields' - Address: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/Address' - - Facility: - type: object - properties: - id: - $ref: '#/definitions/id' - tenantId: - $ref: '#/definitions/tenantId' - isPermanent: - type: boolean - default: true - name: - type: string - minLength: 2 - maxLength: 2000 - description: Name of the facility - example: 'Facility XYZ' - usage: + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes +components: + parameters: + tenantId: + name: tenantId + in: query + description: Unique id for a tenant. + required: true + schema: type: string - example: 'STORAGE_WAREHOUSE' - # enum: - # - STORAGE_WAREHOUSE - # - MEDICAL_FACILITY - # - SEWAGE_TREATMENT_PLANT - storageCapacity: + format: varchar + + lastChangedSince: + name: lastChangedSince + in: query + description: | + Epoch of the time since when the changes on the object should be picked up. + Search results from this parameter should include both newly created objects + since this time as well as any modified objects since this time. + required: false + schema: type: integer - description: Physical storage capacity of the facility in cubic meters - address: - $ref: '#/definitions/Address' - additionalFields: - $ref: '#/definitions/additionalFields' - isDeleted: - $ref: '#/definitions/isDeleted' - rowVersion: - $ref: '#/definitions/rowVersion' - auditDetails: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/AuditDetails - - FacilitySearch: - type: object - properties: - id: - $ref: '#/definitions/idForSearch' - isPermanent: + format: int64 + + echoResource: + name: echoResource + in: query + description: | + Client can specify if the resource in request body needs to be sent back in the response. + required: false + schema: type: boolean - usage: - type: string - storageCapacity: + default: true + + serverHandlesErrors: + name: serverHandlesErrors + in: query + description: | + Client can specify that it is incapable of handling any errors with the requests. + required: false + schema: + type: boolean + default: false + + limit: + name: limit + in: query + description: Pagination - limit records in response + required: true + schema: type: integer - boundaryCode: - $ref: '#/definitions/boundaryCode' - - FacilityRequest: - type: object - properties: - RequestInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/RequestInfo - Facility: - type: object - $ref: '#/definitions/Facility' - required: - - RequestInfo - - Facility - - FacilityBulkRequest: - type: object - properties: - RequestInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/RequestInfo - Facilities: - type: array - minItems: 1 - items: - $ref: '#/definitions/Facility' - required: - - RequestInfo - - Facility - - FacilitySearchRequest: - type: object - properties: - RequestInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/RequestInfo - Facility: - $ref: '#/definitions/FacilitySearch' - required: - - RequestInfo - - Facility - - FacilityResponse: - type: object - properties: - ResponseInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ResponseInfo - Facility: - type: object - $ref: '#/definitions/Facility' - required: - - ResponseInfo - - FacilityBulkResponse: - type: object - properties: - ResponseInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ResponseInfo - Facilities: - type: array - items: - $ref: '#/definitions/Facility' - required: - - ResponseInfo - - - BulkAcceptedResponse: - type: object - properties: - ResponseInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ResponseInfo - required: - - ResponseInfo + minimum: 0 + maximum: 1000 # TODO: review + + offset: + name: offset + in: query + description: Pagination - offset from which records should be returned in response + required: true + schema: + type: integer + minimum: 0 + + includeDeleted: + name: includeDeleted + in: query + description: Used in search APIs to specify if (soft) deleted records should be included in search results. + required: false + schema: + type: boolean + default: false + schemas: + AdditionalFields: + type: object + properties: + schema: + maxLength: 64 + minLength: 2 + type: string + version: + minimum: 1 + type: integer + format: int32 + fields: + type: array + items: + $ref: '#/components/schemas/Field' + Address: + type: object + properties: + id: + maxLength: 64 + minLength: 2 + type: string + tenantId: + type: string + clientReferenceId: + maxLength: 64 + minLength: 2 + type: string + doorNo: + maxLength: 64 + minLength: 2 + type: string + latitude: + maximum: 90 + exclusiveMaximum: false + minimum: -90 + exclusiveMinimum: false + type: number + format: double + longitude: + maximum: 180 + exclusiveMaximum: false + minimum: -180 + exclusiveMinimum: false + type: number + format: double + locationAccuracy: + minimum: 0 + exclusiveMinimum: false + type: number + format: double + type: + type: string + enum: + - PERMANENT + - CORRESPONDENCE + - OTHER + addressLine1: + maxLength: 256 + minLength: 2 + type: string + addressLine2: + maxLength: 256 + minLength: 2 + type: string + landmark: + maxLength: 256 + minLength: 2 + type: string + city: + maxLength: 256 + minLength: 2 + type: string + pincode: + maxLength: 64 + minLength: 2 + type: string + buildingName: + maxLength: 256 + minLength: 2 + type: string + street: + maxLength: 256 + minLength: 2 + type: string + locality: + $ref: '#/components/schemas/Boundary' + AuditDetails: + type: object + properties: + createdBy: + type: string + lastModifiedBy: + type: string + createdTime: + type: integer + format: int64 + lastModifiedTime: + type: integer + format: int64 + Boundary: + required: + - code + type: object + properties: + id: + type: string + tenantId: + type: string + code: + type: string + geometry: + $ref: '#/components/schemas/JsonNode' + auditDetails: + $ref: '#/components/schemas/AuditDetails' + additionalDetails: + $ref: '#/components/schemas/JsonNode' + Facility: + required: + - tenantId + type: object + properties: + id: + maxLength: 64 + minLength: 2 + type: string + tenantId: + maxLength: 1000 + minLength: 2 + type: string + source: + type: string + rowVersion: + type: integer + format: int32 + applicationId: + type: string + hasErrors: + type: boolean + additionalFields: + $ref: '#/components/schemas/AdditionalFields' + auditDetails: + $ref: '#/components/schemas/AuditDetails' + clientReferenceId: + maxLength: 64 + minLength: 2 + type: string + clientAuditDetails: + $ref: '#/components/schemas/AuditDetails' + isPermanent: + type: boolean + name: + maxLength: 2000 + minLength: 2 + type: string + usage: + type: string + storageCapacity: + type: integer + format: int32 + address: + $ref: '#/components/schemas/Address' + isDeleted: + type: boolean + FacilityBulkRequest: + required: + - Facilities + - RequestInfo + type: object + properties: + RequestInfo: + $ref: '#/components/schemas/RequestInfo' + Facilities: + maxItems: 2147483647 + minItems: 1 + type: array + items: + $ref: '#/components/schemas/Facility' + Field: + required: + - key + - value + type: object + properties: + key: + maxLength: 64 + minLength: 2 + type: string + value: + maxLength: 10000 + minLength: 1 + type: string + JsonNode: + type: object + PlainAccessRequest: + type: object + properties: + recordId: + type: string + plainRequestFields: + type: array + items: + type: string + RequestInfo: + type: object + properties: + apiId: + type: string + ver: + type: string + ts: + type: integer + format: int64 + action: + type: string + did: + type: string + key: + type: string + msgId: + type: string + authToken: + type: string + correlationId: + type: string + plainAccessRequest: + $ref: '#/components/schemas/PlainAccessRequest' + userInfo: + $ref: '#/components/schemas/User' + Role: + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + code: + type: string + tenantId: + type: string + User: + type: object + properties: + id: + type: integer + format: int64 + userName: + type: string + name: + type: string + type: + type: string + mobileNumber: + type: string + emailId: + type: string + roles: + type: array + items: + $ref: '#/components/schemas/Role' + tenantId: + type: string + uuid: + type: string + ResponseInfo: + type: object + properties: + apiId: + type: string + ver: + type: string + ts: + type: integer + format: int64 + resMsgId: + type: string + msgId: + type: string + status: + type: string + FacilityRequest: + required: + - Facility + - RequestInfo + type: object + properties: + RequestInfo: + $ref: '#/components/schemas/RequestInfo' + Facility: + $ref: '#/components/schemas/Facility' + FacilityResponse: + required: + - ResponseInfo + type: object + properties: + ResponseInfo: + $ref: '#/components/schemas/ResponseInfo' + Facility: + $ref: '#/components/schemas/Facility' + URLParams: + required: + - limit + - offset + - tenantId + type: object + properties: + urlparams: + $ref: '#/components/schemas/URLParams' + limit: + maximum: 1000 + minimum: 0 + type: integer + format: int32 + offset: + minimum: 0 + type: integer + format: int32 + tenantId: + type: string + lastChangedSince: + type: integer + format: int64 + includeDeleted: + type: boolean + FacilitySearch: + type: object + properties: + id: + type: array + items: + type: string + clientReferenceId: + type: array + items: + type: string + isPermanent: + type: boolean + usage: + type: string + storageCapacity: + type: integer + format: int32 + boundaryCode: + type: string + FacilitySearchRequest: + required: + - Facility + - RequestInfo + type: object + properties: + RequestInfo: + $ref: '#/components/schemas/RequestInfo' + Facility: + $ref: '#/components/schemas/FacilitySearch' + FacilityBulkResponse: + required: + - ResponseInfo + type: object + properties: + ResponseInfo: + $ref: '#/components/schemas/ResponseInfo' + Facilities: + type: array + items: + $ref: '#/components/schemas/Facility' + TotalCount: + type: integer + format: int64 diff --git a/docs/health-api-specs/contracts/registries/household.yml b/docs/health-api-specs/contracts/registries/household.yml index 8b6f58a8f46..ede714313a9 100644 --- a/docs/health-api-specs/contracts/registries/household.yml +++ b/docs/health-api-specs/contracts/registries/household.yml @@ -1,786 +1,1175 @@ -swagger: '2.0' +openapi: 3.0.1 info: - version: 1.0.1 title: Household Registry - description: > - This module facilitates maintenance of a household registry. - contact: - name: Digit - email: info@egovernments.org -schemes: - - https -x-common-path: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-0-0.yml + version: v1.6 +servers: + - url: https://unified-dev.digit.org + description: Development server url paths: + /household/v1/_create: post: - summary: >- - Create/Add a new household - description: >- - Create a new household - parameters: - - name: Household - in: body - description: Capture details of Household. - required: true - schema: - $ref: '#/definitions/HouseholdRequest' - - $ref: '#/parameters/echoResource' tags: - Household - responses: - '202': - description: Accepted + summary: Create/Add a new household + description: Create a new household + operationId: householdV1CreatePost_1 + parameters: + - name: echoResource + in: query + required: false schema: - $ref: '#/definitions/HouseholdResponse' + type: boolean + default: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/HouseholdRequest' + required: true + responses: + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/HouseholdResponse' '400': description: Bad Request - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes '500': description: Internal Server Error - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes /household/v1/bulk/_create: post: - summary: >- - Create/Add new households in bulk - description: >- - Create a new household in bulk - parameters: - - name: Household - in: body - description: Capture details of Household. - required: true - schema: - $ref: '#/definitions/HouseholdBulkRequest' - - $ref: '#/parameters/echoResource' tags: - Household - responses: - '202': - description: Accepted + summary: Create/Add new households in bulk + description: Create new households in bulk + operationId: householdV1CreatePost + parameters: + - name: echoResource + in: query + required: false schema: - $ref: '#/definitions/BulkResponse' + type: boolean + default: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/HouseholdBulkRequest' + required: true + responses: + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ResponseInfo' '400': description: Bad Request - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes '500': description: Internal Server Error - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + /household/v1/_update: post: - summary: >- - Update the details of a existing household - description: >- - Update the details of a existing household - parameters: - - name: Household - in: body - description: Details for existing household. - required: true - schema: - $ref: '#/definitions/HouseholdRequest' - - $ref: '#/parameters/echoResource' tags: - Household - responses: - '202': - description: Accepted + summary: Update the details of an existing household + description: Update the details of an existing household + operationId: householdV1UpdatePost + parameters: + - name: echoResource + in: query + required: false schema: - $ref: '#/definitions/HouseholdResponse' + type: boolean + default: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/HouseholdRequest' + required: true + responses: + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/HouseholdResponse' '400': description: Bad Request - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes '500': description: Internal Server Error - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes /household/v1/bulk/_update: post: - summary: >- - Update the details of a existing household in bulk - description: >- - Update the details of a existing household in bulk - parameters: - - name: Household - in: body - description: Details for existing household. - required: true - schema: - $ref: '#/definitions/HouseholdBulkRequest' - - $ref: '#/parameters/echoResource' tags: - Household - responses: - '202': - description: Accepted + summary: Update the details of an existing household in bulk + description: Update the details of an existing household in bulk + operationId: householdV1BulkUpdatePost + parameters: + - name: echoResource + in: query + required: false schema: - $ref: '#/definitions/BulkResponse' + type: boolean + default: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/HouseholdBulkRequest' + required: true + responses: + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ResponseInfo' '400': description: Bad Request - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes '500': description: Internal Server Error - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes /household/v1/_delete: post: - summary: >- - Soft delete the details of a existing household - description: >- - Soft delete the details of a existing household - parameters: - - name: Household - in: body - description: Details for the household. - required: true - schema: - $ref: '#/definitions/HouseholdRequest' - - $ref: '#/parameters/echoResource' tags: - Household - responses: - '202': - description: Accepted + summary: Soft delete the details of a existing household + description: Soft delete the details of a existing household + operationId: householdV1DeletePost_1 + parameters: + - name: echoResource + in: query + required: false schema: - $ref: '#/definitions/HouseholdRequest' + type: boolean + default: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/HouseholdRequest' + required: true + responses: + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/HouseholdResponse' '400': description: Bad Request - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes '500': description: Internal Server Error - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes /household/v1/bulk/_delete: post: - summary: >- - Soft delete the details of an existing households in bulk - description: >- - Soft delete the details of an existing households in bulk - parameters: - - name: Household - in: body - description: Details for the Household. - required: true - schema: - $ref: '#/definitions/HouseholdBulkRequest' - - $ref: '#/parameters/echoResource' tags: - Household - responses: - '202': - description: Accepted + summary: Soft delete the details of an existing households in bulk + description: Soft delete the details of an existing households in bulk + operationId: householdV1DeletePost + parameters: + - name: echoResource + in: query + required: false schema: - $ref: '#/definitions/BulkResponse' + type: boolean + default: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/HouseholdBulkRequest' + required: true + responses: + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ResponseInfo' '400': description: Bad Request - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes '500': description: Internal Server Error - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes /household/v1/_search: post: - summary: >- - Search existing household - description: >- - Search existing household - parameters: - - name: Household - in: body - description: Details for existing household. - required: true - schema: - $ref: '#/definitions/HouseholdSearchRequest' - - $ref: '#/parameters/limit' - - $ref: '#/parameters/offset' - - $ref: '#/parameters/tenantId' - - $ref: '#/parameters/lastChangedSince' - - $ref: '#/parameters/includeDeleted' tags: - Household + summary: Search existing household + description: Search existing household + operationId: householdV1SearchPost + parameters: + - $ref: "#/components/parameters/limit" + - $ref: "#/components/parameters/offset" + - $ref: "#/components/parameters/tenantId" + - $ref: "#/components/parameters/lastChangedSince" + - $ref: "#/components/parameters/includeDeleted" + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/HouseholdSearchRequest' + required: true responses: '200': - description: Ok - schema: - $ref: '#/definitions/HouseholdBulkResponse' + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/HouseholdBulkResponse' '400': description: Bad Request - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes '500': description: Internal Server Error - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes /household/member/v1/_create: post: - summary: >- - Add a new household member - description: >- - Add a new member to household - parameters: - - name: HouseholdMember - in: body - description: Capture linkage of Household to Member. - required: true - schema: - $ref: '#/definitions/HouseholdMemberRequest' - - $ref: '#/parameters/echoResource' tags: - Household Member - responses: - '202': - description: Accepted + summary: Add a new household member + description: Add a new member to a household + operationId: householdMemberV1CreatePost + parameters: + - name: echoResource + in: query + required: false schema: - $ref: '#/definitions/HouseholdMemberResponse' + type: boolean + default: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/HouseholdMemberRequest' + required: true + responses: + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/HouseholdMemberResponse' '400': description: Bad Request - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes '500': description: Internal Server Error - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes /household/member/v1/bulk/_create: post: - summary: >- - Add new household members in bulk - description: >- - Add new members to household in bulk - parameters: - - name: HouseholdMember - in: body - description: Capture linkage of Household to Member. - required: true - schema: - $ref: '#/definitions/HouseholdMemberBulkRequest' - - $ref: '#/parameters/echoResource' tags: - Household Member - responses: - '202': - description: Accepted + summary: Add new household members in bulk + description: Add new household members in bulk + operationId: householdMemberV1BulkCreatePost + parameters: + - name: echoResource + in: query + required: false schema: - $ref: '#/definitions/BulkResponse' + type: boolean + default: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/HouseholdMemberBulkRequest' + required: true + responses: + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ResponseInfo' '400': description: Bad Request - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes '500': description: Internal Server Error - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes /household/member/v1/_update: post: - summary: >- - Update the linkage details of an existing household member - description: >- - Update the linkage details of an existing household member - parameters: - - name: HouseholdMember - in: body - description: Linkage details for existing household member. - required: true - schema: - $ref: '#/definitions/HouseholdMemberRequest' - - $ref: '#/parameters/echoResource' tags: - Household Member - responses: - '202': - description: Accepted + summary: Update the linkage details of an existing household member + description: Update the linkage details of an existing household member + operationId: householdMemberV1UpdatePost + parameters: + - name: echoResource + in: query + required: false schema: - $ref: '#/definitions/HouseholdResponse' + type: boolean + default: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/HouseholdMemberRequest' + required: true + responses: + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/HouseholdMemberResponse' '400': description: Bad Request - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes '500': description: Internal Server Error - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes /household/member/v1/bulk/_update: post: - summary: >- - Update the linkage details of an existing household members in bulk - description: >- - Update the linkage details of an existing household members in bulk - parameters: - - name: HouseholdMember - in: body - description: Linkage details for existing household members. - required: true - schema: - $ref: '#/definitions/HouseholdMemberBulkRequest' - - $ref: '#/parameters/echoResource' tags: - Household Member - responses: - '202': - description: Accepted + summary: Update the linkage details of an existing household members in bulk + description: Update the linkage details of an existing household members in bulk + operationId: householdMemberV1BulkUpdatePost + parameters: + - name: echoResource + in: query + required: false schema: - $ref: '#/definitions/BulkResponse' + type: boolean + default: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/HouseholdMemberBulkRequest' + required: true + responses: + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ResponseInfo' '400': description: Bad Request - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes '500': description: Internal Server Error - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes /household/member/v1/_delete: post: - summary: >- - Soft delete the linking of existing household member household - description: >- - Soft delete the linking of an existing household member from a household - parameters: - - name: HouseholdMember - in: body - description: Details for the household member. - required: true - schema: - $ref: '#/definitions/HouseholdMemberRequest' - - $ref: '#/parameters/echoResource' tags: - Household Member - responses: - '202': - description: Accepted + summary: Soft delete the linking of existing household member household + description: Soft delete the linking of existing household member household + operationId: householdMemberV1DeletePost + parameters: + - name: echoResource + in: query + required: false schema: - $ref: '#/definitions/HouseholdMemberResponse' + type: boolean + default: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/HouseholdMemberRequest' + required: true + responses: + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/HouseholdMemberResponse' '400': description: Bad Request - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes '500': description: Internal Server Error - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes /household/member/v1/bulk/_delete: post: - summary: >- - Soft delete the linking of existing household members in bulk from a household - description: >- - Soft delete the linking of an existing households in bulk from a household - parameters: - - name: Household - in: body - description: Details for the Household. - required: true - schema: - $ref: '#/definitions/HouseholdMemberBulkRequest' - - $ref: '#/parameters/echoResource' tags: - Household Member - responses: - '202': - description: Accepted + summary: Soft delete the linking of existing household members in bulk from a household + description: Soft delete the linking of existing household members in bulk from a household + operationId: householdMemberV1BulkDeletePost + parameters: + - name: echoResource + in: query + required: false schema: - $ref: '#/definitions/BulkResponse' + type: boolean + default: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/HouseholdMemberBulkRequest' + required: true + responses: + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ResponseInfo' '400': description: Bad Request - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes '500': description: Internal Server Error - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes /household/member/v1/_search: post: - summary: >- - Search existing household member - description: >- - Search existing household member - parameters: - - name: HouseholdMember - in: body - description: Details for existing household member. - required: true - schema: - $ref: '#/definitions/HouseholdMemberSearchRequest' - - $ref: '#/parameters/limit' - - $ref: '#/parameters/offset' - - $ref: '#/parameters/tenantId' - - $ref: '#/parameters/lastChangedSince' - - $ref: '#/parameters/includeDeleted' tags: - Household Member + summary: Search existing household member + description: Search existing household member + operationId: householdMemberV1SearchPost + parameters: + - $ref: "#/components/parameters/limit" + - $ref: "#/components/parameters/offset" + - $ref: "#/components/parameters/tenantId" + - $ref: "#/components/parameters/lastChangedSince" + - $ref: "#/components/parameters/includeDeleted" + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/HouseholdMemberSearchRequest' + required: true responses: '200': - description: Ok - schema: - $ref: '#/definitions/HouseholdMemberBulkResponse' + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/HouseholdMemberBulkResponse' '400': description: Bad Request - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes '500': description: Internal Server Error - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - - -parameters: - #TODO is tenantId required as a query param if it can be determine from requestInfo->userInfo - tenantId: - name: tenantId - in: query - description: Unique id for a tenant. - required: true - type: string - format: varchar - - lastChangedSince: - name: lastChangedSince - description: | - epoch of the time since when the changes on the object should be picked up. Search results from this parameter should include both newly created objects since this time as well as any modified objects since this time. This criterion is included to help polling clients to get the changes in system since a last time they synchronized with the platform. - in: query - required: false - type: integer - format: int64 - - echoResource: - name: echoResource - in: query - type: boolean - required: false - default: true - description: Client can specify if the resource in request body needs to be sent back in the response. This is being used to limit amount of data that needs to flow back from the server to the client in low bandwidth scenarios. Server will always send the server generated id for validated requests. - - serverHandlesErrors: - name: serverHandlesErrors - in: query - type: boolean - required: false - default: false - description: Client can specify that it is incapable of handling any errors with the requests and server should route these for manual intervention if required. - - limit: - name: limit - description: Pagination - limit records in response - in: query - type: integer - minimum: 0 - maximum: 1000 #TODO review - required: true - - offset: - name: offset - description: Pagination - offset from which records should be returned in response - in: query - type: integer - minimum: 0 - required: true - - includeDeleted: - name: includeDeleted - description: Used in search APIs to specify if (soft) deleted records should be included in search results. - in: query - type: boolean - default: false - required: false - -definitions: - boundaryCode: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/boundaryCode' - id: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/id' - idForSearch: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/idForSearch' - clientReferenceId: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/clientReferenceId' - clientReferenceIdForSearch: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/clientReferenceIdForSearch' - tenantId: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/tenantId' - eventTimestamp: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/eventTimestamp' - isDeleted: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/isDeleted' - rowVersion: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/rowVersion' - additionalFields: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/additionalFields' - Address: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/Address' - - memberCount: - type: integer - example: 4 - minimum: 0 - maximum: 1000 - description: Total no of individuals in a household. Could be different from the count of members as all members may not be enumerated individually. - - Household: - description: A representation of Household. - type: object - required: - - memberCount - properties: - id: - $ref: '#/definitions/id' - tenantId: - $ref: '#/definitions/tenantId' - clientReferenceId: - $ref: '#/definitions/clientReferenceId' - memberCount: - $ref: '#/definitions/memberCount' - address: - $ref: '#/definitions/Address' - # members: - # type: array - # items: - # $ref: '#/definitions/HouseholdMember' - additionalFields: - $ref: '#/definitions/additionalFields' - isDeleted: - $ref: '#/definitions/isDeleted' - rowVersion: - $ref: '#/definitions/rowVersion' - auditDetails: - $ref: 'https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/AuditDetails' - - HouseholdSearch: - description: A representation of Household. - type: object - properties: - id: - $ref: '#/definitions/idForSearch' - clientReferenceId: - $ref: '#/definitions/clientReferenceIdForSearch' - boundaryCode: - $ref: '#/definitions/boundaryCode' - - HouseholdMember: - description: A representation of a household member (already registered as an individual) - type: object - required: - - householdId - - individualId - properties: - id: - $ref: '#/definitions/id' - householdId: - $ref: '#/definitions/id' - householdClientReferenceId: - $ref: '#/definitions/clientReferenceId' - individualId: - $ref: '#/definitions/id' - individualClientReferenceId: - $ref: '#/definitions/clientReferenceId' - isHeadOfHousehold: + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes +components: + parameters: + tenantId: + name: tenantId + in: query + description: Unique id for a tenant. + required: true + schema: + type: string + format: varchar + + lastChangedSince: + name: lastChangedSince + in: query + description: | + Epoch of the time since when the changes on the object should be picked up. + Search results from this parameter should include both newly created objects + since this time as well as any modified objects since this time. + required: false + schema: + type: integer + format: int64 + + echoResource: + name: echoResource + in: query + description: | + Client can specify if the resource in request body needs to be sent back in the response. + required: false + schema: + type: boolean + default: true + + serverHandlesErrors: + name: serverHandlesErrors + in: query + description: | + Client can specify that it is incapable of handling any errors with the requests. + required: false + schema: type: boolean default: false - tenantId: - $ref: '#/definitions/tenantId' - additionalFields: - $ref: '#/definitions/additionalFields' - isDeleted: - $ref: '#/definitions/isDeleted' - rowVersion: - $ref: '#/definitions/rowVersion' - auditDetails: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/AuditDetails - - HouseholdMemberSearch: - description: Search model for household member - type: object - properties: - id: - $ref: '#/definitions/idForSearch' - householdId: - $ref: '#/definitions/id' - householdClientReferenceId: - $ref: '#/definitions/clientReferenceId' - individualId: - $ref: '#/definitions/id' - individualClientReferenceId: - $ref: '#/definitions/clientReferenceId' - isHeadOfHousehold: + + limit: + name: limit + in: query + description: Pagination - limit records in response + required: true + schema: + type: integer + minimum: 0 + maximum: 1000 # TODO: review + + offset: + name: offset + in: query + description: Pagination - offset from which records should be returned in response + required: true + schema: + type: integer + minimum: 0 + + includeDeleted: + name: includeDeleted + in: query + description: Used in search APIs to specify if (soft) deleted records should be included in search results. + required: false + schema: type: boolean + default: false - HouseholdRequest: - type: object - properties: - RequestInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/RequestInfo - Household: - type: object - $ref: '#/definitions/Household' - required: - - RequestInfo - - Household - - HouseholdBulkRequest: - type: object - properties: - RequestInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/RequestInfo - Households: - type: array - minItems: 1 - items: - $ref: '#/definitions/Household' - required: - - RequestInfo - - Household - - HouseholdSearchRequest: - type: object - properties: - RequestInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/RequestInfo - Household: - $ref: '#/definitions/HouseholdSearch' - required: - - RequestInfo - - Household - - HouseholdResponse: - type: object - properties: - ResponseInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ResponseInfo - Household: - type: object - $ref: '#/definitions/Household' - required: - - ResponseInfo - - HouseholdBulkResponse: - type: object - properties: - ResponseInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ResponseInfo - Households: - type: array - items: - $ref: '#/definitions/Household' - required: - - ResponseInfo - - HouseholdMemberRequest: - type: object - properties: - RequestInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/RequestInfo - HouseholdMember: - type: object - $ref: '#/definitions/HouseholdMember' - required: - - RequestInfo - - HouseholdMemberBulkRequest: - type: object - properties: - RequestInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/RequestInfo - HouseholdMembers: - type: array - minItems: 1 - items: - $ref: '#/definitions/HouseholdMember' - required: - - RequestInfo - - BulkResponse: - type: object - properties: - ResponseInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ResponseInfo - required: - - ResponseInfo - - HouseholdMemberSearchRequest: - type: object - properties: - RequestInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/RequestInfo - HouseholdMember: - $ref: '#/definitions/HouseholdMemberSearch' - required: - - RequestInfo - - HouseholdMember - - HouseholdMemberResponse: - type: object - properties: - ResponseInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ResponseInfo - HouseholdMember: - type: object - $ref: '#/definitions/HouseholdMember' - required: - - ResponseInfo - - HouseholdMemberBulkResponse: - type: object - properties: - ResponseInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ResponseInfo - HouseholdMembers: - type: array - items: - $ref: '#/definitions/HouseholdMember' - required: - - ResponseInfo + + schemas: + AdditionalFields: + type: object + properties: + schema: + maxLength: 64 + minLength: 2 + type: string + version: + minimum: 1 + type: integer + format: int32 + fields: + type: array + items: + $ref: '#/components/schemas/Field' + Address: + required: + - tenantId + type: object + properties: + id: + maxLength: 64 + minLength: 2 + type: string + clientReferenceId: + maxLength: 64 + minLength: 2 + type: string + tenantId: + maxLength: 1000 + minLength: 2 + type: string + doorNo: + maxLength: 64 + minLength: 2 + type: string + latitude: + maximum: 90 + exclusiveMaximum: false + minimum: -90 + exclusiveMinimum: false + type: number + format: double + longitude: + maximum: 180 + exclusiveMaximum: false + minimum: -180 + exclusiveMinimum: false + type: number + format: double + locationAccuracy: + minimum: 0 + exclusiveMinimum: false + type: number + format: double + type: + type: string + enum: + - PERMANENT + - CORRESPONDENCE + - OTHER + addressLine1: + maxLength: 256 + minLength: 2 + type: string + addressLine2: + maxLength: 256 + minLength: 2 + type: string + landmark: + maxLength: 256 + minLength: 2 + type: string + city: + maxLength: 256 + minLength: 2 + type: string + pincode: + maxLength: 64 + minLength: 2 + type: string + buildingName: + maxLength: 256 + minLength: 2 + type: string + street: + maxLength: 256 + minLength: 2 + type: string + locality: + $ref: '#/components/schemas/Boundary' + AuditDetails: + type: object + properties: + createdBy: + type: string + lastModifiedBy: + type: string + createdTime: + type: integer + format: int64 + lastModifiedTime: + type: integer + format: int64 + Boundary: + required: + - code + type: object + properties: + id: + type: string + tenantId: + type: string + code: + type: string + geometry: + $ref: '#/components/schemas/JsonNode' + auditDetails: + $ref: '#/components/schemas/AuditDetails' + additionalDetails: + $ref: '#/components/schemas/JsonNode' + Field: + required: + - key + - value + type: object + properties: + key: + maxLength: 64 + minLength: 2 + type: string + value: + maxLength: 10000 + minLength: 1 + type: string + Household: + required: + - memberCount + - tenantId + type: object + properties: + id: + maxLength: 64 + minLength: 2 + type: string + tenantId: + maxLength: 1000 + minLength: 2 + type: string + status: + type: string + source: + type: string + rowVersion: + type: integer + format: int32 + applicationId: + type: string + hasErrors: + type: boolean + additionalFields: + $ref: '#/components/schemas/AdditionalFields' + auditDetails: + $ref: '#/components/schemas/AuditDetails' + clientReferenceId: + maxLength: 64 + minLength: 2 + type: string + clientAuditDetails: + $ref: '#/components/schemas/AuditDetails' + memberCount: + type: integer + format: int32 + address: + $ref: '#/components/schemas/Address' + isDeleted: + type: boolean + HouseholdBulkRequest: + required: + - Households + - RequestInfo + type: object + properties: + RequestInfo: + $ref: '#/components/schemas/RequestInfo' + Households: + maxItems: 2147483647 + minItems: 1 + type: array + items: + $ref: '#/components/schemas/Household' + JsonNode: + type: object + PlainAccessRequest: + type: object + properties: + recordId: + type: string + plainRequestFields: + type: array + items: + type: string + RequestInfo: + type: object + properties: + apiId: + type: string + ver: + type: string + ts: + type: integer + format: int64 + action: + type: string + did: + type: string + key: + type: string + msgId: + type: string + authToken: + type: string + correlationId: + type: string + plainAccessRequest: + $ref: '#/components/schemas/PlainAccessRequest' + userInfo: + $ref: '#/components/schemas/User' + Role: + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + code: + type: string + tenantId: + type: string + User: + type: object + properties: + id: + type: integer + format: int64 + userName: + type: string + name: + type: string + type: + type: string + mobileNumber: + type: string + emailId: + type: string + roles: + type: array + items: + $ref: '#/components/schemas/Role' + tenantId: + type: string + uuid: + type: string + ResponseInfo: + type: object + properties: + apiId: + type: string + ver: + type: string + ts: + type: integer + format: int64 + resMsgId: + type: string + msgId: + type: string + status: + type: string + HouseholdRequest: + required: + - Household + - RequestInfo + type: object + properties: + RequestInfo: + $ref: '#/components/schemas/RequestInfo' + Household: + $ref: '#/components/schemas/Household' + HouseholdResponse: + required: + - ResponseInfo + type: object + properties: + ResponseInfo: + $ref: '#/components/schemas/ResponseInfo' + Household: + $ref: '#/components/schemas/Household' + URLParams: + required: + - limit + - offset + - tenantId + type: object + properties: + urlparams: + $ref: '#/components/schemas/URLParams' + limit: + maximum: 1000 + minimum: 0 + type: integer + format: int32 + offset: + minimum: 0 + type: integer + format: int32 + tenantId: + type: string + lastChangedSince: + type: integer + format: int64 + includeDeleted: + type: boolean + HouseholdSearch: + type: object + properties: + id: + type: array + items: + type: string + clientReferenceId: + type: array + items: + type: string + boundaryCode: + type: string + latitude: + maximum: 90 + exclusiveMaximum: false + minimum: -90 + exclusiveMinimum: false + type: number + format: double + longitude: + maximum: 180 + exclusiveMaximum: false + minimum: -180 + exclusiveMinimum: false + type: number + format: double + searchRadius: + minimum: 0 + exclusiveMinimum: false + type: number + format: double + HouseholdSearchRequest: + required: + - Household + - RequestInfo + type: object + properties: + RequestInfo: + $ref: '#/components/schemas/RequestInfo' + Household: + $ref: '#/components/schemas/HouseholdSearch' + HouseholdBulkResponse: + required: + - ResponseInfo + type: object + properties: + ResponseInfo: + $ref: '#/components/schemas/ResponseInfo' + Households: + type: array + items: + $ref: '#/components/schemas/Household' + TotalCount: + type: integer + format: int64 + HouseholdMember: + required: + - tenantId + type: object + properties: + id: + maxLength: 64 + minLength: 2 + type: string + tenantId: + maxLength: 1000 + minLength: 2 + type: string + status: + type: string + source: + type: string + rowVersion: + type: integer + format: int32 + applicationId: + type: string + hasErrors: + type: boolean + additionalFields: + $ref: '#/components/schemas/AdditionalFields' + auditDetails: + $ref: '#/components/schemas/AuditDetails' + clientReferenceId: + maxLength: 64 + minLength: 2 + type: string + clientAuditDetails: + $ref: '#/components/schemas/AuditDetails' + householdId: + maxLength: 64 + minLength: 2 + type: string + householdClientReferenceId: + maxLength: 64 + minLength: 2 + type: string + individualId: + maxLength: 64 + minLength: 2 + type: string + individualClientReferenceId: + maxLength: 64 + minLength: 2 + type: string + isHeadOfHousehold: + type: boolean + isDeleted: + type: boolean + HouseholdMemberBulkRequest: + required: + - HouseholdMembers + - RequestInfo + type: object + properties: + RequestInfo: + $ref: '#/components/schemas/RequestInfo' + HouseholdMembers: + maxItems: 2147483647 + minItems: 1 + type: array + items: + $ref: '#/components/schemas/HouseholdMember' + HouseholdMemberRequest: + required: + - HouseholdMember + - RequestInfo + type: object + properties: + RequestInfo: + $ref: '#/components/schemas/RequestInfo' + HouseholdMember: + $ref: '#/components/schemas/HouseholdMember' + HouseholdMemberResponse: + required: + - ResponseInfo + type: object + properties: + ResponseInfo: + $ref: '#/components/schemas/ResponseInfo' + HouseholdMember: + $ref: '#/components/schemas/HouseholdMember' + HouseholdMemberSearch: + type: object + properties: + id: + type: array + items: + type: string + clientReferenceId: + type: array + items: + type: string + householdId: + type: array + items: + type: string + householdClientReferenceId: + type: array + items: + type: string + individualId: + type: array + items: + type: string + individualClientReferenceId: + type: array + items: + type: string + isHeadOfHousehold: + type: boolean + HouseholdMemberSearchRequest: + required: + - HouseholdMember + - RequestInfo + type: object + properties: + RequestInfo: + $ref: '#/components/schemas/RequestInfo' + HouseholdMember: + $ref: '#/components/schemas/HouseholdMemberSearch' + HouseholdMemberBulkResponse: + required: + - ResponseInfo + type: object + properties: + ResponseInfo: + $ref: '#/components/schemas/ResponseInfo' + TotalCount: + type: integer + format: int64 + HouseholdMembers: + type: array + items: + $ref: '#/components/schemas/HouseholdMember' diff --git a/docs/health-api-specs/contracts/registries/individual.yml b/docs/health-api-specs/contracts/registries/individual.yml index 8fce191f8c4..16c0ea3684e 100644 --- a/docs/health-api-specs/contracts/registries/individual.yml +++ b/docs/health-api-specs/contracts/registries/individual.yml @@ -1,597 +1,973 @@ -swagger: '2.0' +openapi: 3.0.1 info: - version: 1.0.0 title: Individual Registry - description: > - This module facilitates maintenance of an Individual registry. - contact: - name: Digit - email: info@egovernments.org -schemes: - - https -x-common-path: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-0-0.yml + version: v1.6 +servers: + - url: https://unified-dev.digit.org + description: Development server url paths: + /individual/v1/_create: post: - summary: >- - Create/Add a new Individual - description: >- - Create a new Individual - parameters: - - name: Individual - in: body - description: Capture details of Individual. - required: true - schema: - $ref: '#/definitions/IndividualRequest' - - $ref: '#/parameters/echoResource' tags: - Individual - responses: - '202': - description: Accepted + operationId: individualV1CreatePost + parameters: + - name: echoResource + in: query + required: false schema: - $ref: '#/definitions/IndividualResponse' + type: boolean + default: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/IndividualRequest' + required: true + responses: + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/IndividualResponse' '400': description: Bad Request - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes '500': description: Internal Server Error - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes /individual/v1/bulk/_create: post: - summary: >- - Create/Add Individuals - description: >- - Create a new Individuals - parameters: - - name: Individual - in: body - description: Capture details of Individual. - required: true - schema: - $ref: '#/definitions/IndividualBulkRequest' - - $ref: '#/parameters/echoResource' tags: - Individual - responses: - '202': - description: Accepted + operationId: individualV1BulkCreatePost + parameters: + - name: echoResource + in: query + required: false schema: - $ref: '#/definitions/IndividualBulkResponse' + type: boolean + default: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/IndividualBulkRequest' + required: true + responses: + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ResponseInfo' '400': description: Bad Request - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes '500': description: Internal Server Error - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes /individual/v1/_update: post: - summary: >- - Update the details of a existing Individual - description: >- - Update the details of a existing Individual - parameters: - - name: Individual - in: body - description: Details for the Individual. - required: true - schema: - $ref: '#/definitions/IndividualRequest' - - $ref: '#/parameters/echoResource' tags: - Individual - responses: - '202': - description: Accepted + operationId: individualV1UpdatePost + parameters: + - name: echoResource + in: query + required: false schema: - $ref: '#/definitions/IndividualResponse' + type: boolean + default: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/IndividualRequest' + required: true + responses: + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/IndividualResponse' '400': description: Bad Request - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes '500': description: Internal Server Error - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes /individual/v1/bulk/_update: post: - summary: >- - Update the details of existing Individuals - description: >- - Update the details of existing Individuals - parameters: - - name: Individual - in: body - description: Details for the Individual. - required: true - schema: - $ref: '#/definitions/IndividualBulkRequest' - - $ref: '#/parameters/echoResource' tags: - Individual - responses: - '202': - description: Accepted + operationId: individualV1BulkUpdatePost + parameters: + - name: echoResource + in: query + required: false schema: - $ref: '#/definitions/IndividualBulkResponse' + type: boolean + default: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/IndividualBulkRequest' + required: true + responses: + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ResponseInfo' '400': description: Bad Request - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes '500': description: Internal Server Error - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes /individual/v1/_delete: post: - summary: >- - Soft delete the details of a existing Individual and nested entities - description: >- - Soft delete the details of a existing Individual and nested entities - parameters: - - name: Individual - in: body - description: Details for the Individual. - required: true - schema: - $ref: '#/definitions/IndividualRequest' - - $ref: '#/parameters/echoResource' tags: - Individual - responses: - '202': - description: Accepted + operationId: individualV1DeletePost + parameters: + - name: echoResource + in: query + required: false schema: - $ref: '#/definitions/IndividualResponse' + type: boolean + default: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/IndividualRequest' + required: true + responses: + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/IndividualResponse' '400': description: Bad Request - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes '500': description: Internal Server Error - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes /individual/v1/bulk/_delete: post: - summary: >- - Soft delete the details of a existing Individual and nested entities in bulk - description: >- - Soft delete the details of a existing Individual and nested entities in bulk - parameters: - - name: Individual - in: body - description: Details for the Individual. - required: true - schema: - $ref: '#/definitions/IndividualBulkRequest' - - $ref: '#/parameters/echoResource' tags: - Individual - responses: - '202': - description: Accepted + operationId: individualV1BulkDeletePost + parameters: + - name: echoResource + in: query + required: false schema: - $ref: '#/definitions/IndividualBulkResponse' + type: boolean + default: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/IndividualBulkRequest' + required: true + responses: + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ResponseInfo' '400': description: Bad Request - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes '500': description: Internal Server Error - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes /individual/v1/_search: post: - summary: >- - Search existing Individual - description: >- - Search existing Individual - parameters: - - name: Individual - in: body - description: Individual details. - required: true - schema: - $ref: '#/definitions/IndividualSearchRequest' - - $ref: '#/parameters/limit' - - $ref: '#/parameters/offset' - - $ref: '#/parameters/tenantId' - - $ref: '#/parameters/lastChangedSince' - - $ref: '#/parameters/includeDeleted' tags: - Individual + operationId: individualV1SearchPost + parameters: + - $ref: "#/components/parameters/limit" + - $ref: "#/components/parameters/offset" + - $ref: "#/components/parameters/tenantId" + - $ref: "#/components/parameters/lastChangedSince" + - $ref: "#/components/parameters/includeDeleted" + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/IndividualSearchRequest' + required: true responses: '200': - description: Ok - schema: - $ref: '#/definitions/IndividualBulkSearchResponse' + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/IndividualBulkResponse' '400': description: Bad Request - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes '500': description: Internal Server Error - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - -parameters: - #TODO is tenantId required as a query param if it can be determine from requestInfo->userInfo - tenantId: - name: tenantId - in: query - description: Unique id for a tenant. - required: true - type: string - format: varchar - - lastChangedSince: - name: lastChangedSince - description: | - epoch of the time since when the changes on the object should be picked up. Search results from this parameter should include both newly created objects since this time as well as any modified objects since this time. This criterion is included to help polling clients to get the changes in system since a last time they synchronized with the platform. - in: query - required: false - type: integer - format: int64 - - echoResource: - name: echoResource - in: query - type: boolean - required: false - default: true - description: Client can specify if the resource in request body needs to be sent back in the response. This is being used to limit amount of data that needs to flow back from the server to the client in low bandwidth scenarios. Server will always send the server generated id for validated requests. + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - serverHandlesErrors: - name: serverHandlesErrors - in: query - type: boolean - required: false - default: false - description: Client can specify that it is incapable of handling any errors with the requests and server should route these for manual intervention if required. - - limit: - name: limit - description: Pagination - limit records in response - in: query - type: integer - minimum: 0 - maximum: 1000 - required: true +components: + parameters: + tenantId: + name: tenantId + in: query + description: Unique id for a tenant. + required: true + schema: + type: string + format: varchar - offset: - name: offset - description: Pagination - offset from which records should be returned in response - in: query - type: integer - minimum: 0 - required: true + lastChangedSince: + name: lastChangedSince + in: query + description: | + Epoch of the time since when the changes on the object should be picked up. + Search results from this parameter should include both newly created objects + since this time as well as any modified objects since this time. + required: false + schema: + type: integer + format: int64 + + echoResource: + name: echoResource + in: query + description: | + Client can specify if the resource in request body needs to be sent back in the response. + required: false + schema: + type: boolean + default: true + + serverHandlesErrors: + name: serverHandlesErrors + in: query + description: | + Client can specify that it is incapable of handling any errors with the requests. + required: false + schema: + type: boolean + default: false + + limit: + name: limit + in: query + description: Pagination - limit records in response + required: true + schema: + type: integer + minimum: 0 + maximum: 1000 # TODO: review + + offset: + name: offset + in: query + description: Pagination - offset from which records should be returned in response + required: true + schema: + type: integer + minimum: 0 + + includeDeleted: + name: includeDeleted + in: query + description: Used in search APIs to specify if (soft) deleted records should be included in search results. + required: false + schema: + type: boolean + default: false - includeDeleted: - name: includeDeleted - description: Used in search APIs to specify if (soft) deleted records should be included in search results. - in: query - type: boolean - default: false - required: false -definitions: - boundaryCode: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/boundaryCode' - id: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/id' - idForSearch: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/idForSearch' - clientReferenceIdForSearch: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/clientReferenceIdForSearch' - clientReferenceId: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/clientReferenceId' - gender: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/gender' - dateOfBirth: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/dateDDMMYYYY' - tenantId: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/tenantId' - eventTimestamp: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/eventTimestamp' - isDeleted: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/isDeleted' - rowVersion: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/rowVersion' - apiOperation: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/apiOperation' - additionalFields: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/additionalFields' - Address: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/Address' - name: - type: object - properties: - givenName: - type: string - minLength: 2 - maxLength: 200 - description: Given name of individual - familyName: - type: string - minLength: 2 - maxLength: 200 - description: Family name of individual - otherNames: - type: string - minLength: 0 - maxLength: 200 - description: Other names of individual - individualId: - type: string - minLength: 2 - maxLength: 64 - description: Formatted id - Individual: - description: A representation of an Individual. - type: object - required: - - name - properties: - id: - $ref: '#/definitions/id' - individualId: - $ref: '#/definitions/individualId' - tenantId: - $ref: '#/definitions/tenantId' - clientReferenceId: - $ref: '#/definitions/clientReferenceId' - userId: #reference to user service id for this individual - $ref: '#/definitions/id' - name: - $ref: '#/definitions/name' - dateOfBirth: - $ref: '#/definitions/dateOfBirth' - gender: - $ref: '#/definitions/gender' - bloodGroup: - type: string - description: Blood group of the user. - maxLength: 3 - items: + schemas: + AdditionalFields: + type: object + properties: + schema: + maxLength: 64 + minLength: 2 + type: string + version: + minimum: 1 + type: integer + format: int32 + fields: + type: array + items: + $ref: '#/components/schemas/Field' + Address: + required: + - type + type: object + properties: + id: + maxLength: 64 + minLength: 2 + type: string + clientReferenceId: + maxLength: 64 + minLength: 2 + type: string + individualId: + maxLength: 64 + minLength: 2 + type: string + tenantId: + type: string + doorNo: + maxLength: 64 + minLength: 2 + type: string + latitude: + maximum: 90 + exclusiveMaximum: false + minimum: -90 + exclusiveMinimum: false + type: number + format: double + longitude: + maximum: 180 + exclusiveMaximum: false + minimum: -180 + exclusiveMinimum: false + type: number + format: double + locationAccuracy: + minimum: 0 + exclusiveMinimum: false + type: number + format: double + type: + type: string + enum: + - PERMANENT + - CORRESPONDENCE + - OTHER + addressLine1: + maxLength: 256 + minLength: 2 + type: string + addressLine2: + maxLength: 256 + minLength: 2 + type: string + landmark: + maxLength: 256 + minLength: 2 + type: string + city: + maxLength: 256 + minLength: 2 + type: string + pincode: + maxLength: 64 + minLength: 2 + type: string + buildingName: + maxLength: 256 + minLength: 2 + type: string + street: + maxLength: 256 + minLength: 2 + type: string + locality: + $ref: '#/components/schemas/Boundary' + ward: + $ref: '#/components/schemas/Boundary' + isDeleted: + type: boolean + auditDetails: + $ref: '#/components/schemas/AuditDetails' + AuditDetails: + type: object + properties: + createdBy: + type: string + lastModifiedBy: + type: string + createdTime: + type: integer + format: int64 + lastModifiedTime: + type: integer + format: int64 + Boundary: + required: + - code + type: object + properties: + id: + type: string + tenantId: + type: string + code: + type: string + geometry: + $ref: '#/components/schemas/JsonNode' + auditDetails: + $ref: '#/components/schemas/AuditDetails' + additionalDetails: + $ref: '#/components/schemas/JsonNode' + Field: + required: + - key + - value + type: object + properties: + key: + maxLength: 64 + minLength: 2 + type: string + value: + maxLength: 10000 + minLength: 1 + type: string + Identifier: + required: + - identifierId + - identifierType + type: object + properties: + id: + maxLength: 64 + minLength: 2 + type: string + clientReferenceId: + maxLength: 64 + minLength: 2 + type: string + individualId: + maxLength: 64 + minLength: 2 + type: string + identifierType: + maxLength: 64 + minLength: 2 + type: string + identifierId: + maxLength: 64 + minLength: 2 + type: string + isDeleted: + type: boolean + auditDetails: + $ref: '#/components/schemas/AuditDetails' + Individual: + required: + - name + - tenantId + type: object + properties: + id: + maxLength: 64 + minLength: 2 + type: string + tenantId: + maxLength: 1000 + minLength: 2 + type: string + status: + type: string + source: + type: string + rowVersion: + type: integer + format: int32 + applicationId: + type: string + hasErrors: + type: boolean + additionalFields: + $ref: '#/components/schemas/AdditionalFields' + auditDetails: + $ref: '#/components/schemas/AuditDetails' + clientReferenceId: + maxLength: 64 + minLength: 2 + type: string + clientAuditDetails: + $ref: '#/components/schemas/AuditDetails' + individualId: + maxLength: 64 + minLength: 2 + type: string + userId: + type: string + userUuid: + type: string + name: + $ref: '#/components/schemas/Name' + dateOfBirth: + type: string + format: date-time + gender: + type: string + enum: + - MALE + - FEMALE + - OTHER + - TRANSGENDER + bloodGroup: type: string enum: - - A+ - B+ - - O+ - - AB+ - - A- - B- + - A+ + - A- + - AB+ - AB- - O- - example: AB+ - mobileNumber: - type: string - description: Mobile number of the user - maxLength: 20 - altContactNumber: - type: string - description: Alternate contact number of the user - maxLength: 16 - email: - type: string - format: email - minLength: 5 - maxLength: 200 - address: - type: array - items: - $ref: '#/definitions/Address' - fatherName: - type: string - description: Individual's father's name - if available - maxLength: 100 - husbandName: - type: string - description: Individual's husband's name - if applicable - maxLength: 100 - relationship: - type: string - description: Relationship - if guardian - maxLength: 100 - identifiers: - type: array - items: - $ref: '#/definitions/Identifier' - skills: - type: array - items: - $ref: '#/definitions/Skill' - photo: - type: string - description : Filestore service uuid holding individual's photograph - additionalFields: - $ref: '#/definitions/additionalFields' - isDeleted: - $ref: '#/definitions/isDeleted' - isSystemUser: - type: boolean - description: Flag to indicate if the individual should be registered with Egov-user service - readOnly: true - rowVersion: - $ref: '#/definitions/rowVersion' - auditDetails: - $ref: 'https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/AuditDetails' - - IndividualSearch: - description: A representation of an Individual. - type: object - properties: - individualId: -# $ref: '#/definitions/individualId' - type: array - items: - type: string - id: - $ref: '#/definitions/idForSearch' - clientReferenceId: - $ref: '#/definitions/clientReferenceIdForSearch' - name: - $ref: '#/definitions/name' - dateOfBirth: - $ref: '#/definitions/dateOfBirth' - gender: - $ref: '#/definitions/gender' - mobileNumber: - type: array - items: - type: string + - O+ + mobileNumber: maxLength: 20 - description: Mobile number of the user - - socialCategory: - type: string - description: Social category of the user - identifier: - $ref: '#/definitions/Identifier' - boundaryCode: - $ref: '#/definitions/boundaryCode' - wardCode: - $ref: '#/definitions/boundaryCode' - createdFrom: - type: number - createdTo: - type: number - - Identifier: - type: object - required: - - type - - id - properties: - identifierType: - type: string - example: 'SYSTEM_GENERATED' - minLength: 2 - maxLength: 64 - identifierId: - type: string - example: 'ABCD-1212' - minLength: 2 - maxLength: 64 - - IndividualRequest: - type: object - properties: - RequestInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/RequestInfo - Individual: - type: object - $ref: '#/definitions/Individual' - required: - - RequestInfo - - Individual - - IndividualBulkRequest: - type: object - properties: - RequestInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/RequestInfo - Individuals: - type: array - minItems: 1 - items: - $ref: '#/definitions/Individual' - required: - - RequestInfo - - Individual - - IndividualSearchRequest: - type: object - properties: - RequestInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/RequestInfo - Individual: - $ref: '#/definitions/IndividualSearch' - required: - - RequestInfo - - Individual - - IndividualResponse: - type: object - properties: - ResponseInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ResponseInfo - Individual: - type: object - $ref: '#/definitions/Individual' - required: - - ResponseInfo - - IndividualBulkResponse: - type: object - properties: - ResponseInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ResponseInfo - required: - - ResponseInfo - - IndividualBulkSearchResponse: - type: object - properties: - ResponseInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ResponseInfo - Individuals: - type: array - items: - $ref: '#/definitions/Individual' - required: - - ResponseInfo - - Skill: - type: object - required: [type] - properties: - id: - $ref: '#/definitions/id' - type: - type: string - description: skill type of the individual - minLength: 2 - maxLength: 64 - level: - type: string - description: skill level of the individual - minLength: 2 - maxLength: 64 - experience: - type: string - description: experience of the individual - minLength: 2 - maxLength: 64 + minLength: 0 + type: string + altContactNumber: + maxLength: 16 + minLength: 0 + type: string + email: + maxLength: 200 + minLength: 5 + type: string + address: + maxItems: 3 + minItems: 0 + type: array + items: + $ref: '#/components/schemas/Address' + fatherName: + maxLength: 100 + minLength: 0 + type: string + husbandName: + maxLength: 100 + minLength: 0 + type: string + relationship: + maxLength: 100 + minLength: 1 + type: string + identifiers: + type: array + items: + $ref: '#/components/schemas/Identifier' + skills: + type: array + items: + $ref: '#/components/schemas/Skill' + photo: + type: string + isDeleted: + type: boolean + isSystemUser: + type: boolean + isSystemUserActive: + type: boolean + userDetails: + $ref: '#/components/schemas/UserDetails' + IndividualBulkRequest: + required: + - Individuals + - RequestInfo + type: object + properties: + RequestInfo: + $ref: '#/components/schemas/RequestInfo' + Individuals: + maxItems: 2147483647 + minItems: 1 + type: array + items: + $ref: '#/components/schemas/Individual' + JsonNode: + type: object + Name: + type: object + properties: + givenName: + maxLength: 200 + minLength: 2 + type: string + familyName: + maxLength: 200 + minLength: 2 + type: string + otherNames: + maxLength: 200 + minLength: 0 + type: string + PlainAccessRequest: + type: object + properties: + recordId: + type: string + plainRequestFields: + type: array + items: + type: string + RequestInfo: + type: object + properties: + apiId: + type: string + ver: + type: string + ts: + type: integer + format: int64 + action: + type: string + did: + type: string + key: + type: string + msgId: + type: string + authToken: + type: string + correlationId: + type: string + plainAccessRequest: + $ref: '#/components/schemas/PlainAccessRequest' + userInfo: + $ref: '#/components/schemas/User' + Role: + type: object + properties: + name: + type: string + code: + type: string + description: + type: string + tenantId: + type: string + Skill: + required: + - type + type: object + properties: + id: + maxLength: 64 + minLength: 2 + type: string + clientReferenceId: + maxLength: 64 + minLength: 2 + type: string + individualId: + maxLength: 64 + minLength: 2 + type: string + type: + maxLength: 64 + minLength: 2 + type: string + level: + maxLength: 64 + minLength: 2 + type: string + experience: + maxLength: 64 + minLength: 2 + type: string + isDeleted: + type: boolean + auditDetails: + $ref: '#/components/schemas/AuditDetails' + User: + type: object + properties: + id: + type: integer + format: int64 + userName: + type: string + name: + type: string + type: + type: string + mobileNumber: + type: string + emailId: + type: string + roles: + type: array + items: + $ref: '#/components/schemas/Role' + tenantId: + type: string + uuid: + type: string + UserDetails: + type: object + properties: + username: + maxLength: 180 + minLength: 0 + type: string + password: + maxLength: 64 + minLength: 0 + type: string + tenantId: + maxLength: 1000 + minLength: 2 + type: string + roles: + type: array + items: + $ref: '#/components/schemas/Role' + type: + maxLength: 50 + minLength: 0 + type: string + enum: + - CITIZEN + - EMPLOYEE + - SYSTEM + - BUSINESS + ResponseInfo: + type: object + properties: + apiId: + type: string + ver: + type: string + ts: + type: integer + format: int64 + resMsgId: + type: string + msgId: + type: string + status: + type: string + IndividualRequest: + required: + - Individual + - RequestInfo + type: object + properties: + RequestInfo: + $ref: '#/components/schemas/RequestInfo' + Individual: + $ref: '#/components/schemas/Individual' + IndividualResponse: + required: + - ResponseInfo + type: object + properties: + ResponseInfo: + $ref: '#/components/schemas/ResponseInfo' + Individual: + $ref: '#/components/schemas/Individual' + URLParams: + required: + - limit + - offset + - tenantId + type: object + properties: + urlparams: + $ref: '#/components/schemas/URLParams' + limit: + maximum: 1000 + minimum: 0 + type: integer + format: int32 + offset: + minimum: 0 + type: integer + format: int32 + tenantId: + type: string + lastChangedSince: + type: integer + format: int64 + includeDeleted: + type: boolean + IndividualSearch: + type: object + properties: + id: + type: array + items: + type: string + clientReferenceId: + type: array + items: + type: string + individualId: + type: array + items: + type: string + name: + $ref: '#/components/schemas/Name' + dateOfBirth: + type: string + format: date-time + gender: + type: string + enum: + - MALE + - FEMALE + - OTHER + - TRANSGENDER + mobileNumber: + type: array + items: + type: string + socialCategory: + type: string + wardCode: + type: string + individualName: + type: string + createdFrom: + type: number + createdTo: + type: number + identifier: + $ref: '#/components/schemas/Identifier' + boundaryCode: + type: string + roleCodes: + type: array + items: + type: string + username: + type: array + items: + type: string + userId: + type: array + items: + type: integer + format: int64 + userUuid: + maxItems: 2147483647 + minItems: 1 + type: array + items: + type: string + latitude: + maximum: 90 + exclusiveMaximum: false + minimum: -90 + exclusiveMinimum: false + type: number + format: double + longitude: + maximum: 180 + exclusiveMaximum: false + minimum: -180 + exclusiveMinimum: false + type: number + format: double + searchRadius: + minimum: 0 + exclusiveMinimum: false + type: number + format: double + type: + type: string + IndividualSearchRequest: + required: + - Individual + - RequestInfo + type: object + properties: + RequestInfo: + $ref: '#/components/schemas/RequestInfo' + Individual: + $ref: '#/components/schemas/IndividualSearch' + IndividualBulkResponse: + required: + - ResponseInfo + type: object + properties: + ResponseInfo: + $ref: '#/components/schemas/ResponseInfo' + TotalCount: + type: integer + format: int64 + Individual: + type: array + items: + $ref: '#/components/schemas/Individual' diff --git a/docs/health-api-specs/contracts/registries/product.yml b/docs/health-api-specs/contracts/registries/product.yml index 7b5c6fe903b..71afff06ed2 100644 --- a/docs/health-api-specs/contracts/registries/product.yml +++ b/docs/health-api-specs/contracts/registries/product.yml @@ -1,515 +1,576 @@ -swagger: '2.0' +openapi: 3.0.1 info: - version: 1.0.0 - title: Product Registry - description: > - This module facilitates maintenance of a Product registry. - contact: - name: Digit - email: info@egovernments.org -schemes: - - https -x-common-path: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-0-0.yml + title: Household Registry + version: v1.6 +servers: + - url: https://unified-dev.digit.org + description: Development server url paths: - /product/v1/_create: + /v1/_create: post: - summary: >- - Create/Add a new product - description: >- - Create a new product - parameters: - - name: Product - in: body - description: Capture details of Product. - required: true - schema: - $ref: '#/definitions/ProductRequest' tags: - Product + summary: Create/Add a new product + description: Create/Add a new product + operationId: productV1CreatePost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProductRequest' + required: true responses: - '202': - description: Product request has been accepted. - schema: - $ref: '#/definitions/ProductResponse' + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ProductResponse' '400': - description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - /product/v1/_update: + description: Bad Request + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + /v1/_update: post: - summary: >- - Update product - description: >- - Update product - parameters: - - name: Product - in: body - description: Capture details of Product. - required: true - schema: - $ref: '#/definitions/ProductRequest' tags: - Product + summary: Update product + description: Update product + operationId: productV1UpdatePost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProductRequest' + required: true responses: - '202': - description: Product request has been accepted. - schema: - $ref: '#/definitions/ProductResponse' + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ProductResponse' '400': - description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - /product/v1/_search: + description: Bad Request + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + /v1/_search: post: - summary: >- - Search product - description: >- - Search product + tags: + - Product + summary: Search product + description: Search product + operationId: productV1SearchPost parameters: - - name: Product - in: body - description: Capture details of Product. + - name: limit + in: query required: true schema: - $ref: '#/definitions/ProductSearchRequest' - - $ref: '#/parameters/limit' - - $ref: '#/parameters/offset' - - $ref: '#/parameters/tenantId' - - $ref: '#/parameters/lastChangedSince' - - $ref: '#/parameters/includeDeleted' - tags: - - Product + maximum: 1000 + minimum: 0 + type: integer + format: int32 + - name: offset + in: query + required: true + schema: + minimum: 0 + type: integer + format: int32 + - name: tenantId + in: query + required: true + schema: + maxLength: 1000 + minLength: 2 + type: string + - name: lastChangedSince + in: query + required: false + schema: + type: integer + format: int64 + - name: includeDeleted + in: query + required: false + schema: + type: boolean + default: false + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProductSearchRequest' + required: true responses: '200': - description: Product. - schema: - $ref: '#/definitions/ProductResponse' + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ProductResponse' '400': - description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - - /product/variant/v1/_create: + description: Bad Request + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + /variant/v1/_create: post: - summary: >- - Create/Add a new variant for a product - description: >- - Create/Add a new variant for a product - parameters: - - name: ProductVariant - in: body - description: Capture details of Product Variant. - required: true - schema: - $ref: '#/definitions/ProductVariantRequest' tags: - - Product + - Product Variant + summary: Create/Add a new variant for a product + description: Create/Add a new variant for a product + operationId: productVariantV1CreatePost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProductVariantRequest' + required: true responses: - '202': - description: Product Variant request has been accepted. - schema: - $ref: '#/definitions/ProductVariantResponse' + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ProductVariantResponse' '400': - description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - /product/variant/v1/_update: + description: Bad Request + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + /variant/v1/_update: post: - summary: >- - Update product variant - description: >- - Update product variant - parameters: - - name: ProductVariant - in: body - description: Capture details of Product Variant. - required: true - schema: - $ref: '#/definitions/ProductVariantRequest' tags: - - Product + - Product Variant + summary: Update product variant + description: Update product variant + operationId: productVariantV1UpdatePost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProductVariantRequest' + required: true responses: - '202': - description: Product variant request has been accepted. - schema: - $ref: '#/definitions/ProductVariantResponse' + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ProductVariantResponse' '400': - description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - /product/variant/v1/_search: + description: Bad Request + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + /variant/v1/_search: post: - summary: >- - Search product variant - description: >- - Search product variant + tags: + - Product Variant + summary: Search product variant + description: Search product variant + operationId: productVariantV1SearchPost parameters: - - name: ProductVariant - in: body - description: Capture details of Product variant. + - name: limit + in: query required: true schema: - $ref: '#/definitions/ProductVariantSearchRequest' - - $ref: '#/parameters/limit' - - $ref: '#/parameters/offset' - - $ref: '#/parameters/tenantId' - - $ref: '#/parameters/lastChangedSince' - - $ref: '#/parameters/includeDeleted' - tags: - - Product + maximum: 1000 + minimum: 0 + type: integer + format: int32 + - name: offset + in: query + required: true + schema: + minimum: 0 + type: integer + format: int32 + - name: tenantId + in: query + required: true + schema: + maxLength: 1000 + minLength: 2 + type: string + - name: lastChangedSince + in: query + required: false + schema: + type: integer + format: int64 + - name: includeDeleted + in: query + required: false + schema: + type: boolean + default: false + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProductVariantSearchRequest' + required: true responses: '200': - description: Product Variant. - schema: - $ref: '#/definitions/ProductVariantResponse' + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ProductVariantResponse' '400': - description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - -parameters: - #TODO is tenantId required as a query param if it can be determine from requestInfo->userInfo - tenantId: - name: tenantId - in: query - description: Unique id for a tenant. - required: true - type: string - format: varchar - - lastChangedSince: - name: lastChangedSince - description: | - epoch of the time since when the changes on the object should be picked up. Search results from this parameter should include both newly created objects since this time as well as any modified objects since this time. This criterion is included to help polling clients to get the changes in system since a last time they synchronized with the platform. - in: query - required: false - type: integer - format: int64 - - echoResource: - name: echoResource - in: query - type: boolean - required: false - default: true - description: Client can specify if the resource in request body needs to be sent back in the response. This is being used to limit amount of data that needs to flow back from the server to the client in low bandwidth scenarios. Server will always send the server generated id for validated requests. - - serverHandlesErrors: - name: serverHandlesErrors - in: query - type: boolean - required: false - default: false - description: Client can specify that it is incapable of handling any errors with the requests and server should route these for manual intervention if required. - - limit: - name: limit - description: Pagination - limit records in response - in: query - type: integer - minimum: 0 - maximum: 1000 #TODO review - required: true - - offset: - name: offset - description: Pagination - offset from which records should be returned in response - in: query - type: integer - minimum: 0 - required: true - - includeDeleted: - name: includeDeleted - description: Used in search APIs to specify if (soft) deleted records should be included in search results. - in: query - type: boolean - default: false - required: false - -definitions: - boundaryCode: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/boundaryCode' - id: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/id' - idForSearch: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/idForSearch' - tenantId: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/tenantId' - eventTimestamp: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/eventTimestamp' - isDeleted: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/isDeleted' - rowVersion: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/rowVersion' - apiOperation: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/apiOperation' - additionalFields: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/additionalFields' - Address: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/Address' - - - Product: - type: object - required: - - type - - name - properties: - id: - $ref: '#/definitions/id' - tenantId: - $ref: '#/definitions/tenantId' - type: - type: string - description: Define the type of product - example: 'DRUG' - minLength: 2 - maxLength: 100 - # enum: - # - MEDICINE - # - VACCINE - # - SPRAY - # - BEDNET - # - EDUCATIONAL_MATERIAL - name: - type: string - description: Capture name of the product - example: Paracetamol - minLength: 2 - maxLength: 1000 - manufacturer: - type: string - description: Capture manufacturer of product - example: 'J&J' - minLength: 0 - maxLength: 1000 - additionalFields: - $ref: '#/definitions/additionalFields' - isDeleted: - $ref: '#/definitions/isDeleted' - rowVersion: - $ref: '#/definitions/rowVersion' - auditDetails: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/AuditDetails - - ProductSearch: - type: object - properties: - id: - $ref: '#/definitions/idForSearch' - type: - type: string - description: Define the type of product - example: 'DRUG' - name: - type: array - items: - type: string - example: Paracetamol - description: Capture name of the product - - manufacturer: - type: array - items: + description: Bad Request + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes +components: + schemas: + AdditionalFields: + type: object + properties: + schema: + maxLength: 64 + minLength: 2 type: string - example: 'J&J' - description: Capture manufacturer of product - - - ProductVariant: - type: object - required: - - productId - - variation - properties: - id: - $ref: '#/definitions/id' - tenantId: - $ref: '#/definitions/tenantId' - productId: - type: string - minLength: 2 - maxLength: 64 - description: Product for which this variant is being created - sku: - type: string - description: Capture sku code of the variant - example: 'PAR-200' - minLength: 0 - maxLength: 1000 - variation: - type: string - description: Capture name of the variant - example: Paracetamol 200mg white color - minLength: 0 - maxLength: 1000 - # variant: - # #A variant is a combination of 1 or more variations for a product - # type: array - # items: - # $ref: '#/definitions/Variation' - # description: Capture product variant - additionalFields: - $ref: '#/definitions/additionalFields' - isDeleted: - $ref: '#/definitions/isDeleted' - rowVersion: - $ref: '#/definitions/rowVersion' - auditDetails: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/AuditDetails - - ProductVariantSearch: - type: object - properties: - id: - $ref: '#/definitions/idForSearch' - productId: - type: array - items: + version: + minimum: 1 + type: integer + format: int32 + fields: + type: array + items: + $ref: '#/components/schemas/Field' + AuditDetails: + type: object + properties: + createdBy: + type: string + lastModifiedBy: + type: string + createdTime: + type: integer + format: int64 + lastModifiedTime: + type: integer + format: int64 + Field: + required: + - key + - value + type: object + properties: + key: + maxLength: 64 + minLength: 2 + type: string + value: + maxLength: 10000 + minLength: 2 + type: string + PlainAccessRequest: + type: object + properties: + recordId: + type: string + plainRequestFields: + type: array + items: + type: string + ProductVariant: + required: + - productId + - tenantId + - variation + type: object + properties: + id: type: string + tenantId: + maxLength: 1000 minLength: 2 + type: string + productId: maxLength: 64 - description: Product for which this variant is being created - sku: - type: string - description: Capture sku code of the variant - example: 'PAR-200' - minLength: 0 - maxLength: 1000 - variation: - type: string - description: Capture name of the variant - example: Paracetamol 200mg white color - minLength: 0 - maxLength: 1000 - - # Variation: - # type: object - # properties: - # variation: - # type: string - # description: Capture product variation - # example: '200' - # variationUnit: - # type: string - # example: 'MG' - # enum: - # - BALE - # - CARTONS - # - VIALS - # - MG - # - ML - - ProjectProductVariant: - #Master Data MDMS - #Required to map projects to product variants and define the type and if the variant is considered as a base unit within this project - type: object - required: - - productVariantId - properties: - productVariantId: - type: string - description: Reference to id in ProductVariant - type: - type: string - description: Type of resource i.e. Human, Product in the context of the project - isBaseUnitVariant: - type: boolean - description: Denotes if a variant is a base unit variant. Useful to filter variants applicable for tasks within a project. - - - ProductRequest: - type: object - properties: - RequestInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/RequestInfo - Product: - type: array - minItems: 1 - items: - $ref: '#/definitions/Product' - apiOperation: - $ref: '#/definitions/apiOperation' - required: - - RequestInfo - - Product - - ProductSearchRequest: - type: object - properties: - RequestInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/RequestInfo - Product: - $ref: '#/definitions/ProductSearch' - required: - - RequestInfo - - Product - - ProductResponse: - type: object - properties: - ResponseInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ResponseInfo - Product: - type: array - items: - $ref: '#/definitions/Product' - required: - - ResponseInfo - - Product - - ProductVariantRequest: - type: object - properties: - RequestInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/RequestInfo - ProductVariant: - type: array - minItems: 1 - items: - $ref: '#/definitions/ProductVariant' - apiOperation: - $ref: '#/definitions/apiOperation' - required: - - RequestInfo - - ProductVariant - - ProductVariantSearchRequest: - type: object - properties: - RequestInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/RequestInfo - ProductVariant: - $ref: '#/definitions/ProductVariantSearch' - required: - - RequestInfo - - ProductVariant + minLength: 2 + type: string + sku: + maxLength: 1000 + minLength: 0 + type: string + variation: + maxLength: 1000 + minLength: 0 + type: string + additionalFields: + $ref: '#/components/schemas/AdditionalFields' + isDeleted: + type: boolean + rowVersion: + type: integer + format: int32 + auditDetails: + $ref: '#/components/schemas/AuditDetails' + ProductVariantRequest: + required: + - ProductVariant + - RequestInfo + type: object + properties: + RequestInfo: + $ref: '#/components/schemas/RequestInfo' + ProductVariant: + maxItems: 2147483647 + minItems: 1 + type: array + items: + $ref: '#/components/schemas/ProductVariant' + apiOperation: + type: string + enum: + - CREATE + - UPDATE + - DELETE + RequestInfo: + type: object + properties: + apiId: + type: string + ver: + type: string + ts: + type: integer + format: int64 + action: + type: string + did: + type: string + key: + type: string + msgId: + type: string + authToken: + type: string + correlationId: + type: string + plainAccessRequest: + $ref: '#/components/schemas/PlainAccessRequest' + userInfo: + $ref: '#/components/schemas/User' + Role: + type: object + properties: + id: + type: integer + format: int64 + name: + maxLength: 128 + minLength: 0 + type: string + code: + maxLength: 50 + minLength: 0 + type: string + tenantId: + maxLength: 256 + minLength: 0 + type: string + User: + type: object + properties: + id: + type: integer + format: int64 + userName: + maxLength: 180 + minLength: 0 + type: string + name: + maxLength: 250 + minLength: 0 + type: string + type: + maxLength: 50 + minLength: 0 + type: string + mobileNumber: + maxLength: 150 + minLength: 0 + type: string + emailId: + maxLength: 300 + minLength: 0 + type: string + roles: + type: array + items: + $ref: '#/components/schemas/Role' + tenantId: + maxLength: 256 + minLength: 0 + type: string + uuid: + maxLength: 36 + minLength: 0 + type: string + ProductVariantResponse: + required: + - ProductVariant + - ResponseInfo + type: object + properties: + ResponseInfo: + $ref: '#/components/schemas/ResponseInfo' + ProductVariant: + type: array + items: + $ref: '#/components/schemas/ProductVariant' + ResponseInfo: + type: object + properties: + apiId: + type: string + ver: + type: string + ts: + type: integer + format: int64 + resMsgId: + type: string + msgId: + type: string + status: + type: string + ProductVariantSearch: + type: object + properties: + id: + type: array + items: + type: string + productId: + maxLength: 64 + minLength: 2 + type: string + sku: + maxLength: 1000 + minLength: 0 + type: string + variation: + maxLength: 1000 + minLength: 0 + type: string + ProductVariantSearchRequest: + required: + - ProductVariant + - RequestInfo + type: object + properties: + RequestInfo: + $ref: '#/components/schemas/RequestInfo' + ProductVariant: + $ref: '#/components/schemas/ProductVariantSearch' + Product: + required: + - name + - tenantId + - type + type: object + properties: + id: + type: string + tenantId: + maxLength: 1000 + minLength: 2 + type: string + type: + maxLength: 100 + minLength: 2 + type: string + name: + maxLength: 1000 + minLength: 2 + type: string + manufacturer: + maxLength: 1000 + minLength: 0 + type: string + additionalFields: + $ref: '#/components/schemas/AdditionalFields' + isDeleted: + type: boolean + rowVersion: + type: integer + format: int32 + auditDetails: + $ref: '#/components/schemas/AuditDetails' + ProductRequest: + required: + - Product + - RequestInfo + type: object + properties: + RequestInfo: + $ref: '#/components/schemas/RequestInfo' + Product: + maxItems: 2147483647 + minItems: 1 + type: array + items: + $ref: '#/components/schemas/Product' + apiOperation: + type: string + enum: + - CREATE + - UPDATE + - DELETE + ProductResponse: + required: + - Product + - ResponseInfo + type: object + properties: + ResponseInfo: + $ref: '#/components/schemas/ResponseInfo' + Product: + type: array + items: + $ref: '#/components/schemas/Product' + ProductSearch: + type: object + properties: + id: + type: array + items: + type: string + type: + type: string + name: + type: string + manufacturer: + type: string + ProductSearchRequest: + required: + - Product + - RequestInfo + type: object + properties: + RequestInfo: + $ref: '#/components/schemas/RequestInfo' + Product: + $ref: '#/components/schemas/ProductSearch' - ProductVariantResponse: - type: object - properties: - ResponseInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ResponseInfo - ProductVariant: - type: array - items: - $ref: '#/definitions/ProductVariant' - required: - - ResponseInfo - - ProductVariant \ No newline at end of file diff --git a/docs/health-api-specs/contracts/stock.yml b/docs/health-api-specs/contracts/stock.yml index f3f513188f0..e0ba83ff88d 100644 --- a/docs/health-api-specs/contracts/stock.yml +++ b/docs/health-api-specs/contracts/stock.yml @@ -1,818 +1,973 @@ -swagger: '2.0' +openapi: 3.0.1 info: - version: 1.0.1 title: Stock Service - description: > - This module facilitates operations on Stock. - contact: - name: Digit - email: info@egovernments.org -schemes: - - https - + version: v1.6 +servers: + - url: https://unified-qa.digit.org + description: Development server url paths: /stock/v1/_create: post: - summary: >- - Create/Add a new record for transfer of product variant stock - description: >- - Create/Add a new record for transfer of product variant stock - parameters: - - name: Stock - in: body - description: Capture details of stock transaction. - required: true - schema: - $ref: '#/definitions/StockRequest' tags: - Stock + summary: Create/Add a new record for transfer of product variant stock + description: Create/Add a new record for transfer of product variant stock + operationId: stockV1CreatePost_1 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/StockRequest' + required: true + responses: - '202': - description: Stock Transaction request has been accepted. - schema: - $ref: '#/definitions/StockResponse' + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/StockResponse' '400': description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes /stock/v1/bulk/_create: post: - summary: >- - Create/Add a new record for transfer of product variant stock in bulk - description: >- - Create/Add a new record for transfer of product variant stock in bulk - parameters: - - name: Stock - in: body - description: Capture details of stock transaction. - required: true - schema: - $ref: '#/definitions/StockBulkRequest' tags: - Stock + summary: Create/Add a new record for transfer of product variant stock in bulk + description: Create/Add a new record for transfer of product variant stock in bulk + operationId: stockV1CreatePost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/StockBulkRequest' + required: true responses: - '202': - description: Stock Transaction request has been accepted. - schema: - $ref: '#/definitions/BulkAcceptedResponse' + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ResponseInfo' '400': description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes /stock/v1/_update: post: - summary: >- - Update record for transfer of a stock transaction - description: >- - Update record for transfer of a stock transaction - parameters: - - name: Stock - in: body - description: Capture details of stock transaction - required: true - schema: - $ref: '#/definitions/StockRequest' tags: - Stock + summary: Update record for transfer of a stock transaction + description: Update record for transfer of a stock transaction + operationId: stockV1UpdatePost_1 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/StockRequest' + required: true responses: - '202': - description: Stock Transaction request has been accepted. - schema: - $ref: '#/definitions/StockResponse' + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/StockResponse' '400': description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes /stock/v1/bulk/_update: post: - summary: >- - Update records for transfer of a stock transaction in bulk - description: >- - Update records for transfer of a stock transaction in bulk - parameters: - - name: Stock - in: body - description: Capture details of stock transaction - required: true - schema: - $ref: '#/definitions/StockBulkRequest' tags: - Stock + summary: Update records for transfer of a stock transaction in bulk + description: Update records for transfer of a stock transaction in bulk + operationId: stockV1UpdatePost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/StockBulkRequest' + required: true responses: - '202': - description: Stock Transaction request has been accepted. - schema: - $ref: '#/definitions/BulkAcceptedResponse' + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ResponseInfo' '400': description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes /stock/v1/_delete: post: - summary: >- - Soft delete record for transfer of a stock transaction - description: >- - Soft delete record for transfer of a stock transaction - parameters: - - name: Stock - in: body - description: Capture details of stock transaction - required: true - schema: - $ref: '#/definitions/StockRequest' tags: - Stock + summary: Soft delete record for transfer of a stock transaction + description: Soft delete record for transfer of a stock transaction + operationId: stockV1DeletePost_1 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/StockRequest' + required: true responses: - '202': - description: Stock Transaction delete request has been accepted. - schema: - $ref: '#/definitions/StockResponse' + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/StockResponse' '400': description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes /stock/v1/bulk/_delete: post: - summary: >- - Soft delete records for transfer of a stock transaction - description: >- - Soft delete records for transfer of a stock transaction - parameters: - - name: Stock - in: body - description: Capture details of stock transaction - required: true - schema: - $ref: '#/definitions/StockBulkRequest' tags: - Stock + summary: Soft delete records for transfer of a stock transaction + description: Soft delete records for transfer of a stock transaction + operationId: stockV1DeletePost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/StockBulkRequest' + required: true responses: - '202': - description: Stock Transaction delete request has been accepted. - schema: - $ref: '#/definitions/BulkAcceptedResponse' + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ResponseInfo' '400': description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes /stock/v1/_search: post: - summary: >- - Search for stock transaction - description: >- - Search for stock transaction - parameters: - - name: Stock - in: body - description: Capture details of Stock Transfer. - required: true - schema: - $ref: '#/definitions/StockSearchRequest' - - $ref: '#/parameters/limit' - - $ref: '#/parameters/offset' - - $ref: '#/parameters/tenantId' - - $ref: '#/parameters/lastChangedSince' - - $ref: '#/parameters/includeDeleted' tags: - Stock + summary: Search for stock transaction + description: Search for stock transaction based on given criteria + operationId: stockV1SearchPost + parameters: + - $ref: "#/components/parameters/limit" + - $ref: "#/components/parameters/offset" + - $ref: "#/components/parameters/tenantId" + - $ref: "#/components/parameters/lastChangedSince" + - $ref: "#/components/parameters/includeDeleted" + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/StockSearchRequest' + required: true responses: '200': - description: Stock transfer. - schema: - $ref: '#/definitions/StockBulkResponse' + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/StockBulkResponse' '400': description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + /stock/reconciliation/v1/_create: post: - summary: >- - Create/Add a new stock reconciliation record for a product variant - description: >- - Create/Add a new stock reconciliation record for a product variant - parameters: - - name: StockReconciliation - in: body - description: Capture details of stock transaction. - required: true - schema: - $ref: '#/definitions/StockReconciliationRequest' tags: - Stock Reconciliation + summary: Create/Add a new stock reconciliation record for a product variant + description: Create/Add a new stock reconciliation record for a product variant + operationId: stockReconciliationV1CreatePost_1 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/StockReconciliationRequest' + required: true responses: - '202': - description: Accepted. - schema: - $ref: '#/definitions/StockReconciliationResponse' + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/StockReconciliationResponse' '400': description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes /stock/reconciliation/v1/bulk/_create: post: - summary: >- - Create/Add a new stock reconciliation record for a product variant in bulk - description: >- - Create/Add a new stock reconciliation record for a product variant in bulk - parameters: - - name: StockReconciliation - in: body - description: Capture details of stock transaction. - required: true - schema: - $ref: '#/definitions/StockReconciliationBulkRequest' tags: - Stock Reconciliation + summary: Create/Add a new stock reconciliation record for a product variant in bulk + description: Create/Add a new stock reconciliation record for a product variant in bulk + operationId: stockReconciliationV1CreatePost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/StockReconciliationBulkRequest' + required: true responses: - '202': - description: Accepted. + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ResponseInfo' '400': description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes /stock/reconciliation/v1/_update: post: - summary: >- - Update stock reconciliation record - description: >- - Update stock reconciliation record - parameters: - - name: StockReconciliation - in: body - description: Capture details of stock transaction - required: true - schema: - $ref: '#/definitions/StockReconciliationRequest' tags: - Stock Reconciliation + summary: Update stock reconciliation record + description: Update stock reconciliation record + operationId: stockReconciliationV1UpdatePost_1 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/StockReconciliationRequest' + required: true responses: - '202': - description: Stock Reconciliation request has been accepted. - schema: - $ref: '#/definitions/StockReconciliationResponse' + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/StockReconciliationResponse' '400': description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes /stock/reconciliation/v1/bulk/_update: post: - summary: >- - Update stock reconciliation records - description: >- - Update stock reconciliation records - parameters: - - name: StockReconciliation - in: body - description: Capture details of stock transaction - required: true - schema: - $ref: '#/definitions/StockReconciliationBulkRequest' tags: - Stock Reconciliation + summary: Update stock reconciliation records in bulk + description: Update stock reconciliation records in bulk + operationId: stockReconciliationV1UpdatePost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/StockReconciliationBulkRequest' + required: true responses: - '202': - description: Stock Reconciliation request has been accepted. + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ResponseInfo' '400': description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes /stock/reconciliation/v1/_delete: post: - summary: >- - Soft delete stock reconciliation record - description: >- - Soft delete stock reconciliation record - parameters: - - name: StockReconciliation - in: body - description: Capture details of stock transaction - required: true - schema: - $ref: '#/definitions/StockReconciliationRequest' tags: - Stock Reconciliation + summary: Soft delete stock reconciliation record + description: Soft delete stock reconciliation record + operationId: stockReconciliationV1DeletePost_1 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/StockReconciliationRequest' + required: true responses: - '202': - description: Stock Reconciliation delete request has been accepted. - schema: - $ref: '#/definitions/StockReconciliationResponse' + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/StockReconciliationResponse' '400': description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes /stock/reconciliation/v1/bulk/_delete: post: - summary: >- - Soft delete stock reconciliation records - description: >- - Soft delete stock reconciliation records - parameters: - - name: StockReconciliation - in: body - description: Capture details of stock transaction - required: true - schema: - $ref: '#/definitions/StockReconciliationBulkRequest' tags: - Stock Reconciliation + summary: Soft delete stock reconciliation records in bulk + description: Soft delete stock reconciliation records in bulk + operationId: stockReconciliationV1DeletePost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/StockReconciliationBulkRequest' + required: true responses: - '202': - description: Stock Reconciliation delete request has been accepted. + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ResponseInfo' '400': description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes /stock/reconciliation/v1/_search: post: - summary: >- - Search for stock reconciliation record - description: >- - Search for stock reconciliation record - parameters: - - name: Stock - in: body - description: Capture details of Stock Reconciliation. - required: true - schema: - $ref: '#/definitions/StockReconciliationSearchRequest' - - $ref: '#/parameters/limit' - - $ref: '#/parameters/offset' - - $ref: '#/parameters/tenantId' - - $ref: '#/parameters/lastChangedSince' - - $ref: '#/parameters/includeDeleted' tags: - Stock Reconciliation + summary: Search for stock reconciliation record + description: Search for stock reconciliation record + operationId: stockReconciliationV1SearchPost + parameters: + - $ref: "#/components/parameters/limit" + - $ref: "#/components/parameters/offset" + - $ref: "#/components/parameters/tenantId" + - $ref: "#/components/parameters/lastChangedSince" + - $ref: "#/components/parameters/includeDeleted" + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/StockReconciliationSearchRequest' + required: true responses: '200': - description: Stock reconciliations. - schema: - $ref: '#/definitions/StockReconciliationBulkResponse' + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/StockReconciliationBulkResponse' '400': description: Invalid Input body. - schema: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes - -parameters: - #TODO is tenantId required as a query param if it can be determine from requestInfo->userInfo - tenantId: - name: tenantId - in: query - description: Unique id for a tenant. - required: true - type: string - format: varchar - - lastChangedSince: - name: lastChangedSince - description: | - epoch of the time since when the changes on the object should be picked up. Search results from this parameter should include both newly created objects since this time as well as any modified objects since this time. This criterion is included to help polling clients to get the changes in system since a last time they synchronized with the platform. - in: query - required: false - type: integer - format: int64 - - echoResource: - name: echoResource - in: query - type: boolean - required: false - default: true - description: Client can specify if the resource in request body needs to be sent back in the response. This is being used to limit amount of data that needs to flow back from the server to the client in low bandwidth scenarios. Server will always send the server generated id for validated requests. - - serverHandlesErrors: - name: serverHandlesErrors - in: query - type: boolean - required: false - default: false - description: Client can specify that it is incapable of handling any errors with the requests and server should route these for manual intervention if required. - - limit: - name: limit - description: Pagination - limit records in response - in: query - type: integer - minimum: 0 - maximum: 1000 #TODO review - required: true - - offset: - name: offset - description: Pagination - offset from which records should be returned in response - in: query - type: integer - minimum: 0 - required: true - - includeDeleted: - name: includeDeleted - description: Used in search APIs to specify if (soft) deleted records should be included in search results. - in: query - type: boolean - default: false - required: false - -definitions: - id: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/id' - idForSearch: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/idForSearch' - clientReferenceId: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/clientReferenceId' - clientReferenceIdForSearch: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/clientReferenceIdForSearch' - boundaryCode: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/boundaryCode' - tenantId: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/tenantId' - eventTimestamp: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/eventTimestamp' - isDeleted: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/isDeleted' - rowVersion: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/rowVersion' - additionalFields: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/additionalFields' - Address: - $ref: 'https://raw.githubusercontent.com/digit-egov/health-api-specs/main/contracts/common.yaml#/definitions/Address' - - facilityId: - type: string - minLength: 2 - maxLength: 64 - description: Id of the facility where stock of the product variant are being transferred - example: 'FacilityA' - productVariantId: - type: string - minLength: 2 - maxLength: 64 - description: Product variant that is being transferred - quantity: - type: integer - format: int64 - description: Number/Quantity/Count of units of the product variant that are being transacted - referenceId: - type: string - example: "C-1" - description: Reference entity for which the stock transfer is occuring - referenceIdType: - type: string - example: "PROJECT" - minLength: 2 - maxLength: 64 - description: Entity type that referenceId refers to - transactionType: - type: string - minLength: 2 - maxLength: 64 - enum: - - RECEIVED - - DISPATCHED - transactionReason: - type: string - minLength: 2 - maxLength: 64 - enum: - - RECEIVED - - RETURNED - - LOST_IN_STORAGE - - LOST_IN_TRANSIT - - DAMAGED_IN_STORAGE - - DAMAGED_IN_TRANSIT - description: This field accepts values from enum and if an invalid value is provided, it will default to null. - wayBillNumber: - type: string - minLength: 2 - maxLength: 200 - description: Receipt number of the bill - transactingPartyId: - type: string - minLength: 2 - maxLength: 64 - description: Id of the party from/to which the product variant stock is being transferred - transactingPartyType: - type: string - minLength: 2 - maxLength: 64 - description: Type of entity that transactingPartyId refers to - example: 'WAREHOUSE' - physicalCount: - type: integer - format: int64 - description: Count of units of the product variant as a result of a physical count - calculatedCount: - type: integer - format: int64 - description: Count of units of the product variant calculated from stock movements - - - - Stock: - type: object - required: - - tenantId - - facilityId - - productVariantId - - quantity - - transactionType - - transactingPartyId - - transactingPartyType - properties: - id: - $ref: '#/definitions/id' - clientReferenceId: - $ref: '#/definitions/clientReferenceId' - tenantId: - $ref: '#/definitions/tenantId' - facilityId: - $ref: '#/definitions/facilityId' - productVariantId: - $ref: '#/definitions/productVariantId' - quantity: - $ref: '#/definitions/quantity' - wayBillNumber: - $ref: '#/definitions/wayBillNumber' - referenceId: - $ref: '#/definitions/referenceId' - referenceIdType: - $ref: '#/definitions/referenceIdType' - transactionType: - $ref: '#/definitions/transactionType' - transactionReason: - $ref: '#/definitions/transactionReason' - transactingPartyId: - $ref: '#/definitions/transactingPartyId' - transactingPartyType: - $ref: '#/definitions/transactingPartyType' - additionalFields: - $ref: '#/definitions/additionalFields' - isDeleted: - $ref: '#/definitions/isDeleted' - rowVersion: - $ref: '#/definitions/rowVersion' - auditDetails: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/AuditDetails - - StockSearch: - type: object - properties: - id: - $ref: '#/definitions/idForSearch' - clientReferenceId: - $ref: '#/definitions/clientReferenceIdForSearch' - facilityId: - $ref: '#/definitions/facilityId' - productVariantId: -# $ref: '#/definitions/productVariantId' - type: array - items: - type: string - referenceId: - $ref: '#/definitions/referenceId' - referenceIdType: - $ref: '#/definitions/referenceIdType' - transactionType: - $ref: '#/definitions/transactionType' - transactionReason: - $ref: '#/definitions/transactionReason' - transactingPartyId: - $ref: '#/definitions/transactingPartyId' - transactingPartyType: - $ref: '#/definitions/transactingPartyType' - wayBillNumber: -# $ref: '#/definitions/wayBillNumber' - type: array - items: - type: string - StockReconciliation: - type: object - required: - - tenantId - - facilityId - - productVariantId - - quantity - - transactionType - - transactingPartyId - - transactingPartyType - properties: - id: - $ref: '#/definitions/id' - clientReferenceId: - $ref: '#/definitions/clientReferenceId' - tenantId: - $ref: '#/definitions/tenantId' - facilityId: - $ref: '#/definitions/facilityId' - productVariantId: - $ref: '#/definitions/productVariantId' - referenceId: - $ref: '#/definitions/referenceId' - referenceIdType: - $ref: '#/definitions/referenceIdType' - physicalCount: - $ref: '#/definitions/physicalCount' - calculatedCount: - $ref: '#/definitions/calculatedCount' - commentsOnReconciliation: + content: + '*/*': + schema: + $ref: >- + https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes + +components: + parameters: + tenantId: + name: tenantId + in: query + description: Unique id for a tenant. + required: true + schema: type: string - description: Comments regarding reconciliation - dateOfReconciliation: - $ref: '#/definitions/eventTimestamp' - additionalFields: - $ref: '#/definitions/additionalFields' - isDeleted: - $ref: '#/definitions/isDeleted' - rowVersion: - $ref: '#/definitions/rowVersion' - auditDetails: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/AuditDetails - - StockReconciliationSearch: - type: object - properties: - id: - $ref: '#/definitions/idForSearch' - clientReferenceId: - $ref: '#/definitions/clientReferenceIdForSearch' - facilityId: -# $ref: '#/definitions/facilityId' - type: array - items: - type: string - example: FacilityA - productVariantId: -# $ref: '#/definitions/productVariantId' - type: array - items: + format: varchar + + lastChangedSince: + name: lastChangedSince + in: query + description: | + Epoch of the time since when the changes on the object should be picked up. + Search results from this parameter should include both newly created objects + since this time as well as any modified objects since this time. + required: false + schema: + type: integer + format: int64 + + echoResource: + name: echoResource + in: query + description: | + Client can specify if the resource in request body needs to be sent back in the response. + required: false + schema: + type: boolean + default: true + + serverHandlesErrors: + name: serverHandlesErrors + in: query + description: | + Client can specify that it is incapable of handling any errors with the requests. + required: false + schema: + type: boolean + default: false + + limit: + name: limit + in: query + description: Pagination - limit records in response + required: true + schema: + type: integer + minimum: 0 + maximum: 1000 # TODO: review + + offset: + name: offset + in: query + description: Pagination - offset from which records should be returned in response + required: true + schema: + type: integer + minimum: 0 + + includeDeleted: + name: includeDeleted + in: query + description: Used in search APIs to specify if (soft) deleted records should be included in search results. + required: false + schema: + type: boolean + default: false + + schemas: + AdditionalFields: + type: object + properties: + schema: + maxLength: 64 + minLength: 2 type: string - - - StockRequest: - type: object - properties: - RequestInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/RequestInfo - Stock: - type: object - $ref: '#/definitions/Stock' - required: - - RequestInfo - - Stock - - StockBulkRequest: - type: object - properties: - RequestInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/RequestInfo - Stock: - type: array - minItems: 1 - items: - $ref: '#/definitions/Stock' - required: - - RequestInfo - - Stock - - StockSearchRequest: - type: object - properties: - RequestInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/RequestInfo - Stock: - $ref: '#/definitions/StockSearch' - required: - - RequestInfo - - Stock - - StockResponse: - type: object - properties: - ResponseInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ResponseInfo - Stock: - type: object - $ref: '#/definitions/Stock' - required: - - ResponseInfo - - Stock - - StockBulkResponse: - type: object - properties: - ResponseInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ResponseInfo - Stock: - type: array - items: - $ref: '#/definitions/Stock' - required: - - ResponseInfo - - Stock - - StockReconciliationRequest: - type: object - properties: - RequestInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/RequestInfo - StockReconciliation: - type: object - $ref: '#/definitions/StockReconciliation' - required: - - RequestInfo - - StockReconciliation - - StockReconciliationBulkRequest: - type: object - properties: - RequestInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/RequestInfo - StockReconciliation: - type: array - minItems: 1 - items: - $ref: '#/definitions/StockReconciliation' - required: - - RequestInfo - - StockReconciliation - - StockReconciliationSearchRequest: - type: object - properties: - RequestInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/RequestInfo - StockReconciliation: - $ref: '#/definitions/StockReconciliationSearch' - required: - - RequestInfo - - StockReconciliation - - StockReconciliationResponse: - type: object - properties: - ResponseInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ResponseInfo - StockReconciliation: - type: object - $ref: '#/definitions/StockReconciliation' - required: - - ResponseInfo - - StockReconciliation - - StockReconciliationBulkResponse: - type: object - properties: - ResponseInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ResponseInfo - StockReconciliation: - type: array - items: - $ref: '#/definitions/StockReconciliation' - required: - - ResponseInfo - - StockReconciliation - - BulkAcceptedResponse: - type: object - properties: - ResponseInfo: - $ref: >- - https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ResponseInfo - required: - - ResponseInfo \ No newline at end of file + version: + minimum: 1 + type: integer + format: int32 + fields: + type: array + items: + $ref: '#/components/schemas/Field' + AuditDetails: + type: object + properties: + createdBy: + type: string + lastModifiedBy: + type: string + createdTime: + type: integer + format: int64 + lastModifiedTime: + type: integer + format: int64 + Field: + required: + - key + - value + type: object + properties: + key: + maxLength: 64 + minLength: 2 + type: string + value: + maxLength: 10000 + minLength: 1 + type: string + PlainAccessRequest: + type: object + properties: + recordId: + type: string + plainRequestFields: + type: array + items: + type: string + RequestInfo: + type: object + properties: + apiId: + type: string + ver: + type: string + ts: + type: integer + format: int64 + action: + type: string + did: + type: string + key: + type: string + msgId: + type: string + authToken: + type: string + correlationId: + type: string + plainAccessRequest: + $ref: '#/components/schemas/PlainAccessRequest' + userInfo: + $ref: '#/components/schemas/User' + Role: + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + code: + type: string + tenantId: + type: string + Stock: + required: + - productVariantId + - quantity + - receiverId + - receiverType + - referenceIdType + - senderId + - senderType + - tenantId + - transactionType + type: object + properties: + id: + maxLength: 64 + minLength: 2 + type: string + tenantId: + maxLength: 1000 + minLength: 2 + type: string + source: + type: string + rowVersion: + type: integer + format: int32 + applicationId: + type: string + hasErrors: + type: boolean + additionalFields: + $ref: '#/components/schemas/AdditionalFields' + auditDetails: + $ref: '#/components/schemas/AuditDetails' + clientReferenceId: + maxLength: 64 + minLength: 2 + type: string + clientAuditDetails: + $ref: '#/components/schemas/AuditDetails' + productVariantId: + maxLength: 64 + minLength: 2 + type: string + quantity: + maximum: 2147483647 + minimum: 1 + type: integer + format: int32 + referenceId: + type: string + referenceIdType: + type: string + enum: + - PROJECT + - OTHER + transactionType: + type: string + enum: + - RECEIVED + - DISPATCHED + transactionReason: + type: string + enum: + - RECEIVED + - RETURNED + - LOST_IN_STORAGE + - LOST_IN_TRANSIT + - DAMAGED_IN_STORAGE + - DAMAGED_IN_TRANSIT + senderId: + maxLength: 64 + minLength: 2 + type: string + senderType: + type: string + enum: + - WAREHOUSE + - STAFF + receiverId: + maxLength: 64 + minLength: 2 + type: string + receiverType: + type: string + enum: + - WAREHOUSE + - STAFF + wayBillNumber: + maxLength: 200 + minLength: 2 + type: string + isDeleted: + type: boolean + dateOfEntry: + type: integer + format: int64 + StockBulkRequest: + required: + - RequestInfo + - Stock + type: object + properties: + RequestInfo: + $ref: '#/components/schemas/RequestInfo' + Stock: + maxItems: 2147483647 + minItems: 1 + type: array + items: + $ref: '#/components/schemas/Stock' + User: + type: object + properties: + id: + type: integer + format: int64 + userName: + type: string + name: + type: string + type: + type: string + mobileNumber: + type: string + emailId: + type: string + roles: + type: array + items: + $ref: '#/components/schemas/Role' + tenantId: + type: string + uuid: + type: string + ResponseInfo: + type: object + properties: + apiId: + type: string + ver: + type: string + ts: + type: integer + format: int64 + resMsgId: + type: string + msgId: + type: string + status: + type: string + StockRequest: + required: + - RequestInfo + - Stock + type: object + properties: + RequestInfo: + $ref: '#/components/schemas/RequestInfo' + Stock: + $ref: '#/components/schemas/Stock' + StockResponse: + required: + - ResponseInfo + - Stock + type: object + properties: + ResponseInfo: + $ref: '#/components/schemas/ResponseInfo' + Stock: + $ref: '#/components/schemas/Stock' + URLParams: + required: + - limit + - offset + - tenantId + type: object + properties: + urlparams: + $ref: '#/components/schemas/URLParams' + limit: + maximum: 1000 + minimum: 0 + type: integer + format: int32 + offset: + minimum: 0 + type: integer + format: int32 + tenantId: + type: string + lastChangedSince: + type: integer + format: int64 + includeDeleted: + type: boolean + StockSearch: + type: object + properties: + id: + type: array + items: + type: string + clientReferenceId: + type: array + items: + type: string + facilityId: + maxLength: 64 + minLength: 2 + type: string + productVariantId: + type: array + items: + type: string + referenceId: + type: string + wayBillNumber: + type: array + items: + type: string + referenceIdType: + maxLength: 64 + minLength: 2 + type: string + transactionType: + type: string + enum: + - RECEIVED + - DISPATCHED + transactionReason: + type: string + enum: + - RECEIVED + - RETURNED + - LOST_IN_STORAGE + - LOST_IN_TRANSIT + - DAMAGED_IN_STORAGE + - DAMAGED_IN_TRANSIT + transactingPartyId: + maxLength: 64 + minLength: 2 + type: string + transactingPartyType: + type: string + StockSearchRequest: + required: + - RequestInfo + - Stock + type: object + properties: + RequestInfo: + $ref: '#/components/schemas/RequestInfo' + Stock: + $ref: '#/components/schemas/StockSearch' + StockBulkResponse: + required: + - ResponseInfo + - Stock + type: object + properties: + ResponseInfo: + $ref: '#/components/schemas/ResponseInfo' + Stock: + type: array + items: + $ref: '#/components/schemas/Stock' + TotalCount: + type: integer + format: int64 + StockReconciliation: + required: + - facilityId + - productVariantId + - tenantId + type: object + properties: + id: + maxLength: 64 + minLength: 2 + type: string + tenantId: + maxLength: 1000 + minLength: 2 + type: string + source: + type: string + rowVersion: + type: integer + format: int32 + applicationId: + type: string + hasErrors: + type: boolean + additionalFields: + $ref: '#/components/schemas/AdditionalFields' + auditDetails: + $ref: '#/components/schemas/AuditDetails' + clientReferenceId: + maxLength: 64 + minLength: 2 + type: string + clientAuditDetails: + $ref: '#/components/schemas/AuditDetails' + facilityId: + maxLength: 64 + minLength: 2 + type: string + productVariantId: + maxLength: 64 + minLength: 2 + type: string + referenceId: + type: string + referenceIdType: + maxLength: 64 + minLength: 2 + type: string + physicalCount: + type: integer + format: int32 + calculatedCount: + type: integer + format: int32 + commentsOnReconciliation: + type: string + dateOfReconciliation: + type: integer + format: int64 + isDeleted: + type: boolean + StockReconciliationBulkRequest: + required: + - RequestInfo + - StockReconciliation + type: object + properties: + RequestInfo: + $ref: '#/components/schemas/RequestInfo' + StockReconciliation: + maxItems: 2147483647 + minItems: 1 + type: array + items: + $ref: '#/components/schemas/StockReconciliation' + StockReconciliationRequest: + required: + - RequestInfo + - StockReconciliation + type: object + properties: + RequestInfo: + $ref: '#/components/schemas/RequestInfo' + StockReconciliation: + $ref: '#/components/schemas/StockReconciliation' + StockReconciliationResponse: + required: + - ResponseInfo + - StockReconciliation + type: object + properties: + ResponseInfo: + $ref: '#/components/schemas/ResponseInfo' + StockReconciliation: + $ref: '#/components/schemas/StockReconciliation' + StockReconciliationSearch: + type: object + properties: + id: + type: array + items: + type: string + clientReferenceId: + type: array + items: + type: string + facilityId: + type: array + items: + type: string + productVariantId: + type: array + items: + type: string + StockReconciliationSearchRequest: + required: + - RequestInfo + - StockReconciliation + type: object + properties: + RequestInfo: + $ref: '#/components/schemas/RequestInfo' + StockReconciliation: + $ref: '#/components/schemas/StockReconciliationSearch' + StockReconciliationBulkResponse: + required: + - ResponseInfo + - StockReconciliation + type: object + properties: + ResponseInfo: + $ref: '#/components/schemas/ResponseInfo' + StockReconciliation: + type: array + items: + $ref: '#/components/schemas/StockReconciliation' + TotalCount: + type: integer + format: int64 diff --git a/docs/health-api-specs/contracts/user-action.yaml b/docs/health-api-specs/contracts/user-action.yaml new file mode 100644 index 00000000000..12e8699353e --- /dev/null +++ b/docs/health-api-specs/contracts/user-action.yaml @@ -0,0 +1,368 @@ +openapi: 3.0.1 +info: + title: User Action System + version: v1.6 +servers: + - url: https://unified-dev.digit.org + description: Development server url +paths: + /project/user-action/v1/_create: + post: + tags: + - User Actions + summary: Bulk create user actions + description: Receives a bulk request to create user actions and sends it to the appropriate Kafka topic for processing. + operationId: userActionV1BulkCreatePost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UserActionBulkRequest' + required: true + responses: + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ResponseInfo' + /project/user-action/v1/_search: + post: + tags: + - User Actions + summary: Search user actions + description: Searches for user actions based on the provided search criteria. Returns matching results and total count. + operationId: userActionV2SearchPost + requestBody: + content: + application/json: + schema: + type: object + properties: + urlParams: + $ref: '#/components/schemas/URLParams' + request: + $ref: '#/components/schemas/UserActionSearchRequest' + required: true + responses: + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/UserActionBulkResponse' + /project/user-action/v1/_update: + post: + tags: + - User Actions + summary: Bulk update user actions + description: Receives a bulk request to update user actions and sends it to the appropriate Kafka topic for processing. + operationId: userActionV1BulkUpdatePost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UserActionBulkRequest' + required: true + responses: + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ResponseInfo' +components: + schemas: + AdditionalFields: + type: object + properties: + schema: + maxLength: 64 + minLength: 2 + type: string + version: + minimum: 1 + type: integer + format: int32 + fields: + type: array + items: + $ref: '#/components/schemas/Field' + AuditDetails: + type: object + properties: + createdBy: + type: string + lastModifiedBy: + type: string + createdTime: + type: integer + format: int64 + lastModifiedTime: + type: integer + format: int64 + Field: + required: + - key + - value + type: object + properties: + key: + maxLength: 64 + minLength: 2 + type: string + value: + maxLength: 10000 + minLength: 1 + type: string + PlainAccessRequest: + type: object + properties: + recordId: + type: string + plainRequestFields: + type: array + items: + type: string + RequestInfo: + type: object + properties: + apiId: + type: string + ver: + type: string + ts: + type: integer + format: int64 + action: + type: string + did: + type: string + key: + type: string + msgId: + type: string + authToken: + type: string + correlationId: + type: string + plainAccessRequest: + $ref: '#/components/schemas/PlainAccessRequest' + userInfo: + $ref: '#/components/schemas/User' + Role: + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + code: + type: string + tenantId: + type: string + User: + type: object + properties: + id: + type: integer + format: int64 + userName: + type: string + name: + type: string + type: + type: string + mobileNumber: + type: string + emailId: + type: string + roles: + type: array + items: + $ref: '#/components/schemas/Role' + tenantId: + type: string + uuid: + type: string + UserAction: + required: + - action + - boundaryCode + - latitude + - locationAccuracy + - longitude + - projectId + - tenantId + type: object + properties: + id: + maxLength: 64 + minLength: 2 + type: string + tenantId: + maxLength: 1000 + minLength: 2 + type: string + source: + type: string + rowVersion: + type: integer + format: int32 + applicationId: + type: string + hasErrors: + type: boolean + additionalFields: + $ref: '#/components/schemas/AdditionalFields' + auditDetails: + $ref: '#/components/schemas/AuditDetails' + clientReferenceId: + maxLength: 64 + minLength: 2 + type: string + clientAuditDetails: + $ref: '#/components/schemas/AuditDetails' + projectId: + maxLength: 64 + minLength: 2 + type: string + latitude: + maximum: 90 + exclusiveMaximum: false + minimum: -90 + exclusiveMinimum: false + type: number + format: double + longitude: + maximum: 180 + exclusiveMaximum: false + minimum: -180 + exclusiveMinimum: false + type: number + format: double + locationAccuracy: + minimum: 0 + exclusiveMinimum: false + type: number + format: double + boundaryCode: + type: string + action: + type: string + enum: + - CLOSED_HOUSEHOLD + - LOCATION_CAPTURE + - OTHER + beneficiaryTag: + maxLength: 64 + minLength: 2 + type: string + resourceTag: + maxLength: 64 + minLength: 2 + type: string + isDeleted: + type: boolean + UserActionBulkRequest: + required: + - RequestInfo + - UserActions + type: object + properties: + RequestInfo: + $ref: '#/components/schemas/RequestInfo' + UserActions: + maxItems: 2147483647 + minItems: 1 + type: array + items: + $ref: '#/components/schemas/UserAction' + ResponseInfo: + type: object + properties: + apiId: + type: string + ver: + type: string + ts: + type: integer + format: int64 + resMsgId: + type: string + msgId: + type: string + status: + type: string + URLParams: + required: + - limit + - offset + - tenantId + type: object + properties: + urlparams: + $ref: '#/components/schemas/URLParams' + limit: + maximum: 1000 + minimum: 0 + type: integer + format: int32 + offset: + minimum: 0 + type: integer + format: int32 + tenantId: + type: string + lastChangedSince: + type: integer + format: int64 + includeDeleted: + type: boolean + UserActionSearch: + type: object + properties: + id: + type: array + items: + type: string + clientReferenceId: + type: array + items: + type: string + createdBy: + type: string + projectId: + type: string + beneficiaryTag: + type: string + resourceTag: + type: string + boundaryCode: + type: string + UserActionSearchRequest: + required: + - RequestInfo + - UserAction + type: object + properties: + RequestInfo: + $ref: '#/components/schemas/RequestInfo' + UserAction: + $ref: '#/components/schemas/UserActionSearch' + UserActionBulkResponse: + required: + - ResponseInfo + - UserActions + type: object + properties: + ResponseInfo: + $ref: '#/components/schemas/ResponseInfo' + TotalCount: + type: integer + format: int64 + UserActions: + type: array + items: + $ref: '#/components/schemas/UserAction'