Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/jobber/actions/create-client/create-client.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "jobber-create-client",
name: "Create Client",
description: "Generates a new client within Jobber. [See the documentation](https://developer.getjobber.com/docs)",
version: "0.0.4",
version: "0.0.5",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
2 changes: 1 addition & 1 deletion components/jobber/actions/create-quote/create-quote.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "jobber-create-quote",
name: "Create Quote",
description: "Generates a new quote for a client's property in Jobber. [See the documentation](https://developer.getjobber.com/docs/)",
version: "0.0.4",
version: "0.0.5",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
key: "jobber-create-request",
name: "Create Service Request",
description: "Creates a new service request for a client's first property within Jobber. [See the documentation](https://developer.getjobber.com/docs/)",
version: "0.0.4",
version: "0.0.5",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
2 changes: 1 addition & 1 deletion components/jobber/actions/filter-quotes/filter-quotes.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "jobber-filter-quotes",
name: "Filter Quotes",
description: "Filter quotes by status, quote number, or cost in Jobber. [See the documentation](https://developer.getjobber.com/docs)",
version: "0.0.2",
version: "0.0.3",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "jobber-list-client-id-options",
name: "List Client ID Options",
description: "Retrieves available options for the Client ID field.",
version: "0.0.1",
version: "0.0.2",
type: "action",
annotations: {
destructiveHint: false,
Expand Down
58 changes: 58 additions & 0 deletions components/jobber/actions/list-clients/list-clients.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import jobber from "../../jobber.app.mjs";
import constants from "../../common/constants.mjs";

export default {
key: "jobber-list-clients",
name: "List Clients",
description: "Retrieve client records from Jobber, optionally filtered by a search term. [See the documentation](https://developer.getjobber.com/docs/)",
version: "0.0.1",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: true,
},
type: "action",
props: {
jobber,
searchTerm: {
type: "string",
label: "Search Term",
description: "Filter clients by a search term (e.g. name, company, email, or phone number)",
optional: true,
},
maxResults: {
type: "integer",
label: "Max Results",
description: "The maximum number of clients to return",
default: 100,
optional: true,
},
},
async run({ $ }) {
const query = `query ListClients($first: Int, $after: String, $searchTerm: String) {
clients(first: $first, after: $after, searchTerm: $searchTerm) {
nodes {
${constants.CLIENT_FIELDS}
}
pageInfo {
endCursor
hasNextPage
}
}
}`;

const args = {
searchTerm: this.searchTerm,
};
const clients = await this.jobber.getPaginatedResources({
query,
args,
resourceKey: "clients",
max: this.maxResults,
});
$.export("$summary", `Successfully retrieved ${clients.length} client${clients.length === 1
? ""
: "s"}`);
return clients;
},
};
2 changes: 1 addition & 1 deletion components/jobber/actions/search-quotes/search-quotes.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "jobber-search-quotes",
name: "Search Quotes",
description: "Search for quotes using a search termin Jobber. [See the documentation](https://developer.getjobber.com/docs)",
version: "0.0.2",
version: "0.0.3",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
41 changes: 41 additions & 0 deletions components/jobber/common/constants.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,47 @@ const QUOTE_FIELDS = `
updatedAt
`;

const CLIENT_FIELDS = `
id
name
firstName
lastName
companyName
isCompany
isArchived
isLead
title
balance
jobberWebUri
createdAt
updatedAt
emails {
id
description
primary
address
}
phones {
id
description
primary
number
}
billingAddress {
street
city
province
postalCode
country
}
tags {
nodes {
label
}
}
`;

export default {
QUOTE_FIELDS,
CLIENT_FIELDS,
};
2 changes: 1 addition & 1 deletion components/jobber/jobber.app.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export default {
url: `${this._baseUrl()}${path}`,
headers: {
"Authorization": `Bearer ${this.$auth.oauth_access_token}`,
"X-JOBBER-GRAPHQL-VERSION": "2025-01-20",
"X-JOBBER-GRAPHQL-VERSION": "2026-05-12",
},
});
if (response.errors) {
Expand Down
2 changes: 1 addition & 1 deletion components/jobber/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/jobber",
"version": "0.3.0",
"version": "0.4.0",
"description": "Pipedream Jobber Components",
"main": "jobber.app.mjs",
"keywords": [
Expand Down
Loading