Skip to content

Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.

fix: employee abilities

Brad Barbin3d03b52cbacf
diff --git a/apps/carbon/app/modules/resources/resources.service.ts b/apps/carbon/app/modules/resources/resources.service.ts
index ef836376b7..ac4738c148 100644
--- a/apps/carbon/app/modules/resources/resources.service.ts
+++ b/apps/carbon/app/modules/resources/resources.service.ts
@@ -81,13 +81,12 @@ export async function getAbilities(
) {
let query = client
.from("ability")
- .select(`*, employeeAbility(user(id, fullName, avatarUrl))`, {
+ .select(`*, employeeAbility(employeeId)`, {
count: "exact",
})
.eq("companyId", companyId)
.eq("active", true)
- .eq("employeeAbility.active", true)
- .eq("employeeAbility.user.active", true);
+ .eq("employeeAbility.active", true);
if (args?.search) {
query = query.ilike("name", `%${args.search}%`);
@@ -117,7 +116,7 @@ export async function getAbility(
return client
.from("ability")
.select(
- `*, employeeAbility(id, user(id, fullName, avatarUrl, active), lastTrainingDate, trainingDays, trainingCompleted)`,
+ `*, employeeAbility(id, employeeId, lastTrainingDate, trainingDays, trainingCompleted)`,
{
count: "exact",
}
@@ -125,7 +124,6 @@ export async function getAbility(
.eq("id", abilityId)
.eq("active", true)
.eq("employeeAbility.active", true)
- .eq("employeeAbility.user.active", true)
.single();
}
@@ -403,11 +401,13 @@ export async function insertAbility(
export async function insertEmployeeAbilities(
client: SupabaseClient<Database>,
abilityId: string,
- employeeIds: string[]
+ employeeIds: string[],
+ companyId: string
) {
const employeeAbilities = employeeIds.map((employeeId) => ({
abilityId,
employeeId,
+ companyId,
trainingCompleted: true,
}));
@@ -499,6 +499,7 @@ export async function upsertEmployeeAbility(
employeeId: string;
trainingCompleted: boolean;
trainingDays?: number;
+ companyId: string;
}
) {
const { id, ...update } = employeeAbility;
diff --git a/apps/carbon/app/modules/resources/ui/Abilities/AbilitiesTable.tsx b/apps/carbon/app/modules/resources/ui/Abilities/AbilitiesTable.tsx
index bbbec462fa..430ed84b6c 100644
--- a/apps/carbon/app/modules/resources/ui/Abilities/AbilitiesTable.tsx
+++ b/apps/carbon/app/modules/resources/ui/Abilities/AbilitiesTable.tsx
@@ -1,11 +1,4 @@
-import {
- AvatarGroup,
- AvatarGroupList,
- AvatarOverflowIndicator,
- Badge,
- MenuIcon,
- MenuItem,
-} from "@carbon/react";
+import { Badge, MenuIcon, MenuItem } from "@carbon/react";
import { useNavigate } from "@remix-run/react";
import type { ColumnDef } from "@tanstack/react-table";
import { memo, useCallback, useMemo } from "react";
@@ -17,7 +10,7 @@ import {
LuTrendingUp,
LuUsers,
} from "react-icons/lu";
-import { Avatar, New, Table } from "~/components";
+import { EmployeeAvatarGroup, New, Table } from "~/components";
import { usePermissions, useUrlParams } from "~/hooks";
import { path } from "~/utils/path";
import type { Abilities, AbilityDatum } from "../../types";
@@ -40,35 +33,9 @@ const AbilitiesTable = memo(({ data, count }: AbilitiesTableProps) => {
weeks: row.curve?.data.at(-1).week,
curve: row.curve as { data: AbilityDatum[] },
shadowWeeks: row.shadowWeeks,
- employees: Array.isArray(row.employeeAbility)
- ? row.employeeAbility.reduce<
- { name: string; avatarUrl: string | null }[]
- >((acc, curr) => {
- if (curr.user) {
- if (Array.isArray(curr.user)) {
- curr.user.forEach((user) => {
- acc.push({
- name: user.fullName ?? "",
- avatarUrl: user.avatarUrl,
- });
- });
- } else {
- acc.push({
- name: curr.user.fullName ?? "",
- avatarUrl: curr.user.avatarUrl,
- });
- }
- }
- return acc;
- }, [])
- : // @ts-expect-error
- row.employeeAbility?.user && Array.isArray(row.employeeAbility?.user)
- ? // @ts-expect-error
- row.employeeAbility.user.map((user) => ({
- name: user.fullName ?? "",
- avatarUrl: user.avatarUrl,
- }))
- : [],
+ employees: row.employeeAbility?.map(
+ (employeeAbility) => employeeAbility.employeeId
+ ),
}));
const columns = useMemo<ColumnDef<(typeof rows)[number]>[]>(() => {
@@ -93,20 +60,11 @@ const AbilitiesTable = memo(({ data, count }: AbilitiesTableProps) => {
header: "Employees",
// accessorKey: undefined, // makes the column unsortable
cell: ({ row }) => (
- <AvatarGroup limit={5}>
- <AvatarGroupList>
- {/* @ts-ignore */}
- {row.original.employees.map((employee, index: number) => (
- <Avatar
- key={index}
- name={employee.name ?? undefined}
- title={employee.name ?? undefined}
- path={employee.avatarUrl}
- />
- ))}
- </AvatarGroupList>
- <AvatarOverflowIndicator />
- </AvatarGroup>
+ <EmployeeAvatarGroup
+ employeeIds={row.original.employees}
+ size="xs"
+ limit={3}
+ />
),
meta: {
icon: <LuUsers />,
diff --git a/apps/carbon/app/modules/resources/ui/Abilities/AbilityChart.tsx b/apps/carbon/app/modules/resources/ui/Abilities/AbilityChart.tsx
index ff72dd270d..259f900d0f 100644
--- a/apps/carbon/app/modules/resources/ui/Abilities/AbilityChart.tsx
+++ b/apps/carbon/app/modules/resources/ui/Abilities/AbilityChart.tsx
@@ -125,7 +125,7 @@ const AbilityChart = ({
id="diagonalLines"
height={6}
width={6}
- stroke={zinc[600]}
+ stroke={`hsl(var(--muted-foreground))`}
strokeWidth={1}
orientation={["diagonal"]}
/>
diff --git a/apps/carbon/app/modules/resources/ui/Abilities/AbilityEmployeesTable.tsx b/apps/carbon/app/modules/resources/ui/Abilities/AbilityEmployeesTable.tsx
index c5de82231d..29b2cbcfda 100644
--- a/apps/carbon/app/modules/resources/ui/Abilities/AbilityEmployeesTable.tsx
+++ b/apps/carbon/app/modules/resources/ui/Abilities/AbilityEmployeesTable.tsx
@@ -9,7 +9,7 @@ import { useNavigate, useParams } from "@remix-run/react";
import type { ColumnDef } from "@tanstack/react-table";
import { useCallback, useMemo } from "react";
import { LuPencil, LuTrash } from "react-icons/lu";
-import { Avatar, New, Table } from "~/components";
+import { EmployeeAvatar, New, Table } from "~/components";
import { usePermissions } from "~/hooks";
import { AbilityEmployeeStatus, type AbilityEmployees } from "../../types";
@@ -34,32 +34,28 @@ const AbilityEmployeesTable = ({
const rows = useMemo(
() =>
Array.isArray(employees)
- ? employees
- .filter((employee) => {
- // @ts-ignore
- return employee.user?.active === true;
- })
- .map((employee) => {
- if (Array.isArray(employee.user)) {
- throw new Error("AbilityEmployeesTable: user is an array");
- }
+ ? employees.map((employee) => {
+ if (Array.isArray(employee)) {
+ throw new Error("AbilityEmployeesTable: user is an array");
+ }
- return {
- id: employee.id,
- name: employee.user?.fullName ?? "",
- avatarUrl: employee.user?.avatarUrl ?? null,
- status: employee.trainingCompleted
- ? AbilityEmployeeStatus.Complete
- : employee.trainingDays
- ? AbilityEmployeeStatus.InProgress
- : AbilityEmployeeStatus.NotStarted,
- percentage: (employee.trainingDays / 5 / weeks) * 100,
- };
- })
+ return {
+ id: employee.id,
+ employeeId: employee.employeeId,
+ status: employee.trainingCompleted
+ ? AbilityEmployeeStatus.Complete
+ : employee.trainingDays
+ ? AbilityEmployeeStatus.InProgress
+ : AbilityEmployeeStatus.NotStarted,
+ percentage: (employee.trainingDays / 5 / weeks) * 100,
+ };
+ })
: [],
[employees, weeks]
);
+ console.log();
+
const columns = useMemo<ColumnDef<(typeof rows)[number]>[]>(() => {
return [
{
@@ -67,13 +63,7 @@ const AbilityEmployeesTable = ({
header: "Name",
cell: ({ row }) => (
<HStack>
- <Avatar
- size="sm"
- name={row.original.name}
- path={row.original.avatarUrl}
- />
-
- <span>{row.original.name}</span>
+ <EmployeeAvatar employeeId={row.original.employeeId} />
</HStack>
),
},
diff --git a/apps/carbon/app/routes/x+/resources+/abilities.new.tsx b/apps/carbon/app/routes/x+/resources+/abilities.new.tsx
index fca6adbb3b..3eb6ccc901 100644
--- a/apps/carbon/app/routes/x+/resources+/abilities.new.tsx
+++ b/apps/carbon/app/routes/x+/resources+/abilities.new.tsx
@@ -82,7 +82,8 @@ export async function action({ request }: ActionFunctionArgs) {
const createEmployeeAbilities = await insertEmployeeAbilities(
client,
abilityId,
- employees
+ employees,
+ companyId
);
if (createEmployeeAbilities.error) {
diff --git a/apps/carbon/app/routes/x+/resources+/ability.$abilityId.employee.$id.tsx b/apps/carbon/app/routes/x+/resources+/ability.$abilityId.employee.$id.tsx
index 9b033556ec..f5b788551f 100644
--- a/apps/carbon/app/routes/x+/resources+/ability.$abilityId.employee.$id.tsx
+++ b/apps/carbon/app/routes/x+/resources+/ability.$abilityId.employee.$id.tsx
@@ -51,7 +51,7 @@ export async function action({ params, request }: ActionFunctionArgs) {
if (!abilityId) throw new Error("abilityId is not found");
if (!id) throw new Error("id is not found");
- const { client } = await requirePermissions(request, {
+ const { client, companyId } = await requirePermissions(request, {
create: "resources",
});
@@ -71,6 +71,7 @@ export async function action({ params, request }: ActionFunctionArgs) {
abilityId,
trainingCompleted: trainingStatus === AbilityEmployeeStatus.Complete,
trainingDays: trainingDays || 0,
+ companyId,
});
if (updateEmployeeAbility.error) {
@@ -102,12 +103,8 @@ export default function EmployeeAbilityRoute() {
weeks: number;
}>(path.to.ability(abilityId));
- if (Array.isArray(employeeAbility?.user)) {
- throw new Error("employeeAbility.user is an array");
- }
-
const initialValues = {
- employeeId: employeeAbility?.user?.id ?? "",
+ employeeId: employeeAbility?.employeeId ?? "",
trainingStatus: getTrainingStatus(employeeAbility) ?? "",
trainingPercent: getTrainingPercent(
employeeAbility?.trainingDays,
diff --git a/apps/carbon/app/routes/x+/resources+/ability.$abilityId.employee.new.tsx b/apps/carbon/app/routes/x+/resources+/ability.$abilityId.employee.new.tsx
index 913a866d16..279ed83562 100644
--- a/apps/carbon/app/routes/x+/resources+/ability.$abilityId.employee.new.tsx
+++ b/apps/carbon/app/routes/x+/resources+/ability.$abilityId.employee.new.tsx
@@ -19,7 +19,7 @@ export async function action({ params, request }: ActionFunctionArgs) {
const { abilityId } = params;
if (!abilityId) throw new Error("abilityId is not found");
- const { client } = await requirePermissions(request, {
+ const { client, companyId } = await requirePermissions(request, {
create: "resources",
});
@@ -38,6 +38,7 @@ export async function action({ params, request }: ActionFunctionArgs) {
abilityId,
trainingCompleted: trainingStatus === AbilityEmployeeStatus.Complete,
trainingDays: trainingDays || 0,
+ companyId,
});
if (insertEmployeeAbility.error) {
diff --git a/packages/database/src/swagger-docs-schema.ts b/packages/database/src/swagger-docs-schema.ts
index 128a0c8fd3..b288972ee5 100644
--- a/packages/database/src/swagger-docs-schema.ts
+++ b/packages/database/src/swagger-docs-schema.ts
@@ -2649,6 +2649,9 @@ export default {
{
$ref: "#/parameters/rowFilter.quotes.digitalQuoteAcceptedByEmail",
},
+ {
+ $ref: "#/parameters/rowFilter.quotes.tags",
+ },
{
$ref: "#/parameters/rowFilter.quotes.locationName",
},
@@ -2667,6 +2670,9 @@ export default {
{
$ref: "#/parameters/rowFilter.quotes.salesOrderId",
},
+ {
+ $ref: "#/parameters/rowFilter.quotes.shippingCost",
+ },
{
$ref: "#/parameters/select",
},
@@ -3705,176 +3711,35 @@ export default {
tags: ["supplierPayment"],
},
},
- "/currencyCode": {
+ "/methodOperationTool": {
get: {
parameters: [
{
- $ref: "#/parameters/rowFilter.currencyCode.code",
- },
- {
- $ref: "#/parameters/rowFilter.currencyCode.name",
- },
- {
- $ref: "#/parameters/select",
- },
- {
- $ref: "#/parameters/order",
- },
- {
- $ref: "#/parameters/range",
- },
- {
- $ref: "#/parameters/rangeUnit",
- },
- {
- $ref: "#/parameters/offset",
- },
- {
- $ref: "#/parameters/limit",
- },
- {
- $ref: "#/parameters/preferCount",
- },
- ],
- responses: {
- "200": {
- description: "OK",
- schema: {
- items: {
- $ref: "#/definitions/currencyCode",
- },
- type: "array",
- },
- },
- "206": {
- description: "Partial Content",
- },
- },
- tags: ["currencyCode"],
- },
- post: {
- parameters: [
- {
- $ref: "#/parameters/body.currencyCode",
- },
- {
- $ref: "#/parameters/select",
- },
- {
- $ref: "#/parameters/preferPost",
- },
- ],
- responses: {
- "201": {
- description: "Created",
- },
- },
- tags: ["currencyCode"],
- },
- delete: {
- parameters: [
- {
- $ref: "#/parameters/rowFilter.currencyCode.code",
- },
- {
- $ref: "#/parameters/rowFilter.currencyCode.name",
- },
- {
- $ref: "#/parameters/preferReturn",
- },
- ],
- responses: {
- "204": {
- description: "No Content",
- },
- },
- tags: ["currencyCode"],
- },
- patch: {
- parameters: [
- {
- $ref: "#/parameters/rowFilter.currencyCode.code",
- },
- {
- $ref: "#/parameters/rowFilter.currencyCode.name",
- },
- {
- $ref: "#/parameters/body.currencyCode",
- },
- {
- $ref: "#/parameters/preferReturn",
- },
- ],
- responses: {
- "204": {
- description: "No Content",
- },
- },
- tags: ["currencyCode"],
- },
- },
- "/methodMaterial": {
- get: {
- parameters: [
- {
- $ref: "#/parameters/rowFilter.methodMaterial.id",
- },
- {
- $ref: "#/parameters/rowFilter.methodMaterial.makeMethodId",
- },
- {
- $ref: "#/parameters/rowFilter.methodMaterial.methodType",
- },
- {
- $ref: "#/parameters/rowFilter.methodMaterial.materialMakeMethodId",
- },
- {
- $ref: "#/parameters/rowFilter.methodMaterial.itemType",
- },
- {
- $ref: "#/parameters/rowFilter.methodMaterial.itemId",
- },
- {
- $ref: "#/parameters/rowFilter.methodMaterial.quantity",
- },
- {
- $ref: "#/parameters/rowFilter.methodMaterial.unitOfMeasureCode",
- },
- {
- $ref: "#/parameters/rowFilter.methodMaterial.companyId",
- },
- {
- $ref: "#/parameters/rowFilter.methodMaterial.createdAt",
- },
- {
- $ref: "#/parameters/rowFilter.methodMaterial.createdBy",
+ $ref: "#/parameters/rowFilter.methodOperationTool.id",
},
{
- $ref: "#/parameters/rowFilter.methodMaterial.updatedAt",
+ $ref: "#/parameters/rowFilter.methodOperationTool.operationId",
},
{
- $ref: "#/parameters/rowFilter.methodMaterial.updatedBy",
+ $ref: "#/parameters/rowFilter.methodOperationTool.toolId",
},
{
- $ref: "#/parameters/rowFilter.methodMaterial.customFields",
- },
- {
- $ref: "#/parameters/rowFilter.methodMaterial.itemReadableId",
+ $ref: "#/parameters/rowFilter.methodOperationTool.quantity",
},
{
- $ref: "#/parameters/rowFilter.methodMaterial.order",
+ $ref: "#/parameters/rowFilter.methodOperationTool.companyId",
},
{
- $ref: "#/parameters/rowFilter.methodMaterial.methodOperationId",
+ $ref: "#/parameters/rowFilter.methodOperationTool.createdAt",
},
{
- $ref: "#/parameters/rowFilter.methodMaterial.scrapQuantity",
+ $ref: "#/parameters/rowFilter.methodOperationTool.createdBy",
},
{
- $ref: "#/parameters/rowFilter.methodMaterial.productionQuantity",
+ $ref: "#/parameters/rowFilter.methodOperationTool.updatedAt",
},
{
- $ref: "#/parameters/rowFilter.methodMaterial.tags",
+ $ref: "#/parameters/rowFilter.methodOperationTool.updatedBy",
},
{
$ref: "#/parameters/select",
@@ -3903,7 +3768,7 @@ export default {
description: "OK",
schema: {
items: {
- $ref: "#/definitions/methodMaterial",
+ $ref: "#/definitions/methodOperationTool",
},
type: "array",
},
@@ -3912,12 +3777,12 @@ export default {
description: "Partial Content",
},
},
- tags: ["methodMaterial"],
+ tags: ["methodOperationTool"],
},
post: {
parameters: [
{
- $ref: "#/parameters/body.methodMaterial",
+ $ref: "#/parameters/body.methodOperationTool",
},
{
$ref: "#/parameters/select",
@@ -3931,69 +3796,36 @@ export default {
description: "Created",
},
},
- tags: ["methodMaterial"],
+ tags: ["methodOperationTool"],
},
delete: {
parameters: [
{
- $ref: "#/parameters/rowFilter.methodMaterial.id",
- },
- {
- $ref: "#/parameters/rowFilter.methodMaterial.makeMethodId",
- },
- {
- $ref: "#/parameters/rowFilter.methodMaterial.methodType",
- },
- {
- $ref: "#/parameters/rowFilter.methodMaterial.materialMakeMethodId",
+ $ref: "#/parameters/rowFilter.methodOperationTool.id",
},
{
- $ref: "#/parameters/rowFilter.methodMaterial.itemType",
+ $ref: "#/parameters/rowFilter.methodOperationTool.operationId",
},
{
- $ref: "#/parameters/rowFilter.methodMaterial.itemId",
+ $ref: "#/parameters/rowFilter.methodOperationTool.toolId",
},
{
- $ref: "#/parameters/rowFilter.methodMaterial.quantity",
+ $ref: "#/parameters/rowFilter.methodOperationTool.quantity",
},
{
- $ref: "#/parameters/rowFilter.methodMaterial.unitOfMeasureCode",
+ $ref: "#/parameters/rowFilter.methodOperationTool.companyId",
},
{
- $ref: "#/parameters/rowFilter.methodMaterial.companyId",
+ $ref: "#/parameters/rowFilter.methodOperationTool.createdAt",
},
{
- $ref: "#/parameters/rowFilter.methodMaterial.createdAt",
+ $ref: "#/parameters/rowFilter.methodOperationTool.createdBy",
},
{
- $ref: "#/parameters/rowFilter.methodMaterial.createdBy",
+ $ref: "#/parameters/rowFilter.methodOperationTool.updatedAt",
},
{
- $ref: "#/parameters/rowFilter.methodMaterial.updatedAt",
- },
- {
- $ref: "#/parameters/rowFilter.methodMaterial.updatedBy",
- },
- {
- $ref: "#/parameters/rowFilter.methodMaterial.customFields",
- },
- {
- $ref: "#/parameters/rowFilter.methodMaterial.itemReadableId",
- },
- {
- $ref: "#/parameters/rowFilter.methodMaterial.order",
- },
- {
- $ref: "#/parameters/rowFilter.methodMaterial.methodOperationId",
- },
- {
- $ref: "#/parameters/rowFilter.methodMaterial.scrapQuantity",
- },
- {
- $ref: "#/parameters/rowFilter.methodMaterial.productionQuantity",
- },
- {
- $ref: "#/parameters/rowFilter.methodMaterial.tags",
+ $ref: "#/parameters/rowFilter.methodOperationTool.updatedBy",
},
{
$ref: "#/parameters/preferReturn",
@@ -4004,72 +3836,39 @@ export default {
description: "No Content",
},
},
- tags: ["methodMaterial"],
+ tags: ["methodOperationTool"],
},
patch: {
parameters: [
{
- $ref: "#/parameters/rowFilter.methodMaterial.id",
+ $ref: "#/parameters/rowFilter.methodOperationTool.id",
},
{
- $ref: "#/parameters/rowFilter.methodMaterial.makeMethodId",
+ $ref: "#/parameters/rowFilter.methodOperationTool.operationId",
},
{
- $ref: "#/parameters/rowFilter.methodMaterial.methodType",
+ $ref: "#/parameters/rowFilter.methodOperationTool.toolId",
},
{
- $ref: "#/parameters/rowFilter.methodMaterial.materialMakeMethodId",
+ $ref: "#/parameters/rowFilter.methodOperationTool.quantity",
},
{
- $ref: "#/parameters/rowFilter.methodMaterial.itemType",
+ $ref: "#/parameters/rowFilter.methodOperationTool.companyId",
},
{
- $ref: "#/parameters/rowFilter.methodMaterial.itemId",
+ $ref: "#/parameters/rowFilter.methodOperationTool.createdAt",
},
{
- $ref: "#/parameters/rowFilter.methodMaterial.quantity",
+ $ref: "#/parameters/rowFilter.methodOperationTool.createdBy",
},
{
- $ref: "#/parameters/rowFilter.methodMaterial.unitOfMeasureCode",
+ $ref: "#/parameters/rowFilter.methodOperationTool.updatedAt",
},
{
- $ref: "#/parameters/rowFilter.methodMaterial.companyId",
+ $ref: "#/parameters/rowFilter.methodOperationTool.updatedBy",
},
{
- $ref: "#/parameters/rowFilter.methodMaterial.createdAt",
- },
- {
- $ref: "#/parameters/rowFilter.methodMaterial.createdBy",
- },
- {
- $ref: "#/parameters/rowFilter.methodMaterial.updatedAt",
- },
- {
- $ref: "#/parameters/rowFilter.methodMaterial.updatedBy",
- },
- {
- $ref: "#/parameters/rowFilter.methodMaterial.customFields",
- },
- {
- $ref: "#/parameters/rowFilter.methodMaterial.itemReadableId",
- },
- {
- $ref: "#/parameters/rowFilter.methodMaterial.order",
- },
- {
- $ref: "#/parameters/rowFilter.methodMaterial.methodOperationId",
- },
- {
- $ref: "#/parameters/rowFilter.methodMaterial.scrapQuantity",
- },
- {
- $ref: "#/parameters/rowFilter.methodMaterial.productionQuantity",
- },
- {
- $ref: "#/parameters/rowFilter.methodMaterial.tags",
- },
- {
- $ref: "#/parameters/body.methodMaterial",
+ $ref: "#/parameters/body.methodOperationTool",
},
{
$ref: "#/parameters/preferReturn",
@@ -4080,47 +3879,425 @@ export default {
description: "No Content",
},
},
- tags: ["methodMaterial"],
+ tags: ["methodOperationTool"],
},
},
- "/processes": {
+ "/currencyCode": {
get: {
parameters: [
{
- $ref: "#/parameters/rowFilter.processes.id",
- },
- {
- $ref: "#/parameters/rowFilter.processes.name",
- },
- {
- $ref: "#/parameters/rowFilter.processes.defaultStandardFactor",
- },
- {
- $ref: "#/parameters/rowFilter.processes.companyId",
- },
- {
- $ref: "#/parameters/rowFilter.processes.customFields",
- },
- {
- $ref: "#/parameters/rowFilter.processes.createdBy",
- },
- {
- $ref: "#/parameters/rowFilter.processes.createdAt",
- },
- {
- $ref: "#/parameters/rowFilter.processes.updatedBy",
- },
- {
- $ref: "#/parameters/rowFilter.processes.updatedAt",
- },
- {
- $ref: "#/parameters/rowFilter.processes.processType",
- },
- {
- $ref: "#/parameters/rowFilter.processes.workCenters",
+ $ref: "#/parameters/rowFilter.currencyCode.code",
},
{
- $ref: "#/parameters/rowFilter.processes.suppliers",
+ $ref: "#/parameters/rowFilter.currencyCode.name",
+ },
+ {
+ $ref: "#/parameters/select",
+ },
+ {
+ $ref: "#/parameters/order",
+ },
+ {
+ $ref: "#/parameters/range",
+ },
+ {
+ $ref: "#/parameters/rangeUnit",
+ },
+ {
+ $ref: "#/parameters/offset",
+ },
+ {
+ $ref: "#/parameters/limit",
+ },
+ {
+ $ref: "#/parameters/preferCount",
+ },
+ ],
+ responses: {
+ "200": {
+ description: "OK",
+ schema: {
+ items: {
+ $ref: "#/definitions/currencyCode",
+ },
+ type: "array",
+ },
+ },
+ "206": {
+ description: "Partial Content",
+ },
+ },
+ tags: ["currencyCode"],
+ },
+ post: {
+ parameters: [
+ {
+ $ref: "#/parameters/body.currencyCode",
+ },
+ {
+ $ref: "#/parameters/select",
+ },
+ {
+ $ref: "#/parameters/preferPost",
+ },
+ ],
+ responses: {
+ "201": {
+ description: "Created",
+ },
+ },
+ tags: ["currencyCode"],
+ },
+ delete: {
+ parameters: [
+ {
+ $ref: "#/parameters/rowFilter.currencyCode.code",
+ },
+ {
+ $ref: "#/parameters/rowFilter.currencyCode.name",
+ },
+ {
+ $ref: "#/parameters/preferReturn",
+ },
+ ],
+ responses: {
+ "204": {
+ description: "No Content",
+ },
+ },
+ tags: ["currencyCode"],
+ },
+ patch: {
+ parameters: [
+ {
+ $ref: "#/parameters/rowFilter.currencyCode.code",
+ },
+ {
+ $ref: "#/parameters/rowFilter.currencyCode.name",
+ },
+ {
+ $ref: "#/parameters/body.currencyCode",
+ },
+ {
+ $ref: "#/parameters/preferReturn",
+ },
+ ],
+ responses: {
+ "204": {
+ description: "No Content",
+ },
+ },
+ tags: ["currencyCode"],
+ },
+ },
+ "/methodMaterial": {
+ get: {
+ parameters: [
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.id",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.makeMethodId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.methodType",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.materialMakeMethodId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.itemType",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.itemId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.quantity",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.unitOfMeasureCode",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.companyId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.createdAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.createdBy",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.updatedAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.updatedBy",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.customFields",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.itemReadableId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.order",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.methodOperationId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.scrapQuantity",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.productionQuantity",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.tags",
+ },
+ {
+ $ref: "#/parameters/select",
+ },
+ {
+ $ref: "#/parameters/order",
+ },
+ {
+ $ref: "#/parameters/range",
+ },
+ {
+ $ref: "#/parameters/rangeUnit",
+ },
+ {
+ $ref: "#/parameters/offset",
+ },
+ {
+ $ref: "#/parameters/limit",
+ },
+ {
+ $ref: "#/parameters/preferCount",
+ },
+ ],
+ responses: {
+ "200": {
+ description: "OK",
+ schema: {
+ items: {
+ $ref: "#/definitions/methodMaterial",
+ },
+ type: "array",
+ },
+ },
+ "206": {
+ description: "Partial Content",
+ },
+ },
+ tags: ["methodMaterial"],
+ },
+ post: {
+ parameters: [
+ {
+ $ref: "#/parameters/body.methodMaterial",
+ },
+ {
+ $ref: "#/parameters/select",
+ },
+ {
+ $ref: "#/parameters/preferPost",
+ },
+ ],
+ responses: {
+ "201": {
+ description: "Created",
+ },
+ },
+ tags: ["methodMaterial"],
+ },
+ delete: {
+ parameters: [
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.id",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.makeMethodId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.methodType",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.materialMakeMethodId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.itemType",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.itemId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.quantity",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.unitOfMeasureCode",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.companyId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.createdAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.createdBy",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.updatedAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.updatedBy",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.customFields",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.itemReadableId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.order",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.methodOperationId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.scrapQuantity",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.productionQuantity",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.tags",
+ },
+ {
+ $ref: "#/parameters/preferReturn",
+ },
+ ],
+ responses: {
+ "204": {
+ description: "No Content",
+ },
+ },
+ tags: ["methodMaterial"],
+ },
+ patch: {
+ parameters: [
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.id",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.makeMethodId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.methodType",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.materialMakeMethodId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.itemType",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.itemId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.quantity",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.unitOfMeasureCode",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.companyId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.createdAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.createdBy",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.updatedAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.updatedBy",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.customFields",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.itemReadableId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.order",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.methodOperationId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.scrapQuantity",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.productionQuantity",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.tags",
+ },
+ {
+ $ref: "#/parameters/body.methodMaterial",
+ },
+ {
+ $ref: "#/parameters/preferReturn",
+ },
+ ],
+ responses: {
+ "204": {
+ description: "No Content",
+ },
+ },
+ tags: ["methodMaterial"],
+ },
+ },
+ "/processes": {
+ get: {
+ parameters: [
+ {
+ $ref: "#/parameters/rowFilter.processes.id",
+ },
+ {
+ $ref: "#/parameters/rowFilter.processes.name",
+ },
+ {
+ $ref: "#/parameters/rowFilter.processes.defaultStandardFactor",
+ },
+ {
+ $ref: "#/parameters/rowFilter.processes.companyId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.processes.customFields",
+ },
+ {
+ $ref: "#/parameters/rowFilter.processes.createdBy",
+ },
+ {
+ $ref: "#/parameters/rowFilter.processes.createdAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.processes.updatedBy",
+ },
+ {
+ $ref: "#/parameters/rowFilter.processes.updatedAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.processes.processType",
+ },
+ {
+ $ref: "#/parameters/rowFilter.processes.workCenters",
+ },
+ {
+ $ref: "#/parameters/rowFilter.processes.suppliers",
},
{
$ref: "#/parameters/select",
@@ -5970,6 +6147,9 @@ export default {
{
$ref: "#/parameters/rowFilter.item.thumbnailPath",
},
+ {
+ $ref: "#/parameters/rowFilter.item.notes",
+ },
{
$ref: "#/parameters/select",
},
@@ -6086,6 +6266,9 @@ export default {
{
$ref: "#/parameters/rowFilter.item.thumbnailPath",
},
+ {
+ $ref: "#/parameters/rowFilter.item.notes",
+ },
{
$ref: "#/parameters/preferReturn",
},
@@ -6156,6 +6339,9 @@ export default {
{
$ref: "#/parameters/rowFilter.item.thumbnailPath",
},
+ {
+ $ref: "#/parameters/rowFilter.item.notes",
+ },
{
$ref: "#/parameters/body.item",
},
@@ -8757,9 +8943,6 @@ export default {
{
$ref: "#/parameters/rowFilter.companies.baseCurrencyCode",
},
- {
- $ref: "#/parameters/rowFilter.companies.digitalQuoteEnabled",
- },
{
$ref: "#/parameters/rowFilter.companies.logoDarkIcon",
},
@@ -8772,9 +8955,6 @@ export default {
{
$ref: "#/parameters/rowFilter.companies.logoLight",
},
- {
- $ref: "#/parameters/rowFilter.companies.digitalQuoteNotificationGroup",
- },
{
$ref: "#/parameters/rowFilter.companies.userId",
},
@@ -9309,9 +9489,6 @@ export default {
{
$ref: "#/parameters/rowFilter.company.baseCurrencyCode",
},
- {
- $ref: "#/parameters/rowFilter.company.digitalQuoteEnabled",
- },
{
$ref: "#/parameters/rowFilter.company.logoDarkIcon",
},
@@ -9324,9 +9501,6 @@ export default {
{
$ref: "#/parameters/rowFilter.company.logoLight",
},
- {
- $ref: "#/parameters/rowFilter.company.digitalQuoteNotificationGroup",
- },
{
$ref: "#/parameters/select",
},
@@ -9431,9 +9605,6 @@ export default {
{
$ref: "#/parameters/rowFilter.company.baseCurrencyCode",
},
- {
- $ref: "#/parameters/rowFilter.company.digitalQuoteEnabled",
- },
{
$ref: "#/parameters/rowFilter.company.logoDarkIcon",
},
@@ -9447,7 +9618,77 @@ export default {
$ref: "#/parameters/rowFilter.company.logoLight",
},
{
- $ref: "#/parameters/rowFilter.company.digitalQuoteNotificationGroup",
+ $ref: "#/parameters/preferReturn",
+ },
+ ],
+ responses: {
+ "204": {
+ description: "No Content",
+ },
+ },
+ tags: ["company"],
+ },
+ patch: {
+ parameters: [
+ {
+ $ref: "#/parameters/rowFilter.company.id",
+ },
+ {
+ $ref: "#/parameters/rowFilter.company.name",
+ },
+ {
+ $ref: "#/parameters/rowFilter.company.taxId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.company.addressLine1",
+ },
+ {
+ $ref: "#/parameters/rowFilter.company.addressLine2",
+ },
+ {
+ $ref: "#/parameters/rowFilter.company.city",
+ },
+ {
+ $ref: "#/parameters/rowFilter.company.stateProvince",
+ },
+ {
+ $ref: "#/parameters/rowFilter.company.postalCode",
+ },
+ {
+ $ref: "#/parameters/rowFilter.company.countryCode",
+ },
+ {
+ $ref: "#/parameters/rowFilter.company.phone",
+ },
+ {
+ $ref: "#/parameters/rowFilter.company.fax",
+ },
+ {
+ $ref: "#/parameters/rowFilter.company.email",
+ },
+ {
+ $ref: "#/parameters/rowFilter.company.website",
+ },
+ {
+ $ref: "#/parameters/rowFilter.company.updatedBy",
+ },
+ {
+ $ref: "#/parameters/rowFilter.company.baseCurrencyCode",
+ },
+ {
+ $ref: "#/parameters/rowFilter.company.logoDarkIcon",
+ },
+ {
+ $ref: "#/parameters/rowFilter.company.logoLightIcon",
+ },
+ {
+ $ref: "#/parameters/rowFilter.company.logoDark",
+ },
+ {
+ $ref: "#/parameters/rowFilter.company.logoLight",
+ },
+ {
+ $ref: "#/parameters/body.company",
},
{
$ref: "#/parameters/preferReturn",
@@ -9460,73 +9701,122 @@ export default {
},
tags: ["company"],
},
- patch: {
+ },
+ "/jobOperationTool": {
+ get: {
parameters: [
{
- $ref: "#/parameters/rowFilter.company.id",
+ $ref: "#/parameters/rowFilter.jobOperationTool.id",
},
{
- $ref: "#/parameters/rowFilter.company.name",
+ $ref: "#/parameters/rowFilter.jobOperationTool.operationId",
},
{
- $ref: "#/parameters/rowFilter.company.taxId",
+ $ref: "#/parameters/rowFilter.jobOperationTool.toolId",
},
{
- $ref: "#/parameters/rowFilter.company.addressLine1",
+ $ref: "#/parameters/rowFilter.jobOperationTool.quantity",
},
{
- $ref: "#/parameters/rowFilter.company.addressLine2",
+ $ref: "#/parameters/rowFilter.jobOperationTool.companyId",
},
{
- $ref: "#/parameters/rowFilter.company.city",
+ $ref: "#/parameters/rowFilter.jobOperationTool.createdAt",
},
{
- $ref: "#/parameters/rowFilter.company.stateProvince",
+ $ref: "#/parameters/rowFilter.jobOperationTool.createdBy",
},
{
- $ref: "#/parameters/rowFilter.company.postalCode",
+ $ref: "#/parameters/rowFilter.jobOperationTool.updatedAt",
},
{
- $ref: "#/parameters/rowFilter.company.countryCode",
+ $ref: "#/parameters/rowFilter.jobOperationTool.updatedBy",
},
{
- $ref: "#/parameters/rowFilter.company.phone",
+ $ref: "#/parameters/select",
},
{
- $ref: "#/parameters/rowFilter.company.fax",
+ $ref: "#/parameters/order",
},
{
- $ref: "#/parameters/rowFilter.company.email",
+ $ref: "#/parameters/range",
},
{
- $ref: "#/parameters/rowFilter.company.website",
+ $ref: "#/parameters/rangeUnit",
},
{
- $ref: "#/parameters/rowFilter.company.updatedBy",
+ $ref: "#/parameters/offset",
},
{
- $ref: "#/parameters/rowFilter.company.baseCurrencyCode",
+ $ref: "#/parameters/limit",
},
{
- $ref: "#/parameters/rowFilter.company.digitalQuoteEnabled",
+ $ref: "#/parameters/preferCount",
},
+ ],
+ responses: {
+ "200": {
+ description: "OK",
+ schema: {
+ items: {
+ $ref: "#/definitions/jobOperationTool",
+ },
+ type: "array",
+ },
+ },
+ "206": {
+ description: "Partial Content",
+ },
+ },
+ tags: ["jobOperationTool"],
+ },
+ post: {
+ parameters: [
{
- $ref: "#/parameters/rowFilter.company.logoDarkIcon",
+ $ref: "#/parameters/body.jobOperationTool",
},
{
- $ref: "#/parameters/rowFilter.company.logoLightIcon",
+ $ref: "#/parameters/select",
},
{
- $ref: "#/parameters/rowFilter.company.logoDark",
+ $ref: "#/parameters/preferPost",
+ },
+ ],
+ responses: {
+ "201": {
+ description: "Created",
+ },
+ },
+ tags: ["jobOperationTool"],
+ },
+ delete: {
+ parameters: [
+ {
+ $ref: "#/parameters/rowFilter.jobOperationTool.id",
},
{
- $ref: "#/parameters/rowFilter.company.logoLight",
+ $ref: "#/parameters/rowFilter.jobOperationTool.operationId",
},
{
- $ref: "#/parameters/rowFilter.company.digitalQuoteNotificationGroup",
+ $ref: "#/parameters/rowFilter.jobOperationTool.toolId",
},
{
- $ref: "#/parameters/body.company",
+ $ref: "#/parameters/rowFilter.jobOperationTool.quantity",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperationTool.companyId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperationTool.createdAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperationTool.createdBy",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperationTool.updatedAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperationTool.updatedBy",
},
{
$ref: "#/parameters/preferReturn",
@@ -9537,7 +9827,50 @@ export default {
description: "No Content",
},
},
- tags: ["company"],
+ tags: ["jobOperationTool"],
+ },
+ patch: {
+ parameters: [
+ {
+ $ref: "#/parameters/rowFilter.jobOperationTool.id",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperationTool.operationId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperationTool.toolId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperationTool.quantity",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperationTool.companyId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperationTool.createdAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperationTool.createdBy",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperationTool.updatedAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperationTool.updatedBy",
+ },
+ {
+ $ref: "#/parameters/body.jobOperationTool",
+ },
+ {
+ $ref: "#/parameters/preferReturn",
+ },
+ ],
+ responses: {
+ "204": {
+ description: "No Content",
+ },
+ },
+ tags: ["jobOperationTool"],
},
},
"/userAttributeCategory": {
@@ -11976,6 +12309,9 @@ export default {
{
$ref: "#/parameters/rowFilter.salesOrderShipment.assignee",
},
+ {
+ $ref: "#/parameters/rowFilter.salesOrderShipment.shippingCost",
+ },
{
$ref: "#/parameters/select",
},
@@ -12092,6 +12428,9 @@ export default {
{
$ref: "#/parameters/rowFilter.salesOrderShipment.assignee",
},
+ {
+ $ref: "#/parameters/rowFilter.salesOrderShipment.shippingCost",
+ },
{
$ref: "#/parameters/preferReturn",
},
@@ -12162,6 +12501,9 @@ export default {
{
$ref: "#/parameters/rowFilter.salesOrderShipment.assignee",
},
+ {
+ $ref: "#/parameters/rowFilter.salesOrderShipment.shippingCost",
+ },
{
$ref: "#/parameters/body.salesOrderShipment",
},
@@ -13539,6 +13881,9 @@ export default {
{
$ref: "#/parameters/rowFilter.consumables.unitOfMeasureCode",
},
+ {
+ $ref: "#/parameters/rowFilter.consumables.notes",
+ },
{
$ref: "#/parameters/rowFilter.consumables.id",
},
@@ -15624,6 +15969,9 @@ export default {
{
$ref: "#/parameters/rowFilter.salesOrders.dropShipment",
},
+ {
+ $ref: "#/parameters/rowFilter.salesOrders.shippingCost",
+ },
{
$ref: "#/parameters/rowFilter.salesOrders.locationName",
},
@@ -19638,6 +19986,9 @@ export default {
{
$ref: "#/parameters/rowFilter.quoteShipment.updatedAt",
},
+ {
+ $ref: "#/parameters/rowFilter.quoteShipment.shippingCost",
+ },
{
$ref: "#/parameters/select",
},
@@ -19721,6 +20072,9 @@ export default {
{
$ref: "#/parameters/rowFilter.quoteShipment.updatedAt",
},
+ {
+ $ref: "#/parameters/rowFilter.quoteShipment.shippingCost",
+ },
{
$ref: "#/parameters/preferReturn",
},
@@ -19758,6 +20112,9 @@ export default {
{
$ref: "#/parameters/rowFilter.quoteShipment.updatedAt",
},
+ {
+ $ref: "#/parameters/rowFilter.quoteShipment.shippingCost",
+ },
{
$ref: "#/parameters/body.quoteShipment",
},
@@ -21153,6 +21510,9 @@ export default {
{
$ref: "#/parameters/rowFilter.parts.unitOfMeasureCode",
},
+ {
+ $ref: "#/parameters/rowFilter.parts.notes",
+ },
{
$ref: "#/parameters/rowFilter.parts.thumbnailPath",
},
@@ -23061,6 +23421,177 @@ export default {
tags: ["externalLink"],
},
},
+ "/quoteOperationTool": {
+ get: {
+ parameters: [
+ {
+ $ref: "#/parameters/rowFilter.quoteOperationTool.id",
+ },
+ {
+ $ref: "#/parameters/rowFilter.quoteOperationTool.operationId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.quoteOperationTool.toolId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.quoteOperationTool.quantity",
+ },
+ {
+ $ref: "#/parameters/rowFilter.quoteOperationTool.companyId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.quoteOperationTool.createdAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.quoteOperationTool.createdBy",
+ },
+ {
+ $ref: "#/parameters/rowFilter.quoteOperationTool.updatedAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.quoteOperationTool.updatedBy",
+ },
+ {
+ $ref: "#/parameters/select",
+ },
+ {
+ $ref: "#/parameters/order",
+ },
+ {
+ $ref: "#/parameters/range",
+ },
+ {
+ $ref: "#/parameters/rangeUnit",
+ },
+ {
+ $ref: "#/parameters/offset",
+ },
+ {
+ $ref: "#/parameters/limit",
+ },
+ {
+ $ref: "#/parameters/preferCount",
+ },
+ ],
+ responses: {
+ "200": {
+ description: "OK",
+ schema: {
+ items: {
+ $ref: "#/definitions/quoteOperationTool",
+ },
+ type: "array",
+ },
+ },
+ "206": {
+ description: "Partial Content",
+ },
+ },
+ tags: ["quoteOperationTool"],
+ },
+ post: {
+ parameters: [
+ {
+ $ref: "#/parameters/body.quoteOperationTool",
+ },
+ {
+ $ref: "#/parameters/select",
+ },
+ {
+ $ref: "#/parameters/preferPost",
+ },
+ ],
+ responses: {
+ "201": {
+ description: "Created",
+ },
+ },
+ tags: ["quoteOperationTool"],
+ },
+ delete: {
+ parameters: [
+ {
+ $ref: "#/parameters/rowFilter.quoteOperationTool.id",
+ },
+ {
+ $ref: "#/parameters/rowFilter.quoteOperationTool.operationId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.quoteOperationTool.toolId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.quoteOperationTool.quantity",
+ },
+ {
+ $ref: "#/parameters/rowFilter.quoteOperationTool.companyId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.quoteOperationTool.createdAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.quoteOperationTool.createdBy",
+ },
+ {
+ $ref: "#/parameters/rowFilter.quoteOperationTool.updatedAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.quoteOperationTool.updatedBy",
+ },
+ {
+ $ref: "#/parameters/preferReturn",
+ },
+ ],
+ responses: {
+ "204": {
+ description: "No Content",
+ },
+ },
+ tags: ["quoteOperationTool"],
+ },
+ patch: {
+ parameters: [
+ {
+ $ref: "#/parameters/rowFilter.quoteOperationTool.id",
+ },
+ {
+ $ref: "#/parameters/rowFilter.quoteOperationTool.operationId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.quoteOperationTool.toolId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.quoteOperationTool.quantity",
+ },
+ {
+ $ref: "#/parameters/rowFilter.quoteOperationTool.companyId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.quoteOperationTool.createdAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.quoteOperationTool.createdBy",
+ },
+ {
+ $ref: "#/parameters/rowFilter.quoteOperationTool.updatedAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.quoteOperationTool.updatedBy",
+ },
+ {
+ $ref: "#/parameters/body.quoteOperationTool",
+ },
+ {
+ $ref: "#/parameters/preferReturn",
+ },
+ ],
+ responses: {
+ "204": {
+ description: "No Content",
+ },
+ },
+ tags: ["quoteOperationTool"],
+ },
+ },
"/supplierContact": {
get: {
parameters: [
@@ -24711,7 +25242,271 @@ export default {
description: "OK",
schema: {
items: {
- $ref: "#/definitions/companyIntegration",
+ $ref: "#/definitions/companyIntegration",
+ },
+ type: "array",
+ },
+ },
+ "206": {
+ description: "Partial Content",
+ },
+ },
+ tags: ["companyIntegration"],
+ },
+ post: {
+ parameters: [
+ {
+ $ref: "#/parameters/body.companyIntegration",
+ },
+ {
+ $ref: "#/parameters/select",
+ },
+ {
+ $ref: "#/parameters/preferPost",
+ },
+ ],
+ responses: {
+ "201": {
+ description: "Created",
+ },
+ },
+ tags: ["companyIntegration"],
+ },
+ delete: {
+ parameters: [
+ {
+ $ref: "#/parameters/rowFilter.companyIntegration.id",
+ },
+ {
+ $ref: "#/parameters/rowFilter.companyIntegration.metadata",
+ },
+ {
+ $ref: "#/parameters/rowFilter.companyIntegration.companyId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.companyIntegration.active",
+ },
+ {
+ $ref: "#/parameters/rowFilter.companyIntegration.updatedAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.companyIntegration.updatedBy",
+ },
+ {
+ $ref: "#/parameters/preferReturn",
+ },
+ ],
+ responses: {
+ "204": {
+ description: "No Content",
+ },
+ },
+ tags: ["companyIntegration"],
+ },
+ patch: {
+ parameters: [
+ {
+ $ref: "#/parameters/rowFilter.companyIntegration.id",
+ },
+ {
+ $ref: "#/parameters/rowFilter.companyIntegration.metadata",
+ },
+ {
+ $ref: "#/parameters/rowFilter.companyIntegration.companyId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.companyIntegration.active",
+ },
+ {
+ $ref: "#/parameters/rowFilter.companyIntegration.updatedAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.companyIntegration.updatedBy",
+ },
+ {
+ $ref: "#/parameters/body.companyIntegration",
+ },
+ {
+ $ref: "#/parameters/preferReturn",
+ },
+ ],
+ responses: {
+ "204": {
+ description: "No Content",
+ },
+ },
+ tags: ["companyIntegration"],
+ },
+ },
+ "/salesRfqLines": {
+ get: {
+ parameters: [
+ {
+ $ref: "#/parameters/rowFilter.salesRfqLines.id",
+ },
+ {
+ $ref: "#/parameters/rowFilter.salesRfqLines.salesRfqId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.salesRfqLines.itemId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.salesRfqLines.description",
+ },
+ {
+ $ref: "#/parameters/rowFilter.salesRfqLines.quantity",
+ },
+ {
+ $ref: "#/parameters/rowFilter.salesRfqLines.unitOfMeasureCode",
+ },
+ {
+ $ref: "#/parameters/rowFilter.salesRfqLines.order",
+ },
+ {
+ $ref: "#/parameters/rowFilter.salesRfqLines.internalNotes",
+ },
+ {
+ $ref: "#/parameters/rowFilter.salesRfqLines.externalNotes",
+ },
+ {
+ $ref: "#/parameters/rowFilter.salesRfqLines.companyId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.salesRfqLines.customFields",
+ },
+ {
+ $ref: "#/parameters/rowFilter.salesRfqLines.createdAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.salesRfqLines.createdBy",
+ },
+ {
+ $ref: "#/parameters/rowFilter.salesRfqLines.updatedAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.salesRfqLines.updatedBy",
+ },
+ {
+ $ref: "#/parameters/rowFilter.salesRfqLines.modelUploadId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.salesRfqLines.customerPartId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.salesRfqLines.customerPartRevision",
+ },
+ {
+ $ref: "#/parameters/rowFilter.salesRfqLines.modelId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.salesRfqLines.autodeskUrn",
+ },
+ {
+ $ref: "#/parameters/rowFilter.salesRfqLines.modelPath",
+ },
+ {
+ $ref: "#/parameters/rowFilter.salesRfqLines.modelName",
+ },
+ {
+ $ref: "#/parameters/rowFilter.salesRfqLines.modelSize",
+ },
+ {
+ $ref: "#/parameters/rowFilter.salesRfqLines.thumbnailPath",
+ },
+ {
+ $ref: "#/parameters/rowFilter.salesRfqLines.itemName",
+ },
+ {
+ $ref: "#/parameters/rowFilter.salesRfqLines.methodType",
+ },
+ {
+ $ref: "#/parameters/rowFilter.salesRfqLines.itemReadableId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.salesRfqLines.itemType",
+ },
+ {
+ $ref: "#/parameters/select",
+ },
+ {
+ $ref: "#/parameters/order",
+ },
+ {
+ $ref: "#/parameters/range",
+ },
+ {
+ $ref: "#/parameters/rangeUnit",
+ },
+ {
+ $ref: "#/parameters/offset",
+ },
+ {
+ $ref: "#/parameters/limit",
+ },
+ {
+ $ref: "#/parameters/preferCount",
+ },
+ ],
+ responses: {
+ "200": {
+ description: "OK",
+ schema: {
+ items: {
+ $ref: "#/definitions/salesRfqLines",
+ },
+ type: "array",
+ },
+ },
+ "206": {
+ description: "Partial Content",
+ },
+ },
+ tags: ["salesRfqLines"],
+ },
+ },
+ "/companySettings": {
+ get: {
+ parameters: [
+ {
+ $ref: "#/parameters/rowFilter.companySettings.id",
+ },
+ {
+ $ref: "#/parameters/rowFilter.companySettings.digitalQuoteEnabled",
+ },
+ {
+ $ref: "#/parameters/rowFilter.companySettings.digitalQuoteNotificationGroup",
+ },
+ {
+ $ref: "#/parameters/rowFilter.companySettings.digitalQuoteIncludesPurchaseOrders",
+ },
+ {
+ $ref: "#/parameters/select",
+ },
+ {
+ $ref: "#/parameters/order",
+ },
+ {
+ $ref: "#/parameters/range",
+ },
+ {
+ $ref: "#/parameters/rangeUnit",
+ },
+ {
+ $ref: "#/parameters/offset",
+ },
+ {
+ $ref: "#/parameters/limit",
+ },
+ {
+ $ref: "#/parameters/preferCount",
+ },
+ ],
+ responses: {
+ "200": {
+ description: "OK",
+ schema: {
+ items: {
+ $ref: "#/definitions/companySettings",
},
type: "array",
},
@@ -24720,12 +25515,12 @@ export default {
description: "Partial Content",
},
},
- tags: ["companyIntegration"],
+ tags: ["companySettings"],
},
post: {
parameters: [
{
- $ref: "#/parameters/body.companyIntegration",
+ $ref: "#/parameters/body.companySettings",
},
{
$ref: "#/parameters/select",
@@ -24739,27 +25534,21 @@ export default {
description: "Created",
},
},
- tags: ["companyIntegration"],
+ tags: ["companySettings"],
},
delete: {
parameters: [
{
- $ref: "#/parameters/rowFilter.companyIntegration.id",
+ $ref: "#/parameters/rowFilter.companySettings.id",
},
{
- $ref: "#/parameters/rowFilter.companyIntegration.metadata",
+ $ref: "#/parameters/rowFilter.companySettings.digitalQuoteEnabled",
},
{
- $ref: "#/parameters/rowFilter.companyIntegration.companyId",
+ $ref: "#/parameters/rowFilter.companySettings.digitalQuoteNotificationGroup",
},
{
- $ref: "#/parameters/rowFilter.companyIntegration.active",
- },
- {
- $ref: "#/parameters/rowFilter.companyIntegration.updatedAt",
- },
- {
- $ref: "#/parameters/rowFilter.companyIntegration.updatedBy",
+ $ref: "#/parameters/rowFilter.companySettings.digitalQuoteIncludesPurchaseOrders",
},
{
$ref: "#/parameters/preferReturn",
@@ -24770,30 +25559,24 @@ export default {
description: "No Content",
},
},
- tags: ["companyIntegration"],
+ tags: ["companySettings"],
},
patch: {
parameters: [
{
- $ref: "#/parameters/rowFilter.companyIntegration.id",
- },
- {
- $ref: "#/parameters/rowFilter.companyIntegration.metadata",
+ $ref: "#/parameters/rowFilter.companySettings.id",
},
{
- $ref: "#/parameters/rowFilter.companyIntegration.companyId",
+ $ref: "#/parameters/rowFilter.companySettings.digitalQuoteEnabled",
},
{
- $ref: "#/parameters/rowFilter.companyIntegration.active",
+ $ref: "#/parameters/rowFilter.companySettings.digitalQuoteNotificationGroup",
},
{
- $ref: "#/parameters/rowFilter.companyIntegration.updatedAt",
+ $ref: "#/parameters/rowFilter.companySettings.digitalQuoteIncludesPurchaseOrders",
},
{
- $ref: "#/parameters/rowFilter.companyIntegration.updatedBy",
- },
- {
- $ref: "#/parameters/body.companyIntegration",
+ $ref: "#/parameters/body.companySettings",
},
{
$ref: "#/parameters/preferReturn",
@@ -24804,133 +25587,7 @@ export default {
description: "No Content",
},
},
- tags: ["companyIntegration"],
- },
- },
- "/salesRfqLines": {
- get: {
- parameters: [
- {
- $ref: "#/parameters/rowFilter.salesRfqLines.id",
- },
- {
- $ref: "#/parameters/rowFilter.salesRfqLines.salesRfqId",
- },
- {
- $ref: "#/parameters/rowFilter.salesRfqLines.itemId",
- },
- {
- $ref: "#/parameters/rowFilter.salesRfqLines.description",
- },
- {
- $ref: "#/parameters/rowFilter.salesRfqLines.quantity",
- },
- {
- $ref: "#/parameters/rowFilter.salesRfqLines.unitOfMeasureCode",
- },
- {
- $ref: "#/parameters/rowFilter.salesRfqLines.order",
- },
- {
- $ref: "#/parameters/rowFilter.salesRfqLines.internalNotes",
- },
- {
- $ref: "#/parameters/rowFilter.salesRfqLines.externalNotes",
- },
- {
- $ref: "#/parameters/rowFilter.salesRfqLines.companyId",
- },
- {
- $ref: "#/parameters/rowFilter.salesRfqLines.customFields",
- },
- {
- $ref: "#/parameters/rowFilter.salesRfqLines.createdAt",
- },
- {
- $ref: "#/parameters/rowFilter.salesRfqLines.createdBy",
- },
- {
- $ref: "#/parameters/rowFilter.salesRfqLines.updatedAt",
- },
- {
- $ref: "#/parameters/rowFilter.salesRfqLines.updatedBy",
- },
- {
- $ref: "#/parameters/rowFilter.salesRfqLines.modelUploadId",
- },
- {
- $ref: "#/parameters/rowFilter.salesRfqLines.customerPartId",
- },
- {
- $ref: "#/parameters/rowFilter.salesRfqLines.customerPartRevision",
- },
- {
- $ref: "#/parameters/rowFilter.salesRfqLines.modelId",
- },
- {
- $ref: "#/parameters/rowFilter.salesRfqLines.autodeskUrn",
- },
- {
- $ref: "#/parameters/rowFilter.salesRfqLines.modelPath",
- },
- {
- $ref: "#/parameters/rowFilter.salesRfqLines.modelName",
- },
- {
- $ref: "#/parameters/rowFilter.salesRfqLines.modelSize",
- },
- {
- $ref: "#/parameters/rowFilter.salesRfqLines.thumbnailPath",
- },
- {
- $ref: "#/parameters/rowFilter.salesRfqLines.itemName",
- },
- {
- $ref: "#/parameters/rowFilter.salesRfqLines.methodType",
- },
- {
- $ref: "#/parameters/rowFilter.salesRfqLines.itemReadableId",
- },
- {
- $ref: "#/parameters/rowFilter.salesRfqLines.itemType",
- },
- {
- $ref: "#/parameters/select",
- },
- {
- $ref: "#/parameters/order",
- },
- {
- $ref: "#/parameters/range",
- },
- {
- $ref: "#/parameters/rangeUnit",
- },
- {
- $ref: "#/parameters/offset",
- },
- {
- $ref: "#/parameters/limit",
- },
- {
- $ref: "#/parameters/preferCount",
- },
- ],
- responses: {
- "200": {
- description: "OK",
- schema: {
- items: {
- $ref: "#/definitions/salesRfqLines",
- },
- type: "array",
- },
- },
- "206": {
- description: "Partial Content",
- },
- },
- tags: ["salesRfqLines"],
+ tags: ["companySettings"],
},
},
"/externalLinkMessage": {
@@ -26208,6 +26865,9 @@ export default {
{
$ref: "#/parameters/rowFilter.employeeAbility.trainingCompleted",
},
+ {
+ $ref: "#/parameters/rowFilter.employeeAbility.companyId",
+ },
{
$ref: "#/parameters/select",
},
@@ -26288,6 +26948,9 @@ export default {
{
$ref: "#/parameters/rowFilter.employeeAbility.trainingCompleted",
},
+ {
+ $ref: "#/parameters/rowFilter.employeeAbility.companyId",
+ },
{
$ref: "#/parameters/preferReturn",
},
@@ -26322,6 +26985,9 @@ export default {
{
$ref: "#/parameters/rowFilter.employeeAbility.trainingCompleted",
},
+ {
+ $ref: "#/parameters/rowFilter.employeeAbility.companyId",
+ },
{
$ref: "#/parameters/body.employeeAbility",
},
@@ -29292,6 +29958,9 @@ export default {
{
$ref: "#/parameters/rowFilter.materials.unitOfMeasureCode",
},
+ {
+ $ref: "#/parameters/rowFilter.materials.notes",
+ },
{
$ref: "#/parameters/rowFilter.materials.id",
},
@@ -31227,6 +31896,9 @@ export default {
{
$ref: "#/parameters/rowFilter.tools.unitOfMeasureCode",
},
+ {
+ $ref: "#/parameters/rowFilter.tools.notes",
+ },
{
$ref: "#/parameters/rowFilter.tools.id",
},
@@ -33468,6 +34140,9 @@ export default {
{
$ref: "#/parameters/rowFilter.productionEvent.updatedBy",
},
+ {
+ $ref: "#/parameters/rowFilter.productionEvent.notes",
+ },
{
$ref: "#/parameters/select",
},
@@ -33566,6 +34241,9 @@ export default {
{
$ref: "#/parameters/rowFilter.productionEvent.updatedBy",
},
+ {
+ $ref: "#/parameters/rowFilter.productionEvent.notes",
+ },
{
$ref: "#/parameters/preferReturn",
},
@@ -33618,6 +34296,9 @@ export default {
{
$ref: "#/parameters/rowFilter.productionEvent.updatedBy",
},
+ {
+ $ref: "#/parameters/rowFilter.productionEvent.notes",
+ },
{
$ref: "#/parameters/body.productionEvent",
},
@@ -37877,6 +38558,102 @@ export default {
tags: ["(rpc) create_rfq_from_model_v1"],
},
},
+ "/rpc/create_rfq_from_models_v1": {
+ get: {
+ parameters: [
+ {
+ format: "text",
+ in: "query",
+ name: "company_id",
+ required: true,
+ type: "string",
+ },
+ {
+ format: "text",
+ in: "query",
+ name: "email",
+ required: true,
+ type: "string",
+ },
+ {
+ format: "text",
+ in: "query",
+ name: "sequence_number",
+ required: true,
+ type: "string",
+ },
+ {
+ format: "json[]",
+ in: "query",
+ name: "model_data",
+ required: true,
+ type: "string",
+ },
+ ],
+ produces: [
+ "application/json",
+ "application/vnd.pgrst.object+json;nulls=stripped",
+ "application/vnd.pgrst.object+json",
+ ],
+ responses: {
+ "200": {
+ description: "OK",
+ },
+ },
+ tags: ["(rpc) create_rfq_from_models_v1"],
+ },
+ post: {
+ parameters: [
+ {
+ in: "body",
+ name: "args",
+ required: true,
+ schema: {
+ properties: {
+ company_id: {
+ format: "text",
+ type: "string",
+ },
+ email: {
+ format: "text",
+ type: "string",
+ },
+ model_data: {
+ format: "json[]",
+ items: {},
+ type: "array",
+ },
+ sequence_number: {
+ format: "text",
+ type: "string",
+ },
+ },
+ required: [
+ "company_id",
+ "email",
+ "sequence_number",
+ "model_data",
+ ],
+ type: "object",
+ },
+ },
+ {
+ $ref: "#/parameters/preferParams",
+ },
+ ],
+ produces: [
+ "application/json",
+ "application/vnd.pgrst.object+json;nulls=stripped",
+ "application/vnd.pgrst.object+json",
+ ],
+ responses: {
+ "200": {
+ description: "OK",
+ },
+ },
+ tags: ["(rpc) create_rfq_from_models_v1"],
+ },
+ },
"/rpc/get_item_quantities": {
get: {
parameters: [
@@ -39291,6 +40068,13 @@ export default {
format: "text",
type: "string",
},
+ tags: {
+ format: "text[]",
+ items: {
+ type: "string",
+ },
+ type: "array",
+ },
locationName: {
format: "text",
type: "string",
@@ -39319,6 +40103,10 @@ export default {
format: "text",
type: "string",
},
+ shippingCost: {
+ format: "numeric",
+ type: "number",
+ },
},
type: "object",
},
@@ -39525,8 +40313,6 @@ export default {
type: "string",
},
itemId: {
- description:
- "Note:\nThis is a Foreign Key to `item.id`.<fk table='item' column='id'/>",
format: "text",
type: "string",
},
@@ -39669,6 +40455,72 @@ export default {
},
type: "object",
},
+ methodOperationTool: {
+ required: [
+ "id",
+ "operationId",
+ "toolId",
+ "quantity",
+ "companyId",
+ "createdAt",
+ "createdBy",
+ "updatedAt",
+ ],
+ properties: {
+ id: {
+ default: "public.xid()",
+ description: "Note:\nThis is a Primary Key.<pk/>",
+ format: "text",
+ type: "string",
+ },
+ operationId: {
+ description:
+ "Note:\nThis is a Foreign Key to `methodOperation.id`.<fk table='methodOperation' column='id'/>",
+ format: "text",
+ type: "string",
+ },
+ toolId: {
+ description:
+ "Note:\nThis is a Foreign Key to `tool.itemId`.<fk table='tool' column='itemId'/>",
+ format: "text",
+ type: "string",
+ },
+ quantity: {
+ default: 1,
+ format: "integer",
+ type: "integer",
+ },
+ companyId: {
+ description:
+ "Note:\nThis is a Foreign Key to `company.id`.<fk table='company' column='id'/>",
+ format: "text",
+ type: "string",
+ },
+ createdAt: {
+ default: "now()",
+ format: "timestamp with time zone",
+ type: "string",
+ },
+ createdBy: {
+ description:
+ "Note:\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",
+ format: "text",
+ type: "string",
+ },
+ updatedAt: {
+ default: "now()",
+ format: "timestamp with time zone",
+ type: "string",
+ },
+ updatedBy: {
+ description:
+ "Note:\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",
+ format: "text",
+ type: "string",
+ },
+ },
+ type: "object",
+ },
currencyCode: {
required: ["code", "name"],
properties: {
@@ -41031,6 +41883,9 @@ export default {
format: "text",
type: "string",
},
+ notes: {
+ format: "jsonb",
+ },
},
type: "object",
},
@@ -42318,10 +43173,6 @@ export default {
format: "text",
type: "string",
},
- digitalQuoteEnabled: {
- format: "boolean",
- type: "boolean",
- },
logoDarkIcon: {
format: "text",
type: "string",
@@ -42338,13 +43189,6 @@ export default {
format: "text",
type: "string",
},
- digitalQuoteNotificationGroup: {
- format: "text[]",
- items: {
- type: "string",
- },
- type: "array",
- },
userId: {
description:
"Note:\nThis is a Primary Key.<pk/>\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",
@@ -42661,13 +43505,7 @@ export default {
type: "object",
},
company: {
- required: [
- "id",
- "name",
- "baseCurrencyCode",
- "digitalQuoteEnabled",
- "digitalQuoteNotificationGroup",
- ],
+ required: ["id", "name", "baseCurrencyCode"],
properties: {
id: {
default: "public.xid()",
@@ -42735,11 +43573,6 @@ export default {
format: "text",
type: "string",
},
- digitalQuoteEnabled: {
- default: false,
- format: "boolean",
- type: "boolean",
- },
logoDarkIcon: {
format: "text",
type: "string",
@@ -42756,12 +43589,71 @@ export default {
format: "text",
type: "string",
},
- digitalQuoteNotificationGroup: {
- format: "text[]",
- items: {
- type: "string",
- },
- type: "array",
+ },
+ type: "object",
+ },
+ jobOperationTool: {
+ required: [
+ "id",
+ "operationId",
+ "toolId",
+ "quantity",
+ "companyId",
+ "createdAt",
+ "createdBy",
+ "updatedAt",
+ ],
+ properties: {
+ id: {
+ default: "public.xid()",
+ description: "Note:\nThis is a Primary Key.<pk/>",
+ format: "text",
+ type: "string",
+ },
+ operationId: {
+ description:
+ "Note:\nThis is a Foreign Key to `jobOperation.id`.<fk table='jobOperation' column='id'/>",
+ format: "text",
+ type: "string",
+ },
+ toolId: {
+ description:
+ "Note:\nThis is a Foreign Key to `tool.itemId`.<fk table='tool' column='itemId'/>",
+ format: "text",
+ type: "string",
+ },
+ quantity: {
+ default: 1,
+ format: "integer",
+ type: "integer",
+ },
+ companyId: {
+ description:
+ "Note:\nThis is a Foreign Key to `company.id`.<fk table='company' column='id'/>",
+ format: "text",
+ type: "string",
+ },
+ createdAt: {
+ default: "now()",
+ format: "timestamp with time zone",
+ type: "string",
+ },
+ createdBy: {
+ description:
+ "Note:\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",
+ format: "text",
+ type: "string",
+ },
+ updatedAt: {
+ default: "now()",
+ format: "timestamp with time zone",
+ type: "string",
+ },
+ updatedBy: {
+ description:
+ "Note:\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",
+ format: "text",
+ type: "string",
},
},
type: "object",
@@ -43920,6 +44812,11 @@ export default {
format: "text",
type: "string",
},
+ shippingCost: {
+ default: 0,
+ format: "numeric",
+ type: "number",
+ },
},
type: "object",
},
@@ -44503,14 +45400,15 @@ export default {
format: "text",
type: "string",
},
+ notes: {
+ format: "jsonb",
+ },
id: {
description: "Note:\nThis is a Primary Key.<pk/>",
format: "text",
type: "string",
},
itemId: {
- description:
- "Note:\nThis is a Foreign Key to `item.id`.<fk table='item' column='id'/>",
format: "text",
type: "string",
},
@@ -45245,8 +46143,6 @@ export default {
type: "string",
},
itemId: {
- description:
- "Note:\nThis is a Foreign Key to `item.id`.<fk table='item' column='id'/>",
format: "text",
type: "string",
},
@@ -45638,6 +46534,10 @@ export default {
format: "boolean",
type: "boolean",
},
+ shippingCost: {
+ format: "numeric",
+ type: "number",
+ },
locationName: {
format: "text",
type: "string",
@@ -47403,6 +48303,11 @@ export default {
format: "timestamp with time zone",
type: "string",
},
+ shippingCost: {
+ default: 0,
+ format: "numeric",
+ type: "number",
+ },
},
type: "object",
},
@@ -48140,6 +49045,9 @@ export default {
format: "text",
type: "string",
},
+ notes: {
+ format: "jsonb",
+ },
thumbnailPath: {
format: "text",
type: "string",
@@ -48171,8 +49079,6 @@ export default {
type: "string",
},
itemId: {
- description:
- "Note:\nThis is a Foreign Key to `item.id`.<fk table='item' column='id'/>",
format: "text",
type: "string",
},
@@ -49025,6 +49931,72 @@ export default {
},
type: "object",
},
+ quoteOperationTool: {
+ required: [
+ "id",
+ "operationId",
+ "toolId",
+ "quantity",
+ "companyId",
+ "createdAt",
+ "createdBy",
+ "updatedAt",
+ ],
+ properties: {
+ id: {
+ default: "public.xid()",
+ description: "Note:\nThis is a Primary Key.<pk/>",
+ format: "text",
+ type: "string",
+ },
+ operationId: {
+ description:
+ "Note:\nThis is a Foreign Key to `quoteOperation.id`.<fk table='quoteOperation' column='id'/>",
+ format: "text",
+ type: "string",
+ },
+ toolId: {
+ description:
+ "Note:\nThis is a Foreign Key to `tool.itemId`.<fk table='tool' column='itemId'/>",
+ format: "text",
+ type: "string",
+ },
+ quantity: {
+ default: 1,
+ format: "integer",
+ type: "integer",
+ },
+ companyId: {
+ description:
+ "Note:\nThis is a Foreign Key to `company.id`.<fk table='company' column='id'/>",
+ format: "text",
+ type: "string",
+ },
+ createdAt: {
+ default: "now()",
+ format: "timestamp with time zone",
+ type: "string",
+ },
+ createdBy: {
+ description:
+ "Note:\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",
+ format: "text",
+ type: "string",
+ },
+ updatedAt: {
+ default: "now()",
+ format: "timestamp with time zone",
+ type: "string",
+ },
+ updatedBy: {
+ description:
+ "Note:\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",
+ format: "text",
+ type: "string",
+ },
+ },
+ type: "object",
+ },
supplierContact: {
required: ["id", "supplierId", "contactId"],
properties: {
@@ -49915,6 +50887,39 @@ export default {
},
type: "object",
},
+ companySettings: {
+ required: [
+ "id",
+ "digitalQuoteEnabled",
+ "digitalQuoteNotificationGroup",
+ "digitalQuoteIncludesPurchaseOrders",
+ ],
+ properties: {
+ id: {
+ description: "Note:\nThis is a Primary Key.<pk/>",
+ format: "text",
+ type: "string",
+ },
+ digitalQuoteEnabled: {
+ default: false,
+ format: "boolean",
+ type: "boolean",
+ },
+ digitalQuoteNotificationGroup: {
+ format: "text[]",
+ items: {
+ type: "string",
+ },
+ type: "array",
+ },
+ digitalQuoteIncludesPurchaseOrders: {
+ default: true,
+ format: "boolean",
+ type: "boolean",
+ },
+ },
+ type: "object",
+ },
externalLinkMessage: {
required: ["id", "externalLinkId", "message", "createdAt", "companyId"],
properties: {
@@ -50207,8 +51212,6 @@ export default {
type: "string",
},
itemId: {
- description:
- "Note:\nThis is a Foreign Key to `item.id`.<fk table='item' column='id'/>",
format: "text",
type: "string",
},
@@ -50363,7 +51366,14 @@ export default {
type: "object",
},
employeeAbility: {
- required: ["id", "employeeId", "abilityId", "active", "trainingDays"],
+ required: [
+ "id",
+ "employeeId",
+ "abilityId",
+ "active",
+ "trainingDays",
+ "companyId",
+ ],
properties: {
id: {
default: "public.xid()",
@@ -50372,8 +51382,6 @@ export default {
type: "string",
},
employeeId: {
- description:
- "Note:\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",
format: "text",
type: "string",
},
@@ -50402,6 +51410,12 @@ export default {
format: "boolean",
type: "boolean",
},
+ companyId: {
+ description:
+ "Note:\nThis is a Foreign Key to `company.id`.<fk table='company' column='id'/>",
+ format: "text",
+ type: "string",
+ },
},
type: "object",
},
@@ -51487,8 +52501,6 @@ export default {
type: "string",
},
itemId: {
- description:
- "Note:\nThis is a Foreign Key to `item.id`.<fk table='item' column='id'/>",
format: "text",
type: "string",
},
@@ -51636,14 +52648,15 @@ export default {
format: "text",
type: "string",
},
+ notes: {
+ format: "jsonb",
+ },
id: {
description: "Note:\nThis is a Primary Key.<pk/>",
format: "text",
type: "string",
},
itemId: {
- description:
- "Note:\nThis is a Foreign Key to `item.id`.<fk table='item' column='id'/>",
format: "text",
type: "string",
},
@@ -52458,14 +53471,15 @@ export default {
format: "text",
type: "string",
},
+ notes: {
+ format: "jsonb",
+ },
id: {
description: "Note:\nThis is a Primary Key.<pk/>",
format: "text",
type: "string",
},
itemId: {
- description:
- "Note:\nThis is a Foreign Key to `item.id`.<fk table='item' column='id'/>",
format: "text",
type: "string",
},
@@ -53896,6 +54910,10 @@ export default {
format: "text",
type: "string",
},
+ notes: {
+ format: "text",
+ type: "string",
+ },
},
type: "object",
},
@@ -56287,6 +57305,13 @@ export default {
in: "query",
type: "string",
},
+ "rowFilter.quotes.tags": {
+ name: "tags",
+ required: false,
+ format: "text[]",
+ in: "query",
+ type: "string",
+ },
"rowFilter.quotes.locationName": {
name: "locationName",
required: false,
@@ -56329,6 +57354,13 @@ export default {
in: "query",
type: "string",
},
+ "rowFilter.quotes.shippingCost": {
+ name: "shippingCost",
+ required: false,
+ format: "numeric",
+ in: "query",
+ type: "string",
+ },
"body.documentExtensions": {
name: "documentExtensions",
description: "documentExtensions",
@@ -56782,6 +57814,78 @@ export default {
in: "query",
type: "string",
},
+ "body.methodOperationTool": {
+ name: "methodOperationTool",
+ description: "methodOperationTool",
+ required: false,
+ in: "body",
+ schema: {
+ $ref: "#/definitions/methodOperationTool",
+ },
+ },
+ "rowFilter.methodOperationTool.id": {
+ name: "id",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.methodOperationTool.operationId": {
+ name: "operationId",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.methodOperationTool.toolId": {
+ name: "toolId",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.methodOperationTool.quantity": {
+ name: "quantity",
+ required: false,
+ format: "integer",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.methodOperationTool.companyId": {
+ name: "companyId",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.methodOperationTool.createdAt": {
+ name: "createdAt",
+ required: false,
+ format: "timestamp with time zone",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.methodOperationTool.createdBy": {
+ name: "createdBy",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.methodOperationTool.updatedAt": {
+ name: "updatedAt",
+ required: false,
+ format: "timestamp with time zone",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.methodOperationTool.updatedBy": {
+ name: "updatedBy",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
"body.currencyCode": {
name: "currencyCode",
description: "currencyCode",
@@ -58514,6 +59618,13 @@ export default {
in: "query",
type: "string",
},
+ "rowFilter.item.notes": {
+ name: "notes",
+ required: false,
+ format: "jsonb",
+ in: "query",
+ type: "string",
+ },
"body.receipt": {
name: "receipt",
description: "receipt",
@@ -60106,13 +61217,6 @@ export default {
in: "query",
type: "string",
},
- "rowFilter.companies.digitalQuoteEnabled": {
- name: "digitalQuoteEnabled",
- required: false,
- format: "boolean",
- in: "query",
- type: "string",
- },
"rowFilter.companies.logoDarkIcon": {
name: "logoDarkIcon",
required: false,
@@ -60141,13 +61245,6 @@ export default {
in: "query",
type: "string",
},
- "rowFilter.companies.digitalQuoteNotificationGroup": {
- name: "digitalQuoteNotificationGroup",
- required: false,
- format: "text[]",
- in: "query",
- type: "string",
- },
"rowFilter.companies.userId": {
name: "userId",
required: false,
@@ -60679,13 +61776,6 @@ export default {
in: "query",
type: "string",
},
- "rowFilter.company.digitalQuoteEnabled": {
- name: "digitalQuoteEnabled",
- required: false,
- format: "boolean",
- in: "query",
- type: "string",
- },
"rowFilter.company.logoDarkIcon": {
name: "logoDarkIcon",
required: false,
@@ -60714,10 +61804,75 @@ export default {
in: "query",
type: "string",
},
- "rowFilter.company.digitalQuoteNotificationGroup": {
- name: "digitalQuoteNotificationGroup",
+ "body.jobOperationTool": {
+ name: "jobOperationTool",
+ description: "jobOperationTool",
required: false,
- format: "text[]",
+ in: "body",
+ schema: {
+ $ref: "#/definitions/jobOperationTool",
+ },
+ },
+ "rowFilter.jobOperationTool.id": {
+ name: "id",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobOperationTool.operationId": {
+ name: "operationId",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobOperationTool.toolId": {
+ name: "toolId",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobOperationTool.quantity": {
+ name: "quantity",
+ required: false,
+ format: "integer",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobOperationTool.companyId": {
+ name: "companyId",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobOperationTool.createdAt": {
+ name: "createdAt",
+ required: false,
+ format: "timestamp with time zone",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobOperationTool.createdBy": {
+ name: "createdBy",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobOperationTool.updatedAt": {
+ name: "updatedAt",
+ required: false,
+ format: "timestamp with time zone",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobOperationTool.updatedBy": {
+ name: "updatedBy",
+ required: false,
+ format: "text",
in: "query",
type: "string",
},
@@ -62203,6 +63358,13 @@ export default {
in: "query",
type: "string",
},
+ "rowFilter.salesOrderShipment.shippingCost": {
+ name: "shippingCost",
+ required: false,
+ format: "numeric",
+ in: "query",
+ type: "string",
+ },
"body.employeeSummary": {
name: "employeeSummary",
description: "employeeSummary",
@@ -62949,6 +64111,13 @@ export default {
in: "query",
type: "string",
},
+ "rowFilter.consumables.notes": {
+ name: "notes",
+ required: false,
+ format: "jsonb",
+ in: "query",
+ type: "string",
+ },
"rowFilter.consumables.id": {
name: "id",
required: false,
@@ -64562,6 +65731,13 @@ export default {
in: "query",
type: "string",
},
+ "rowFilter.salesOrders.shippingCost": {
+ name: "shippingCost",
+ required: false,
+ format: "numeric",
+ in: "query",
+ type: "string",
+ },
"rowFilter.salesOrders.locationName": {
name: "locationName",
required: false,
@@ -66781,6 +67957,13 @@ export default {
in: "query",
type: "string",
},
+ "rowFilter.quoteShipment.shippingCost": {
+ name: "shippingCost",
+ required: false,
+ format: "numeric",
+ in: "query",
+ type: "string",
+ },
"body.modelUpload": {
name: "modelUpload",
description: "modelUpload",
@@ -67774,6 +68957,13 @@ export default {
in: "query",
type: "string",
},
+ "rowFilter.parts.notes": {
+ name: "notes",
+ required: false,
+ format: "jsonb",
+ in: "query",
+ type: "string",
+ },
"rowFilter.parts.thumbnailPath": {
name: "thumbnailPath",
required: false,
@@ -68935,6 +70125,78 @@ export default {
in: "query",
type: "string",
},
+ "body.quoteOperationTool": {
+ name: "quoteOperationTool",
+ description: "quoteOperationTool",
+ required: false,
+ in: "body",
+ schema: {
+ $ref: "#/definitions/quoteOperationTool",
+ },
+ },
+ "rowFilter.quoteOperationTool.id": {
+ name: "id",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.quoteOperationTool.operationId": {
+ name: "operationId",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.quoteOperationTool.toolId": {
+ name: "toolId",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.quoteOperationTool.quantity": {
+ name: "quantity",
+ required: false,
+ format: "integer",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.quoteOperationTool.companyId": {
+ name: "companyId",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.quoteOperationTool.createdAt": {
+ name: "createdAt",
+ required: false,
+ format: "timestamp with time zone",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.quoteOperationTool.createdBy": {
+ name: "createdBy",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.quoteOperationTool.updatedAt": {
+ name: "updatedAt",
+ required: false,
+ format: "timestamp with time zone",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.quoteOperationTool.updatedBy": {
+ name: "updatedBy",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
"body.supplierContact": {
name: "supplierContact",
description: "supplierContact",
@@ -70135,6 +71397,43 @@ export default {
in: "query",
type: "string",
},
+ "body.companySettings": {
+ name: "companySettings",
+ description: "companySettings",
+ required: false,
+ in: "body",
+ schema: {
+ $ref: "#/definitions/companySettings",
+ },
+ },
+ "rowFilter.companySettings.id": {
+ name: "id",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.companySettings.digitalQuoteEnabled": {
+ name: "digitalQuoteEnabled",
+ required: false,
+ format: "boolean",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.companySettings.digitalQuoteNotificationGroup": {
+ name: "digitalQuoteNotificationGroup",
+ required: false,
+ format: "text[]",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.companySettings.digitalQuoteIncludesPurchaseOrders": {
+ name: "digitalQuoteIncludesPurchaseOrders",
+ required: false,
+ format: "boolean",
+ in: "query",
+ type: "string",
+ },
"body.externalLinkMessage": {
name: "externalLinkMessage",
description: "externalLinkMessage",
@@ -70790,6 +72089,13 @@ export default {
in: "query",
type: "string",
},
+ "rowFilter.employeeAbility.companyId": {
+ name: "companyId",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
"body.quoteOperation": {
name: "quoteOperation",
description: "quoteOperation",
@@ -72357,6 +73663,13 @@ export default {
in: "query",
type: "string",
},
+ "rowFilter.materials.notes": {
+ name: "notes",
+ required: false,
+ format: "jsonb",
+ in: "query",
+ type: "string",
+ },
"rowFilter.materials.id": {
name: "id",
required: false,
@@ -73424,6 +74737,13 @@ export default {
in: "query",
type: "string",
},
+ "rowFilter.tools.notes": {
+ name: "notes",
+ required: false,
+ format: "jsonb",
+ in: "query",
+ type: "string",
+ },
"rowFilter.tools.id": {
name: "id",
required: false,
@@ -75349,6 +76669,13 @@ export default {
in: "query",
type: "string",
},
+ "rowFilter.productionEvent.notes": {
+ name: "notes",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
"body.accounts": {
name: "accounts",
description: "accounts",
diff --git a/packages/database/src/types.ts b/packages/database/src/types.ts
index 5838995b13..801244c852 100644
--- a/packages/database/src/types.ts
+++ b/packages/database/src/types.ts
@@ -4748,6 +4748,7 @@ export type Database = {
Row: {
abilityId: string
active: boolean
+ companyId: string
employeeId: string
id: string
lastTrainingDate: string | null
@@ -4757,6 +4758,7 @@ export type Database = {
Insert: {
abilityId: string
active?: boolean
+ companyId: string
employeeId: string
id?: string
lastTrainingDate?: string | null
@@ -4766,6 +4768,7 @@ export type Database = {
Update: {
abilityId?: string
active?: boolean
+ companyId?: string
employeeId?: string
id?: string
lastTrainingDate?: string | null
@@ -4781,39 +4784,67 @@ export type Database = {
referencedColumns: ["id"]
},
{
- foreignKeyName: "employeeAbilities_employeeId_fkey"
- columns: ["employeeId"]
+ foreignKeyName: "employeeAbilities_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "employees"
+ referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "employeeAbilities_employeeId_fkey"
- columns: ["employeeId"]
+ foreignKeyName: "employeeAbilities_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
+ referencedRelation: "company"
referencedColumns: ["id"]
},
+ {
+ foreignKeyName: "employeeAbilities_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "employeeAbilities_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
{
foreignKeyName: "employeeAbilities_employeeId_fkey"
- columns: ["employeeId"]
+ columns: ["employeeId", "companyId"]
isOneToOne: false
- referencedRelation: "employeeSummary"
+ referencedRelation: "employee"
+ referencedColumns: ["id", "companyId"]
+ },
+ {
+ foreignKeyName: "employeeAbility_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "employeeAbilities_employeeId_fkey"
- columns: ["employeeId"]
+ foreignKeyName: "employeeAbility_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "user"
+ referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "employeeAbilities_employeeId_fkey"
- columns: ["employeeId"]
+ foreignKeyName: "employeeAbility_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "employeeAbility_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
},
]
}
@@ -28570,14 +28601,14 @@ export type Database = {
Relationships: [
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["paymentCountryCode"]
+ columns: ["customerCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["alpha2"]
},
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["customerCountryCode"]
+ columns: ["paymentCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["alpha2"]
diff --git a/packages/database/supabase/functions/lib/types.ts b/packages/database/supabase/functions/lib/types.ts
index 5838995b13..801244c852 100644
--- a/packages/database/supabase/functions/lib/types.ts
+++ b/packages/database/supabase/functions/lib/types.ts
@@ -4748,6 +4748,7 @@ export type Database = {
Row: {
abilityId: string
active: boolean
+ companyId: string
employeeId: string
id: string
lastTrainingDate: string | null
@@ -4757,6 +4758,7 @@ export type Database = {
Insert: {
abilityId: string
active?: boolean
+ companyId: string
employeeId: string
id?: string
lastTrainingDate?: string | null
@@ -4766,6 +4768,7 @@ export type Database = {
Update: {
abilityId?: string
active?: boolean
+ companyId?: string
employeeId?: string
id?: string
lastTrainingDate?: string | null
@@ -4781,39 +4784,67 @@ export type Database = {
referencedColumns: ["id"]
},
{
- foreignKeyName: "employeeAbilities_employeeId_fkey"
- columns: ["employeeId"]
+ foreignKeyName: "employeeAbilities_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "employees"
+ referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "employeeAbilities_employeeId_fkey"
- columns: ["employeeId"]
+ foreignKeyName: "employeeAbilities_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
+ referencedRelation: "company"
referencedColumns: ["id"]
},
+ {
+ foreignKeyName: "employeeAbilities_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "employeeAbilities_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
{
foreignKeyName: "employeeAbilities_employeeId_fkey"
- columns: ["employeeId"]
+ columns: ["employeeId", "companyId"]
isOneToOne: false
- referencedRelation: "employeeSummary"
+ referencedRelation: "employee"
+ referencedColumns: ["id", "companyId"]
+ },
+ {
+ foreignKeyName: "employeeAbility_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "employeeAbilities_employeeId_fkey"
- columns: ["employeeId"]
+ foreignKeyName: "employeeAbility_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "user"
+ referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "employeeAbilities_employeeId_fkey"
- columns: ["employeeId"]
+ foreignKeyName: "employeeAbility_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "employeeAbility_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
},
]
}
@@ -28570,14 +28601,14 @@ export type Database = {
Relationships: [
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["paymentCountryCode"]
+ columns: ["customerCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["alpha2"]
},
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["customerCountryCode"]
+ columns: ["paymentCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["alpha2"]
diff --git a/packages/database/supabase/migrations/20241130191054_employee-ability-fk.sql b/packages/database/supabase/migrations/20241130191054_employee-ability-fk.sql
new file mode 100644
index 0000000000..0d7b0f35d0
--- /dev/null
+++ b/packages/database/supabase/migrations/20241130191054_employee-ability-fk.sql
@@ -0,0 +1,48 @@
+DROP TABLE "employeeAbility";
+CREATE TABLE "employeeAbility" (
+ "id" TEXT NOT NULL DEFAULT xid(),
+ "employeeId" TEXT NOT NULL,
+ "abilityId" TEXT NOT NULL,
+ "active" BOOLEAN NOT NULL DEFAULT true,
+ "lastTrainingDate" DATE,
+ "trainingDays" NUMERIC NOT NULL DEFAULT 0,
+ "trainingCompleted" BOOLEAN DEFAULT false,
+ "companyId" TEXT NOT NULL REFERENCES "company"("id") ON DELETE CASCADE ON UPDATE CASCADE,
+
+ CONSTRAINT "employeeAbilities_pkey" PRIMARY KEY ("id"),
+ CONSTRAINT "employeeAbilities_employeeId_fkey" FOREIGN KEY ("employeeId", "companyId") REFERENCES "employee"("id", "companyId") ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT "employeeAbilities_abilityId_fkey" FOREIGN KEY ("abilityId") REFERENCES "ability"("id") ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT "employeeAbilities_companyId_fkey" FOREIGN KEY ("companyId") REFERENCES "company"("id") ON DELETE CASCADE ON UPDATE CASCADE,
+
+ CONSTRAINT uq_employeeAbility_employeeId_abilityId UNIQUE ( "employeeId", "abilityId")
+);
+
+ALTER TABLE "employeeAbility" ENABLE ROW LEVEL SECURITY;
+
+CREATE POLICY "Employees with resources_view can view employeeAbilities" ON "employeeAbility"
+ FOR SELECT
+ USING (
+ has_role('employee', "companyId") AND
+ has_company_permission('resources_view', "companyId")
+ );
+
+CREATE POLICY "Employees with resources_create can insert employeeAbilities" ON "employeeAbility"
+ FOR INSERT
+ WITH CHECK (
+ has_role('employee', "companyId") AND
+ has_company_permission('resources_create', "companyId")
+);
+
+CREATE POLICY "Employees with resources_update can update employeeAbilities" ON "employeeAbility"
+ FOR UPDATE
+ USING (
+ has_role('employee', "companyId") AND
+ has_company_permission('resources_update', "companyId")
+ );
+
+CREATE POLICY "Employees with resources_delete can delete employeeAbilities" ON "employeeAbility"
+ FOR DELETE
+ USING (
+ has_role('employee', "companyId") AND
+ has_company_permission('resources_delete', "companyId")
+ );