Skip to content
Merged
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
3 changes: 0 additions & 3 deletions components/clicktime/.gitignore

This file was deleted.

88 changes: 88 additions & 0 deletions components/clicktime/actions/create-client/create-client.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
import app from "../../clicktime.app.mjs";

export default {
key: "clicktime-create-client",
name: "Create Client",
description: "Create a Client on ClickTime [See the documentation](https://developer.clicktime.com/docs/api/#/Clients)",
version: "0.0.1",
type: "action",
props: {
app,
clientNumber: {
propDefinition: [
app,
"clientNumber",
],
optional: true,
},
accountingPackageId: {
propDefinition: [
app,
"accountingPackageId",
],
optional: true,
},
billingRate: {
propDefinition: [
app,
"billingRate",
],
description: "The billing rate for the client",
optional: true,
},
isActive: {
propDefinition: [
app,
"isActive",
],
description: "Indicates whether the client is currently active",
optional: true,
},
isEligibleTimeOffAllocation: {
propDefinition: [
app,
"isEligibleTimeOffAllocation",
],
description: "Determines if the client is eligible for time-off allocation",
optional: true,
},
name: {
propDefinition: [
app,
"name",
],
description: "The name of the client",
},
notes: {
propDefinition: [
app,
"notes",
],
description: "Additional information related to the client",
optional: true,
},
shortName: {
propDefinition: [
app,
"shortName",
],
},
},
async run({ $ }) {
const response = await this.app.createClient({
$,
data: {
AccountingPackageID: this.accountingPackageId,
BillingRate: this.billingRate,
ClientNumber: this.clientNumber,
IsActive: this.isActive,
IsEligibleTimeOffAllocation: this.isEligibleTimeOffAllocation,
Name: this.name,
Notes: this.notes,
ShortName: this.shortName,
},
});
$.export("$summary", `Successfully created Client with the ID: ${response.data.ID}`);
return response;
},
};
136 changes: 136 additions & 0 deletions components/clicktime/actions/create-job/create-job.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
import app from "../../clicktime.app.mjs";

export default {
key: "clicktime-create-job",
name: "Create Job",
description: "Create a Job on Clicktime. [See the documentation](https://developer.clicktime.com/docs/api/#/operations/Jobs/CreateJob)",
version: "0.0.1",
type: "action",
props: {
app,
accountingPackageId: {
propDefinition: [
app,
"accountingPackageId",
],
optional: true,
},
billingRate: {
propDefinition: [
app,
"billingRate",
],
description: "The billing rate for the job",
optional: true,
},
isActive: {
propDefinition: [
app,
"isActive",
],
description: "Indicates whether the job is currently active",
optional: true,
},
isEligibleTimeOffAllocation: {
propDefinition: [
app,
"isEligibleTimeOffAllocation",
],
description: "Determines if the job is eligible for time-off allocation",
optional: true,
},
name: {
propDefinition: [
app,
"name",
],
description: "The name of the job",
},
notes: {
propDefinition: [
app,
"notes",
],
description: "Additional information related to the job",
optional: true,
},
clientId: {
propDefinition: [
app,
"clientId",
],
},
includeInRm: {
propDefinition: [
app,
"includeInRm",
],
optional: true,
},
isBillable: {
propDefinition: [
app,
"isBillable",
],
optional: true,
},
jobNumber: {
propDefinition: [
app,
"jobNumber",
],
},
startDate: {
propDefinition: [
app,
"startDate",
],
description: "The start date of the job, i.e.: `2020-01-01`",
optional: true,
},
endDate: {
propDefinition: [
app,
"endDate",
],
optional: true,
},
timeRequiresApproval: {
propDefinition: [
app,
"timeRequiresApproval",
],
optional: true,
},
useCompanyBillingRate: {
propDefinition: [
app,
"useCompanyBillingRate",
],
optional: true,
},
},
async run({ $ }) {
const response = await this.app.createJob({
$,
data: {
AccountingPackageID: this.accountingPackageId,
BillingRate: this.billingRate,
IsActive: this.isActive,
IsEligibleTimeOffAllocation: this.isEligibleTimeOffAllocation,
Name: this.name,
Notes: this.notes,
ClientID: this.clientId,
EndDate: this.endDate,
IncludeInRM: this.includeInRm,
IsBillable: this.isBillable,
JobNumber: this.jobNumber,
StartDate: this.startDate,
TimeRequiresApproval: this.timeRequiresApproval,
UseCompanyBillingRate: this.useCompanyBillingRate,
},
});
$.export("$summary", `Successfully created Job with ID: ${response.data.ID}`);
return response;
},
};
95 changes: 95 additions & 0 deletions components/clicktime/actions/create-user/create-user.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
import app from "../../clicktime.app.mjs";

export default {
key: "clicktime-create-user",
name: "Create User",
description: "Create an User on ClickTime. [See the documentation](https://developer.clicktime.com/docs/api/#/operations/Users/CreateManagedUser)",
version: "0.0.1",
type: "action",
props: {
app,
billingRate: {
propDefinition: [
app,
"billingRate",
],
description: "The billing rate for the user",
optional: true,
},
isActive: {
propDefinition: [
app,
"isActive",
],
description: "Indicates whether the user is currently active",
optional: true,
},
name: {
propDefinition: [
app,
"name",
],
description: "The name of the user",
},
startDate: {
propDefinition: [
app,
"startDate",
],
description: "The start date of the user, i.e.: `2020-01-01`",
optional: true,
},
costModel: {
propDefinition: [
app,
"costModel",
],
optional: true,
},
costRate: {
propDefinition: [
app,
"costRate",
],
optional: true,
},
email: {
propDefinition: [
app,
"email",
],
},
employmentTypeId: {
propDefinition: [
app,
"employmentTypeId",
],
optional: true,
},
role: {
propDefinition: [
app,
"role",
],
optional: true,
},
},
async run({ $ }) {
const response = await this.app.createUser({
$,
data: {
BillingRate: this.billingRate,
IsActive: this.isActive,
Name: this.name,
StartDate: this.startDate,
CostModel: this.costModel,
CostRate: this.costRate,
Email: this.email,
EmploymentTypeID: this.employmentTypeId,
Role: this.role,
},
});
$.export("$summary", `Successfully created User with the ID: ${response.data.ID}`);
return response;
},
};
13 changes: 0 additions & 13 deletions components/clicktime/app/clicktime.app.ts

This file was deleted.

Loading
Loading