From 32601060cb6831c87513263cf24bdc97adad2707 Mon Sep 17 00:00:00 2001 From: kshitij-k-osmosys Date: Thu, 22 Aug 2024 23:26:34 +0530 Subject: [PATCH 1/5] docs: api documentation --- apps/api/docs/api-documentation.md | 161 ++++++++++++++++++++++++++++- 1 file changed, 160 insertions(+), 1 deletion(-) diff --git a/apps/api/docs/api-documentation.md b/apps/api/docs/api-documentation.md index f87f5c1..1bddf99 100644 --- a/apps/api/docs/api-documentation.md +++ b/apps/api/docs/api-documentation.md @@ -1 +1,160 @@ -# TODO \ No newline at end of file +# API Documentation + +This document provides a brief overview of the different API endpoints, their usage and purpose. + +## File Upload using graphQL + +Allows the user to upload a file. This is called when a user uploads a transcript file to generate a transcript summary. + +**Endpoint:** `http://localhost:3000/graphql` + +**Method:** `POST` + +**Headers:** + +| Key | Value | Description | +| --- | ----- | ----------- | +| Accept-Encoding | gzip, deflate, br | Indicates the content encoding that the client can understand | +| Content-Type | application/json | Indicate the original media type of the resource prior to any content encoding applied before transmission | +| Accept | application/json | Indicates which content types, expressed as MIME types, the client is able to understand | +| Connection | keep-alive | The Keep-Alive general header allows the sender to hint about how the connection may be used to set a timeout and a maximum amount of requests | +| Authorization | Bearer auth-token | Microsoft account jwt bearer auth token | +| x-apollo-operation-name | createSummary | Custom header to call createSummary operation | + +**Body:** `form-data` + +| Key | Type | Value | Description | +| --- | ---- | ----- | ----------- | +| `operations` | Text | `{"query":"mutation ($file: Upload!) {\n createSummary(createSummaryInput: { inputFile: $file }) {\n jobId\n }\n}"}` | Parameterized GraphQL query to upload file for processing. | +| `map` | Text | `{"0": ["variables.file"]}` | Used to map the uploaded file and GraphQL query. | +| `0` | File | `@"/home/user/sample-transcript.txt"` | Transcript file uploaded from local machine for processing. **Allowed extensions:** `.txt`, `.vtt` | + +**cURL** + +```sh +curl --location 'http://localhost:3000/graphql' \ +--header 'Accept-Encoding: gzip, deflate, br' \ +--header 'Content-Type: application/json' \ +--header 'Accept: application/json' \ +--header 'Connection: keep-alive' \ +--header 'Origin: chrome-extension://flnheeellpciglgpaodhkhmapeljopja' \ +--header 'x-apollo-operation-name: createSummary' \ +--header 'Authorization: Bearer auth-token' \ +--form 'operations="{\"query\":\"mutation (\$file: Upload\!) {\\n createSummary(createSummaryInput: { inputFile: \$file }) {\\n jobId\\n }\\n}\"}"' \ +--form 'map="{\"0\": [\"variables.file\"]}"' \ +--form '0=@"/home/user/sample-transcript.txt"' +``` + +**Sample response** + +```json +{ + "data": { + "createSummary": { + "jobId": 1 + } + } +} +``` + +## Fetch all Summaries + +Allows the user to fetch all summaries based on the passed query parameters. Requires passing bearer token for authorization. + +The different options that can be used while fetching summaries are as follows: + +- `limit:` Limit the number of results to the provided value +- `offset:` Offset the result set by the provided value +- `sortBy:` Sort the results by the provided key +- `sortOrder:` Sort the results in either `ASC`ending or `DESC`ending order +- `search:` Display those results which contain the input string. Searchable fields: `inputFile`, `createdBy`, `outputText` +- `filters:` Filter the results based on the provided `createdOn` and `createdBy`. Operator can be `eq` (equal), `ne` (not equal), `contains`, `gt` (greater than) or `lt` (less than) + +**Endpoint:** `http://localhost:3000/graphql` + +**Method:** `POST` + +**Headers:** + +| Key | Value | Description | +| --- | ----- | ----------- | +| Accept-Encoding | gzip, deflate, br | Indicates the content encoding that the client can understand | +| Content-Type | application/json | Indicate the original media type of the resource prior to any content encoding applied before transmission | +| Accept | application/json | Indicates which content types, expressed as MIME types, the client is able to understand | +| Connection | keep-alive | The Keep-Alive general header allows the sender to hint about how the connection may be used to set a timeout and a maximum amount of requests | +| Authorization | Bearer auth-token | Microsoft account jwt bearer auth token | + +**Body:** `graphql` + +```graphql +{ + summaries( + options: { + limit: 10 + offset: 0 + sortOrder: ASC + search: "John Doe" # Remove search if you want complete data + filters: [ # Remove filter if you want complete data + { field: "createdOn", operator: "gte", value: "2023-01-01" } # Specify the date range to fetch record + { field: "createdOn", operator: "lte", value: "2024-06-06" } # Specify the upper limit for the date range + { field: "createdBy", operator: "in", value: "[\"user@example.com\",\"admin@example.com\"]" } # Specify the email id of the person whose record you want to find + ] + } + ) { + limit + offset + summaries { + createdBy + createdOn + jobId + inputFile + jobStatus + modifiedBy + modifiedOn + outputText + status + } + total + } +} +``` + +**cURL** + +```sh +curl --location 'http://localhost:3000/graphql' \ +--header 'Accept-Encoding: gzip, deflate, br' \ +--header 'Content-Type: application/json' \ +--header 'Accept: application/json' \ +--header 'Connection: keep-alive' \ +--header 'Origin: chrome-extension://flnheeellpciglgpaodhkhmapeljopja' \ +--header 'Authorization: Bearer auth-token' \ +--data-raw '{"query":"{\n summaries(\n options: {\n limit: 10\n offset: 0\n sortOrder: ASC\n search: \"John Doe\" # Remove search if you want complete data\n filters: [ # Remove filters if you want complete data\n { field: \"createdOn\", operator: \"gte\", value: \"2023-01-01\" } # Specify the date range to fetch record\n { field: \"createdOn\", operator: \"lte\", value: \"2024-06-06\" } # Specify the upper limit for the date range\n { field: \"createdBy\", operator: \"in\", value: \"[\\\"user@example.com\\\",\\\"admin@example.com\\\"]\" } # Specify the email id of the person whose record you want to find\n ]\n }\n ) {\n limit\n offset\n summaries {\n createdBy\n createdOn\n jobId\n inputFile\n jobStatus\n modifiedBy\n modifiedOn\n outputText\n status\n }\n total\n }\n}\n","variables":{}}' +``` + +**Sample response** + +```json +{ + "data": { + "summaries": { + "limit": 1, + "offset": 0, + "summaries": [ + { + "createdBy": "user@example.com", + "createdOn": "2024-08-13T08:26:17.000Z", + "jobId": 1, + "inputFile": "933b7c65a8_sample-site-creation.txt", + "jobStatus": 4, + "modifiedBy": "user@example.com", + "modifiedOn": "2024-08-13T08:26:17.000Z", + "outputText": "# Meeting Minutes\n**Discussion Heading:** Angular Login Page Layout \n**Created on:** 2024-08-13 08:26:20 \n**Duration:** 00:06:10 \n\n# Participants\n- John Doe \n- Amy Smith \n- Troy Pines \n\n# Agenda\n- Discuss the layout and features for the Angular login page.\n- Ensure user experience and security are prioritized.\n- Explore design options and technical implementations.\n\n# Discussion\n- **Form Layout:** \n - **Amy Smith:** Suggested starting with a simple form layout for ease of use. \n - **Troy Pines:** Agreed, emphasizing that simplicity is crucial for user experience. \n\n- **Social Media Login Options:** \n - **John Doe:** Proposed including social media login options. \n - **Amy Smith:** Supported the idea for convenience. \n - **Troy Pines:** Cautioned against overcrowding the interface. \n\n- **Forgot Password Link:** \n - **John Doe:** Suggested adding a forgot password link. \n - **Amy Smith:** Confirmed its necessity as a common user expectation. \n - **Troy Pines:** Mentioned integrating it seamlessly into the design. \n\n- **Animations:** \n - **John Doe:** Inquired about the need for animations. \n - **Amy Smith:** Suggested subtle animations to enhance user experience. \n - **Troy Pines:** Recommended keeping animations smooth and non-distracting. \n\n- **Two-Factor Authentication:** \n - **John Doe:** Asked about implementing two-factor authentication. \n - **Amy Smith:** Supported it for added security. \n - **Troy Pines:** Highlighted the importance of user-friendliness. \n\n- **Dark Mode Option:** \n - **John Doe:** Proposed incorporating a dark mode option. \n - **Amy Smith:** Agreed, noting it allows for user customization. \n - **Troy Pines:** Mentioned it caters to different user preferences. \n\n- **Styling with Angular Material:** \n - **John Doe:** Suggested using Angular Material for styling. \n - **Amy Smith:** Pointed out its ready-made components could save time. \n - **Troy Pines:** Stressed the need for alignment with design principles. \n\n- **Mobile Responsiveness:** \n - **John Doe:** Raised the need for mobile responsiveness. \n - **Amy Smith:** Confirmed its importance for mobile users. \n - **Troy Pines:** Committed to prioritizing a seamless mobile experience. \n\n- **Error Handling Features:** \n - **John Doe:** Asked about including error handling features. \n - **Amy Smith:** Affirmed its necessity for guiding users. \n - **Troy Pines:** Suggested clear error messages to prevent frustration. \n\n- **Google Analytics Integration:** \n - **John Doe:** Proposed integrating Google Analytics for tracking. \n - **Amy Smith:** Supported it for valuable insights. \n - **Troy Pines:** Emphasized compliance with privacy regulations. \n\n- **Stay Logged In Option:** \n - **John Doe:** Suggested allowing users to stay logged in. \n - **Amy Smith:** Agreed, with a logout option for security. \n - **Troy Pines:** Committed to implementing secure session management. \n\n- **Progress Indicator During Login:** \n - **John Doe:** Proposed adding a progress indicator. \n - **Amy Smith:** Supported it for user feedback. \n - **Troy Pines:** Suggested keeping it subtle yet informative. \n\n- **CAPTCHA Implementation:** \n - **John Doe:** Asked about implementing CAPTCHA. \n - **Amy Smith:** Suggested it to prevent bot attacks. \n - **Troy Pines:** Recommended using it sparingly to avoid inconvenience. \n\n- **User Profile Customization:** \n - **John Doe:** Suggested allowing users to customize their profiles. \n - **Amy Smith:** Supported personalization for engagement. \n - **Troy Pines:** Mentioned providing options within reasonable limits. \n\n- **Tooltips for Form Inputs:** \n - **John Doe:** Proposed incorporating tooltips for form inputs. \n - **Amy Smith:** Suggested they clarify input requirements. \n - **Troy Pines:** Emphasized the need for concise and helpful tooltips. \n\n- **Password Change Feature:** \n - **John Doe:** Asked about allowing users to change their passwords. \n - **Amy Smith:** Confirmed it's a standard security feature. \n - **Troy Pines:** Committed to providing a straightforward process. \n\n- **Multi-Language Support:** \n - **John Doe:** Suggested implementing multi-language support. \n - **Amy Smith:** Supported it for global user base expansion. \n - **Troy Pines:** Stressed the importance of accurate translations. \n\n- **Terms of Service Agreement:** \n - **John Doe:** Proposed incorporating a terms of service agreement. \n - **Amy Smith:** Confirmed its necessity for legal compliance. \n - **Troy Pines:** Committed to making it easily accessible. \n\n- **Password Strength Validation:** \n - **John Doe:** Suggested implementing password strength validation. \n - **Amy Smith:** Supported it to encourage secure passwords. \n\n# Action Items\n- Develop a simple form layout with social media login options while avoiding interface overcrowding.\n- Integrate a forgot password link and ensure seamless design integration.\n- Implement subtle animations and two-factor authentication, focusing on user-friendliness.\n- Incorporate a dark mode option and use Angular Material for styling, ensuring design principle alignment.\n- Ensure mobile responsiveness and prioritize a seamless mobile experience.\n- Include error handling features with clear messages to guide users.\n- Integrate Google Analytics while ensuring compliance with privacy regulations.\n- Implement secure session management for the stay logged in feature.\n- Add a progress indicator during login and use CAPTCHA sparingly.\n- Allow user profile customization and incorporate tooltips for form inputs.\n- Provide a straightforward password change process and implement multi-language support with accurate translations.\n- Include a terms of service agreement and implement password strength validation.", + "status": 1 + } + ], + "total": 12 + } + } +} +``` From 9d7776e8ace61ef490ebbcd713f71857c07e01f2 Mon Sep 17 00:00:00 2001 From: kshitij-k-osmosys Date: Thu, 22 Aug 2024 23:27:23 +0530 Subject: [PATCH 2/5] fix: searchable fields --- apps/api/src/modules/summary/summary.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/api/src/modules/summary/summary.service.ts b/apps/api/src/modules/summary/summary.service.ts index cd04b89..aaa98c1 100644 --- a/apps/api/src/modules/summary/summary.service.ts +++ b/apps/api/src/modules/summary/summary.service.ts @@ -83,7 +83,7 @@ export class SummaryService extends CoreService { this.logger.log('Getting all jobs with options.'); const baseConditions = [{ field: 'status', value: Status.ACTIVE }]; - const searchableFields = ['createdBy', 'data', 'result']; + const searchableFields = ['inputFile', 'createdBy', 'outputText']; const { items, total } = await super.findAll( options, From cb637afbe353970abdf282f0dec6cf535b8006ca Mon Sep 17 00:00:00 2001 From: kshitij-k-osmosys Date: Sun, 25 Aug 2024 13:59:22 +0530 Subject: [PATCH 3/5] docs: update postman collection --- ...ript Summarization.postman_collection.json | 495 ++++++++++++------ 1 file changed, 338 insertions(+), 157 deletions(-) diff --git a/apps/api/Transcript Summarization.postman_collection.json b/apps/api/Transcript Summarization.postman_collection.json index ae526ff..dfb3e8a 100644 --- a/apps/api/Transcript Summarization.postman_collection.json +++ b/apps/api/Transcript Summarization.postman_collection.json @@ -1,116 +1,165 @@ { "info": { - "_postman_id": "102cfd2e-16ee-4c0b-9567-96158dc9427a", + "_postman_id": "1946e044-5b83-4f6b-9c00-dda0f57174ad", "name": "Transcript Summarization", - "schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json", - "_exporter_id": "20654268" + "description": "Transcript Summarization API helps creating uploading transcripts for processing as well as fetching details of past summaries", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", + "_exporter_id": "27217372" }, "item": [ { - "name": "File Upload using graphQL", - "request": { - "method": "POST", - "header": [ - { - "key": "Accept-Encoding", - "value": "gzip, deflate, br", - "uuid": "ff8f8915-d306-465d-a085-1030cf805690" - }, - { - "key": "Content-Type", - "value": "application/json", - "uuid": "4cae4956-2a10-4132-a5e2-bf1a379c3a5a" - }, - { - "key": "Accept", - "value": "application/json", - "uuid": "624f9968-7176-411a-8715-4584a1a5dad3" - }, - { - "key": "Connection", - "value": "keep-alive", - "uuid": "6cba5432-4dc7-4bbb-9885-87394a1eeeaa" - }, - { - "key": "Origin", - "value": "chrome-extension://flnheeellpciglgpaodhkhmapeljopja", - "uuid": "da802fc2-1c40-4917-b9f7-bca94a219568" - }, - { - "key": "x-apollo-operation-name", - "value": "createSummary", - "uuid": "bcfbac4a-4986-4b8a-8886-c138faa92135" - }, - { - "key": "Authorization", - "value": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IkwxS2ZLRklfam5YYndXYzIyeFp4dzFzVUhIMCIsImtpZCI6IkwxS2ZLRklfam5YYndXYzIyeFp4dzFzVUhIMCJ9.eyJhdWQiOiJhcGk6Ly9mNDQ0N2QwYy04YzY4LTRlODMtYWU5MS1lNjJlMjc1NmExNDciLCJpc3MiOiJodHRwczovL3N0cy53aW5kb3dzLm5ldC85NWNhODVjYi0yMGM5LTQ1YzUtYmJmYy1iZTJkMGFjMmU2NTcvIiwiaWF0IjoxNzE2ODEyMjIwLCJuYmYiOjE3MTY4MTIyMjAsImV4cCI6MTcxNjgxNzgxNSwiYWNyIjoiMSIsImFpbyI6IkFUUUF5LzhXQUFBQUVKandMclNlaDV2Qlg1TmticC92UDVqSmhUNlg4TFp0Y0gzRkhTekpXbHdMbXhVZzR6R3JLcXc4Und5R2ZjdlIiLCJhbXIiOlsicHdkIl0sImFwcGlkIjoiMmIwM2U3M2UtMTdlMS00OGYzLWIyNGEtN2QyNzAxOTZmNDc3IiwiYXBwaWRhY3IiOiIwIiwiZ2l2ZW5fbmFtZSI6IkhhcmlzaCIsImlwYWRkciI6IjE0Ljk5LjIwMy41MCIsIm5hbWUiOiJIYXJpc2giLCJvaWQiOiI0NjFhZWRlNi1kOWRlLTQ4NTctOTc5ZS0yZWVmZDQ5ODU1MTYiLCJyaCI6IjAuQVZZQXk0WEtsY2tneFVXN19MNHRDc0xtVnd4OVJQUm9qSU5PcnBIbUxpZFdvVWRXQUlVLiIsInNjcCI6ImFwaS5jb25zdW1lIiwic3ViIjoidkRsb0VSUTZMRndjLTYyS2prRnUwMWdXSHRvbVNSOXdJaE92aXpLNEV6MCIsInRpZCI6Ijk1Y2E4NWNiLTIwYzktNDVjNS1iYmZjLWJlMmQwYWMyZTY1NyIsInVuaXF1ZV9uYW1lIjoiaGFyaXNoQG9zbW9zeXMuY28iLCJ1cG4iOiJoYXJpc2hAb3Ntb3N5cy5jbyIsInV0aSI6ImtOSlRYdUVhbEVPTjFaRWUxeHY0QUEiLCJ2ZXIiOiIxLjAifQ.Lo4UPQ3oOWfhkTECerSqP3aewhzl-eAREQVc1MajDNL1xGBbtK2d7d8qw7CmphR97AUY47UjH6ZjN0xbBYMN-2nBokDlSvUj1SLJkdwj4_NS9-xDUYdqwHSBbOx7ue6Qt-RCs4W6vVgDpCVT1wRldGjfTOn4Vni-CbVmfjHz3Rwv1LDJEj3atM4pYG8katXgvwR3ztl5lu0taDA48cciwPSHZFqwN8SoBN8KpoB5II2GQRrkkWybGXPz-4daeXAlPuFrTJ68ExW3LlrmMW3ZSZavlbv8VIUjVHtz9j7PRoRJzurO_C_AWKLNqBh6Q3WWWZRx4KqE3aDaemwHOS-x4w", - "type": "text", - "uuid": "2095ff28-47a7-46ca-b775-f838b3831a76" - } - ], - "body": { - "mode": "formdata", - "formdata": [ + "name": "File upload using GraphQL", + "item": [ + { + "name": "File Upload using graphQL - Success", + "event": [ { - "key": "operations", - "value": "{\"query\":\"mutation ($file: Upload!) {\\n createSummary(createSummaryInput: { inputFile: $file }) {\\n jobId\\n }\\n}\"}", - "type": "text" + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Response is valid JSON\", function () {", + " pm.response.to.be.json;", + "});", + "pm.test(\"Response has valid 'data' property\", function () {", + " var jsonData = pm.response.json();", + " pm.expect(jsonData).to.have.property(\"data\").to.be.an(\"object\");", + "});", + "pm.test(\"Response contains a valid 'createSummary' object\", function () {", + " var jsonData = pm.response.json();", + " pm.expect(jsonData.data).to.have.property(\"createSummary\").to.be.an(\"object\");", + "});", + "pm.test(\"Response 'createSummary' contains a valid 'jobId' \", function () {", + " var jsonData = pm.response.json();", + " pm.expect(jsonData.data.createSummary).to.have.property(\"jobId\").to.be.a(\"number\");", + "});", + "" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept-Encoding", + "value": "gzip, deflate, br" + }, + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-apollo-operation-name", + "value": "createSummary" + }, + { + "key": "Authorization", + "value": "Bearer {{auth-token}}", + "type": "text" + } + ], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "operations", + "value": "{\"query\":\"mutation ($file: Upload!) {\\n createSummary(createSummaryInput: { inputFile: $file }) {\\n jobId\\n }\\n}\"}", + "description": "Parameterized GraphQL query to upload file for processing", + "type": "text" + }, + { + "key": "map", + "value": "{\"0\": [\"variables.file\"]}", + "description": "Used to map the uploaded file and GraphQL query", + "type": "text" + }, + { + "key": "0", + "description": "Transcript file uploaded from local machine for processing. Allowed extensions: .txt, .vtt", + "type": "file", + "src": "/home/testuser/Downloads/sample-transcript.txt" + } + ] }, - { - "key": "map", - "value": "{\"0\": [\"variables.file\"]}", - "type": "text" + "url": { + "raw": "http://localhost:3000/graphql", + "protocol": "http", + "host": [ + "localhost" + ], + "port": "3000", + "path": [ + "graphql" + ] }, - { - "key": "0", - "type": "file", - "src": "/home/harish-work/sample.txt" - } - ] + "description": "Allows uploading of a .txt or .vtt file for processing" + }, + "response": [] }, - "url": "http://localhost:3000/graphql" - }, - "response": [ { - "name": "Untitled Response", - "originalRequest": { + "name": "File Upload using graphQL - No Attachments", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Response is valid JSON\", function () {", + " pm.response.to.be.json;", + "});", + "pm.test(\"Response has valid 'errors' and 'data' properties\", function () {", + " var jsonData = pm.response.json();", + " pm.expect(jsonData).to.have.property(\"data\");", + " pm.expect(jsonData).to.have.property(\"errors\").to.be.an(\"array\");", + "});", + "pm.test(\"message: File missing in the request.\", function () {", + " var jsonData = pm.response.json();", + " pm.expect(jsonData).to.have.property(\"data\");", + " pm.expect(jsonData).to.have.property(\"errors\").to.be.an(\"array\");", + " pm.expect(jsonData.errors[0]).to.have.property(\"message\").contain(\"File missing in the request.\");", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { "method": "POST", "header": [ { "key": "Accept-Encoding", - "value": "gzip, deflate, br", - "uuid": "ff8f8915-d306-465d-a085-1030cf805690" + "value": "gzip, deflate, br" }, { "key": "Content-Type", - "value": "application/json", - "uuid": "4cae4956-2a10-4132-a5e2-bf1a379c3a5a" + "value": "application/json" }, { "key": "Accept", - "value": "application/json", - "uuid": "624f9968-7176-411a-8715-4584a1a5dad3" + "value": "application/json" }, { "key": "Connection", - "value": "keep-alive", - "uuid": "6cba5432-4dc7-4bbb-9885-87394a1eeeaa" - }, - { - "key": "Origin", - "value": "chrome-extension://flnheeellpciglgpaodhkhmapeljopja", - "uuid": "da802fc2-1c40-4917-b9f7-bca94a219568" + "value": "keep-alive" }, { "key": "x-apollo-operation-name", - "value": "createSummary", - "uuid": "bcfbac4a-4986-4b8a-8886-c138faa92135" + "value": "createSummary" }, { "key": "Authorization", - "value": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IkwxS2ZLRklfam5YYndXYzIyeFp4dzFzVUhIMCIsImtpZCI6IkwxS2ZLRklfam5YYndXYzIyeFp4dzFzVUhIMCJ9.eyJhdWQiOiJhcGk6Ly9mNDQ0N2QwYy04YzY4LTRlODMtYWU5MS1lNjJlMjc1NmExNDciLCJpc3MiOiJodHRwczovL3N0cy53aW5kb3dzLm5ldC85NWNhODVjYi0yMGM5LTQ1YzUtYmJmYy1iZTJkMGFjMmU2NTcvIiwiaWF0IjoxNzE2ODEyMjIwLCJuYmYiOjE3MTY4MTIyMjAsImV4cCI6MTcxNjgxNzgxNSwiYWNyIjoiMSIsImFpbyI6IkFUUUF5LzhXQUFBQUVKandMclNlaDV2Qlg1TmticC92UDVqSmhUNlg4TFp0Y0gzRkhTekpXbHdMbXhVZzR6R3JLcXc4Und5R2ZjdlIiLCJhbXIiOlsicHdkIl0sImFwcGlkIjoiMmIwM2U3M2UtMTdlMS00OGYzLWIyNGEtN2QyNzAxOTZmNDc3IiwiYXBwaWRhY3IiOiIwIiwiZ2l2ZW5fbmFtZSI6IkhhcmlzaCIsImlwYWRkciI6IjE0Ljk5LjIwMy41MCIsIm5hbWUiOiJIYXJpc2giLCJvaWQiOiI0NjFhZWRlNi1kOWRlLTQ4NTctOTc5ZS0yZWVmZDQ5ODU1MTYiLCJyaCI6IjAuQVZZQXk0WEtsY2tneFVXN19MNHRDc0xtVnd4OVJQUm9qSU5PcnBIbUxpZFdvVWRXQUlVLiIsInNjcCI6ImFwaS5jb25zdW1lIiwic3ViIjoidkRsb0VSUTZMRndjLTYyS2prRnUwMWdXSHRvbVNSOXdJaE92aXpLNEV6MCIsInRpZCI6Ijk1Y2E4NWNiLTIwYzktNDVjNS1iYmZjLWJlMmQwYWMyZTY1NyIsInVuaXF1ZV9uYW1lIjoiaGFyaXNoQG9zbW9zeXMuY28iLCJ1cG4iOiJoYXJpc2hAb3Ntb3N5cy5jbyIsInV0aSI6ImtOSlRYdUVhbEVPTjFaRWUxeHY0QUEiLCJ2ZXIiOiIxLjAifQ.Lo4UPQ3oOWfhkTECerSqP3aewhzl-eAREQVc1MajDNL1xGBbtK2d7d8qw7CmphR97AUY47UjH6ZjN0xbBYMN-2nBokDlSvUj1SLJkdwj4_NS9-xDUYdqwHSBbOx7ue6Qt-RCs4W6vVgDpCVT1wRldGjfTOn4Vni-CbVmfjHz3Rwv1LDJEj3atM4pYG8katXgvwR3ztl5lu0taDA48cciwPSHZFqwN8SoBN8KpoB5II2GQRrkkWybGXPz-4daeXAlPuFrTJ68ExW3LlrmMW3ZSZavlbv8VIUjVHtz9j7PRoRJzurO_C_AWKLNqBh6Q3WWWZRx4KqE3aDaemwHOS-x4w", - "type": "text", - "uuid": "2095ff28-47a7-46ca-b775-f838b3831a76" + "value": "Bearer {{auth-token}}", + "type": "text" } ], "body": { @@ -119,128 +168,260 @@ { "key": "operations", "value": "{\"query\":\"mutation ($file: Upload!) {\\n createSummary(createSummaryInput: { inputFile: $file }) {\\n jobId\\n }\\n}\"}", + "description": "Parameterized GraphQL query to upload file for processing", "type": "text" }, { "key": "map", "value": "{\"0\": [\"variables.file\"]}", + "description": "Used to map the uploaded file and GraphQL query", "type": "text" }, { "key": "0", + "description": "Transcript file uploaded from local machine for processing. Allowed extensions: .txt, .vtt", "type": "file", - "src": "/home/harish-work/sample.txt" + "src": [] } ] }, - "url": "http://localhost:3000/graphql" + "url": { + "raw": "http://localhost:3000/graphql", + "protocol": "http", + "host": [ + "localhost" + ], + "port": "3000", + "path": [ + "graphql" + ] + }, + "description": "Allows uploading of a .txt or .vtt file for processing" }, - "_postman_previewlanguage": "Text", - "header": [], - "cookie": [], - "body": "" + "response": [] } - ] + ], + "description": "Collection of requests pertaining to uploading files using graphQL" }, { - "name": "FetchAllRecords", - "request": { - "method": "POST", - "header": [ - { - "key": "Accept-Encoding", - "value": "gzip, deflate, br", - "uuid": "6a27d6e3-a963-4660-b63c-a737f9f9cc4c" - }, - { - "key": "Content-Type", - "value": "application/json", - "uuid": "3b63dce7-db61-40dc-9be4-1448e0fb3edf" - }, - { - "key": "Accept", - "value": "application/json", - "uuid": "3e0c90f9-d0de-4cbb-9189-332ca8aae4a0" - }, - { - "key": "Connection", - "value": "keep-alive", - "uuid": "4a043dd2-d248-4416-a197-fbe174b08746" - }, - { - "key": "Origin", - "value": "chrome-extension://flnheeellpciglgpaodhkhmapeljopja", - "uuid": "13fe81c3-a5fa-4a3d-95ce-0e978bb945e9" + "name": "Fetch all Summaries", + "item": [ + { + "name": "Fetch All Summaries - Success", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Response is valid JSON\", function () {", + " pm.response.to.be.json;", + "});", + "pm.test(\"Response has valid 'data' property\", function () {", + " var jsonData = pm.response.json();", + " pm.expect(jsonData).to.have.property(\"data\").to.be.an(\"object\");", + "});", + "pm.test(\"Response contains a valid 'summaries' object\", function () {", + " var jsonData = pm.response.json();", + " pm.expect(jsonData.data).to.have.property(\"summaries\").to.be.an(\"object\");", + "});", + "pm.test(\"Response contains a valid 'summaries' array\", function () {", + " var jsonData = pm.response.json();", + " pm.expect(jsonData.data.summaries).to.have.property(\"summaries\").to.be.an(\"array\");", + "});", + "" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept-Encoding", + "value": "gzip, deflate, br" + }, + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "Authorization", + "value": "Bearer {{auth-token}}", + "type": "text" + } + ], + "body": { + "mode": "graphql", + "graphql": { + "query": "{\n summaries(\n options: {\n limit: 10\n offset: 0\n sortOrder: ASC\n search: \"John Doe\" # Remove search if you want complete data\n filters: [ # Remove filter if you want complete data\n { field: \"createdOn\", operator: \"gte\", value: \"2023-01-01\" } # Specify the date range to fetch record\n { field: \"createdOn\", operator: \"lte\", value: \"2024-09-01\" } # Specify the upper limit for the date range\n # { field: \"createdBy\", operator: \"in\", value: \"[\\\"user@example.com\\\",\\\"admin@example.com\\\"]\" } # Specify the email id of the person whose record you want to find\n ]\n }\n ) {\n limit\n offset\n summaries {\n createdBy\n createdOn\n jobId\n inputFile\n jobStatus\n modifiedBy\n modifiedOn\n outputText\n status\n }\n total\n }\n}", + "variables": "" + } + }, + "url": { + "raw": "http://localhost:3000/graphql", + "protocol": "http", + "host": [ + "localhost" + ], + "port": "3000", + "path": [ + "graphql" + ] + }, + "description": "Allows successfully fetching all summaries based on the options passed" }, - { - "key": "Authorization", - "value": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IkwxS2ZLRklfam5YYndXYzIyeFp4dzFzVUhIMCIsImtpZCI6IkwxS2ZLRklfam5YYndXYzIyeFp4dzFzVUhIMCJ9.eyJhdWQiOiJhcGk6Ly9mNDQ0N2QwYy04YzY4LTRlODMtYWU5MS1lNjJlMjc1NmExNDciLCJpc3MiOiJodHRwczovL3N0cy53aW5kb3dzLm5ldC85NWNhODVjYi0yMGM5LTQ1YzUtYmJmYy1iZTJkMGFjMmU2NTcvIiwiaWF0IjoxNzE2ODc4NDQxLCJuYmYiOjE3MTY4Nzg0NDEsImV4cCI6MTcxNjg4Mzk0MSwiYWNyIjoiMSIsImFpbyI6IkFUUUF5LzhXQUFBQUlqK2dFNzNRZ2lkZUhUV2F1MFViOWVlUVVvZllhcGxQbHBJVmdoNXE5VGphMmUyOGF0aWMrRThkWUJUck1jWUkiLCJhbXIiOlsicHdkIl0sImFwcGlkIjoiMmIwM2U3M2UtMTdlMS00OGYzLWIyNGEtN2QyNzAxOTZmNDc3IiwiYXBwaWRhY3IiOiIwIiwiZ2l2ZW5fbmFtZSI6IkhhcmlzaCIsImlwYWRkciI6IjE0Ljk5LjIwMy41MCIsIm5hbWUiOiJIYXJpc2giLCJvaWQiOiI0NjFhZWRlNi1kOWRlLTQ4NTctOTc5ZS0yZWVmZDQ5ODU1MTYiLCJyaCI6IjAuQVZZQXk0WEtsY2tneFVXN19MNHRDc0xtVnd4OVJQUm9qSU5PcnBIbUxpZFdvVWRXQUlVLiIsInNjcCI6ImFwaS5jb25zdW1lIiwic3ViIjoidkRsb0VSUTZMRndjLTYyS2prRnUwMWdXSHRvbVNSOXdJaE92aXpLNEV6MCIsInRpZCI6Ijk1Y2E4NWNiLTIwYzktNDVjNS1iYmZjLWJlMmQwYWMyZTY1NyIsInVuaXF1ZV9uYW1lIjoiaGFyaXNoQG9zbW9zeXMuY28iLCJ1cG4iOiJoYXJpc2hAb3Ntb3N5cy5jbyIsInV0aSI6Ik96NHNMdEJhTFVtdTNlS0hjTkFOQUEiLCJ2ZXIiOiIxLjAifQ.kk0RedjQn9PAcCLnLlGJtMKa9cvdV1nF4XzU17QpyfACg6YJSDev1JKl6xvUIkDmP0hbGbyaWbswLcG-k-shS1UJ04EMHychDDOVlMKCCinusZo2C03z_s4PUTi8eomt1RyxshndQy9OozvF1RQrv6_MgvHm3GWrn5c3tjya7zBGYgoL854dje6V8x_GhWE6zPOyR-iEkryc6SySpwUShI6CZfO8M9i4EklNbb_ikjmKni_ZeiqPBcXxK9t8zbREqhLACm8Xl7ueyvJlhivMhYhnXJWIGlaLDSa669Grz0vfGxs35DUncv0Rz_XXdHgBh3Bl6a_4cvxB_NIyNy_UVA", - "type": "text", - "uuid": "6ece77f5-183a-40ed-a8f9-dd6d2e2a67ec" - } - ], - "body": { - "mode": "graphql", - "graphql": { - "query": "{\n summaries(\n options: {\n limit: 10\n offset: 0\n sortOrder: ASC\n filters: [ #Remove filter if you want complete data \n { field: \"createdOn\", operator: \"gte\", value: \"2023-01-01\" } #Specify the date range to fetch record\n { field: \"createdOn\", operator: \"lte\", value: \"2024-06-06\" }\n { field: \"createdBy\", operator: \"in\", value: \"[\\\"vikas.k@osmosys.co\\\",\\\"harish@osmosys.co\\\"]\" } # Specify the email id of the person whose record you want to find \n ]\n }\n ) {\n limit\n offset\n summaries {\n createdBy\n createdOn\n jobId\n inputFile\n jobStatus\n modifiedBy\n modifiedOn\n outputText\n status\n }\n total\n }\n}\n", - "variables": "" - } + "response": [] }, - "url": "http://localhost:3000/graphql" - }, - "response": [ { - "name": "Untitled Response", - "originalRequest": { + "name": "Fetch All Summaries - Unauthorized", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Response is valid JSON\", function () {", + " pm.response.to.be.json;", + "});", + "pm.test(\"Response has valid 'errors' and 'data' properties\", function () {", + " var jsonData = pm.response.json();", + " pm.expect(jsonData).to.have.property(\"data\");", + " pm.expect(jsonData).to.have.property(\"errors\").to.be.an(\"array\");", + "});", + "pm.test(\"message: Unauthorized\", function () {", + " var jsonData = pm.response.json();", + " pm.expect(jsonData).to.have.property(\"data\");", + " pm.expect(jsonData).to.have.property(\"errors\").to.be.an(\"array\");", + " pm.expect(jsonData.errors[0]).to.have.property(\"message\", \"Unauthorized\");", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { "method": "POST", "header": [ { "key": "Accept-Encoding", - "value": "gzip, deflate, br", - "uuid": "6a27d6e3-a963-4660-b63c-a737f9f9cc4c" + "value": "gzip, deflate, br" }, { "key": "Content-Type", - "value": "application/json", - "uuid": "3b63dce7-db61-40dc-9be4-1448e0fb3edf" + "value": "application/json" }, { "key": "Accept", - "value": "application/json", - "uuid": "3e0c90f9-d0de-4cbb-9189-332ca8aae4a0" + "value": "application/json" }, { "key": "Connection", - "value": "keep-alive", - "uuid": "4a043dd2-d248-4416-a197-fbe174b08746" + "value": "keep-alive" + } + ], + "body": { + "mode": "graphql", + "graphql": { + "query": "{\n summaries(\n options: {\n limit: 10\n offset: 0\n sortOrder: ASC\n search: \"John Doe\" # Remove search if you want complete data\n filters: [ # Remove filter if you want complete data\n { field: \"createdOn\", operator: \"gte\", value: \"2023-01-01\" } # Specify the date range to fetch record\n { field: \"createdOn\", operator: \"lte\", value: \"2024-09-01\" } # Specify the upper limit for the date range\n # { field: \"createdBy\", operator: \"in\", value: \"[\\\"user@example.com\\\",\\\"admin@example.com\\\"]\" } # Specify the email id of the person whose record you want to find\n ]\n }\n ) {\n limit\n offset\n summaries {\n createdBy\n createdOn\n jobId\n inputFile\n jobStatus\n modifiedBy\n modifiedOn\n outputText\n status\n }\n total\n }\n}", + "variables": "" + } + }, + "url": { + "raw": "http://localhost:3000/graphql", + "protocol": "http", + "host": [ + "localhost" + ], + "port": "3000", + "path": [ + "graphql" + ] + }, + "description": "Allows successfully fetching all summaries based on the options passed" + }, + "response": [] + }, + { + "name": "Fetch All Summaries - Bad Request", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Response is valid JSON\", function () {", + " pm.response.to.be.json;", + "});", + "pm.test(\"Response for fetching summaries with bad request\", function () {", + " pm.expect(pm.response.code).to.equal(400);", + " pm.expect(pm.response.json().errors).to.be.an(\"array\");", + " pm.expect(pm.response.json().errors[0].message).to.be.a(\"string\");", + "});", + "" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept-Encoding", + "value": "gzip, deflate, br" }, { - "key": "Origin", - "value": "chrome-extension://flnheeellpciglgpaodhkhmapeljopja", - "uuid": "13fe81c3-a5fa-4a3d-95ce-0e978bb945e9" + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "key": "Connection", + "value": "keep-alive" }, { "key": "Authorization", - "value": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IkwxS2ZLRklfam5YYndXYzIyeFp4dzFzVUhIMCIsImtpZCI6IkwxS2ZLRklfam5YYndXYzIyeFp4dzFzVUhIMCJ9.eyJhdWQiOiJhcGk6Ly9mNDQ0N2QwYy04YzY4LTRlODMtYWU5MS1lNjJlMjc1NmExNDciLCJpc3MiOiJodHRwczovL3N0cy53aW5kb3dzLm5ldC85NWNhODVjYi0yMGM5LTQ1YzUtYmJmYy1iZTJkMGFjMmU2NTcvIiwiaWF0IjoxNzE2ODc4NDQxLCJuYmYiOjE3MTY4Nzg0NDEsImV4cCI6MTcxNjg4Mzk0MSwiYWNyIjoiMSIsImFpbyI6IkFUUUF5LzhXQUFBQUlqK2dFNzNRZ2lkZUhUV2F1MFViOWVlUVVvZllhcGxQbHBJVmdoNXE5VGphMmUyOGF0aWMrRThkWUJUck1jWUkiLCJhbXIiOlsicHdkIl0sImFwcGlkIjoiMmIwM2U3M2UtMTdlMS00OGYzLWIyNGEtN2QyNzAxOTZmNDc3IiwiYXBwaWRhY3IiOiIwIiwiZ2l2ZW5fbmFtZSI6IkhhcmlzaCIsImlwYWRkciI6IjE0Ljk5LjIwMy41MCIsIm5hbWUiOiJIYXJpc2giLCJvaWQiOiI0NjFhZWRlNi1kOWRlLTQ4NTctOTc5ZS0yZWVmZDQ5ODU1MTYiLCJyaCI6IjAuQVZZQXk0WEtsY2tneFVXN19MNHRDc0xtVnd4OVJQUm9qSU5PcnBIbUxpZFdvVWRXQUlVLiIsInNjcCI6ImFwaS5jb25zdW1lIiwic3ViIjoidkRsb0VSUTZMRndjLTYyS2prRnUwMWdXSHRvbVNSOXdJaE92aXpLNEV6MCIsInRpZCI6Ijk1Y2E4NWNiLTIwYzktNDVjNS1iYmZjLWJlMmQwYWMyZTY1NyIsInVuaXF1ZV9uYW1lIjoiaGFyaXNoQG9zbW9zeXMuY28iLCJ1cG4iOiJoYXJpc2hAb3Ntb3N5cy5jbyIsInV0aSI6Ik96NHNMdEJhTFVtdTNlS0hjTkFOQUEiLCJ2ZXIiOiIxLjAifQ.kk0RedjQn9PAcCLnLlGJtMKa9cvdV1nF4XzU17QpyfACg6YJSDev1JKl6xvUIkDmP0hbGbyaWbswLcG-k-shS1UJ04EMHychDDOVlMKCCinusZo2C03z_s4PUTi8eomt1RyxshndQy9OozvF1RQrv6_MgvHm3GWrn5c3tjya7zBGYgoL854dje6V8x_GhWE6zPOyR-iEkryc6SySpwUShI6CZfO8M9i4EklNbb_ikjmKni_ZeiqPBcXxK9t8zbREqhLACm8Xl7ueyvJlhivMhYhnXJWIGlaLDSa669Grz0vfGxs35DUncv0Rz_XXdHgBh3Bl6a_4cvxB_NIyNy_UVA", - "type": "text", - "uuid": "6ece77f5-183a-40ed-a8f9-dd6d2e2a67ec" + "value": "Bearer {{auth-token}}", + "type": "text" } ], "body": { "mode": "graphql", "graphql": { - "query": "{\n summaries(\n options: {\n limit: 10\n offset: 0\n sortOrder: ASC\n filters: [ #Remove filter if you want complete data \n { field: \"createdOn\", operator: \"gte\", value: \"2023-01-01\" } #Specify the date range to fetch record\n { field: \"createdOn\", operator: \"lte\", value: \"2024-06-06\" }\n { field: \"createdBy\", operator: \"in\", value: \"[\\\"vikas.k@osmosys.co\\\",\\\"harish@osmosys.co\\\"]\" } # Specify the email id of the person whose record you want to find \n ]\n }\n ) {\n limit\n offset\n summaries {\n createdBy\n createdOn\n jobId\n inputFile\n jobStatus\n modifiedBy\n modifiedOn\n outputText\n status\n }\n total\n }\n}\n", + "query": "{\n summaries(\n options: {\n unknownValue: \"Some unknown parameter\",\n limit: 10\n offset: 0\n sortOrder: ASC\n search: \"John Doe\" # Remove search if you want complete data\n filters: [ # Remove filter if you want complete data\n { field: \"createdOn\", operator: \"gte\", value: \"2023-01-01\" } # Specify the date range to fetch record\n { field: \"createdOn\", operator: \"lte\", value: \"2024-09-01\" } # Specify the upper limit for the date range\n { field: \"createdBy\", operator: \"in\", value: \"[\\\"user@example.com\\\",\\\"admin@example.com\\\"]\" } # Specify the email id of the person whose record you want to find\n ]\n }\n ) {\n limit\n offset\n summaries {\n createdBy\n createdOn\n jobId\n inputFile\n jobStatus\n modifiedBy\n modifiedOn\n outputText\n status\n }\n total\n }\n}", "variables": "" } }, - "url": "http://localhost:3000/graphql" + "url": { + "raw": "http://localhost:3000/graphql", + "protocol": "http", + "host": [ + "localhost" + ], + "port": "3000", + "path": [ + "graphql" + ] + }, + "description": "Allows successfully fetching all summaries based on the options passed" }, - "_postman_previewlanguage": "Text", - "header": [], - "cookie": [], - "body": "" + "response": [] } - ] + ], + "description": "Collection of requests pertaining to fetching all summaries" } ] } \ No newline at end of file From 6d4fe661db3186302aaa46de94f80eec981c6c78 Mon Sep 17 00:00:00 2001 From: kshitij-k-osmosys Date: Sun, 25 Aug 2024 13:59:48 +0530 Subject: [PATCH 4/5] docs: remove unused headers --- apps/api/docs/api-documentation.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/api/docs/api-documentation.md b/apps/api/docs/api-documentation.md index 1bddf99..5a26112 100644 --- a/apps/api/docs/api-documentation.md +++ b/apps/api/docs/api-documentation.md @@ -37,7 +37,6 @@ curl --location 'http://localhost:3000/graphql' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'Connection: keep-alive' \ ---header 'Origin: chrome-extension://flnheeellpciglgpaodhkhmapeljopja' \ --header 'x-apollo-operation-name: createSummary' \ --header 'Authorization: Bearer auth-token' \ --form 'operations="{\"query\":\"mutation (\$file: Upload\!) {\\n createSummary(createSummaryInput: { inputFile: \$file }) {\\n jobId\\n }\\n}\"}"' \ @@ -68,7 +67,7 @@ The different options that can be used while fetching summaries are as follows: - `sortBy:` Sort the results by the provided key - `sortOrder:` Sort the results in either `ASC`ending or `DESC`ending order - `search:` Display those results which contain the input string. Searchable fields: `inputFile`, `createdBy`, `outputText` -- `filters:` Filter the results based on the provided `createdOn` and `createdBy`. Operator can be `eq` (equal), `ne` (not equal), `contains`, `gt` (greater than) or `lt` (less than) +- `filters:` Filter the results based on the provided `createdOn` and `createdBy`. Operator can be `eq` (equal), `ne` (not equal), `contains`, `gt` (greater than), `gte` (greater than or equal to), `lt` (less than) or `lte` (less than or equal to) **Endpoint:** `http://localhost:3000/graphql` @@ -127,7 +126,6 @@ curl --location 'http://localhost:3000/graphql' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'Connection: keep-alive' \ ---header 'Origin: chrome-extension://flnheeellpciglgpaodhkhmapeljopja' \ --header 'Authorization: Bearer auth-token' \ --data-raw '{"query":"{\n summaries(\n options: {\n limit: 10\n offset: 0\n sortOrder: ASC\n search: \"John Doe\" # Remove search if you want complete data\n filters: [ # Remove filters if you want complete data\n { field: \"createdOn\", operator: \"gte\", value: \"2023-01-01\" } # Specify the date range to fetch record\n { field: \"createdOn\", operator: \"lte\", value: \"2024-06-06\" } # Specify the upper limit for the date range\n { field: \"createdBy\", operator: \"in\", value: \"[\\\"user@example.com\\\",\\\"admin@example.com\\\"]\" } # Specify the email id of the person whose record you want to find\n ]\n }\n ) {\n limit\n offset\n summaries {\n createdBy\n createdOn\n jobId\n inputFile\n jobStatus\n modifiedBy\n modifiedOn\n outputText\n status\n }\n total\n }\n}\n","variables":{}}' ``` From a0a63ae0e1b905811b0f921b55465ce98a912de5 Mon Sep 17 00:00:00 2001 From: kshitij-k-osmosys Date: Thu, 29 Aug 2024 12:01:46 +0530 Subject: [PATCH 5/5] Revert "fix: searchable fields" This reverts commit 9d7776e8ace61ef490ebbcd713f71857c07e01f2. --- apps/api/src/modules/summary/summary.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/api/src/modules/summary/summary.service.ts b/apps/api/src/modules/summary/summary.service.ts index aaa98c1..cd04b89 100644 --- a/apps/api/src/modules/summary/summary.service.ts +++ b/apps/api/src/modules/summary/summary.service.ts @@ -83,7 +83,7 @@ export class SummaryService extends CoreService { this.logger.log('Getting all jobs with options.'); const baseConditions = [{ field: 'status', value: Status.ACTIVE }]; - const searchableFields = ['inputFile', 'createdBy', 'outputText']; + const searchableFields = ['createdBy', 'data', 'result']; const { items, total } = await super.findAll( options,