{"id":31684800,"url":"https://github.com/muavia1/testttt","last_synced_at":"2026-02-14T22:31:21.599Z","repository":{"id":315931754,"uuid":"1061305091","full_name":"Muavia1/testttt","owner":"Muavia1","description":null,"archived":false,"fork":false,"pushed_at":"2026-02-12T17:33:00.000Z","size":50,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-13T01:10:02.433Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Muavia1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-21T16:46:55.000Z","updated_at":"2026-02-12T17:33:45.000Z","dependencies_parsed_at":"2025-09-21T18:35:51.504Z","dependency_job_id":"8e47e67b-8781-4d27-916e-b860de2a0662","html_url":"https://github.com/Muavia1/testttt","commit_stats":null,"previous_names":["muavia1/testttt"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Muavia1/testttt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Muavia1%2Ftestttt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Muavia1%2Ftestttt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Muavia1%2Ftestttt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Muavia1%2Ftestttt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Muavia1","download_url":"https://codeload.github.com/Muavia1/testttt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Muavia1%2Ftestttt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29458582,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T21:29:27.764Z","status":"ssl_error","status_checked_at":"2026-02-14T21:28:11.111Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-08T08:39:04.498Z","updated_at":"2026-02-14T22:31:21.593Z","avatar_url":"https://github.com/Muavia1.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"\nHere’s a copy-paste spec you can give your backend engineer.\n\n---\n\n# Backend: Job application statuses – update flow\n\n## 1. Database \u0026 model\n\n**Table:** `job`  \n**New column:**\n\n| Column name        | Type   | Nullable | Default value |\n|--------------------|--------|----------|----------------|\n| `applicationStatuses` or `statuses` | JSON   | **NO**   | `[\"shortlisted\", \"screening\", \"interview\", \"offered\", \"rejected\"]` |\n\n- **Type:** JSON array of strings.\n- **Nullable:** `false` — every job must have a value.\n- **Default:** Exactly  \n  `[\"shortlisted\", \"screening\", \"interview\", \"offered\", \"rejected\"]`\n\n**Migration:**\n\n- Add the column with the default above.\n- Backfill existing rows so no row is null (e.g. set default for all existing jobs when adding the column, or `UPDATE job SET applicationStatuses = default_value WHERE applicationStatuses IS NULL`).\n\n**Model (e.g. Sequelize):**\n\n- Add attribute for this column.\n- `allowNull: false`\n- `defaultValue: [\"shortlisted\", \"screening\", \"interview\", \"offered\", \"rejected\"]`\n- Ensure create/read paths use this so all jobs (new and existing) always have this field set.\n\n---\n\n## 2. Existing API: include statuses in job details\n\n**API:** `viewJobPost`  \n**Request:** `{ jobId: \u003cnumber\u003e }` (or existing equivalent).  \n**Response:** Existing job object **plus** a top-level field for the status list.\n\n- Add to the job object returned:\n  - **Field name:** `statuses` (or `applicationStatuses` — must match what frontend expects).\n  - **Value:** The job’s `applicationStatuses` (or `statuses`) column — array of strings, e.g.  \n    `[\"shortlisted\", \"screening\", \"interview\", \"offered\", \"rejected\"]`  \n    or the same list with extra values like `\"technical_interview\"` if the recruiter added them.\n\nNo change to auth or other request/response fields; only add this field to the job payload.\n\n---\n\n## 3. New API: update job application statuses\n\n**Purpose:** Recruiter can change the list of application statuses for a job (e.g. add “Technical Interview”, “Second Interview”). Backend replaces the job’s status list with the one sent.\n\n**Endpoint name (suggestion):** `updateJobApplicationStatuses` or `updateJobStatuses`.\n\n**Request:**\n\n- **Method:** POST (or PUT/PATCH if that’s your convention).\n- **Body (e.g. JSON):**\n  - `jobId` (number, required) — job to update.\n  - `statuses` (array of strings, required) — new full list of statuses.  \n    Example:  \n    `[\"shortlisted\", \"screening\", \"interview\", \"offered\", \"rejected\", \"technical_interview\"]`\n\n**Validation:**\n\n- `jobId` must exist and belong to the authenticated user (or company).\n- `statuses` must be a non-empty array of strings (no null/undefined entries).\n- Optional: max length for the array (e.g. 20) and for each string (e.g. 50 chars).\n\n**Behaviour:**\n\n1. Resolve job by `jobId`, check ownership.\n2. Replace the job’s `applicationStatuses` (or `statuses`) column with the received `statuses` array.\n3. Return success (and optionally the updated job object including `statuses`).\n\n**Response (example):**\n\n- Success: e.g. `{ status: 200, data: { success: true } }` or return updated job with `statuses`.\n- Errors: 4xx for invalid `jobId`, unauthorized, or invalid `statuses`.\n\n---\n\n## 4. Flow summary\n\n| Step | Action |\n|------|--------|\n| 1 | Add `applicationStatuses` (or `statuses`) column to `job`: JSON, NOT NULL, default `[\"shortlisted\", \"screening\", \"interview\", \"offered\", \"rejected\"]`. Backfill existing rows. |\n| 2 | In **viewJobPost** response, include this field (e.g. as `statuses`) in the job object so every job details response has a status list. |\n| 3 | New API **updateJobApplicationStatuses**: accept `jobId` + `statuses` (array of strings); validate; update job’s status list; return success (and optionally updated job). |\n\n---\n\n## 5. Example payloads\n\n**viewJobPost response (snippet):**\n\n```json\n{\n  \"jobId\": 123,\n  \"jobtitle\": \"...\",\n  \"statuses\": [\"shortlisted\", \"screening\", \"interview\", \"offered\", \"rejected\"]\n}\n```\n\nAfter recruiter adds “Technical Interview” and frontend calls the new API:\n\n**updateJobApplicationStatuses request:**\n\n```json\n{\n  \"jobId\": 123,\n  \"statuses\": [\"shortlisted\", \"screening\", \"interview\", \"offered\", \"rejected\", \"technical_interview\"]\n}\n```\n\n**updateJobApplicationStatuses response (example):**\n\n```json\n{\n  \"status\": 200,\n  \"data\": { \"success\": true }\n}\n```\n\nYou can share this document as-is with your backend engineer; they can implement the migration, viewJobPost change, and the new update API from it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuavia1%2Ftestttt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmuavia1%2Ftestttt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuavia1%2Ftestttt/lists"}