Monument

Resources

Staff members, pools, rates, capacity, and resource versions.

externalpermissionstable25 procedures
queryresources.getCurrentResourceInferred output

Get 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.

Input
unknown
Output
{
  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;
} | null
mutationresources.linkToCurrentUserInferred output

Link a resource to the current authenticated user. Sets the externalUserId on the resource to the current user's ID.

Input
{
  resourceId: string;
}
Output
{
  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;
}
mutationresources.unlinkCurrentUserInferred output

Unlink the current user from their resource.

Input
unknown
Output
{
  success: boolean;
  error: string;
} | {
  success: boolean;
  error?: undefined;
}
queryresources.listInferred output

List resources for the organization with optional filters. Salary data is filtered based on user permissions.

Input
{
  department?: string | undefined;
  search?: string | undefined;
  isActive?: boolean | undefined;
  limit?: number | undefined;
  offset?: number | undefined;
  skills?: Array<string> | undefined;
}
Output
{
  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;
}
queryresources.listTagSuggestionsInferred output

List org-wide tag suggestions across tasks, resources, and pools.

Input
unknown
Output
Array<string>
queryresources.getByIdInferred output

Get a single resource by ID. Salary data is filtered based on user permissions.

Input
{
  id: string;
}
Output
{
  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;
} | null
mutationresources.createInferred output

Create a new resource.

Input
{
  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;
}
Output
{
  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;
}
mutationresources.updateInferred output

Update a resource.

Input
{
  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;
}
Output
{
  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;
} | null
mutationresources.deleteInferred output

Soft delete a resource.

Input
{
  id: string;
}
Output
{
  success: boolean;
  error: string;
} | {
  success: boolean;
  error?: undefined;
}
queryresources.listPoolsInferred output

List resource pools.

Input
{
  includeMembers?: boolean | undefined;
}
Output
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;
  }>;
}>
queryresources.getPoolInferred output

Get a single resource pool by ID.

Input
{
  id: string;
}
Output
({
  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;
  }>;
}) | null
mutationresources.createPoolInferred output

Create a resource pool.

Input
{
  name: string;
  description?: string | undefined;
  tags?: Array<string> | undefined;
  rules?: Array<{
    type: "role" | "all" | "department" | "skill" | "explicit";
    value?: string | undefined;
  }> | undefined;
  isExplicit?: boolean | undefined;
}
Output
{
  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;
}
mutationresources.updatePoolInferred output

Update a resource pool.

Input
{
  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;
}
Output
{
  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;
} | null
mutationresources.deletePoolInferred output

Delete a resource pool.

Input
{
  id: string;
}
Output
{
  success: boolean;
  error: string;
} | {
  success: boolean;
  error?: undefined;
}
mutationresources.addPoolMemberInferred output

Add a member to a resource pool.

Input
{
  resourceId: string;
  poolId: string;
  role?: "member" | "lead" | undefined;
  poolPermissionRoleId?: string | null | undefined;
}
Output
{
  success: boolean;
  error: string;
  member?: undefined;
} | {
  success: boolean;
  member: {
    id: string;
    poolId: string;
    resourceId: string;
    role: string | null;
    poolPermissionRoleId: string | null;
  };
  error?: undefined;
}
mutationresources.removePoolMemberInferred output

Remove a member from a resource pool.

Input
{
  resourceId: string;
  poolId: string;
  role?: "member" | "lead" | undefined;
  poolPermissionRoleId?: string | null | undefined;
}
Output
{
  success: boolean;
  error: string;
} | {
  success: boolean;
  error?: undefined;
}
mutationresources.updatePoolMemberRoleInferred output

Update a pool member's role (lead or member).

Input
{
  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;
}
Output
{
  success: boolean;
  error: string;
} | {
  success: boolean;
  error?: undefined;
}
queryresources.listWorkPatternsInferred output

List active work patterns for a resource. Returns patterns where effectiveTo is null (current patterns).

Input
{
  resourceId: string;
}
Output
{
  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;
}
mutationresources.upsertWorkPatternsInferred output

Upsert work patterns for a resource. Expires existing patterns and creates new ones atomically.

Input
{
  resourceId: string;
  patterns: Array<{
    startTime: string;
    dayOfWeek: number;
    endTime: string;
  }>;
}
Output
{
  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;
}
mutationresources.updateWithVersionInferred output

Update a resource with version tracking. Creates a new version record when rate configuration or versioned fields change.

Input
{
  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;
}
Output
{
  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;
} | null
queryresources.listVersionsInferred output

List all versions for a resource.

Input
{
  resourceId: string;
}
Output
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;
}>
mutationresources.promoteInferred output

Promote a resource to a new pool. Creates a version record and updates the resource's defaultPoolId.

Input
{
  resourceId: string;
  newPoolId: string;
  effectiveFrom?: string | undefined;
  changeReason?: string | undefined;
}
Output
{
  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;
} | null
queryresources.getEffectiveRatesInferred output

Get effective rates for a resource. Returns resolved billing and cost rates following inheritance chain.

Input
{
  resourceId: string;
}
Output
EffectiveRatesInfo
mutationresources.updatePoolRatesInferred output

Update a pool's default rates with version tracking.

Input
{
  poolId: string;
  defaultBillingRateId?: string | null | undefined;
  defaultCostRateId?: string | null | undefined;
  effectiveFrom?: string | undefined;
  changeReason?: string | undefined;
}
Output
{
  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;
} | null
queryresources.listPoolVersionsInferred output

List all versions for a resource pool.

Input
{
  poolId: string;
}
Output
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;
}>