Resources
Staff members, pools, rates, capacity, and resource versions.
resources.getCurrentResourceInferred outputGet the resource record for the current authenticated user. Looks up by externalUserId matching the auth user's ID. Users can always see their own salary.
unknown{
id: string;
countryCode: string | null;
organizationId: string;
name: string;
regionCode: string | null;
phone: string | null;
email: string | null;
createdAt: Date;
updatedAt: Date | null;
deletedAt: Date | null;
tags: Array<string> | null;
department: string | null;
currentVersionId: string | null;
startDate: string | null;
endDate: string | null;
billingRateId: string | null;
costRateId: string | null;
isActive: boolean | null;
jobTitle: string | null;
emailBounced: boolean | null;
emailBouncedAt: Date | null;
salary: string | null;
externalUserId: string | null;
cachedEmail: string | null;
cachedAvatarUrl: string | null;
employmentType: string | null;
salaryPeriod: "year" | "hour" | "day" | "week" | "month" | null;
skills: Array<string> | null;
defaultPoolId: string | null;
inheritsBillingRate: boolean | null;
inheritsCostRate: boolean | null;
hasLoginAccess: boolean | null;
} | nullresources.linkToCurrentUserInferred outputLink a resource to the current authenticated user. Sets the externalUserId on the resource to the current user's ID.
{
resourceId: string;
}{
success: boolean;
error: string;
resource?: undefined;
} | {
success: boolean;
resource: {
id: string;
countryCode: string | null;
organizationId: string;
name: string;
regionCode: string | null;
phone: string | null;
email: string | null;
createdAt: Date;
updatedAt: Date | null;
deletedAt: Date | null;
tags: Array<string> | null;
department: string | null;
currentVersionId: string | null;
startDate: string | null;
endDate: string | null;
billingRateId: string | null;
costRateId: string | null;
isActive: boolean | null;
jobTitle: string | null;
emailBounced: boolean | null;
emailBouncedAt: Date | null;
salary: string | null;
externalUserId: string | null;
cachedEmail: string | null;
cachedAvatarUrl: string | null;
employmentType: string | null;
salaryPeriod: "year" | "hour" | "day" | "week" | "month" | null;
skills: Array<string> | null;
defaultPoolId: string | null;
inheritsBillingRate: boolean | null;
inheritsCostRate: boolean | null;
hasLoginAccess: boolean | null;
};
error?: undefined;
}resources.unlinkCurrentUserInferred outputUnlink the current user from their resource.
unknown{
success: boolean;
error: string;
} | {
success: boolean;
error?: undefined;
}resources.listInferred outputList resources for the organization with optional filters. Salary data is filtered based on user permissions.
{
department?: string | undefined;
search?: string | undefined;
isActive?: boolean | undefined;
limit?: number | undefined;
offset?: number | undefined;
skills?: Array<string> | undefined;
}{
data: Array<{
id: string;
countryCode: string | null;
organizationId: string;
name: string;
regionCode: string | null;
phone: string | null;
email: string | null;
createdAt: Date;
updatedAt: Date | null;
deletedAt: Date | null;
tags: Array<string> | null;
department: string | null;
currentVersionId: string | null;
startDate: string | null;
endDate: string | null;
billingRateId: string | null;
costRateId: string | null;
isActive: boolean | null;
jobTitle: string | null;
emailBounced: boolean | null;
emailBouncedAt: Date | null;
salary: string | null;
externalUserId: string | null;
cachedEmail: string | null;
cachedAvatarUrl: string | null;
employmentType: string | null;
salaryPeriod: "year" | "hour" | "day" | "week" | "month" | null;
skills: Array<string> | null;
defaultPoolId: string | null;
inheritsBillingRate: boolean | null;
inheritsCostRate: boolean | null;
hasLoginAccess: boolean | null;
}>;
total: number;
limit: number;
offset: number;
}resources.listTagSuggestionsInferred outputList org-wide tag suggestions across tasks, resources, and pools.
unknownArray<string>resources.getByIdInferred outputGet a single resource by ID. Salary data is filtered based on user permissions.
{
id: string;
}{
id: string;
countryCode: string | null;
organizationId: string;
name: string;
regionCode: string | null;
phone: string | null;
email: string | null;
createdAt: Date;
updatedAt: Date | null;
deletedAt: Date | null;
tags: Array<string> | null;
department: string | null;
currentVersionId: string | null;
startDate: string | null;
endDate: string | null;
billingRateId: string | null;
costRateId: string | null;
isActive: boolean | null;
jobTitle: string | null;
emailBounced: boolean | null;
emailBouncedAt: Date | null;
salary: string | null;
externalUserId: string | null;
cachedEmail: string | null;
cachedAvatarUrl: string | null;
employmentType: string | null;
salaryPeriod: "year" | "hour" | "day" | "week" | "month" | null;
skills: Array<string> | null;
defaultPoolId: string | null;
inheritsBillingRate: boolean | null;
inheritsCostRate: boolean | null;
hasLoginAccess: boolean | null;
} | nullresources.createInferred outputCreate a new resource.
{
name: string;
countryCode?: string | undefined;
regionCode?: string | undefined;
phone?: string | undefined;
email?: string | undefined;
tags?: Array<string> | undefined;
department?: string | undefined;
startDate?: string | undefined;
endDate?: string | undefined;
billingRateId?: string | undefined;
costRateId?: string | undefined;
jobTitle?: string | undefined;
salary?: number | undefined;
externalUserId?: string | undefined;
employmentType?: string | undefined;
salaryPeriod?: "year" | "hour" | "day" | "week" | "month" | undefined;
skills?: Array<string> | undefined;
defaultPoolId?: string | undefined;
}{
id: string;
countryCode: string | null;
organizationId: string;
name: string;
regionCode: string | null;
phone: string | null;
email: string | null;
createdAt: Date;
updatedAt: Date | null;
deletedAt: Date | null;
tags: Array<string> | null;
department: string | null;
currentVersionId: string | null;
startDate: string | null;
endDate: string | null;
billingRateId: string | null;
costRateId: string | null;
isActive: boolean | null;
jobTitle: string | null;
emailBounced: boolean | null;
emailBouncedAt: Date | null;
salary: string | null;
externalUserId: string | null;
cachedEmail: string | null;
cachedAvatarUrl: string | null;
employmentType: string | null;
salaryPeriod: "year" | "hour" | "day" | "week" | "month" | null;
skills: Array<string> | null;
defaultPoolId: string | null;
inheritsBillingRate: boolean | null;
inheritsCostRate: boolean | null;
hasLoginAccess: boolean | null;
}resources.updateInferred outputUpdate a resource.
{
id: string;
countryCode?: string | null | undefined;
name?: string | undefined;
regionCode?: string | null | undefined;
phone?: string | null | undefined;
email?: string | null | undefined;
tags?: Array<string> | undefined;
department?: string | null | undefined;
startDate?: string | null | undefined;
endDate?: string | null | undefined;
isActive?: boolean | undefined;
jobTitle?: string | null | undefined;
salary?: number | null | undefined;
externalUserId?: string | null | undefined;
employmentType?: string | undefined;
salaryPeriod?: "year" | "hour" | "day" | "week" | "month" | null | undefined;
skills?: Array<string> | undefined;
}{
id: string;
countryCode: string | null;
organizationId: string;
name: string;
regionCode: string | null;
phone: string | null;
email: string | null;
createdAt: Date;
updatedAt: Date | null;
deletedAt: Date | null;
tags: Array<string> | null;
department: string | null;
currentVersionId: string | null;
startDate: string | null;
endDate: string | null;
billingRateId: string | null;
costRateId: string | null;
isActive: boolean | null;
jobTitle: string | null;
emailBounced: boolean | null;
emailBouncedAt: Date | null;
salary: string | null;
externalUserId: string | null;
cachedEmail: string | null;
cachedAvatarUrl: string | null;
employmentType: string | null;
salaryPeriod: "year" | "hour" | "day" | "week" | "month" | null;
skills: Array<string> | null;
defaultPoolId: string | null;
inheritsBillingRate: boolean | null;
inheritsCostRate: boolean | null;
hasLoginAccess: boolean | null;
} | nullresources.deleteInferred outputSoft delete a resource.
{
id: string;
}{
success: boolean;
error: string;
} | {
success: boolean;
error?: undefined;
}resources.listPoolsInferred outputList resource pools.
{
includeMembers?: boolean | undefined;
}Array<{
id: string;
organizationId: string;
name: string;
createdAt: Date;
updatedAt: Date | null;
deletedAt: Date | null;
description: string | null;
tags: Array<string> | null;
rules: Array<{
type: "role" | "all" | "department" | "skill" | "explicit";
value?: string | undefined;
}> | null;
isExplicit: boolean | null;
isDefault: boolean | null;
isSystem: boolean | null;
defaultBillingRateId: string | null;
defaultCostRateId: string | null;
currentVersionId: string | null;
}> | Array<{
id: string;
organizationId: string;
name: string;
createdAt: Date;
updatedAt: Date | null;
deletedAt: Date | null;
description: string | null;
tags: Array<string> | null;
rules: Array<{
type: "role" | "all" | "department" | "skill" | "explicit";
value?: string | undefined;
}> | null;
isExplicit: boolean | null;
isDefault: boolean | null;
isSystem: boolean | null;
defaultBillingRateId: string | null;
defaultCostRateId: string | null;
currentVersionId: string | null;
} & {
members: Array<{
id: string;
poolId: string;
resourceId: string;
resourceName: string;
role: string | null;
poolPermissionRoleId: string | null;
poolPermissionRoleName: string | null;
}>;
}>resources.getPoolInferred outputGet a single resource pool by ID.
{
id: string;
}({
id: string;
organizationId: string;
name: string;
createdAt: Date;
updatedAt: Date | null;
deletedAt: Date | null;
description: string | null;
tags: Array<string> | null;
rules: Array<{
type: "role" | "all" | "department" | "skill" | "explicit";
value?: string | undefined;
}> | null;
isExplicit: boolean | null;
isDefault: boolean | null;
isSystem: boolean | null;
defaultBillingRateId: string | null;
defaultCostRateId: string | null;
currentVersionId: string | null;
} & {
members: Array<{
id: string;
resourceId: string;
resourceName: string;
resourceEmail: string | null;
resourceJobTitle: string | null;
role: string | null;
poolPermissionRoleId: string | null;
poolPermissionRoleName: string | null;
}>;
}) | nullresources.createPoolInferred outputCreate a resource pool.
{
name: string;
description?: string | undefined;
tags?: Array<string> | undefined;
rules?: Array<{
type: "role" | "all" | "department" | "skill" | "explicit";
value?: string | undefined;
}> | undefined;
isExplicit?: boolean | undefined;
}{
id: string;
organizationId: string;
name: string;
createdAt: Date;
updatedAt: Date | null;
deletedAt: Date | null;
description: string | null;
tags: Array<string> | null;
rules: Array<{
type: "role" | "all" | "department" | "skill" | "explicit";
value?: string | undefined;
}> | null;
isExplicit: boolean | null;
isDefault: boolean | null;
isSystem: boolean | null;
defaultBillingRateId: string | null;
defaultCostRateId: string | null;
currentVersionId: string | null;
}resources.updatePoolInferred outputUpdate a resource pool.
{
id: string;
name?: string | undefined;
description?: string | null | undefined;
tags?: Array<string> | undefined;
rules?: Array<{
type: "role" | "all" | "department" | "skill" | "explicit";
value?: string | undefined;
}> | undefined;
}{
id: string;
organizationId: string;
name: string;
createdAt: Date;
updatedAt: Date | null;
deletedAt: Date | null;
description: string | null;
tags: Array<string> | null;
rules: Array<{
type: "role" | "all" | "department" | "skill" | "explicit";
value?: string | undefined;
}> | null;
isExplicit: boolean | null;
isDefault: boolean | null;
isSystem: boolean | null;
defaultBillingRateId: string | null;
defaultCostRateId: string | null;
currentVersionId: string | null;
} | nullresources.deletePoolInferred outputDelete a resource pool.
{
id: string;
}{
success: boolean;
error: string;
} | {
success: boolean;
error?: undefined;
}resources.addPoolMemberInferred outputAdd a member to a resource pool.
{
resourceId: string;
poolId: string;
role?: "member" | "lead" | undefined;
poolPermissionRoleId?: string | null | undefined;
}{
success: boolean;
error: string;
member?: undefined;
} | {
success: boolean;
member: {
id: string;
poolId: string;
resourceId: string;
role: string | null;
poolPermissionRoleId: string | null;
};
error?: undefined;
}resources.removePoolMemberInferred outputRemove a member from a resource pool.
{
resourceId: string;
poolId: string;
role?: "member" | "lead" | undefined;
poolPermissionRoleId?: string | null | undefined;
}{
success: boolean;
error: string;
} | {
success: boolean;
error?: undefined;
}resources.updatePoolMemberRoleInferred outputUpdate a pool member's role (lead or member).
{
resourceId: string;
poolId: string;
role?: "member" | "lead" | undefined;
permissions?: {
time?: "hidden" | "view" | "edit" | undefined;
profiles?: "hidden" | "view" | "edit" | undefined;
leave?: "hidden" | "view" | "edit" | undefined;
assignments?: "hidden" | "view" | "edit" | undefined;
} | undefined;
poolPermissionRoleId?: string | null | undefined;
}{
success: boolean;
error: string;
} | {
success: boolean;
error?: undefined;
}resources.listWorkPatternsInferred outputList active work patterns for a resource. Returns patterns where effectiveTo is null (current patterns).
{
resourceId: string;
}{
data: Array<never>;
error: string;
} | {
data: Array<{
id: string;
resourceId: string;
organizationId: string;
createdAt: Date;
updatedAt: Date | null;
deletedAt: Date | null;
startTime: string;
effectiveFrom: string;
effectiveTo: string | null;
dayOfWeek: number;
endTime: string;
isRecurring: boolean | null;
recurrencePattern: {
type: "weekly" | "biweekly";
interval?: number | undefined;
} | null;
}>;
error?: undefined;
}resources.upsertWorkPatternsInferred outputUpsert work patterns for a resource. Expires existing patterns and creates new ones atomically.
{
resourceId: string;
patterns: Array<{
startTime: string;
dayOfWeek: number;
endTime: string;
}>;
}{
success: boolean;
error: string;
data: Array<never>;
} | {
success: boolean;
data: Array<{
id: string;
resourceId: string;
organizationId: string;
createdAt: Date;
updatedAt: Date | null;
deletedAt: Date | null;
startTime: string;
effectiveFrom: string;
effectiveTo: string | null;
dayOfWeek: number;
endTime: string;
isRecurring: boolean | null;
recurrencePattern: {
type: "weekly" | "biweekly";
interval?: number | undefined;
} | null;
}>;
error?: undefined;
}resources.updateWithVersionInferred outputUpdate a resource with version tracking. Creates a new version record when rate configuration or versioned fields change.
{
id: string;
countryCode?: string | null | undefined;
name?: string | undefined;
regionCode?: string | null | undefined;
phone?: string | null | undefined;
email?: string | null | undefined;
tags?: Array<string> | undefined;
department?: string | null | undefined;
startDate?: string | null | undefined;
endDate?: string | null | undefined;
billingRateId?: string | null | undefined;
costRateId?: string | null | undefined;
isActive?: boolean | undefined;
jobTitle?: string | null | undefined;
salary?: number | null | undefined;
effectiveFrom?: string | undefined;
changeReason?: string | undefined;
externalUserId?: string | null | undefined;
employmentType?: string | undefined;
salaryPeriod?: "year" | "hour" | "day" | "week" | "month" | null | undefined;
skills?: Array<string> | undefined;
defaultPoolId?: string | null | undefined;
inheritsBillingRate?: boolean | undefined;
inheritsCostRate?: boolean | undefined;
}{
id: string;
countryCode: string | null;
organizationId: string;
name: string;
regionCode: string | null;
phone: string | null;
email: string | null;
createdAt: Date;
updatedAt: Date | null;
deletedAt: Date | null;
tags: Array<string> | null;
department: string | null;
currentVersionId: string | null;
startDate: string | null;
endDate: string | null;
billingRateId: string | null;
costRateId: string | null;
isActive: boolean | null;
jobTitle: string | null;
emailBounced: boolean | null;
emailBouncedAt: Date | null;
salary: string | null;
externalUserId: string | null;
cachedEmail: string | null;
cachedAvatarUrl: string | null;
employmentType: string | null;
salaryPeriod: "year" | "hour" | "day" | "week" | "month" | null;
skills: Array<string> | null;
defaultPoolId: string | null;
inheritsBillingRate: boolean | null;
inheritsCostRate: boolean | null;
hasLoginAccess: boolean | null;
} | nullresources.listVersionsInferred outputList all versions for a resource.
{
resourceId: string;
}Array<{
id: string;
resourceId: string;
organizationId: string;
createdAt: Date;
department: string | null;
billingRateId: string | null;
costRateId: string | null;
jobTitle: string | null;
version: number;
createdByResourceId: string | null;
salary: string | null;
effectiveFrom: string;
effectiveTo: string | null;
changeReason: string | null;
salaryPeriod: "year" | "hour" | "day" | "week" | "month" | null;
defaultPoolId: string | null;
inheritsBillingRate: boolean | null;
inheritsCostRate: boolean | null;
hoursPerWeek: string | null;
}>resources.promoteInferred outputPromote a resource to a new pool. Creates a version record and updates the resource's defaultPoolId.
{
resourceId: string;
newPoolId: string;
effectiveFrom?: string | undefined;
changeReason?: string | undefined;
}{
id: string;
countryCode: string | null;
organizationId: string;
name: string;
regionCode: string | null;
phone: string | null;
email: string | null;
createdAt: Date;
updatedAt: Date | null;
deletedAt: Date | null;
tags: Array<string> | null;
department: string | null;
currentVersionId: string | null;
startDate: string | null;
endDate: string | null;
billingRateId: string | null;
costRateId: string | null;
isActive: boolean | null;
jobTitle: string | null;
emailBounced: boolean | null;
emailBouncedAt: Date | null;
salary: string | null;
externalUserId: string | null;
cachedEmail: string | null;
cachedAvatarUrl: string | null;
employmentType: string | null;
salaryPeriod: "year" | "hour" | "day" | "week" | "month" | null;
skills: Array<string> | null;
defaultPoolId: string | null;
inheritsBillingRate: boolean | null;
inheritsCostRate: boolean | null;
hasLoginAccess: boolean | null;
} | nullresources.getEffectiveRatesInferred outputGet effective rates for a resource. Returns resolved billing and cost rates following inheritance chain.
{
resourceId: string;
}EffectiveRatesInforesources.updatePoolRatesInferred outputUpdate a pool's default rates with version tracking.
{
poolId: string;
defaultBillingRateId?: string | null | undefined;
defaultCostRateId?: string | null | undefined;
effectiveFrom?: string | undefined;
changeReason?: string | undefined;
}{
id: string;
organizationId: string;
name: string;
createdAt: Date;
updatedAt: Date | null;
deletedAt: Date | null;
description: string | null;
tags: Array<string> | null;
rules: Array<{
type: "role" | "all" | "department" | "skill" | "explicit";
value?: string | undefined;
}> | null;
isExplicit: boolean | null;
isDefault: boolean | null;
isSystem: boolean | null;
defaultBillingRateId: string | null;
defaultCostRateId: string | null;
currentVersionId: string | null;
} | nullresources.listPoolVersionsInferred outputList all versions for a resource pool.
{
poolId: string;
}Array<{
id: string;
organizationId: string;
name: string;
resourcePoolId: string;
createdAt: Date;
defaultBillingRateId: string | null;
defaultCostRateId: string | null;
version: number;
createdByResourceId: string | null;
effectiveFrom: string;
effectiveTo: string | null;
changeReason: string | null;
}>