From e25420f4c98b55768f69e0326e36db691561f435 Mon Sep 17 00:00:00 2001 From: michelle0927 Date: Mon, 30 Dec 2024 15:02:01 -0500 Subject: [PATCH 1/4] taleez init --- .../add-candidate-to-job.mjs | 35 ++ .../create-candidate/create-candidate.mjs | 50 +++ .../taleez/actions/create-job/create-job.mjs | 57 ++++ components/taleez/package.json | 2 +- .../new-candidate-created.mjs | 117 +++++++ .../sources/new-job-listed/new-job-listed.mjs | 100 ++++++ components/taleez/taleez.app.mjs | 299 +++++++++++++++++- 7 files changed, 657 insertions(+), 3 deletions(-) create mode 100644 components/taleez/actions/add-candidate-to-job/add-candidate-to-job.mjs create mode 100644 components/taleez/actions/create-candidate/create-candidate.mjs create mode 100644 components/taleez/actions/create-job/create-job.mjs create mode 100644 components/taleez/sources/new-candidate-created/new-candidate-created.mjs create mode 100644 components/taleez/sources/new-job-listed/new-job-listed.mjs diff --git a/components/taleez/actions/add-candidate-to-job/add-candidate-to-job.mjs b/components/taleez/actions/add-candidate-to-job/add-candidate-to-job.mjs new file mode 100644 index 0000000000000..5936769fff0d4 --- /dev/null +++ b/components/taleez/actions/add-candidate-to-job/add-candidate-to-job.mjs @@ -0,0 +1,35 @@ +import taleez from "../../taleez.app.mjs"; +import { axios } from "@pipedream/platform"; + +export default { + key: "taleez-add-candidate-to-job", + name: "Add Candidate to Job", + description: "Links an existing candidate to a job offer. [See the documentation]()", + version: "0.0.{{ts}}", + type: "action", + props: { + taleez, + candidateId: { + propDefinition: [ + taleez, + "candidateId", + ], + }, + jobId: { + propDefinition: [ + taleez, + "jobId", + ], + }, + }, + async run({ $ }) { + const response = await this.taleez.linkCandidateToJobOffer({ + data: { + candidate_id: this.candidateId, + job_id: this.jobId, + }, + }); + $.export("$summary", `Linked candidate ${this.candidateId} to job ${this.jobId} successfully`); + return response; + }, +}; diff --git a/components/taleez/actions/create-candidate/create-candidate.mjs b/components/taleez/actions/create-candidate/create-candidate.mjs new file mode 100644 index 0000000000000..b12a7ca7eda4e --- /dev/null +++ b/components/taleez/actions/create-candidate/create-candidate.mjs @@ -0,0 +1,50 @@ +import taleez from "../../taleez.app.mjs"; +import { axios } from "@pipedream/platform"; + +export default { + key: "taleez-create-candidate", + name: "Create Candidate", + description: "Creates a new candidate in Taleez. [See the documentation]()", + version: "0.0.{{ts}}", + type: "action", + props: { + taleez, + candidateName: { + propDefinition: [ + taleez, + "candidateName", + ], + }, + email: { + propDefinition: [ + taleez, + "email", + ], + }, + jobListingId: { + propDefinition: [ + taleez, + "jobListingId", + ], + }, + resume: { + propDefinition: [ + taleez, + "resume", + ], + optional: true, + }, + coverLetter: { + propDefinition: [ + taleez, + "coverLetter", + ], + optional: true, + }, + }, + async run({ $ }) { + const response = await this.taleez.createCandidate(); + $.export("$summary", `Created candidate ${this.candidateName} successfully`); + return response; + }, +}; diff --git a/components/taleez/actions/create-job/create-job.mjs b/components/taleez/actions/create-job/create-job.mjs new file mode 100644 index 0000000000000..947e9b8828275 --- /dev/null +++ b/components/taleez/actions/create-job/create-job.mjs @@ -0,0 +1,57 @@ +import taleez from "../../taleez.app.mjs"; +import { axios } from "@pipedream/platform"; + +export default { + key: "taleez-create-job", + name: "Create Job Listing", + description: "Creates a new job listing. [See the documentation]()", + version: "0.0.{{ts}}", + type: "action", + props: { + taleez, + jobTitle: { + propDefinition: [ + taleez, + "jobTitle", + ], + }, + department: { + propDefinition: [ + taleez, + "department", + ], + }, + jobDescription: { + propDefinition: [ + taleez, + "jobDescription", + ], + }, + jobLocation: { + propDefinition: [ + taleez, + "jobLocation", + ], + optional: true, + }, + jobType: { + propDefinition: [ + taleez, + "jobType", + ], + optional: true, + }, + applicationDeadline: { + propDefinition: [ + taleez, + "applicationDeadline", + ], + optional: true, + }, + }, + async run({ $ }) { + const response = await this.taleez.createJobListing(); + $.export("$summary", `Job "${this.jobTitle}" created with ID ${response.id}`); + return response; + }, +}; diff --git a/components/taleez/package.json b/components/taleez/package.json index 0ff7931f6cb1d..955f106eeff59 100644 --- a/components/taleez/package.json +++ b/components/taleez/package.json @@ -12,4 +12,4 @@ "publishConfig": { "access": "public" } -} \ No newline at end of file +} diff --git a/components/taleez/sources/new-candidate-created/new-candidate-created.mjs b/components/taleez/sources/new-candidate-created/new-candidate-created.mjs new file mode 100644 index 0000000000000..ab3a721e62af5 --- /dev/null +++ b/components/taleez/sources/new-candidate-created/new-candidate-created.mjs @@ -0,0 +1,117 @@ +import { + axios, DEFAULT_POLLING_SOURCE_TIMER_INTERVAL, +} from "@pipedream/platform"; +import taleez from "../../taleez.app.mjs"; + +export default { + key: "taleez-new-candidate-created", + name: "New Candidate Created", + description: "Emit new event when a candidate is added to a job listing. [See the documentation]()", + version: "0.0.{{ts}}", + type: "source", + dedupe: "unique", + props: { + taleez: { + type: "app", + app: "taleez", + }, + jobListingId: { + propDefinition: [ + "taleez", + "jobListingId", + ], + }, + departmentFilter: { + propDefinition: [ + "taleez", + "departmentFilter", + ], + optional: true, + }, + locationFilter: { + propDefinition: [ + "taleez", + "locationFilter", + ], + optional: true, + }, + db: { + type: "$.service.db", + db: "default", + }, + timer: { + type: "$.interface.timer", + default: { + intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL, + }, + }, + }, + hooks: { + async deploy() { + const candidates = await this.taleez.paginate(this.taleez.listCandidates, { + params: { + job_listing_id: this.jobListingId, + department: this.departmentFilter, + location: this.locationFilter, + per_page: 50, + }, + }); + + const sortedCandidates = candidates.sort((a, b) => new Date(a.created_at) - new Date(b.created_at)); + + for (const candidate of sortedCandidates) { + this.$emit( + candidate, + { + id: candidate.id || new Date(candidate.created_at).getTime(), + summary: `New Candidate: ${candidate.name}`, + ts: new Date(candidate.created_at).getTime(), + }, + ); + } + + if (candidates.length > 0) { + const latestTimestamp = new Date(candidates[candidates.length - 1].created_at).getTime(); + await this.db.set("lastRunTimestamp", latestTimestamp); + } + }, + async activate() { + // No webhook subscription needed for polling source + }, + async deactivate() { + // No webhook subscription to clean up for polling source + }, + }, + async run() { + const lastRunTimestamp = await this.db.get("lastRunTimestamp") || 0; + + const candidates = await this.taleez.paginate(this.taleez.listCandidates, { + params: { + job_listing_id: this.jobListingId, + department: this.departmentFilter, + location: this.locationFilter, + per_page: 50, + }, + }); + + const newCandidates = candidates.filter((candidate) => new Date(candidate.created_at).getTime() > lastRunTimestamp); + + const sortedNewCandidates = newCandidates.sort((a, b) => new Date(a.created_at) - new Date(b.created_at)); + + for (const candidate of sortedNewCandidates) { + this.$emit( + candidate, + { + id: candidate.id || new Date(candidate.created_at).getTime(), + summary: `New Candidate: ${candidate.name}`, + ts: new Date(candidate.created_at).getTime(), + }, + ); + } + + if (sortedNewCandidates.length > 0) { + const latestTimestamp = new Date(sortedNewCandidates[sortedNewCandidates.length - 1].created_at).getTime(); + await this.db.set("lastRunTimestamp", latestTimestamp); + } + }, +}; diff --git a/components/taleez/sources/new-job-listed/new-job-listed.mjs b/components/taleez/sources/new-job-listed/new-job-listed.mjs new file mode 100644 index 0000000000000..3e8aca614e7cb --- /dev/null +++ b/components/taleez/sources/new-job-listed/new-job-listed.mjs @@ -0,0 +1,100 @@ +import taleez from "../../taleez.app.mjs"; +import { + axios, DEFAULT_POLLING_SOURCE_TIMER_INTERVAL, +} from "@pipedream/platform"; + +export default { + key: "taleez-new-job-listed", + name: "New Job Listing Created", + description: "Emit a new event when a job listing is created. [See the documentation]()", + version: "0.0.{{ts}}", + type: "source", + dedupe: "unique", + props: { + taleez, + db: "$.service.db", + timer: { + type: "$.interface.timer", + default: { + intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL, + }, + }, + departmentFilter: { + propDefinition: [ + taleez, + "departmentFilter", + ], + optional: true, + }, + locationFilter: { + propDefinition: [ + taleez, + "locationFilter", + ], + optional: true, + }, + }, + hooks: { + async deploy() { + const jobListings = await this.taleez.listJobListings({ + params: { + perpage: 50, + sort: "created_desc", + department: this.departmentFilter, + location: this.locationFilter, + }, + }); + + // Sort from oldest to newest + jobListings.sort((a, b) => new Date(a.created_at) - new Date(b.created_at)); + + for (const job of jobListings) { + this.$emit(job, { + id: job.id, + summary: `New Job Listing: ${job.title}`, + ts: Date.parse(job.created_at) || Date.now(), + }); + } + + if (jobListings.length > 0) { + const latestTs = Math.max(...jobListings.map((j) => Date.parse(j.created_at) || Date.now())); + await this.db.set("last_seen_ts", latestTs); + } + }, + async activate() { + await this.taleez.emitNewJobListingEvent(this.callbackUrl); + }, + async deactivate() { + await this.taleez.removeWebhook("job_listing_created"); + }, + }, + async run() { + const lastSeenTs = (await this.db.get("last_seen_ts")) || 0; + const jobListings = await this.taleez.listJobListings({ + params: { + perpage: 100, + sort: "created_asc", + department: this.departmentFilter, + location: this.locationFilter, + }, + }); + + const newJobListings = jobListings.filter((job) => Date.parse(job.created_at) > lastSeenTs); + + // Sort from oldest to newest + newJobListings.sort((a, b) => new Date(a.created_at) - new Date(b.created_at)); + + for (const job of newJobListings) { + this.$emit(job, { + id: job.id, + summary: `New Job Listing: ${job.title}`, + ts: Date.parse(job.created_at) || Date.now(), + }); + } + + if (newJobListings.length > 0) { + const latestTs = Math.max(...newJobListings.map((j) => Date.parse(j.created_at) || Date.now())); + await this.db.set("last_seen_ts", latestTs); + } + }, +}; diff --git a/components/taleez/taleez.app.mjs b/components/taleez/taleez.app.mjs index cbeddc24988b6..229353fbc1017 100644 --- a/components/taleez/taleez.app.mjs +++ b/components/taleez/taleez.app.mjs @@ -1,11 +1,306 @@ +import { axios } from "@pipedream/platform"; + export default { type: "app", app: "taleez", - propDefinitions: {}, + version: "0.0.{{ts}}", + propDefinitions: { + jobListingId: { + type: "string", + label: "Job Listing ID", + description: "The ID of the job listing", + async options() { + const jobListings = await this.listJobListings(); + return jobListings.map((job) => ({ + label: job.title, + value: job.id, + })); + }, + }, + departmentFilter: { + type: "string", + label: "Department Filter", + description: "Filter job listings by department", + optional: true, + async options() { + const departments = await this.getDepartments(); + return departments.map((dept) => ({ + label: dept.name, + value: dept.id, + })); + }, + }, + locationFilter: { + type: "string", + label: "Location Filter", + description: "Filter job listings by location", + optional: true, + async options() { + const locations = await this.getLocations(); + return locations.map((loc) => ({ + label: loc.name, + value: loc.id, + })); + }, + }, + candidateName: { + type: "string", + label: "Candidate Name", + description: "Name of the candidate", + }, + email: { + type: "string", + label: "Email", + description: "Email address of the candidate", + }, + resume: { + type: "string", + label: "Resume", + description: "URL or attachment of the candidate's resume", + optional: true, + }, + coverLetter: { + type: "string", + label: "Cover Letter", + description: "URL or attachment of the candidate's cover letter", + optional: true, + }, + jobTitle: { + type: "string", + label: "Job Title", + description: "Title of the job listing", + }, + department: { + type: "string", + label: "Department", + description: "The department for the job listing", + async options() { + const departments = await this.getDepartments(); + return departments.map((dept) => ({ + label: dept.name, + value: dept.id, + })); + }, + }, + jobDescription: { + type: "string", + label: "Job Description", + description: "Description of the job listing", + }, + jobLocation: { + type: "string", + label: "Job Location", + description: "Location of the job", + optional: true, + async options() { + const locations = await this.getLocations(); + return locations.map((loc) => ({ + label: loc.name, + value: loc.id, + })); + }, + }, + jobType: { + type: "string", + label: "Job Type", + description: "Type of the job (e.g., full-time, part-time)", + optional: true, + options: [ + { + label: "Full-time", + value: "full-time", + }, + { + label: "Part-time", + value: "part-time", + }, + { + label: "Contract", + value: "contract", + }, + ], + }, + applicationDeadline: { + type: "string", + label: "Application Deadline", + description: "Deadline for job applications (YYYY-MM-DD)", + optional: true, + }, + candidateId: { + type: "string", + label: "Candidate ID", + description: "The ID of the candidate to link", + async options() { + const candidates = await this.listCandidates(); + return candidates.map((candidate) => ({ + label: candidate.name, + value: candidate.id, + })); + }, + }, + jobId: { + type: "string", + label: "Job ID", + description: "The ID of the job to link with the candidate", + async options() { + const jobListings = await this.listJobListings(); + return jobListings.map((job) => ({ + label: job.title, + value: job.id, + })); + }, + }, + }, methods: { - // this.$auth contains connected account data authKeys() { console.log(Object.keys(this.$auth)); }, + _baseUrl() { + return "https://api.taleez.com"; + }, + async _makeRequest(opts = {}) { + const { + $ = this, method = "GET", path = "/", headers, ...otherOpts + } = opts; + return axios($, { + ...otherOpts, + method, + url: this._baseUrl() + path, + headers: { + ...headers, + Authorization: `Bearer ${this.$auth.api_token}`, + }, + }); + }, + async listJobListings(opts = {}) { + const params = { + department: this.departmentFilter, + location: this.locationFilter, + ...opts.params, + }; + return this._makeRequest({ + path: "/job_listings", + method: "GET", + params, + }); + }, + async getDepartments(opts = {}) { + return this._makeRequest({ + path: "/departments", + method: "GET", + ...opts, + }); + }, + async getLocations(opts = {}) { + return this._makeRequest({ + path: "/locations", + method: "GET", + ...opts, + }); + }, + async listCandidates(opts = {}) { + return this._makeRequest({ + path: "/candidates", + method: "GET", + ...opts, + }); + }, + async createCandidate(opts = {}) { + const data = { + name: this.candidateName, + email: this.email, + job_listing_id: this.jobListingId, + resume: this.resume, + cover_letter: this.coverLetter, + ...opts.data, + }; + return this._makeRequest({ + path: "/candidates", + method: "POST", + data, + }); + }, + async createJobListing(opts = {}) { + const data = { + title: this.jobTitle, + department: this.department, + description: this.jobDescription, + location: this.jobLocation, + type: this.jobType, + application_deadline: this.applicationDeadline, + ...opts.data, + }; + return this._makeRequest({ + path: "/job_listings", + method: "POST", + data, + }); + }, + async linkCandidateToJobOffer(opts = {}) { + const data = { + candidate_id: this.candidateId, + job_id: this.jobId, + ...opts.data, + }; + return this._makeRequest({ + path: "/candidates/link", + method: "POST", + data, + }); + }, + async emitNewCandidateEvent(callbackUrl) { + const data = { + url: callbackUrl, + events: [ + "candidate_added", + ], + job_listing_id: this.jobListingId, + department: this.departmentFilter, + location: this.locationFilter, + }; + return this._makeRequest({ + path: "/webhooks/candidates", + method: "POST", + data, + }); + }, + async emitNewJobListingEvent(callbackUrl) { + const data = { + url: callbackUrl, + events: [ + "job_listing_created", + ], + department: this.departmentFilter, + location: this.locationFilter, + }; + return this._makeRequest({ + path: "/webhooks/job_listings", + method: "POST", + data, + }); + }, + async paginate(fn, ...opts) { + let results = []; + let hasMore = true; + let page = 1; + + while (hasMore) { + const response = await fn({ + ...opts, + params: { + ...opts[0]?.params, + page, + }, + }); + if (response.length === 0) { + hasMore = false; + } else { + results = results.concat(response); + page += 1; + } + } + + return results; + }, }, }; From a8eabd00506d3287915c265f92f10a8abc074570 Mon Sep 17 00:00:00 2001 From: michelle0927 Date: Mon, 30 Dec 2024 17:43:27 -0500 Subject: [PATCH 2/4] new components --- .../add-candidate-to-job.mjs | 14 +- .../create-candidate/create-candidate.mjs | 60 +-- .../taleez/actions/create-job/create-job.mjs | 57 --- .../taleez/actions/list-jobs/list-jobs.mjs | 74 ++++ components/taleez/package.json | 5 +- components/taleez/sources/common/base.mjs | 72 ++++ .../new-candidate-created.mjs | 123 +----- .../sources/new-job-listed/new-job-listed.mjs | 133 +++---- components/taleez/taleez.app.mjs | 365 +++++++----------- 9 files changed, 409 insertions(+), 494 deletions(-) delete mode 100644 components/taleez/actions/create-job/create-job.mjs create mode 100644 components/taleez/actions/list-jobs/list-jobs.mjs create mode 100644 components/taleez/sources/common/base.mjs diff --git a/components/taleez/actions/add-candidate-to-job/add-candidate-to-job.mjs b/components/taleez/actions/add-candidate-to-job/add-candidate-to-job.mjs index 5936769fff0d4..26acaba9a6892 100644 --- a/components/taleez/actions/add-candidate-to-job/add-candidate-to-job.mjs +++ b/components/taleez/actions/add-candidate-to-job/add-candidate-to-job.mjs @@ -1,11 +1,10 @@ import taleez from "../../taleez.app.mjs"; -import { axios } from "@pipedream/platform"; export default { key: "taleez-add-candidate-to-job", name: "Add Candidate to Job", - description: "Links an existing candidate to a job offer. [See the documentation]()", - version: "0.0.{{ts}}", + description: "Links an existing candidate to a job offer. [See the documentation](https://api.taleez.com/swagger-ui/index.html#/jobs/addCandidate_1)", + version: "0.0.1", type: "action", props: { taleez, @@ -23,10 +22,13 @@ export default { }, }, async run({ $ }) { - const response = await this.taleez.linkCandidateToJobOffer({ + const response = await this.taleez.linkCandidateToJob({ + $, + jobId: this.jobId, data: { - candidate_id: this.candidateId, - job_id: this.jobId, + ids: [ + this.candidateId, + ], }, }); $.export("$summary", `Linked candidate ${this.candidateId} to job ${this.jobId} successfully`); diff --git a/components/taleez/actions/create-candidate/create-candidate.mjs b/components/taleez/actions/create-candidate/create-candidate.mjs index b12a7ca7eda4e..3ba20b075a2cd 100644 --- a/components/taleez/actions/create-candidate/create-candidate.mjs +++ b/components/taleez/actions/create-candidate/create-candidate.mjs @@ -1,50 +1,60 @@ import taleez from "../../taleez.app.mjs"; -import { axios } from "@pipedream/platform"; export default { key: "taleez-create-candidate", name: "Create Candidate", - description: "Creates a new candidate in Taleez. [See the documentation]()", - version: "0.0.{{ts}}", + description: "Creates a new candidate in Taleez. [See the documentation](https://api.taleez.com/swagger-ui/index.html#/candidates/create_1)", + version: "0.0.1", type: "action", props: { taleez, - candidateName: { - propDefinition: [ - taleez, - "candidateName", - ], + firstName: { + type: "string", + label: "First Name", + description: "First name of the candidate", + }, + lastName: { + type: "string", + label: "Last Name", + description: "Last name of the candidate", }, email: { - propDefinition: [ - taleez, - "email", - ], + type: "string", + label: "Email", + description: "Candidate email address. Must be unique in your company", }, - jobListingId: { - propDefinition: [ - taleez, - "jobListingId", - ], + phone: { + type: "string", + label: "Phone", + description: "Candidate phone (formats : 0611223344, +33611223344, 00336112233). Ignored if not valid.", + optional: true, }, - resume: { + unitId: { propDefinition: [ taleez, - "resume", + "unitId", ], - optional: true, }, - coverLetter: { + recruiterId: { propDefinition: [ taleez, - "coverLetter", + "recruiterId", ], - optional: true, }, }, async run({ $ }) { - const response = await this.taleez.createCandidate(); - $.export("$summary", `Created candidate ${this.candidateName} successfully`); + const response = await this.taleez.createCandidate({ + $, + data: { + firstName: this.firstName, + lastName: this.lastName, + mail: this.email, + phone: this.phone, + unitId: this.unitId, + recruiterId: this.recruiterId, + }, + }); + $.export("$summary", `Created candidate ${this.firstName} ${this.lastName} successfully`); return response; }, }; diff --git a/components/taleez/actions/create-job/create-job.mjs b/components/taleez/actions/create-job/create-job.mjs deleted file mode 100644 index 947e9b8828275..0000000000000 --- a/components/taleez/actions/create-job/create-job.mjs +++ /dev/null @@ -1,57 +0,0 @@ -import taleez from "../../taleez.app.mjs"; -import { axios } from "@pipedream/platform"; - -export default { - key: "taleez-create-job", - name: "Create Job Listing", - description: "Creates a new job listing. [See the documentation]()", - version: "0.0.{{ts}}", - type: "action", - props: { - taleez, - jobTitle: { - propDefinition: [ - taleez, - "jobTitle", - ], - }, - department: { - propDefinition: [ - taleez, - "department", - ], - }, - jobDescription: { - propDefinition: [ - taleez, - "jobDescription", - ], - }, - jobLocation: { - propDefinition: [ - taleez, - "jobLocation", - ], - optional: true, - }, - jobType: { - propDefinition: [ - taleez, - "jobType", - ], - optional: true, - }, - applicationDeadline: { - propDefinition: [ - taleez, - "applicationDeadline", - ], - optional: true, - }, - }, - async run({ $ }) { - const response = await this.taleez.createJobListing(); - $.export("$summary", `Job "${this.jobTitle}" created with ID ${response.id}`); - return response; - }, -}; diff --git a/components/taleez/actions/list-jobs/list-jobs.mjs b/components/taleez/actions/list-jobs/list-jobs.mjs new file mode 100644 index 0000000000000..5f4225d9ac017 --- /dev/null +++ b/components/taleez/actions/list-jobs/list-jobs.mjs @@ -0,0 +1,74 @@ +import taleez from "../../taleez.app.mjs"; + +export default { + key: "taleez-list-jobs", + name: "List Jobs", + description: "Retrieves a list of jobs in your company. [See the documentation](https://api.taleez.com/swagger-ui/index.html#/jobs/list_3)", + version: "0.0.1", + type: "action", + props: { + taleez, + unitId: { + propDefinition: [ + taleez, + "unitId", + ], + }, + status: { + propDefinition: [ + taleez, + "status", + ], + }, + contract: { + propDefinition: [ + taleez, + "contract", + ], + }, + city: { + propDefinition: [ + taleez, + "city", + ], + }, + companyLabel: { + propDefinition: [ + taleez, + "companyLabel", + ], + }, + tag: { + propDefinition: [ + taleez, + "tag", + ], + }, + maxResults: { + type: "integer", + label: "Max Results", + description: "The maximum number of jobs to retrieve. Default: `100`", + optional: true, + }, + }, + async run({ $ }) { + const { list: jobs } = await this.taleez.listJobs({ + $, + params: { + unitId: this.unitId, + status: this.status, + contract: this.contract, + city: this.city, + companyLabel: this.companyLabel, + tag: this.tag, + pageSize: this.maxResults, + withDetails: true, + withProps: true, + }, + }); + $.export("$summary", `Successfully retrieved ${jobs?.length} job${jobs?.length === 1 + ? "" + : "s"}`); + return jobs; + }, +}; diff --git a/components/taleez/package.json b/components/taleez/package.json index 955f106eeff59..23c7cf61d9646 100644 --- a/components/taleez/package.json +++ b/components/taleez/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/taleez", - "version": "0.0.1", + "version": "0.1.0", "description": "Pipedream Taleez Components", "main": "taleez.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.0.3" } } diff --git a/components/taleez/sources/common/base.mjs b/components/taleez/sources/common/base.mjs new file mode 100644 index 0000000000000..18e388b92402e --- /dev/null +++ b/components/taleez/sources/common/base.mjs @@ -0,0 +1,72 @@ +import taleez from "../../taleez.app.mjs"; +import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform"; + +export default { + props: { + taleez, + db: "$.service.db", + timer: { + type: "$.interface.timer", + default: { + intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL, + }, + }, + }, + methods: { + _getLastTs() { + return this.db.get("lastTs") || 0; + }, + _setLastTs(lastTs) { + this.db.set("lastTs", lastTs); + }, + emitEvent(item) { + const meta = this.generateMeta(item); + this.$emit(item, meta); + }, + async processEvent(max) { + const lastTs = this._getLastTs(); + let maxTs = lastTs; + const tsField = this.getTsField(); + + const results = this.taleez.paginate({ + fn: this.getResourceFn(), + args: this.getArgs(), + max, + }); + + for await (const item of results) { + if (tsField) { + const ts = item[tsField]; + if (ts > lastTs) { + this.emitEvent(item); + maxTs = Math.max(ts, maxTs); + } + } else { + this.emitEvent(item); + } + } + + this._setLastTs(maxTs); + }, + getArgs() { + return {}; + }, + getTsField() { + return undefined; + }, + getResourceFn() { + throw new Error("getResourceFn is not implemented"); + }, + generateMeta() { + throw new Error("generateMeta is not implemented"); + }, + }, + hooks: { + async deploy() { + await this.processEvent(25); + }, + }, + async run() { + await this.processEvent(); + }, +}; diff --git a/components/taleez/sources/new-candidate-created/new-candidate-created.mjs b/components/taleez/sources/new-candidate-created/new-candidate-created.mjs index ab3a721e62af5..37f3978ddf081 100644 --- a/components/taleez/sources/new-candidate-created/new-candidate-created.mjs +++ b/components/taleez/sources/new-candidate-created/new-candidate-created.mjs @@ -1,117 +1,34 @@ -import { - axios, DEFAULT_POLLING_SOURCE_TIMER_INTERVAL, -} from "@pipedream/platform"; -import taleez from "../../taleez.app.mjs"; +import common from "../common/base.mjs"; export default { + ...common, key: "taleez-new-candidate-created", name: "New Candidate Created", - description: "Emit new event when a candidate is added to a job listing. [See the documentation]()", - version: "0.0.{{ts}}", + description: "Emit new event when a candidate is added in Taleez. [See the documentation](https://api.taleez.com/swagger-ui/index.html#/candidates/list_4)", + version: "0.0.1", type: "source", dedupe: "unique", - props: { - taleez: { - type: "app", - app: "taleez", + methods: { + ...common.methods, + getResourceFn() { + return this.taleez.listCandidates; }, - jobListingId: { - propDefinition: [ - "taleez", - "jobListingId", - ], - }, - departmentFilter: { - propDefinition: [ - "taleez", - "departmentFilter", - ], - optional: true, - }, - locationFilter: { - propDefinition: [ - "taleez", - "locationFilter", - ], - optional: true, - }, - db: { - type: "$.service.db", - db: "default", - }, - timer: { - type: "$.interface.timer", - default: { - intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL, - }, - }, - }, - hooks: { - async deploy() { - const candidates = await this.taleez.paginate(this.taleez.listCandidates, { + getArgs() { + return { params: { - job_listing_id: this.jobListingId, - department: this.departmentFilter, - location: this.locationFilter, - per_page: 50, + withProps: true, }, - }); - - const sortedCandidates = candidates.sort((a, b) => new Date(a.created_at) - new Date(b.created_at)); - - for (const candidate of sortedCandidates) { - this.$emit( - candidate, - { - id: candidate.id || new Date(candidate.created_at).getTime(), - summary: `New Candidate: ${candidate.name}`, - ts: new Date(candidate.created_at).getTime(), - }, - ); - } - - if (candidates.length > 0) { - const latestTimestamp = new Date(candidates[candidates.length - 1].created_at).getTime(); - await this.db.set("lastRunTimestamp", latestTimestamp); - } + }; }, - async activate() { - // No webhook subscription needed for polling source + getTsField() { + return "dateCreation"; }, - async deactivate() { - // No webhook subscription to clean up for polling source + generateMeta(candidate) { + return { + id: candidate.id, + summary: `New Candidate: ${candidate.firstName} ${candidate.lastName}`, + ts: candidate.dateCreation, + }; }, }, - async run() { - const lastRunTimestamp = await this.db.get("lastRunTimestamp") || 0; - - const candidates = await this.taleez.paginate(this.taleez.listCandidates, { - params: { - job_listing_id: this.jobListingId, - department: this.departmentFilter, - location: this.locationFilter, - per_page: 50, - }, - }); - - const newCandidates = candidates.filter((candidate) => new Date(candidate.created_at).getTime() > lastRunTimestamp); - - const sortedNewCandidates = newCandidates.sort((a, b) => new Date(a.created_at) - new Date(b.created_at)); - - for (const candidate of sortedNewCandidates) { - this.$emit( - candidate, - { - id: candidate.id || new Date(candidate.created_at).getTime(), - summary: `New Candidate: ${candidate.name}`, - ts: new Date(candidate.created_at).getTime(), - }, - ); - } - - if (sortedNewCandidates.length > 0) { - const latestTimestamp = new Date(sortedNewCandidates[sortedNewCandidates.length - 1].created_at).getTime(); - await this.db.set("lastRunTimestamp", latestTimestamp); - } - }, }; diff --git a/components/taleez/sources/new-job-listed/new-job-listed.mjs b/components/taleez/sources/new-job-listed/new-job-listed.mjs index 3e8aca614e7cb..ee6d2a5142209 100644 --- a/components/taleez/sources/new-job-listed/new-job-listed.mjs +++ b/components/taleez/sources/new-job-listed/new-job-listed.mjs @@ -1,100 +1,75 @@ -import taleez from "../../taleez.app.mjs"; -import { - axios, DEFAULT_POLLING_SOURCE_TIMER_INTERVAL, -} from "@pipedream/platform"; +import common from "../common/base.mjs"; export default { + ...common, key: "taleez-new-job-listed", name: "New Job Listing Created", - description: "Emit a new event when a job listing is created. [See the documentation]()", - version: "0.0.{{ts}}", + description: "Emit new event when a job listing is created in Taleez. [See the documentation](https://api.taleez.com/swagger-ui/index.html#/jobs/list_3)", + version: "0.0.1", type: "source", dedupe: "unique", props: { - taleez, - db: "$.service.db", - timer: { - type: "$.interface.timer", - default: { - intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL, - }, + ...common.props, + unitId: { + propDefinition: [ + common.props.taleez, + "unitId", + ], }, - departmentFilter: { + status: { propDefinition: [ - taleez, - "departmentFilter", + common.props.taleez, + "status", ], - optional: true, }, - locationFilter: { + contract: { propDefinition: [ - taleez, - "locationFilter", + common.props.taleez, + "contract", ], - optional: true, }, - }, - hooks: { - async deploy() { - const jobListings = await this.taleez.listJobListings({ - params: { - perpage: 50, - sort: "created_desc", - department: this.departmentFilter, - location: this.locationFilter, - }, - }); - - // Sort from oldest to newest - jobListings.sort((a, b) => new Date(a.created_at) - new Date(b.created_at)); - - for (const job of jobListings) { - this.$emit(job, { - id: job.id, - summary: `New Job Listing: ${job.title}`, - ts: Date.parse(job.created_at) || Date.now(), - }); - } - - if (jobListings.length > 0) { - const latestTs = Math.max(...jobListings.map((j) => Date.parse(j.created_at) || Date.now())); - await this.db.set("last_seen_ts", latestTs); - } + city: { + propDefinition: [ + common.props.taleez, + "city", + ], }, - async activate() { - await this.taleez.emitNewJobListingEvent(this.callbackUrl); + companyLabel: { + propDefinition: [ + common.props.taleez, + "companyLabel", + ], }, - async deactivate() { - await this.taleez.removeWebhook("job_listing_created"); + tag: { + propDefinition: [ + common.props.taleez, + "tag", + ], }, }, - async run() { - const lastSeenTs = (await this.db.get("last_seen_ts")) || 0; - const jobListings = await this.taleez.listJobListings({ - params: { - perpage: 100, - sort: "created_asc", - department: this.departmentFilter, - location: this.locationFilter, - }, - }); - - const newJobListings = jobListings.filter((job) => Date.parse(job.created_at) > lastSeenTs); - - // Sort from oldest to newest - newJobListings.sort((a, b) => new Date(a.created_at) - new Date(b.created_at)); - - for (const job of newJobListings) { - this.$emit(job, { + methods: { + ...common.methods, + getResourceFn() { + return this.taleez.listJobs; + }, + getArgs() { + return { + unitId: this.unitId, + status: this.status, + contract: this.contract, + city: this.city, + companyLabel: this.companyLabel, + tag: this.tag, + withDetails: true, + withProps: true, + }; + }, + generateMeta(job) { + return { id: job.id, - summary: `New Job Listing: ${job.title}`, - ts: Date.parse(job.created_at) || Date.now(), - }); - } - - if (newJobListings.length > 0) { - const latestTs = Math.max(...newJobListings.map((j) => Date.parse(j.created_at) || Date.now())); - await this.db.set("last_seen_ts", latestTs); - } + summary: `New Job: ${job.label}`, + ts: job.dateCreation, + }; + }, }, }; diff --git a/components/taleez/taleez.app.mjs b/components/taleez/taleez.app.mjs index 229353fbc1017..d42464cd5e69b 100644 --- a/components/taleez/taleez.app.mjs +++ b/components/taleez/taleez.app.mjs @@ -3,304 +3,223 @@ import { axios } from "@pipedream/platform"; export default { type: "app", app: "taleez", - version: "0.0.{{ts}}", propDefinitions: { - jobListingId: { + jobId: { type: "string", label: "Job Listing ID", description: "The ID of the job listing", - async options() { - const jobListings = await this.listJobListings(); - return jobListings.map((job) => ({ - label: job.title, - value: job.id, + async options({ page }) { + const { list } = await this.listJobs({ + params: { + page, + }, + }); + return list?.map(({ + id: value, label, + }) => ({ + label, + value, })); }, }, - departmentFilter: { + candidateId: { type: "string", - label: "Department Filter", - description: "Filter job listings by department", - optional: true, - async options() { - const departments = await this.getDepartments(); - return departments.map((dept) => ({ - label: dept.name, - value: dept.id, + label: "Candidate ID", + description: "The ID of the candidate to link", + async options({ page }) { + const { list } = await this.listCandidates({ + params: { + page, + }, + }); + return list?.map(({ + id: value, firstName, lastName, + }) => ({ + label: `${firstName} ${lastName}`, + value, })); }, }, - locationFilter: { + unitId: { type: "string", - label: "Location Filter", - description: "Filter job listings by location", + label: "Unit ID", + description: "Filter by unit ID", optional: true, - async options() { - const locations = await this.getLocations(); - return locations.map((loc) => ({ - label: loc.name, - value: loc.id, + async options({ page }) { + const { list } = await this.listUnits({ + params: { + page, + }, + }); + return list?.map(({ + id: value, publicName: label, + }) => ({ + label, + value, })); }, }, - candidateName: { - type: "string", - label: "Candidate Name", - description: "Name of the candidate", - }, - email: { + recruiterId: { type: "string", - label: "Email", - description: "Email address of the candidate", - }, - resume: { - type: "string", - label: "Resume", - description: "URL or attachment of the candidate's resume", - optional: true, - }, - coverLetter: { - type: "string", - label: "Cover Letter", - description: "URL or attachment of the candidate's cover letter", + label: "Recruiter ID", + description: "The ID of the recruiter adding this candidate", optional: true, - }, - jobTitle: { - type: "string", - label: "Job Title", - description: "Title of the job listing", - }, - department: { - type: "string", - label: "Department", - description: "The department for the job listing", - async options() { - const departments = await this.getDepartments(); - return departments.map((dept) => ({ - label: dept.name, - value: dept.id, + async options({ page }) { + const { list } = await this.listRecruiters({ + params: { + page, + }, + }); + return list?.map(({ + id: value, firstName, lastName, + }) => ({ + label: `${firstName} ${lastName}`, + value, })); }, }, - jobDescription: { + status: { type: "string", - label: "Job Description", - description: "Description of the job listing", - }, - jobLocation: { - type: "string", - label: "Job Location", - description: "Location of the job", + label: "Status", + description: "Filter by job status", + options: [ + "DRAFT", + "PUBLISHED", + "DONE", + "SUSPENDED", + ], optional: true, - async options() { - const locations = await this.getLocations(); - return locations.map((loc) => ({ - label: loc.name, - value: loc.id, - })); - }, }, - jobType: { + contract: { type: "string", - label: "Job Type", - description: "Type of the job (e.g., full-time, part-time)", - optional: true, + label: "Contract", + description: "Filter by job contract", options: [ - { - label: "Full-time", - value: "full-time", - }, - { - label: "Part-time", - value: "part-time", - }, - { - label: "Contract", - value: "contract", - }, + "CDI", + "CDD", + "INTERIM", + "FREELANCE", + "INTERNSHIP", + "APPRENTICESHIP", + "STUDENT", + "VIE", + "FRANCHISE", + "STATUTE", + "VACATAIRE", + "LIBERAL", + "CDI_CHANTIER", + "INTERMITTENT", + "SEASON", + "OTHER", + "VOLUNTEER", + "PERMANENT", + "FIXEDTERM", ], + optional: true, }, - applicationDeadline: { + city: { type: "string", - label: "Application Deadline", - description: "Deadline for job applications (YYYY-MM-DD)", + label: "City", + description: "Filter by job city", optional: true, }, - candidateId: { + companyLabel: { type: "string", - label: "Candidate ID", - description: "The ID of the candidate to link", - async options() { - const candidates = await this.listCandidates(); - return candidates.map((candidate) => ({ - label: candidate.name, - value: candidate.id, - })); - }, + label: "Company Label", + description: "Filter by company label", + optional: true, }, - jobId: { + tag: { type: "string", - label: "Job ID", - description: "The ID of the job to link with the candidate", - async options() { - const jobListings = await this.listJobListings(); - return jobListings.map((job) => ({ - label: job.title, - value: job.id, - })); - }, + label: "Tag", + description: "Filter by job tag", + optional: true, }, }, methods: { - authKeys() { - console.log(Object.keys(this.$auth)); - }, _baseUrl() { - return "https://api.taleez.com"; + return "https://api.taleez.com/0"; }, - async _makeRequest(opts = {}) { - const { - $ = this, method = "GET", path = "/", headers, ...otherOpts - } = opts; + _makeRequest({ + $ = this, + path, + ...otherOpts + }) { return axios($, { ...otherOpts, - method, - url: this._baseUrl() + path, + url: `${this._baseUrl()}${path}`, headers: { - ...headers, - Authorization: `Bearer ${this.$auth.api_token}`, + "x-taleez-api-secret": this.$auth.secret_key, }, }); }, - async listJobListings(opts = {}) { - const params = { - department: this.departmentFilter, - location: this.locationFilter, - ...opts.params, - }; + listJobs(opts = {}) { return this._makeRequest({ - path: "/job_listings", - method: "GET", - params, - }); - }, - async getDepartments(opts = {}) { - return this._makeRequest({ - path: "/departments", - method: "GET", - ...opts, - }); - }, - async getLocations(opts = {}) { - return this._makeRequest({ - path: "/locations", - method: "GET", + path: "/jobs", ...opts, }); }, - async listCandidates(opts = {}) { + listCandidates(opts = {}) { return this._makeRequest({ path: "/candidates", - method: "GET", ...opts, }); }, - async createCandidate(opts = {}) { - const data = { - name: this.candidateName, - email: this.email, - job_listing_id: this.jobListingId, - resume: this.resume, - cover_letter: this.coverLetter, - ...opts.data, - }; - return this._makeRequest({ - path: "/candidates", - method: "POST", - data, - }); - }, - async createJobListing(opts = {}) { - const data = { - title: this.jobTitle, - department: this.department, - description: this.jobDescription, - location: this.jobLocation, - type: this.jobType, - application_deadline: this.applicationDeadline, - ...opts.data, - }; + listUnits(opts = {}) { return this._makeRequest({ - path: "/job_listings", - method: "POST", - data, + path: "/units", + ...opts, }); }, - async linkCandidateToJobOffer(opts = {}) { - const data = { - candidate_id: this.candidateId, - job_id: this.jobId, - ...opts.data, - }; + listRecruiters(opts = {}) { return this._makeRequest({ - path: "/candidates/link", - method: "POST", - data, + path: "/recruiters", + ...opts, }); }, - async emitNewCandidateEvent(callbackUrl) { - const data = { - url: callbackUrl, - events: [ - "candidate_added", - ], - job_listing_id: this.jobListingId, - department: this.departmentFilter, - location: this.locationFilter, - }; + createCandidate(opts = {}) { return this._makeRequest({ - path: "/webhooks/candidates", method: "POST", - data, + path: "/candidates", + ...opts, }); }, - async emitNewJobListingEvent(callbackUrl) { - const data = { - url: callbackUrl, - events: [ - "job_listing_created", - ], - department: this.departmentFilter, - location: this.locationFilter, - }; + linkCandidateToJob({ + jobId, ...opts + }) { return this._makeRequest({ - path: "/webhooks/job_listings", method: "POST", - data, + path: `/jobs/${jobId}/candidates`, + ...opts, }); }, - async paginate(fn, ...opts) { - let results = []; - let hasMore = true; - let page = 1; + async *paginate({ + fn, args = {}, max, + }) { + let hasMorePages = true; + let page = 0; + let count = 0; - while (hasMore) { - const response = await fn({ - ...opts, + while (hasMorePages) { + const { + list, hasMore, + } = await fn({ + ...args, params: { - ...opts[0]?.params, + ...args?.params, page, + pageSize: 1000, }, }); - if (response.length === 0) { - hasMore = false; - } else { - results = results.concat(response); - page += 1; + for (const item of list) { + yield item; + if (max && ++count >= max) { + return; + } } + hasMorePages = hasMore; + page++; } - - return results; }, }, }; From 061cf5902a6ec6897e1bd1abb6560d1cce364a24 Mon Sep 17 00:00:00 2001 From: michelle0927 Date: Mon, 30 Dec 2024 17:44:52 -0500 Subject: [PATCH 3/4] pnpm-lock.yaml --- pnpm-lock.yaml | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 16f3248d4750f..489738a44fe1e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -94,8 +94,8 @@ importers: specifier: ^12.3.4 version: 12.5.0(enquirer@2.4.1) pnpm: - specifier: 9.14.3 - version: 9.14.3 + specifier: 9.14.2 + version: 9.14.2 putout: specifier: '>=36' version: 36.13.1(eslint@8.57.1)(typescript@5.6.3) @@ -8669,8 +8669,7 @@ importers: specifier: ^1.5.1 version: 1.6.6 - components/richpanel: - specifiers: {} + components/richpanel: {} components/ringcentral: dependencies: @@ -10239,7 +10238,11 @@ importers: components/taggun: {} - components/taleez: {} + components/taleez: + dependencies: + '@pipedream/platform': + specifier: ^3.0.3 + version: 3.0.3 components/talend: {} @@ -23115,8 +23118,8 @@ packages: resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==} engines: {node: '>=4'} - pnpm@9.14.3: - resolution: {integrity: sha512-wPU+6ZR37ZabgrKJrQEaXRa/FiPJV+fynqvo0MALV0wpuMf1T2xn7nEMc/KFyBVNB85EtG/iwO60dqkEQbrDcQ==} + pnpm@9.14.2: + resolution: {integrity: sha512-biuvd9Brk2IpQVLIUcTyeO3jerHro6Vf2jF6SheyCfTbuXP7JQp3q8Rjo0H8sfF/F8+iQJHE6zGc2g2bhCeDhw==} engines: {node: '>=18.12'} hasBin: true @@ -24576,22 +24579,22 @@ packages: superagent@3.8.1: resolution: {integrity: sha512-VMBFLYgFuRdfeNQSMLbxGSLfmXL/xc+OO+BZp41Za/NRDBet/BNbkRJrYzCUu0u4GU0i/ml2dtT8b9qgkw9z6Q==} engines: {node: '>= 4.0'} - deprecated: Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net + deprecated: Please upgrade to v7.0.2+ of superagent. We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing. See the releases tab for more information at . superagent@4.1.0: resolution: {integrity: sha512-FT3QLMasz0YyCd4uIi5HNe+3t/onxMyEho7C3PSqmti3Twgy2rXT4fmkTz6wRL6bTF4uzPcfkUCa8u4JWHw8Ag==} engines: {node: '>= 6.0'} - deprecated: Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net + deprecated: Please upgrade to v7.0.2+ of superagent. We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing. See the releases tab for more information at . superagent@5.3.1: resolution: {integrity: sha512-wjJ/MoTid2/RuGCOFtlacyGNxN9QLMgcpYLDQlWFIhhdJ93kNscFonGvrpAHSCVjRVj++DGCglocF7Aej1KHvQ==} engines: {node: '>= 7.0.0'} - deprecated: Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net + deprecated: Please upgrade to v7.0.2+ of superagent. We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing. See the releases tab for more information at . superagent@7.1.6: resolution: {integrity: sha512-gZkVCQR1gy/oUXr+kxJMLDjla434KmSOKbx5iGD30Ql+AkJQ/YlPKECJy2nhqOsHLjGHzoDTXNSjhnvWhzKk7g==} engines: {node: '>=6.4.0 <13 || >=14'} - deprecated: Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net + deprecated: Please downgrade to v7.1.5 if you need IE/ActiveXObject support OR upgrade to v8.0.0 as we no longer support IE and published an incorrect patch version (see https://github.com/visionmedia/superagent/issues/1731) supports-color@2.0.0: resolution: {integrity: sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==} @@ -40515,7 +40518,7 @@ snapshots: pluralize@8.0.0: {} - pnpm@9.14.3: {} + pnpm@9.14.2: {} points-on-curve@0.2.0: {} From 68e9f1a0b3c823bc8a32a0c7525eb186eecd877e Mon Sep 17 00:00:00 2001 From: michelle0927 Date: Tue, 31 Dec 2024 10:41:35 -0500 Subject: [PATCH 4/4] fix params --- .../sources/new-job-listed/new-job-listed.mjs | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/components/taleez/sources/new-job-listed/new-job-listed.mjs b/components/taleez/sources/new-job-listed/new-job-listed.mjs index ee6d2a5142209..22d293d974ca5 100644 --- a/components/taleez/sources/new-job-listed/new-job-listed.mjs +++ b/components/taleez/sources/new-job-listed/new-job-listed.mjs @@ -54,14 +54,16 @@ export default { }, getArgs() { return { - unitId: this.unitId, - status: this.status, - contract: this.contract, - city: this.city, - companyLabel: this.companyLabel, - tag: this.tag, - withDetails: true, - withProps: true, + params: { + unitId: this.unitId, + status: this.status, + contract: this.contract, + city: this.city, + companyLabel: this.companyLabel, + tag: this.tag, + withDetails: true, + withProps: true, + }, }; }, generateMeta(job) {