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.

feat: add table for stock transfers

Brad Barbin5eb75df72fe7
diff --git a/apps/erp/app/modules/inventory/inventory.models.ts b/apps/erp/app/modules/inventory/inventory.models.ts
index f3b884d176..acad751776 100644
--- a/apps/erp/app/modules/inventory/inventory.models.ts
+++ b/apps/erp/app/modules/inventory/inventory.models.ts
@@ -268,31 +268,33 @@ export const warehouseTransferLineValidator = z
path: ["toLocationId"],
});
-export const pickListStatusType = [
+export const stockTransferStatusType = [
"Draft",
"Released",
"In Progress",
"Completed",
] as const;
-export const pickListValidator = z.object({
+export const stockTransferValidator = z.object({
id: zfd.text(z.string().optional()),
locationId: z.string().min(1, { message: "Location is required" }),
- status: z.enum(pickListStatusType).optional(),
+ status: z.enum(stockTransferStatusType).optional(),
createdDate: zfd.text(z.string().optional()),
completedDate: zfd.text(z.string().optional()),
});
-export const pickListLineValidator = z.object({
+export const stockTransferLineValidator = z.object({
id: zfd.text(z.string().optional()),
- pickListId: z.string().min(1, { message: "Pick list is required" }),
+ stockTransferId: z.string().min(1, { message: "Pick list is required" }),
jobId: zfd.text(z.string().optional()),
jobMaterialId: zfd.text(z.string().optional()),
itemId: z.string().min(1, { message: "Item is required" }),
fromShelfId: zfd.text(z.string().optional()),
toShelfId: zfd.text(z.string().optional()),
quantity: zfd.numeric(
- z.number().min(0, { message: "Quantity must be greater than or equal to 0" })
+ z
+ .number()
+ .min(0, { message: "Quantity must be greater than or equal to 0" })
),
pickedQuantity: zfd.numeric(z.number().min(0).optional()),
});
diff --git a/apps/erp/app/modules/inventory/inventory.service.ts b/apps/erp/app/modules/inventory/inventory.service.ts
index b3f9a5169c..30ca0bf546 100644
--- a/apps/erp/app/modules/inventory/inventory.service.ts
+++ b/apps/erp/app/modules/inventory/inventory.service.ts
@@ -235,7 +235,7 @@ export async function getKanban(
return client.from("kanbans").select("*").eq("id", kanbanId).single();
}
-export async function getPickLists(
+export async function getStockTransfers(
client: SupabaseClient<Database>,
companyId: string,
args: GenericQueryFilters & {
@@ -243,18 +243,18 @@ export async function getPickLists(
}
) {
let query = client
- .from("pickList")
+ .from("stockTransfer")
.select("*", {
count: "exact",
})
.eq("companyId", companyId);
if (args.search) {
- query = query.ilike("pickListId", `%${args.search}%`);
+ query = query.ilike("stockTransferId", `%${args.search}%`);
}
query = setGenericQueryFilters(query, args, [
- { column: "shipmentId", ascending: false },
+ { column: "stockTransferId", ascending: false },
]);
return query;
}
diff --git a/apps/erp/app/modules/inventory/types.ts b/apps/erp/app/modules/inventory/types.ts
index 1c8b61c413..113218fae3 100644
--- a/apps/erp/app/modules/inventory/types.ts
+++ b/apps/erp/app/modules/inventory/types.ts
@@ -4,7 +4,6 @@ import type {
getInventoryItems,
getItemLedgerPage,
getKanbans,
- getPickLists,
getReceiptLines,
getReceiptTracking,
getReceipts,
@@ -12,6 +11,7 @@ import type {
getShipmentTracking,
getShipments,
getShippingMethods,
+ getStockTransfers,
getTrackedEntities,
getWarehouseTransferLines,
getWarehouseTransfers,
@@ -41,8 +41,8 @@ export type Kanban = NonNullable<
Awaited<ReturnType<typeof getKanbans>>["data"]
>[number];
-export type PickList = NonNullable<
- Awaited<ReturnType<typeof getPickLists>>["data"]
+export type StockTransfer = NonNullable<
+ Awaited<ReturnType<typeof getStockTransfers>>["data"]
>[number];
export type ReceiptLine = NonNullable<
diff --git a/apps/erp/app/modules/inventory/ui/PickLists/PickListsTable.tsx b/apps/erp/app/modules/inventory/ui/PickLists/PickListsTable.tsx
deleted file mode 100644
index 4ae424696f..0000000000
--- a/apps/erp/app/modules/inventory/ui/PickLists/PickListsTable.tsx
+++ /dev/null
@@ -1,284 +0,0 @@
-import { MenuIcon, MenuItem, useDisclosure } from "@carbon/react";
-import { formatDate } from "@carbon/utils";
-import { useNavigate } from "@remix-run/react";
-import type { ColumnDef } from "@tanstack/react-table";
-import { memo, useCallback, useMemo, useState } from "react";
-import {
- LuBookMarked,
- LuCalendar,
- LuClock,
- LuMapPin,
- LuPencil,
- LuTrash,
- LuUser,
-} from "react-icons/lu";
-import { EmployeeAvatar, Hyperlink, New, Table } from "~/components";
-import { Enumerable } from "~/components/Enumerable";
-import { useLocations } from "~/components/Form/Location";
-import { ConfirmDelete } from "~/components/Modals";
-import { usePermissions, useRealtime, useUrlParams } from "~/hooks";
-import { useCustomColumns } from "~/hooks/useCustomColumns";
-import { usePeople } from "~/stores";
-import { path } from "~/utils/path";
-import { pickListStatusType } from "../../inventory.models";
-import type { PickList } from "../../types";
-import PickListStatus from "./PickListStatus";
-
-type PickListsTableProps = {
- data: PickList[];
- count: number;
-};
-
-const PickListsTable = memo(({ data, count }: PickListsTableProps) => {
- useRealtime("shipment", `id=in.(${data.map((d) => d.id).join(",")})`);
-
- const [params] = useUrlParams();
- const navigate = useNavigate();
- const permissions = usePermissions();
-
- const rows = useMemo(() => data, [data]);
- const [people] = usePeople();
-
- const customColumns = useCustomColumns<PickList>("pickList");
- const locations = useLocations();
-
- const columns = useMemo<ColumnDef<PickList>[]>(() => {
- const result: ColumnDef<(typeof rows)[number]>[] = [
- {
- accessorKey: "pickListId",
- header: "Pick List ID",
- cell: ({ row }) => (
- <Hyperlink to={path.to.pickListDetails(row.original.id!)}>
- {row.original.pickListId}
- </Hyperlink>
- ),
- meta: {
- icon: <LuBookMarked />,
- },
- },
- {
- accessorKey: "locationId",
- header: "Location",
- cell: ({ row }) => (
- <Enumerable
- value={
- locations.find((l) => l.value === row.original.locationId)
- ?.label ?? null
- }
- />
- ),
- meta: {
- filter: {
- type: "static",
- options: locations.map((type) => ({
- value: type.value,
- label: <Enumerable value={type.label} />,
- })),
- },
- icon: <LuMapPin />,
- },
- },
- {
- accessorKey: "status",
- header: "Status",
- cell: (item) => {
- const status = item.getValue<(typeof pickListStatusType)[number]>();
- return <PickListStatus status={status} />;
- },
- meta: {
- filter: {
- type: "static",
- options: pickListStatusType.map((type) => ({
- value: type,
- label: <PickListStatus status={type} />,
- })),
- },
- pluralHeader: "Statuses",
- icon: <LuClock />,
- },
- },
- {
- accessorKey: "assignee",
- header: "Assignee",
- cell: ({ row }) => (
- <EmployeeAvatar employeeId={row.original.assignee} />
- ),
- meta: {
- filter: {
- type: "static",
- options: people.map((employee) => ({
- value: employee.id,
- label: employee.name,
- })),
- },
- icon: <LuUser />,
- },
- },
- {
- accessorKey: "assignee",
- header: "Assignee",
- cell: ({ row }) => (
- <EmployeeAvatar employeeId={row.original.assignee} />
- ),
- meta: {
- filter: {
- type: "static",
- options: people.map((employee) => ({
- value: employee.id,
- label: employee.name,
- })),
- },
- icon: <LuUser />,
- },
- },
- {
- accessorKey: "completedAt",
- header: "Created At",
- cell: (item) => formatDate(item.getValue<string>()),
- meta: {
- icon: <LuCalendar />,
- },
- },
- {
- id: "createdBy",
- header: "Created By",
- cell: ({ row }) => (
- <EmployeeAvatar employeeId={row.original.createdBy} />
- ),
- meta: {
- filter: {
- type: "static",
- options: people.map((employee) => ({
- value: employee.id,
- label: employee.name,
- })),
- },
- icon: <LuUser />,
- },
- },
- {
- accessorKey: "createdAt",
- header: "Created At",
- cell: (item) => formatDate(item.getValue<string>()),
- meta: {
- icon: <LuCalendar />,
- },
- },
- {
- id: "updatedBy",
- header: "Updated By",
- cell: ({ row }) => (
- <EmployeeAvatar employeeId={row.original.updatedBy} />
- ),
- meta: {
- filter: {
- type: "static",
- options: people.map((employee) => ({
- value: employee.id,
- label: employee.name,
- })),
- },
- icon: <LuUser />,
- },
- },
- {
- accessorKey: "updatedAt",
- header: "Updated At",
- cell: (item) => formatDate(item.getValue<string>()),
- meta: {
- icon: <LuCalendar />,
- },
- },
- ];
-
- return [...result, ...customColumns];
- }, [locations, people, customColumns]);
-
- const [selectedPickList, setSelectedPickList] = useState<PickList | null>(
- null
- );
- const deletePickListModal = useDisclosure();
-
- const renderContextMenu = useCallback(
- (row: PickList) => {
- return (
- <>
- <MenuItem
- disabled={!permissions.can("update", "inventory")}
- onClick={() => {
- navigate(
- `${path.to.shipmentDetails(row.id!)}?${params.toString()}`
- );
- }}
- >
- <MenuIcon icon={<LuPencil />} />
- {row.completedAt ? "View Pick List" : "Edit Pick List"}
- </MenuItem>
- <MenuItem
- disabled={
- !permissions.can("delete", "inventory") ||
- !!row.completedAt ||
- row.status === "Completed"
- }
- destructive
- onClick={() => {
- setSelectedPickList(row);
- deletePickListModal.onOpen();
- }}
- >
- <MenuIcon icon={<LuTrash />} />
- Delete Pick List
- </MenuItem>
- </>
- );
- },
- [deletePickListModal, navigate, params, permissions]
- );
-
- return (
- <>
- <Table<(typeof data)[number]>
- data={data}
- columns={columns}
- count={count}
- defaultColumnPinning={{
- left: ["shipmentId"],
- }}
- defaultColumnVisibility={{
- createdAt: false,
- createdBy: false,
- updatedAt: false,
- updatedBy: false,
- }}
- primaryAction={
- permissions.can("create", "inventory") && (
- <New label="PickList" to={path.to.newPickList} />
- )
- }
- renderContextMenu={renderContextMenu}
- title="Pick Lists"
- table="pickList"
- withSavedView
- />
- {selectedPickList && selectedPickList.id && (
- <ConfirmDelete
- action={path.to.deletePickList(selectedPickList.id)}
- isOpen={deletePickListModal.isOpen}
- name={selectedPickList.pickListId!}
- text={`Are you sure you want to delete ${selectedPickList.pickListId!}? This cannot be undone.`}
- onCancel={() => {
- deletePickListModal.onClose();
- setSelectedPickList(null);
- }}
- onSubmit={() => {
- deletePickListModal.onClose();
- setSelectedPickList(null);
- }}
- />
- )}
- </>
- );
-});
-
-PickListsTable.displayName = "PickListsTable";
-export default PickListsTable;
diff --git a/apps/erp/app/modules/inventory/ui/PickLists/PickListStatus.tsx b/apps/erp/app/modules/inventory/ui/StockTransfers/StockTransferStatus.tsx
similarity index 60%
rename from apps/erp/app/modules/inventory/ui/PickLists/PickListStatus.tsx
rename to apps/erp/app/modules/inventory/ui/StockTransfers/StockTransferStatus.tsx
index 060a789124..44f28ff793 100644
--- a/apps/erp/app/modules/inventory/ui/PickLists/PickListStatus.tsx
+++ b/apps/erp/app/modules/inventory/ui/StockTransfers/StockTransferStatus.tsx
@@ -1,13 +1,17 @@
import { Status } from "@carbon/react";
-import type { pickListStatusType } from "~/modules/inventory";
+import type { stockTransferStatusType } from "~/modules/inventory";
-type PickListStatusProps = {
- status?: (typeof pickListStatusType)[number] | null;
+type StockTransferStatusProps = {
+ status?: (typeof stockTransferStatusType)[number] | null;
invoiced?: boolean | null;
voided?: boolean | null;
};
-const PickListStatus = ({ status, invoiced, voided }: PickListStatusProps) => {
+const StockTransferStatus = ({
+ status,
+ invoiced,
+ voided,
+}: StockTransferStatusProps) => {
switch (status) {
case "Draft":
return <Status color="gray">{status}</Status>;
@@ -22,4 +26,4 @@ const PickListStatus = ({ status, invoiced, voided }: PickListStatusProps) => {
}
};
-export default PickListStatus;
+export default StockTransferStatus;
diff --git a/apps/erp/app/modules/inventory/ui/StockTransfers/StockTransfersTable.tsx b/apps/erp/app/modules/inventory/ui/StockTransfers/StockTransfersTable.tsx
new file mode 100644
index 0000000000..d6fd367f4a
--- /dev/null
+++ b/apps/erp/app/modules/inventory/ui/StockTransfers/StockTransfersTable.tsx
@@ -0,0 +1,286 @@
+import { MenuIcon, MenuItem, useDisclosure } from "@carbon/react";
+import { formatDate } from "@carbon/utils";
+import { useNavigate } from "@remix-run/react";
+import type { ColumnDef } from "@tanstack/react-table";
+import { memo, useCallback, useMemo, useState } from "react";
+import {
+ LuBookMarked,
+ LuCalendar,
+ LuClock,
+ LuMapPin,
+ LuPencil,
+ LuTrash,
+ LuUser,
+} from "react-icons/lu";
+import { EmployeeAvatar, Hyperlink, New, Table } from "~/components";
+import { Enumerable } from "~/components/Enumerable";
+import { useLocations } from "~/components/Form/Location";
+import { ConfirmDelete } from "~/components/Modals";
+import { usePermissions, useRealtime, useUrlParams } from "~/hooks";
+import { useCustomColumns } from "~/hooks/useCustomColumns";
+import { usePeople } from "~/stores";
+import { path } from "~/utils/path";
+import { stockTransferStatusType } from "../../inventory.models";
+import type { StockTransfer } from "../../types";
+import StockTransferStatus from "./StockTransferStatus";
+
+type StockTransfersTableProps = {
+ data: StockTransfer[];
+ count: number;
+};
+
+const StockTransfersTable = memo(
+ ({ data, count }: StockTransfersTableProps) => {
+ useRealtime("shipment", `id=in.(${data.map((d) => d.id).join(",")})`);
+
+ const [params] = useUrlParams();
+ const navigate = useNavigate();
+ const permissions = usePermissions();
+
+ const rows = useMemo(() => data, [data]);
+ const [people] = usePeople();
+
+ const customColumns = useCustomColumns<StockTransfer>("stockTransfer");
+ const locations = useLocations();
+
+ const columns = useMemo<ColumnDef<StockTransfer>[]>(() => {
+ const result: ColumnDef<(typeof rows)[number]>[] = [
+ {
+ accessorKey: "stockTransferId",
+ header: "Stock Transfer ID",
+ cell: ({ row }) => (
+ <Hyperlink to={path.to.stockTransferDetails(row.original.id!)}>
+ {row.original.stockTransferId}
+ </Hyperlink>
+ ),
+ meta: {
+ icon: <LuBookMarked />,
+ },
+ },
+ {
+ accessorKey: "locationId",
+ header: "Location",
+ cell: ({ row }) => (
+ <Enumerable
+ value={
+ locations.find((l) => l.value === row.original.locationId)
+ ?.label ?? null
+ }
+ />
+ ),
+ meta: {
+ filter: {
+ type: "static",
+ options: locations.map((type) => ({
+ value: type.value,
+ label: <Enumerable value={type.label} />,
+ })),
+ },
+ icon: <LuMapPin />,
+ },
+ },
+ {
+ accessorKey: "status",
+ header: "Status",
+ cell: (item) => {
+ const status =
+ item.getValue<(typeof stockTransferStatusType)[number]>();
+ return <StockTransferStatus status={status} />;
+ },
+ meta: {
+ filter: {
+ type: "static",
+ options: stockTransferStatusType.map((type) => ({
+ value: type,
+ label: <StockTransferStatus status={type} />,
+ })),
+ },
+ pluralHeader: "Statuses",
+ icon: <LuClock />,
+ },
+ },
+ {
+ accessorKey: "assignee",
+ header: "Assignee",
+ cell: ({ row }) => (
+ <EmployeeAvatar employeeId={row.original.assignee} />
+ ),
+ meta: {
+ filter: {
+ type: "static",
+ options: people.map((employee) => ({
+ value: employee.id,
+ label: employee.name,
+ })),
+ },
+ icon: <LuUser />,
+ },
+ },
+ {
+ accessorKey: "assignee",
+ header: "Assignee",
+ cell: ({ row }) => (
+ <EmployeeAvatar employeeId={row.original.assignee} />
+ ),
+ meta: {
+ filter: {
+ type: "static",
+ options: people.map((employee) => ({
+ value: employee.id,
+ label: employee.name,
+ })),
+ },
+ icon: <LuUser />,
+ },
+ },
+ {
+ accessorKey: "completedAt",
+ header: "Created At",
+ cell: (item) => formatDate(item.getValue<string>()),
+ meta: {
+ icon: <LuCalendar />,
+ },
+ },
+ {
+ id: "createdBy",
+ header: "Created By",
+ cell: ({ row }) => (
+ <EmployeeAvatar employeeId={row.original.createdBy} />
+ ),
+ meta: {
+ filter: {
+ type: "static",
+ options: people.map((employee) => ({
+ value: employee.id,
+ label: employee.name,
+ })),
+ },
+ icon: <LuUser />,
+ },
+ },
+ {
+ accessorKey: "createdAt",
+ header: "Created At",
+ cell: (item) => formatDate(item.getValue<string>()),
+ meta: {
+ icon: <LuCalendar />,
+ },
+ },
+ {
+ id: "updatedBy",
+ header: "Updated By",
+ cell: ({ row }) => (
+ <EmployeeAvatar employeeId={row.original.updatedBy} />
+ ),
+ meta: {
+ filter: {
+ type: "static",
+ options: people.map((employee) => ({
+ value: employee.id,
+ label: employee.name,
+ })),
+ },
+ icon: <LuUser />,
+ },
+ },
+ {
+ accessorKey: "updatedAt",
+ header: "Updated At",
+ cell: (item) => formatDate(item.getValue<string>()),
+ meta: {
+ icon: <LuCalendar />,
+ },
+ },
+ ];
+
+ return [...result, ...customColumns];
+ }, [locations, people, customColumns]);
+
+ const [selectedStockTransfer, setSelectedStockTransfer] =
+ useState<StockTransfer | null>(null);
+ const deleteStockTransferModal = useDisclosure();
+
+ const renderContextMenu = useCallback(
+ (row: StockTransfer) => {
+ return (
+ <>
+ <MenuItem
+ disabled={!permissions.can("update", "inventory")}
+ onClick={() => {
+ navigate(
+ `${path.to.shipmentDetails(row.id!)}?${params.toString()}`
+ );
+ }}
+ >
+ <MenuIcon icon={<LuPencil />} />
+ {row.completedAt ? "View Stock Transfer" : "Edit Stock Transfer"}
+ </MenuItem>
+ <MenuItem
+ disabled={
+ !permissions.can("delete", "inventory") ||
+ !!row.completedAt ||
+ row.status === "Completed"
+ }
+ destructive
+ onClick={() => {
+ setSelectedStockTransfer(row);
+ deleteStockTransferModal.onOpen();
+ }}
+ >
+ <MenuIcon icon={<LuTrash />} />
+ Delete Stock Transfer
+ </MenuItem>
+ </>
+ );
+ },
+ [deleteStockTransferModal, navigate, params, permissions]
+ );
+
+ return (
+ <>
+ <Table<(typeof data)[number]>
+ data={data}
+ columns={columns}
+ count={count}
+ defaultColumnPinning={{
+ left: ["shipmentId"],
+ }}
+ defaultColumnVisibility={{
+ createdAt: false,
+ createdBy: false,
+ updatedAt: false,
+ updatedBy: false,
+ }}
+ primaryAction={
+ permissions.can("create", "inventory") && (
+ <New label="Stock Transfer" to={path.to.newStockTransfer} />
+ )
+ }
+ renderContextMenu={renderContextMenu}
+ title="Stock Transfers"
+ table="stockTransfer"
+ withSavedView
+ />
+ {selectedStockTransfer && selectedStockTransfer.id && (
+ <ConfirmDelete
+ action={path.to.deleteStockTransfer(selectedStockTransfer.id)}
+ isOpen={deleteStockTransferModal.isOpen}
+ name={selectedStockTransfer.stockTransferId!}
+ text={`Are you sure you want to delete ${selectedStockTransfer.stockTransferId!}? This cannot be undone.`}
+ onCancel={() => {
+ deleteStockTransferModal.onClose();
+ setSelectedStockTransfer(null);
+ }}
+ onSubmit={() => {
+ deleteStockTransferModal.onClose();
+ setSelectedStockTransfer(null);
+ }}
+ />
+ )}
+ </>
+ );
+ }
+);
+
+StockTransfersTable.displayName = "StockTransfersTable";
+export default StockTransfersTable;
diff --git a/apps/erp/app/modules/inventory/ui/useInventorySubmodules.tsx b/apps/erp/app/modules/inventory/ui/useInventorySubmodules.tsx
index e84bc1fa1b..6fdb5f9d14 100644
--- a/apps/erp/app/modules/inventory/ui/useInventorySubmodules.tsx
+++ b/apps/erp/app/modules/inventory/ui/useInventorySubmodules.tsx
@@ -17,12 +17,6 @@ const inventoryRoutes: AuthenticatedRouteGroup[] = [
{
name: "Manage",
routes: [
- {
- name: "Pick Lists",
- to: path.to.pickLists,
- icon: <LuListChecks />,
- table: "pickList",
- },
{
name: "Receipts",
to: path.to.receipts,
@@ -35,6 +29,12 @@ const inventoryRoutes: AuthenticatedRouteGroup[] = [
icon: <LuTruck />,
table: "shipment",
},
+ {
+ name: "Stock Transfers",
+ to: path.to.stockTransfers,
+ icon: <LuListChecks />,
+ table: "stockTransfer",
+ },
{
name: "Warehouse Transfers",
to: path.to.warehouseTransfers,
diff --git a/apps/erp/app/modules/items/ui/Item/BillOfMaterial.tsx b/apps/erp/app/modules/items/ui/Item/BillOfMaterial.tsx
index 5ae8651540..c0a8c92e22 100644
--- a/apps/erp/app/modules/items/ui/Item/BillOfMaterial.tsx
+++ b/apps/erp/app/modules/items/ui/Item/BillOfMaterial.tsx
@@ -488,7 +488,7 @@ const BillOfMaterial = ({
isDisabled={isReadOnly}
onClick={onAddItem}
>
- Add Material
+ Add Item
</Button>
{configurable && materials.length > 0 && (
<IconButton
diff --git a/apps/erp/app/modules/production/ui/Jobs/JobBillOfMaterial.tsx b/apps/erp/app/modules/production/ui/Jobs/JobBillOfMaterial.tsx
index 15a51561bb..24ad2eb89c 100644
--- a/apps/erp/app/modules/production/ui/Jobs/JobBillOfMaterial.tsx
+++ b/apps/erp/app/modules/production/ui/Jobs/JobBillOfMaterial.tsx
@@ -570,7 +570,7 @@ const JobBillOfMaterial = ({
isDisabled={isDisabled || !permissions.can("update", "production")}
onClick={onAddItem}
>
- Add Material
+ Add Item
</Button>
</CardAction>
</HStack>
diff --git a/apps/erp/app/modules/production/ui/Jobs/JobMaterialsTable.tsx b/apps/erp/app/modules/production/ui/Jobs/JobMaterialsTable.tsx
index 87c7aa9ec6..5610801e0b 100644
--- a/apps/erp/app/modules/production/ui/Jobs/JobMaterialsTable.tsx
+++ b/apps/erp/app/modules/production/ui/Jobs/JobMaterialsTable.tsx
@@ -42,13 +42,13 @@ import {
import { usePermissions, useRouteData } from "~/hooks";
import { useBom, useItems } from "~/stores";
import {
- addToPickListSession,
- removeFromPickListSession,
+ addToStockTransferSession,
+ removeFromStockTransferSession,
useOrderItems,
- usePickListSession,
- usePickListSessionItemsCount,
+ useStockTransferSession,
+ useStockTransferSessionItemsCount,
useTransferItems,
-} from "~/stores/pick-list-session";
+} from "~/stores/stock-transfer";
import { path } from "~/utils/path";
import type { Job, JobMaterial } from "../../types";
@@ -70,11 +70,11 @@ const JobMaterialsTable = memo(({ data, count }: JobMaterialsTableProps) => {
const [items] = useItems();
const [, setSelectedMaterialId] = useBom();
- const sessionItemsCount = usePickListSessionItemsCount();
- const [session, setPickListSession] = usePickListSession();
+ const sessionItemsCount = useStockTransferSessionItemsCount();
+ const [session, setStockTransferSession] = useStockTransferSession();
useMount(() => {
- // Prepopulate pick list session with all parts that need transferred or ordered
+ // Prepopulate stock transfer session with all parts that need transferred or ordered
const itemsToAdd: Array<{
id: string;
itemReadableId: string;
@@ -142,7 +142,7 @@ const JobMaterialsTable = memo(({ data, count }: JobMaterialsTableProps) => {
});
if (itemsToAdd.length > 0) {
- setPickListSession({ items: itemsToAdd });
+ setStockTransferSession({ items: itemsToAdd });
}
});
@@ -382,9 +382,9 @@ const JobMaterialsTable = memo(({ data, count }: JobMaterialsTableProps) => {
destructive={isInSessionForTransfer}
onClick={() => {
if (isInSessionForTransfer) {
- removeFromPickListSession(row.id!, "transfer");
+ removeFromStockTransferSession(row.id!, "transfer");
} else {
- addToPickListSession({
+ addToStockTransferSession({
id: row.id!,
itemReadableId: row.itemReadableId,
description: row.description,
@@ -401,9 +401,9 @@ const JobMaterialsTable = memo(({ data, count }: JobMaterialsTableProps) => {
destructive={isInSessionForOrder}
onClick={() => {
if (isInSessionForOrder) {
- removeFromPickListSession(row.id!, "order");
+ removeFromStockTransferSession(row.id!, "order");
} else {
- addToPickListSession({
+ addToStockTransferSession({
id: row.id!,
itemReadableId: row.itemReadableId,
description: row.description,
@@ -450,7 +450,7 @@ const JobMaterialsTable = memo(({ data, count }: JobMaterialsTableProps) => {
renderContextMenu={renderContextMenu}
title="Materials"
/>
- <PickListSessionWidget />
+ <StockTransferSessionWidget />
</>
);
});
@@ -459,9 +459,9 @@ JobMaterialsTable.displayName = "JobMaterialsTable";
export default JobMaterialsTable;
-const PickListSessionWidget = () => {
- const [session, setPickListSession] = usePickListSession();
- const sessionItemsCount = usePickListSessionItemsCount();
+const StockTransferSessionWidget = () => {
+ const [session, setStockTransferSession] = useStockTransferSession();
+ const sessionItemsCount = useStockTransferSessionItemsCount();
const orderItems = useOrderItems();
const transferItems = useTransferItems();
@@ -475,11 +475,11 @@ const PickListSessionWidget = () => {
(sessionItem) =>
!(sessionItem.id === itemId && sessionItem.action === action)
);
- setPickListSession({ items: updatedItems });
+ setStockTransferSession({ items: updatedItems });
};
const onClearAll = () => {
- setPickListSession({ items: [] });
+ setStockTransferSession({ items: [] });
};
if (sessionItemsCount === 0) {
@@ -563,7 +563,7 @@ const PickListSessionWidget = () => {
No parts added yet
</p>
<p className="text-xs text-muted-foreground mt-1">
- Start adding parts to your pick list
+ Start adding parts to your stock transfer
</p>
</div>
) : (
diff --git a/apps/erp/app/modules/sales/ui/Quotes/QuoteBillOfMaterial.tsx b/apps/erp/app/modules/sales/ui/Quotes/QuoteBillOfMaterial.tsx
index 1083720887..5dfaee4b7e 100644
--- a/apps/erp/app/modules/sales/ui/Quotes/QuoteBillOfMaterial.tsx
+++ b/apps/erp/app/modules/sales/ui/Quotes/QuoteBillOfMaterial.tsx
@@ -564,7 +564,7 @@ const QuoteBillOfMaterial = ({
isDisabled={isDisabled || !permissions.can("update", "sales")}
onClick={onAddItem}
>
- Add Material
+ Add Item
</Button>
</CardAction>
</HStack>
diff --git a/apps/erp/app/routes/api+/kanban.$id.tsx b/apps/erp/app/routes/api+/kanban.$id.tsx
index d34feb41c3..12ed3c58a8 100644
--- a/apps/erp/app/routes/api+/kanban.$id.tsx
+++ b/apps/erp/app/routes/api+/kanban.$id.tsx
@@ -233,7 +233,6 @@ async function handleKanban({
error: null,
};
} else if (kanban.data.replenishmentSystem === "Buy") {
- // Check for existing purchase order
const existingPurchaseOrder = await client
.from("purchaseOrder")
.select("id")
@@ -244,7 +243,6 @@ async function handleKanban({
let purchaseOrderId = existingPurchaseOrder.data?.id;
- // Create purchase order if it doesn't exist
if (!purchaseOrderId) {
const nextSequence = await getNextSequence(
client,
diff --git a/apps/erp/app/routes/x+/inventory+/pick-lists.tsx b/apps/erp/app/routes/x+/inventory+/stock-transfers.tsx
similarity index 62%
rename from apps/erp/app/routes/x+/inventory+/pick-lists.tsx
rename to apps/erp/app/routes/x+/inventory+/stock-transfers.tsx
index 6b71c06ee2..1e30a09522 100644
--- a/apps/erp/app/routes/x+/inventory+/pick-lists.tsx
+++ b/apps/erp/app/routes/x+/inventory+/stock-transfers.tsx
@@ -5,15 +5,15 @@ import { VStack } from "@carbon/react";
import { Outlet, useLoaderData } from "@remix-run/react";
import type { LoaderFunctionArgs } from "@vercel/remix";
import { json, redirect } from "@vercel/remix";
-import { getPickLists } from "~/modules/inventory";
-import PickListsTable from "~/modules/inventory/ui/PickLists/PickListsTable";
+import { getStockTransfers } from "~/modules/inventory";
+import StockTransfersTable from "~/modules/inventory/ui/StockTransfers/StockTransfersTable";
import type { Handle } from "~/utils/handle";
import { path } from "~/utils/path";
import { getGenericQueryFilters } from "~/utils/query";
export const handle: Handle = {
- breadcrumb: "Pick Lists",
- to: path.to.pickLists,
+ breadcrumb: "Stock Transfers",
+ to: path.to.stockTransfers,
};
export async function loader({ request }: LoaderFunctionArgs) {
@@ -27,8 +27,8 @@ export async function loader({ request }: LoaderFunctionArgs) {
const { limit, offset, sorts, filters } =
getGenericQueryFilters(searchParams);
- const [pickLists] = await Promise.all([
- getPickLists(client, companyId, {
+ const [stockTransfers] = await Promise.all([
+ getStockTransfers(client, companyId, {
search,
limit,
offset,
@@ -37,25 +37,26 @@ export async function loader({ request }: LoaderFunctionArgs) {
}),
]);
- if (pickLists.error) {
+ if (stockTransfers.error) {
+ console.error(stockTransfers.error);
throw redirect(
path.to.authenticatedRoot,
- await flash(request, error(null, "Error loading pickLists"))
+ await flash(request, error(null, "Error loading stock transfers"))
);
}
return json({
- pickLists: pickLists.data ?? [],
- count: pickLists.count ?? 0,
+ stockTransfers: stockTransfers.data ?? [],
+ count: stockTransfers.count ?? 0,
});
}
-export default function PickListsRoute() {
- const { pickLists, count } = useLoaderData<typeof loader>();
+export default function StockTransfersRoute() {
+ const { stockTransfers, count } = useLoaderData<typeof loader>();
return (
<VStack spacing={0} className="h-full">
- <PickListsTable data={pickLists} count={count ?? 0} />
+ <StockTransfersTable data={stockTransfers} count={count ?? 0} />
<Outlet />
</VStack>
);
diff --git a/apps/erp/app/stores/index.ts b/apps/erp/app/stores/index.ts
index 859ce84bda..62071df45c 100644
--- a/apps/erp/app/stores/index.ts
+++ b/apps/erp/app/stores/index.ts
@@ -2,5 +2,5 @@ export * from "./bom";
export * from "./customers";
export * from "./items";
export * from "./people";
-export * from "./pick-list-session";
+export * from "./stock-transfer";
export * from "./suppliers";
diff --git a/apps/erp/app/stores/pick-list-session.ts b/apps/erp/app/stores/stock-transfer.ts
similarity index 56%
rename from apps/erp/app/stores/pick-list-session.ts
rename to apps/erp/app/stores/stock-transfer.ts
index 16a1019b36..76d19f1a87 100644
--- a/apps/erp/app/stores/pick-list-session.ts
+++ b/apps/erp/app/stores/stock-transfer.ts
@@ -2,7 +2,7 @@ import { useStore as useValue } from "@nanostores/react";
import { atom, computed } from "nanostores";
import { useNanoStore } from "~/hooks";
-export type PickListSessionItem = {
+export type StockTransferSessionItem = {
id: string;
itemReadableId: string;
description: string;
@@ -10,11 +10,11 @@ export type PickListSessionItem = {
quantity?: number;
};
-export type PickListSessionState = {
- items: PickListSessionItem[];
+export type StockTransferSessionState = {
+ items: StockTransferSessionItem[];
};
-const $sessionStore = atom<PickListSessionState>({
+const $sessionStore = atom<StockTransferSessionState>({
items: [],
});
@@ -31,25 +31,26 @@ const $transferItems = computed($sessionStore, (session) =>
session.items.filter((item) => item.action === "transfer")
);
-export const usePickListSession = () =>
- useNanoStore<PickListSessionState>($sessionStore, "session");
-export const usePickListSessionItemsCount = () => useValue($sessionItemsCount);
+export const useStockTransferSession = () =>
+ useNanoStore<StockTransferSessionState>($sessionStore, "session");
+export const useStockTransferSessionItemsCount = () =>
+ useValue($sessionItemsCount);
export const useOrderItems = () => useValue($orderItems);
export const useTransferItems = () => useValue($transferItems);
-// PickListSession actions
-export const addToPickListSession = (item: PickListSessionItem) => {
- const currentPickListSession = $sessionStore.get();
+// StockTransferSession actions
+export const addToStockTransferSession = (item: StockTransferSessionItem) => {
+ const currentStockTransferSession = $sessionStore.get();
// Check if item already exists with same action
- const existingItemIndex = currentPickListSession.items.findIndex(
+ const existingItemIndex = currentStockTransferSession.items.findIndex(
(sessionItem) =>
sessionItem.id === item.id && sessionItem.action === item.action
);
if (existingItemIndex >= 0) {
// Update existing item
- const updatedItems = [...currentPickListSession.items];
+ const updatedItems = [...currentStockTransferSession.items];
updatedItems[existingItemIndex] = {
...updatedItems[existingItemIndex],
...item,
@@ -57,31 +58,31 @@ export const addToPickListSession = (item: PickListSessionItem) => {
$sessionStore.set({ items: updatedItems });
} else {
// Add new item
- $sessionStore.set({ items: [...currentPickListSession.items, item] });
+ $sessionStore.set({ items: [...currentStockTransferSession.items, item] });
}
};
-export const removeFromPickListSession = (
+export const removeFromStockTransferSession = (
itemId: string,
action: "order" | "transfer"
) => {
- const currentPickListSession = $sessionStore.get();
- const updatedItems = currentPickListSession.items.filter(
+ const currentStockTransferSession = $sessionStore.get();
+ const updatedItems = currentStockTransferSession.items.filter(
(item) => !(item.id === itemId && item.action === action)
);
$sessionStore.set({ items: updatedItems });
};
-export const clearPickListSession = () => {
+export const clearStockTransferSession = () => {
$sessionStore.set({ items: [] });
};
-export const isInPickListSession = (
+export const isInStockTransferSession = (
itemId: string,
action: "order" | "transfer"
) => {
- const currentPickListSession = $sessionStore.get();
- return currentPickListSession.items.some(
+ const currentStockTransferSession = $sessionStore.get();
+ return currentStockTransferSession.items.some(
(item) => item.id === itemId && item.action === action
);
};
diff --git a/apps/erp/app/utils/path.ts b/apps/erp/app/utils/path.ts
index 9d95353d22..3d9f5fc16b 100644
--- a/apps/erp/app/utils/path.ts
+++ b/apps/erp/app/utils/path.ts
@@ -582,8 +582,8 @@ export const path = {
generatePath(`${x}/resources/partners/delete/${id}`),
deletePaymentTerm: (id: string) =>
generatePath(`${x}/accounting/payment-terms/delete/${id}`),
- deletePickList: (id: string) =>
- generatePath(`${x}/inventory/pick-lists/${id}/delete`),
+ deleteStockTransfer: (id: string) =>
+ generatePath(`${x}/inventory/stock-transfers/${id}/delete`),
deleteProcedure: (id: string) =>
generatePath(`${x}/procedure/delete/${id}`),
deleteProcedureStep: (id: string, stepId: string) =>
@@ -934,7 +934,7 @@ export const path = {
newPart: `${x}/part/new`,
newPartSupplier: (id: string) =>
generatePath(`${x}/part/${id}/view/purchasing/new`),
- newPickList: `${x}/inventory/pick-lists/new`,
+ newStockTransfer: `${x}/inventory/stock-transfers/new`,
newProcedure: `${x}/production/procedures/new`,
newProcedureStep: (id: string) =>
generatePath(`${x}/procedure/${id}/steps/new`),
@@ -1057,12 +1057,13 @@ export const path = {
person: (id: string) => generatePath(`${x}/person/${id}`),
personDetails: (id: string) => generatePath(`${x}/person/${id}/details`),
personJob: (id: string) => generatePath(`${x}/person/${id}/job`),
- pickLists: `${x}/inventory/pick-lists`,
- pickList: (id: string) => generatePath(`${x}/inventory/pick-lists/${id}`),
- pickListDetails: (id: string) =>
- generatePath(`${x}/inventory/pick-lists/${id}/details`),
- pickListStatus: (id: string) =>
- generatePath(`${x}/inventory/pick-lists/${id}/status`),
+ stockTransfers: `${x}/inventory/stock-transfers`,
+ stockTransfer: (id: string) =>
+ generatePath(`${x}/inventory/stock-transfers/${id}`),
+ stockTransferDetails: (id: string) =>
+ generatePath(`${x}/inventory/stock-transfers/${id}/details`),
+ stockTransferStatus: (id: string) =>
+ generatePath(`${x}/inventory/stock-transfers/${id}/status`),
procedure: (id: string) => generatePath(`${x}/procedure/${id}`),
procedureStep: (id: string, attributeId: string) =>
generatePath(`${x}/procedure/${id}/steps/${attributeId}`),
diff --git a/packages/database/src/swagger-docs-schema.ts b/packages/database/src/swagger-docs-schema.ts
index fade537cbe..9ac91e9cd1 100644
--- a/packages/database/src/swagger-docs-schema.ts
+++ b/packages/database/src/swagger-docs-schema.ts
@@ -3,7 +3,7 @@ export default {
info: {
description: "",
title: "standard public schema",
- version: "13.0.6",
+ version: "12.2.8 (4a3936f)",
},
host: "0.0.0.0:3000",
basePath: "/",
@@ -47823,213 +47823,6 @@ export default {
tags: ["nonConformanceJobOperation"],
},
},
- "/pickList": {
- get: {
- parameters: [
- {
- $ref: "#/parameters/rowFilter.pickList.id",
- },
- {
- $ref: "#/parameters/rowFilter.pickList.pickListId",
- },
- {
- $ref: "#/parameters/rowFilter.pickList.locationId",
- },
- {
- $ref: "#/parameters/rowFilter.pickList.status",
- },
- {
- $ref: "#/parameters/rowFilter.pickList.completedAt",
- },
- {
- $ref: "#/parameters/rowFilter.pickList.companyId",
- },
- {
- $ref: "#/parameters/rowFilter.pickList.createdAt",
- },
- {
- $ref: "#/parameters/rowFilter.pickList.createdBy",
- },
- {
- $ref: "#/parameters/rowFilter.pickList.updatedAt",
- },
- {
- $ref: "#/parameters/rowFilter.pickList.updatedBy",
- },
- {
- $ref: "#/parameters/rowFilter.pickList.assignee",
- },
- {
- $ref: "#/parameters/rowFilter.pickList.customFields",
- },
- {
- $ref: "#/parameters/rowFilter.pickList.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/pickList",
- },
- type: "array",
- },
- },
- "206": {
- description: "Partial Content",
- },
- },
- tags: ["pickList"],
- },
- post: {
- parameters: [
- {
- $ref: "#/parameters/body.pickList",
- },
- {
- $ref: "#/parameters/select",
- },
- {
- $ref: "#/parameters/preferPost",
- },
- ],
- responses: {
- "201": {
- description: "Created",
- },
- },
- tags: ["pickList"],
- },
- delete: {
- parameters: [
- {
- $ref: "#/parameters/rowFilter.pickList.id",
- },
- {
- $ref: "#/parameters/rowFilter.pickList.pickListId",
- },
- {
- $ref: "#/parameters/rowFilter.pickList.locationId",
- },
- {
- $ref: "#/parameters/rowFilter.pickList.status",
- },
- {
- $ref: "#/parameters/rowFilter.pickList.completedAt",
- },
- {
- $ref: "#/parameters/rowFilter.pickList.companyId",
- },
- {
- $ref: "#/parameters/rowFilter.pickList.createdAt",
- },
- {
- $ref: "#/parameters/rowFilter.pickList.createdBy",
- },
- {
- $ref: "#/parameters/rowFilter.pickList.updatedAt",
- },
- {
- $ref: "#/parameters/rowFilter.pickList.updatedBy",
- },
- {
- $ref: "#/parameters/rowFilter.pickList.assignee",
- },
- {
- $ref: "#/parameters/rowFilter.pickList.customFields",
- },
- {
- $ref: "#/parameters/rowFilter.pickList.tags",
- },
- {
- $ref: "#/parameters/preferReturn",
- },
- ],
- responses: {
- "204": {
- description: "No Content",
- },
- },
- tags: ["pickList"],
- },
- patch: {
- parameters: [
- {
- $ref: "#/parameters/rowFilter.pickList.id",
- },
- {
- $ref: "#/parameters/rowFilter.pickList.pickListId",
- },
- {
- $ref: "#/parameters/rowFilter.pickList.locationId",
- },
- {
- $ref: "#/parameters/rowFilter.pickList.status",
- },
- {
- $ref: "#/parameters/rowFilter.pickList.completedAt",
- },
- {
- $ref: "#/parameters/rowFilter.pickList.companyId",
- },
- {
- $ref: "#/parameters/rowFilter.pickList.createdAt",
- },
- {
- $ref: "#/parameters/rowFilter.pickList.createdBy",
- },
- {
- $ref: "#/parameters/rowFilter.pickList.updatedAt",
- },
- {
- $ref: "#/parameters/rowFilter.pickList.updatedBy",
- },
- {
- $ref: "#/parameters/rowFilter.pickList.assignee",
- },
- {
- $ref: "#/parameters/rowFilter.pickList.customFields",
- },
- {
- $ref: "#/parameters/rowFilter.pickList.tags",
- },
- {
- $ref: "#/parameters/body.pickList",
- },
- {
- $ref: "#/parameters/preferReturn",
- },
- ],
- responses: {
- "204": {
- description: "No Content",
- },
- },
- tags: ["pickList"],
- },
- },
"/salesInvoiceShipment": {
get: {
parameters: [
@@ -50361,6 +50154,213 @@ export default {
tags: ["supplier"],
},
},
+ "/stockTransfer": {
+ get: {
+ parameters: [
+ {
+ $ref: "#/parameters/rowFilter.stockTransfer.id",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransfer.stockTransferId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransfer.locationId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransfer.status",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransfer.completedAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransfer.companyId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransfer.createdAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransfer.createdBy",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransfer.updatedAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransfer.updatedBy",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransfer.assignee",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransfer.customFields",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransfer.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/stockTransfer",
+ },
+ type: "array",
+ },
+ },
+ "206": {
+ description: "Partial Content",
+ },
+ },
+ tags: ["stockTransfer"],
+ },
+ post: {
+ parameters: [
+ {
+ $ref: "#/parameters/body.stockTransfer",
+ },
+ {
+ $ref: "#/parameters/select",
+ },
+ {
+ $ref: "#/parameters/preferPost",
+ },
+ ],
+ responses: {
+ "201": {
+ description: "Created",
+ },
+ },
+ tags: ["stockTransfer"],
+ },
+ delete: {
+ parameters: [
+ {
+ $ref: "#/parameters/rowFilter.stockTransfer.id",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransfer.stockTransferId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransfer.locationId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransfer.status",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransfer.completedAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransfer.companyId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransfer.createdAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransfer.createdBy",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransfer.updatedAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransfer.updatedBy",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransfer.assignee",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransfer.customFields",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransfer.tags",
+ },
+ {
+ $ref: "#/parameters/preferReturn",
+ },
+ ],
+ responses: {
+ "204": {
+ description: "No Content",
+ },
+ },
+ tags: ["stockTransfer"],
+ },
+ patch: {
+ parameters: [
+ {
+ $ref: "#/parameters/rowFilter.stockTransfer.id",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransfer.stockTransferId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransfer.locationId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransfer.status",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransfer.completedAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransfer.companyId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransfer.createdAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransfer.createdBy",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransfer.updatedAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransfer.updatedBy",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransfer.assignee",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransfer.customFields",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransfer.tags",
+ },
+ {
+ $ref: "#/parameters/body.stockTransfer",
+ },
+ {
+ $ref: "#/parameters/preferReturn",
+ },
+ ],
+ responses: {
+ "204": {
+ description: "No Content",
+ },
+ },
+ tags: ["stockTransfer"],
+ },
+ },
"/jobOperationsWithMakeMethods": {
get: {
parameters: [
@@ -50871,222 +50871,6 @@ export default {
tags: ["quoteOperationParameter"],
},
},
- "/pickListLine": {
- get: {
- parameters: [
- {
- $ref: "#/parameters/rowFilter.pickListLine.id",
- },
- {
- $ref: "#/parameters/rowFilter.pickListLine.pickListId",
- },
- {
- $ref: "#/parameters/rowFilter.pickListLine.jobId",
- },
- {
- $ref: "#/parameters/rowFilter.pickListLine.jobMaterialId",
- },
- {
- $ref: "#/parameters/rowFilter.pickListLine.itemId",
- },
- {
- $ref: "#/parameters/rowFilter.pickListLine.fromShelfId",
- },
- {
- $ref: "#/parameters/rowFilter.pickListLine.toShelfId",
- },
- {
- $ref: "#/parameters/rowFilter.pickListLine.quantity",
- },
- {
- $ref: "#/parameters/rowFilter.pickListLine.pickedQuantity",
- },
- {
- $ref: "#/parameters/rowFilter.pickListLine.companyId",
- },
- {
- $ref: "#/parameters/rowFilter.pickListLine.createdAt",
- },
- {
- $ref: "#/parameters/rowFilter.pickListLine.createdBy",
- },
- {
- $ref: "#/parameters/rowFilter.pickListLine.updatedAt",
- },
- {
- $ref: "#/parameters/rowFilter.pickListLine.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/pickListLine",
- },
- type: "array",
- },
- },
- "206": {
- description: "Partial Content",
- },
- },
- tags: ["pickListLine"],
- },
- post: {
- parameters: [
- {
- $ref: "#/parameters/body.pickListLine",
- },
- {
- $ref: "#/parameters/select",
- },
- {
- $ref: "#/parameters/preferPost",
- },
- ],
- responses: {
- "201": {
- description: "Created",
- },
- },
- tags: ["pickListLine"],
- },
- delete: {
- parameters: [
- {
- $ref: "#/parameters/rowFilter.pickListLine.id",
- },
- {
- $ref: "#/parameters/rowFilter.pickListLine.pickListId",
- },
- {
- $ref: "#/parameters/rowFilter.pickListLine.jobId",
- },
- {
- $ref: "#/parameters/rowFilter.pickListLine.jobMaterialId",
- },
- {
- $ref: "#/parameters/rowFilter.pickListLine.itemId",
- },
- {
- $ref: "#/parameters/rowFilter.pickListLine.fromShelfId",
- },
- {
- $ref: "#/parameters/rowFilter.pickListLine.toShelfId",
- },
- {
- $ref: "#/parameters/rowFilter.pickListLine.quantity",
- },
- {
- $ref: "#/parameters/rowFilter.pickListLine.pickedQuantity",
- },
- {
- $ref: "#/parameters/rowFilter.pickListLine.companyId",
- },
- {
- $ref: "#/parameters/rowFilter.pickListLine.createdAt",
- },
- {
- $ref: "#/parameters/rowFilter.pickListLine.createdBy",
- },
- {
- $ref: "#/parameters/rowFilter.pickListLine.updatedAt",
- },
- {
- $ref: "#/parameters/rowFilter.pickListLine.updatedBy",
- },
- {
- $ref: "#/parameters/preferReturn",
- },
- ],
- responses: {
- "204": {
- description: "No Content",
- },
- },
- tags: ["pickListLine"],
- },
- patch: {
- parameters: [
- {
- $ref: "#/parameters/rowFilter.pickListLine.id",
- },
- {
- $ref: "#/parameters/rowFilter.pickListLine.pickListId",
- },
- {
- $ref: "#/parameters/rowFilter.pickListLine.jobId",
- },
- {
- $ref: "#/parameters/rowFilter.pickListLine.jobMaterialId",
- },
- {
- $ref: "#/parameters/rowFilter.pickListLine.itemId",
- },
- {
- $ref: "#/parameters/rowFilter.pickListLine.fromShelfId",
- },
- {
- $ref: "#/parameters/rowFilter.pickListLine.toShelfId",
- },
- {
- $ref: "#/parameters/rowFilter.pickListLine.quantity",
- },
- {
- $ref: "#/parameters/rowFilter.pickListLine.pickedQuantity",
- },
- {
- $ref: "#/parameters/rowFilter.pickListLine.companyId",
- },
- {
- $ref: "#/parameters/rowFilter.pickListLine.createdAt",
- },
- {
- $ref: "#/parameters/rowFilter.pickListLine.createdBy",
- },
- {
- $ref: "#/parameters/rowFilter.pickListLine.updatedAt",
- },
- {
- $ref: "#/parameters/rowFilter.pickListLine.updatedBy",
- },
- {
- $ref: "#/parameters/body.pickListLine",
- },
- {
- $ref: "#/parameters/preferReturn",
- },
- ],
- responses: {
- "204": {
- description: "No Content",
- },
- },
- tags: ["pickListLine"],
- },
- },
"/item": {
get: {
parameters: [
@@ -52353,59 +52137,50 @@ export default {
tags: ["productionEvent"],
},
},
- "/webhook": {
+ "/stockTransferLine": {
get: {
parameters: [
{
- $ref: "#/parameters/rowFilter.webhook.id",
- },
- {
- $ref: "#/parameters/rowFilter.webhook.name",
- },
- {
- $ref: "#/parameters/rowFilter.webhook.table",
- },
- {
- $ref: "#/parameters/rowFilter.webhook.url",
+ $ref: "#/parameters/rowFilter.stockTransferLine.id",
},
{
- $ref: "#/parameters/rowFilter.webhook.active",
+ $ref: "#/parameters/rowFilter.stockTransferLine.stockTransferId",
},
{
- $ref: "#/parameters/rowFilter.webhook.onInsert",
+ $ref: "#/parameters/rowFilter.stockTransferLine.jobId",
},
{
- $ref: "#/parameters/rowFilter.webhook.onUpdate",
+ $ref: "#/parameters/rowFilter.stockTransferLine.jobMaterialId",
},
{
- $ref: "#/parameters/rowFilter.webhook.onDelete",
+ $ref: "#/parameters/rowFilter.stockTransferLine.itemId",
},
{
- $ref: "#/parameters/rowFilter.webhook.successCount",
+ $ref: "#/parameters/rowFilter.stockTransferLine.fromShelfId",
},
{
- $ref: "#/parameters/rowFilter.webhook.lastSuccess",
+ $ref: "#/parameters/rowFilter.stockTransferLine.toShelfId",
},
{
- $ref: "#/parameters/rowFilter.webhook.errorCount",
+ $ref: "#/parameters/rowFilter.stockTransferLine.quantity",
},
{
- $ref: "#/parameters/rowFilter.webhook.lastError",
+ $ref: "#/parameters/rowFilter.stockTransferLine.pickedQuantity",
},
{
- $ref: "#/parameters/rowFilter.webhook.companyId",
+ $ref: "#/parameters/rowFilter.stockTransferLine.companyId",
},
{
- $ref: "#/parameters/rowFilter.webhook.createdAt",
+ $ref: "#/parameters/rowFilter.stockTransferLine.createdAt",
},
{
- $ref: "#/parameters/rowFilter.webhook.createdBy",
+ $ref: "#/parameters/rowFilter.stockTransferLine.createdBy",
},
{
- $ref: "#/parameters/rowFilter.webhook.updatedAt",
+ $ref: "#/parameters/rowFilter.stockTransferLine.updatedAt",
},
{
- $ref: "#/parameters/rowFilter.webhook.updatedBy",
+ $ref: "#/parameters/rowFilter.stockTransferLine.updatedBy",
},
{
$ref: "#/parameters/select",
@@ -52434,7 +52209,7 @@ export default {
description: "OK",
schema: {
items: {
- $ref: "#/definitions/webhook",
+ $ref: "#/definitions/stockTransferLine",
},
type: "array",
},
@@ -52443,12 +52218,12 @@ export default {
description: "Partial Content",
},
},
- tags: ["webhook"],
+ tags: ["stockTransferLine"],
},
post: {
parameters: [
{
- $ref: "#/parameters/body.webhook",
+ $ref: "#/parameters/body.stockTransferLine",
},
{
$ref: "#/parameters/select",
@@ -52462,7 +52237,232 @@ export default {
description: "Created",
},
},
- tags: ["webhook"],
+ tags: ["stockTransferLine"],
+ },
+ delete: {
+ parameters: [
+ {
+ $ref: "#/parameters/rowFilter.stockTransferLine.id",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransferLine.stockTransferId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransferLine.jobId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransferLine.jobMaterialId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransferLine.itemId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransferLine.fromShelfId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransferLine.toShelfId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransferLine.quantity",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransferLine.pickedQuantity",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransferLine.companyId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransferLine.createdAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransferLine.createdBy",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransferLine.updatedAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransferLine.updatedBy",
+ },
+ {
+ $ref: "#/parameters/preferReturn",
+ },
+ ],
+ responses: {
+ "204": {
+ description: "No Content",
+ },
+ },
+ tags: ["stockTransferLine"],
+ },
+ patch: {
+ parameters: [
+ {
+ $ref: "#/parameters/rowFilter.stockTransferLine.id",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransferLine.stockTransferId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransferLine.jobId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransferLine.jobMaterialId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransferLine.itemId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransferLine.fromShelfId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransferLine.toShelfId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransferLine.quantity",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransferLine.pickedQuantity",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransferLine.companyId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransferLine.createdAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransferLine.createdBy",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransferLine.updatedAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.stockTransferLine.updatedBy",
+ },
+ {
+ $ref: "#/parameters/body.stockTransferLine",
+ },
+ {
+ $ref: "#/parameters/preferReturn",
+ },
+ ],
+ responses: {
+ "204": {
+ description: "No Content",
+ },
+ },
+ tags: ["stockTransferLine"],
+ },
+ },
+ "/webhook": {
+ get: {
+ parameters: [
+ {
+ $ref: "#/parameters/rowFilter.webhook.id",
+ },
+ {
+ $ref: "#/parameters/rowFilter.webhook.name",
+ },
+ {
+ $ref: "#/parameters/rowFilter.webhook.table",
+ },
+ {
+ $ref: "#/parameters/rowFilter.webhook.url",
+ },
+ {
+ $ref: "#/parameters/rowFilter.webhook.active",
+ },
+ {
+ $ref: "#/parameters/rowFilter.webhook.onInsert",
+ },
+ {
+ $ref: "#/parameters/rowFilter.webhook.onUpdate",
+ },
+ {
+ $ref: "#/parameters/rowFilter.webhook.onDelete",
+ },
+ {
+ $ref: "#/parameters/rowFilter.webhook.successCount",
+ },
+ {
+ $ref: "#/parameters/rowFilter.webhook.lastSuccess",
+ },
+ {
+ $ref: "#/parameters/rowFilter.webhook.errorCount",
+ },
+ {
+ $ref: "#/parameters/rowFilter.webhook.lastError",
+ },
+ {
+ $ref: "#/parameters/rowFilter.webhook.companyId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.webhook.createdAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.webhook.createdBy",
+ },
+ {
+ $ref: "#/parameters/rowFilter.webhook.updatedAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.webhook.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/webhook",
+ },
+ type: "array",
+ },
+ },
+ "206": {
+ description: "Partial Content",
+ },
+ },
+ tags: ["webhook"],
+ },
+ post: {
+ parameters: [
+ {
+ $ref: "#/parameters/body.webhook",
+ },
+ {
+ $ref: "#/parameters/select",
+ },
+ {
+ $ref: "#/parameters/preferPost",
+ },
+ ],
+ responses: {
+ "201": {
+ description: "Created",
+ },
+ },
+ tags: ["webhook"],
},
delete: {
parameters: [
@@ -56272,6 +56272,35 @@ export default {
},
},
"/rpc/has_company_permission": {
+ get: {
+ parameters: [
+ {
+ format: "text",
+ in: "query",
+ name: "claim",
+ required: true,
+ type: "string",
+ },
+ {
+ format: "text",
+ in: "query",
+ name: "company",
+ 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) has_company_permission"],
+ },
post: {
parameters: [
{
@@ -56311,6 +56340,49 @@ export default {
},
},
"/rpc/create_rfq_from_models_v2": {
+ 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_v2"],
+ },
post: {
parameters: [
{
@@ -56364,6 +56436,28 @@ export default {
},
},
"/rpc/get_supplier_interaction_with_related_records": {
+ get: {
+ parameters: [
+ {
+ format: "text",
+ in: "query",
+ name: "supplier_interaction_id",
+ 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) get_supplier_interaction_with_related_records"],
+ },
post: {
parameters: [
{
@@ -56399,6 +56493,28 @@ export default {
},
},
"/rpc/check_operation_dependencies": {
+ get: {
+ parameters: [
+ {
+ format: "text",
+ in: "query",
+ name: "operation_id",
+ 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) check_operation_dependencies"],
+ },
post: {
parameters: [
{
@@ -56434,6 +56550,28 @@ export default {
},
},
"/rpc/get_companies_with_employee_permission": {
+ get: {
+ parameters: [
+ {
+ format: "text",
+ in: "query",
+ name: "permission",
+ 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) get_companies_with_employee_permission"],
+ },
post: {
parameters: [
{
@@ -56564,6 +56702,19 @@ export default {
},
},
"/rpc/get_companies_with_any_role": {
+ get: {
+ produces: [
+ "application/json",
+ "application/vnd.pgrst.object+json;nulls=stripped",
+ "application/vnd.pgrst.object+json",
+ ],
+ responses: {
+ "200": {
+ description: "OK",
+ },
+ },
+ tags: ["(rpc) get_companies_with_any_role"],
+ },
post: {
parameters: [
{
@@ -56592,6 +56743,28 @@ export default {
},
},
"/rpc/get_direct_ancestors_of_tracked_entity": {
+ get: {
+ parameters: [
+ {
+ format: "text",
+ in: "query",
+ name: "p_tracked_entity_id",
+ 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) get_direct_ancestors_of_tracked_entity"],
+ },
post: {
parameters: [
{
@@ -56627,6 +56800,28 @@ export default {
},
},
"/rpc/get_permission_companies": {
+ get: {
+ parameters: [
+ {
+ format: "text",
+ in: "query",
+ name: "claim",
+ 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) get_permission_companies"],
+ },
post: {
parameters: [
{
@@ -56662,6 +56857,28 @@ export default {
},
},
"/rpc/get_tool_details": {
+ get: {
+ parameters: [
+ {
+ format: "text",
+ in: "query",
+ name: "item_id",
+ 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) get_tool_details"],
+ },
post: {
parameters: [
{
@@ -56697,6 +56914,35 @@ export default {
},
},
"/rpc/get_inventory_quantities": {
+ get: {
+ parameters: [
+ {
+ format: "text",
+ in: "query",
+ name: "company_id",
+ required: true,
+ type: "string",
+ },
+ {
+ format: "text",
+ in: "query",
+ name: "location_id",
+ 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) get_inventory_quantities"],
+ },
post: {
parameters: [
{
@@ -56736,6 +56982,28 @@ export default {
},
},
"/rpc/get_direct_descendants_of_tracked_entity_strict": {
+ get: {
+ parameters: [
+ {
+ format: "text",
+ in: "query",
+ name: "p_tracked_entity_id",
+ 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) get_direct_descendants_of_tracked_entity_strict"],
+ },
post: {
parameters: [
{
@@ -56771,6 +57039,49 @@ export default {
},
},
"/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: [
{
@@ -56824,6 +57135,28 @@ export default {
},
},
"/rpc/get_companies_with_permission": {
+ get: {
+ parameters: [
+ {
+ format: "text",
+ in: "query",
+ name: "permission",
+ 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) get_companies_with_permission"],
+ },
post: {
parameters: [
{
@@ -56859,6 +57192,19 @@ export default {
},
},
"/rpc/get_companies_with_employee_role": {
+ get: {
+ produces: [
+ "application/json",
+ "application/vnd.pgrst.object+json;nulls=stripped",
+ "application/vnd.pgrst.object+json",
+ ],
+ responses: {
+ "200": {
+ description: "OK",
+ },
+ },
+ tags: ["(rpc) get_companies_with_employee_role"],
+ },
post: {
parameters: [
{
@@ -56984,6 +57330,28 @@ export default {
},
},
"/rpc/has_any_company_permission": {
+ get: {
+ parameters: [
+ {
+ format: "text",
+ in: "query",
+ name: "claim",
+ 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) has_any_company_permission"],
+ },
post: {
parameters: [
{
@@ -57019,6 +57387,19 @@ export default {
},
},
"/rpc/is_claims_admin": {
+ get: {
+ produces: [
+ "application/json",
+ "application/vnd.pgrst.object+json;nulls=stripped",
+ "application/vnd.pgrst.object+json",
+ ],
+ responses: {
+ "200": {
+ description: "OK",
+ },
+ },
+ tags: ["(rpc) is_claims_admin"],
+ },
post: {
parameters: [
{
@@ -57047,6 +57428,28 @@ export default {
},
},
"/rpc/xid": {
+ get: {
+ parameters: [
+ {
+ format: "timestamp with time zone",
+ in: "query",
+ name: "_at",
+ required: false,
+ type: "string",
+ },
+ ],
+ produces: [
+ "application/json",
+ "application/vnd.pgrst.object+json;nulls=stripped",
+ "application/vnd.pgrst.object+json",
+ ],
+ responses: {
+ "200": {
+ description: "OK",
+ },
+ },
+ tags: ["(rpc) xid"],
+ },
post: {
parameters: [
{
@@ -57138,6 +57541,56 @@ export default {
},
},
"/rpc/update_receipt_line_serial_tracking": {
+ get: {
+ parameters: [
+ {
+ format: "text",
+ in: "query",
+ name: "p_receipt_line_id",
+ required: true,
+ type: "string",
+ },
+ {
+ format: "text",
+ in: "query",
+ name: "p_receipt_id",
+ required: true,
+ type: "string",
+ },
+ {
+ format: "text",
+ in: "query",
+ name: "p_serial_number",
+ required: true,
+ type: "string",
+ },
+ {
+ format: "integer",
+ in: "query",
+ name: "p_index",
+ required: true,
+ type: "integer",
+ },
+ {
+ format: "text",
+ in: "query",
+ name: "p_tracked_entity_id",
+ required: false,
+ type: "string",
+ },
+ ],
+ produces: [
+ "application/json",
+ "application/vnd.pgrst.object+json;nulls=stripped",
+ "application/vnd.pgrst.object+json",
+ ],
+ responses: {
+ "200": {
+ description: "OK",
+ },
+ },
+ tags: ["(rpc) update_receipt_line_serial_tracking"],
+ },
post: {
parameters: [
{
@@ -57194,6 +57647,42 @@ export default {
},
},
"/rpc/get_production_projections": {
+ get: {
+ parameters: [
+ {
+ format: "text",
+ in: "query",
+ name: "company_id",
+ required: true,
+ type: "string",
+ },
+ {
+ format: "text",
+ in: "query",
+ name: "location_id",
+ required: true,
+ type: "string",
+ },
+ {
+ format: "text[]",
+ in: "query",
+ name: "periods",
+ 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) get_production_projections"],
+ },
post: {
parameters: [
{
@@ -57240,6 +57729,35 @@ export default {
},
},
"/rpc/get_job_operations_by_work_center": {
+ get: {
+ parameters: [
+ {
+ format: "text",
+ in: "query",
+ name: "work_center_id",
+ required: true,
+ type: "string",
+ },
+ {
+ format: "text",
+ in: "query",
+ name: "location_id",
+ 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) get_job_operations_by_work_center"],
+ },
post: {
parameters: [
{
@@ -57279,6 +57797,42 @@ export default {
},
},
"/rpc/get_item_quantities_by_tracking_id": {
+ get: {
+ parameters: [
+ {
+ format: "text",
+ in: "query",
+ name: "item_id",
+ required: true,
+ type: "string",
+ },
+ {
+ format: "text",
+ in: "query",
+ name: "company_id",
+ required: true,
+ type: "string",
+ },
+ {
+ format: "text",
+ in: "query",
+ name: "location_id",
+ 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) get_item_quantities_by_tracking_id"],
+ },
post: {
parameters: [
{
@@ -57436,25 +57990,14 @@ export default {
},
},
"/rpc/xid_time": {
- post: {
+ get: {
parameters: [
{
- in: "body",
- name: "args",
+ format: "public.xid",
+ in: "query",
+ name: "_xid",
required: true,
- schema: {
- properties: {
- _xid: {
- format: "public.xid",
- type: "string",
- },
- },
- required: ["_xid"],
- type: "object",
- },
- },
- {
- $ref: "#/parameters/preferParams",
+ type: "string",
},
],
produces: [
@@ -57469,8 +58012,6 @@ export default {
},
tags: ["(rpc) xid_time"],
},
- },
- "/rpc/get_sales_order_lines_by_customer_id": {
post: {
parameters: [
{
@@ -57479,47 +58020,12 @@ export default {
required: true,
schema: {
properties: {
- customer_id: {
- format: "text",
- type: "string",
- },
- },
- required: ["customer_id"],
- 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) get_sales_order_lines_by_customer_id"],
- },
- },
- "/rpc/get_my_permission": {
- post: {
- parameters: [
- {
- in: "body",
- name: "args",
- required: true,
- schema: {
- properties: {
- claim: {
- format: "text",
+ _xid: {
+ format: "public.xid",
type: "string",
},
},
- required: ["claim"],
+ required: ["_xid"],
type: "object",
},
},
@@ -57537,29 +58043,18 @@ export default {
description: "OK",
},
},
- tags: ["(rpc) get_my_permission"],
+ tags: ["(rpc) xid_time"],
},
},
- "/rpc/xid_decode": {
- post: {
+ "/rpc/get_sales_order_lines_by_customer_id": {
+ get: {
parameters: [
{
- in: "body",
- name: "args",
+ format: "text",
+ in: "query",
+ name: "customer_id",
required: true,
- schema: {
- properties: {
- _xid: {
- format: "public.xid",
- type: "string",
- },
- },
- required: ["_xid"],
- type: "object",
- },
- },
- {
- $ref: "#/parameters/preferParams",
+ type: "string",
},
],
produces: [
@@ -57572,10 +58067,8 @@ export default {
description: "OK",
},
},
- tags: ["(rpc) xid_decode"],
+ tags: ["(rpc) get_sales_order_lines_by_customer_id"],
},
- },
- "/rpc/nanoid_optimized": {
post: {
parameters: [
{
@@ -57584,24 +58077,12 @@ export default {
required: true,
schema: {
properties: {
- alphabet: {
+ customer_id: {
format: "text",
type: "string",
},
- mask: {
- format: "integer",
- type: "integer",
- },
- size: {
- format: "integer",
- type: "integer",
- },
- step: {
- format: "integer",
- type: "integer",
- },
},
- required: ["size", "alphabet", "mask", "step"],
+ required: ["customer_id"],
type: "object",
},
},
@@ -57619,36 +58100,18 @@ export default {
description: "OK",
},
},
- tags: ["(rpc) nanoid_optimized"],
+ tags: ["(rpc) get_sales_order_lines_by_customer_id"],
},
},
- "/rpc/get_active_job_operations_by_location": {
- post: {
+ "/rpc/get_my_permission": {
+ get: {
parameters: [
{
- in: "body",
- name: "args",
+ format: "text",
+ in: "query",
+ name: "claim",
required: true,
- schema: {
- properties: {
- location_id: {
- format: "text",
- type: "string",
- },
- work_center_ids: {
- format: "text[]",
- items: {
- type: "string",
- },
- type: "array",
- },
- },
- required: ["location_id", "work_center_ids"],
- type: "object",
- },
- },
- {
- $ref: "#/parameters/preferParams",
+ type: "string",
},
],
produces: [
@@ -57661,10 +58124,8 @@ export default {
description: "OK",
},
},
- tags: ["(rpc) get_active_job_operations_by_location"],
+ tags: ["(rpc) get_my_permission"],
},
- },
- "/rpc/get_next_numeric_sequence": {
post: {
parameters: [
{
@@ -57673,16 +58134,12 @@ export default {
required: true,
schema: {
properties: {
- company_id: {
+ claim: {
format: "text",
type: "string",
},
- item_type: {
- format: '"itemType"',
- type: "string",
- },
},
- required: ["company_id", "item_type"],
+ required: ["claim"],
type: "object",
},
},
@@ -57700,29 +58157,18 @@ export default {
description: "OK",
},
},
- tags: ["(rpc) get_next_numeric_sequence"],
+ tags: ["(rpc) get_my_permission"],
},
},
- "/rpc/get_part_details": {
- post: {
+ "/rpc/xid_decode": {
+ get: {
parameters: [
{
- in: "body",
- name: "args",
+ format: "public.xid",
+ in: "query",
+ name: "_xid",
required: true,
- schema: {
- properties: {
- item_id: {
- format: "text",
- type: "string",
- },
- },
- required: ["item_id"],
- type: "object",
- },
- },
- {
- $ref: "#/parameters/preferParams",
+ type: "string",
},
],
produces: [
@@ -57735,10 +58181,351 @@ export default {
description: "OK",
},
},
- tags: ["(rpc) get_part_details"],
+ tags: ["(rpc) xid_decode"],
+ },
+ post: {
+ parameters: [
+ {
+ in: "body",
+ name: "args",
+ required: true,
+ schema: {
+ properties: {
+ _xid: {
+ format: "public.xid",
+ type: "string",
+ },
+ },
+ required: ["_xid"],
+ 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) xid_decode"],
+ },
+ },
+ "/rpc/nanoid_optimized": {
+ get: {
+ parameters: [
+ {
+ format: "integer",
+ in: "query",
+ name: "size",
+ required: true,
+ type: "integer",
+ },
+ {
+ format: "text",
+ in: "query",
+ name: "alphabet",
+ required: true,
+ type: "string",
+ },
+ {
+ format: "integer",
+ in: "query",
+ name: "mask",
+ required: true,
+ type: "integer",
+ },
+ {
+ format: "integer",
+ in: "query",
+ name: "step",
+ required: true,
+ type: "integer",
+ },
+ ],
+ produces: [
+ "application/json",
+ "application/vnd.pgrst.object+json;nulls=stripped",
+ "application/vnd.pgrst.object+json",
+ ],
+ responses: {
+ "200": {
+ description: "OK",
+ },
+ },
+ tags: ["(rpc) nanoid_optimized"],
+ },
+ post: {
+ parameters: [
+ {
+ in: "body",
+ name: "args",
+ required: true,
+ schema: {
+ properties: {
+ alphabet: {
+ format: "text",
+ type: "string",
+ },
+ mask: {
+ format: "integer",
+ type: "integer",
+ },
+ size: {
+ format: "integer",
+ type: "integer",
+ },
+ step: {
+ format: "integer",
+ type: "integer",
+ },
+ },
+ required: ["size", "alphabet", "mask", "step"],
+ 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) nanoid_optimized"],
+ },
+ },
+ "/rpc/get_active_job_operations_by_location": {
+ get: {
+ parameters: [
+ {
+ format: "text",
+ in: "query",
+ name: "location_id",
+ required: true,
+ type: "string",
+ },
+ {
+ format: "text[]",
+ in: "query",
+ name: "work_center_ids",
+ 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) get_active_job_operations_by_location"],
+ },
+ post: {
+ parameters: [
+ {
+ in: "body",
+ name: "args",
+ required: true,
+ schema: {
+ properties: {
+ location_id: {
+ format: "text",
+ type: "string",
+ },
+ work_center_ids: {
+ format: "text[]",
+ items: {
+ type: "string",
+ },
+ type: "array",
+ },
+ },
+ required: ["location_id", "work_center_ids"],
+ 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) get_active_job_operations_by_location"],
+ },
+ },
+ "/rpc/get_next_numeric_sequence": {
+ get: {
+ parameters: [
+ {
+ format: "text",
+ in: "query",
+ name: "company_id",
+ required: true,
+ type: "string",
+ },
+ {
+ format: '"itemType"',
+ in: "query",
+ name: "item_type",
+ 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) get_next_numeric_sequence"],
+ },
+ post: {
+ parameters: [
+ {
+ in: "body",
+ name: "args",
+ required: true,
+ schema: {
+ properties: {
+ company_id: {
+ format: "text",
+ type: "string",
+ },
+ item_type: {
+ format: '"itemType"',
+ type: "string",
+ },
+ },
+ required: ["company_id", "item_type"],
+ 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) get_next_numeric_sequence"],
+ },
+ },
+ "/rpc/get_part_details": {
+ get: {
+ parameters: [
+ {
+ format: "text",
+ in: "query",
+ name: "item_id",
+ 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) get_part_details"],
+ },
+ post: {
+ parameters: [
+ {
+ in: "body",
+ name: "args",
+ required: true,
+ schema: {
+ properties: {
+ item_id: {
+ format: "text",
+ type: "string",
+ },
+ },
+ required: ["item_id"],
+ 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) get_part_details"],
+ },
+ },
+ "/rpc/xid_pid": {
+ get: {
+ parameters: [
+ {
+ format: "public.xid",
+ in: "query",
+ name: "_xid",
+ 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) xid_pid"],
},
- },
- "/rpc/xid_pid": {
post: {
parameters: [
{
@@ -57774,6 +58561,35 @@ export default {
},
},
"/rpc/get_active_job_count": {
+ get: {
+ parameters: [
+ {
+ format: "text",
+ in: "query",
+ name: "employee_id",
+ required: true,
+ type: "string",
+ },
+ {
+ format: "text",
+ in: "query",
+ name: "company_id",
+ 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) get_active_job_count"],
+ },
post: {
parameters: [
{
@@ -57813,6 +58629,28 @@ export default {
},
},
"/rpc/groups_for_user": {
+ get: {
+ parameters: [
+ {
+ format: "text",
+ in: "query",
+ name: "uid",
+ 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) groups_for_user"],
+ },
post: {
parameters: [
{
@@ -57848,6 +58686,70 @@ export default {
},
},
"/rpc/create_rfq_from_model_v1": {
+ get: {
+ parameters: [
+ {
+ format: "text",
+ in: "query",
+ name: "company_id",
+ required: true,
+ type: "string",
+ },
+ {
+ format: "text",
+ in: "query",
+ name: "customer_part_id",
+ required: true,
+ type: "string",
+ },
+ {
+ format: "text",
+ in: "query",
+ name: "email",
+ required: true,
+ type: "string",
+ },
+ {
+ format: "text",
+ in: "query",
+ name: "model_id",
+ required: true,
+ type: "string",
+ },
+ {
+ format: "text",
+ in: "query",
+ name: "sequence_number",
+ required: true,
+ type: "string",
+ },
+ {
+ format: "text",
+ in: "query",
+ name: "unit_of_measure",
+ required: true,
+ type: "string",
+ },
+ {
+ format: "json",
+ in: "query",
+ name: "notes",
+ required: false,
+ 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_model_v1"],
+ },
post: {
parameters: [
{
@@ -57913,6 +58815,19 @@ export default {
},
},
"/rpc/get_company_id_from_api_key": {
+ get: {
+ produces: [
+ "application/json",
+ "application/vnd.pgrst.object+json;nulls=stripped",
+ "application/vnd.pgrst.object+json",
+ ],
+ responses: {
+ "200": {
+ description: "OK",
+ },
+ },
+ tags: ["(rpc) get_company_id_from_api_key"],
+ },
post: {
parameters: [
{
@@ -57941,6 +58856,35 @@ export default {
},
},
"/rpc/get_radan_v1": {
+ get: {
+ parameters: [
+ {
+ format: "text",
+ in: "query",
+ name: "company_id",
+ required: true,
+ type: "string",
+ },
+ {
+ format: "text[]",
+ in: "query",
+ name: "processes",
+ 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) get_radan_v1"],
+ },
post: {
parameters: [
{
@@ -57983,6 +58927,28 @@ export default {
},
},
"/rpc/uuid_to_base58": {
+ get: {
+ parameters: [
+ {
+ format: "uuid",
+ in: "query",
+ name: "_uuid",
+ 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) uuid_to_base58"],
+ },
post: {
parameters: [
{
@@ -58018,6 +58984,35 @@ export default {
},
},
"/rpc/get_assigned_job_operations": {
+ get: {
+ parameters: [
+ {
+ format: "text",
+ in: "query",
+ name: "user_id",
+ required: true,
+ type: "string",
+ },
+ {
+ format: "text",
+ in: "query",
+ name: "company_id",
+ 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) get_assigned_job_operations"],
+ },
post: {
parameters: [
{
@@ -58057,6 +59052,28 @@ export default {
},
},
"/rpc/xid_encode": {
+ get: {
+ parameters: [
+ {
+ format: "integer[]",
+ in: "query",
+ name: "_id",
+ 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) xid_encode"],
+ },
post: {
parameters: [
{
@@ -58095,6 +59112,28 @@ export default {
},
},
"/rpc/get_direct_descendants_of_tracked_entity": {
+ get: {
+ parameters: [
+ {
+ format: "text",
+ in: "query",
+ name: "p_tracked_entity_id",
+ 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) get_direct_descendants_of_tracked_entity"],
+ },
post: {
parameters: [
{
@@ -58130,6 +59169,28 @@ export default {
},
},
"/rpc/get_customer_ids_with_customer_permission": {
+ get: {
+ parameters: [
+ {
+ format: "text",
+ in: "query",
+ name: "permission",
+ 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) get_customer_ids_with_customer_permission"],
+ },
post: {
parameters: [
{
@@ -58165,6 +59226,35 @@ export default {
},
},
"/rpc/get_company_id_from_foreign_key": {
+ get: {
+ parameters: [
+ {
+ format: "text",
+ in: "query",
+ name: "foreign_key",
+ required: true,
+ type: "string",
+ },
+ {
+ format: "text",
+ in: "query",
+ name: "tbl",
+ 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) get_company_id_from_foreign_key"],
+ },
post: {
parameters: [
{
@@ -58204,6 +59294,28 @@ export default {
},
},
"/rpc/users_for_groups": {
+ get: {
+ parameters: [
+ {
+ format: "text[]",
+ in: "query",
+ name: "groups",
+ 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) users_for_groups"],
+ },
post: {
parameters: [
{
@@ -58242,6 +59354,35 @@ export default {
},
},
"/rpc/get_recent_job_operations_by_employee": {
+ get: {
+ parameters: [
+ {
+ format: "text",
+ in: "query",
+ name: "employee_id",
+ required: true,
+ type: "string",
+ },
+ {
+ format: "text",
+ in: "query",
+ name: "company_id",
+ 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) get_recent_job_operations_by_employee"],
+ },
post: {
parameters: [
{
@@ -58281,6 +59422,28 @@ export default {
},
},
"/rpc/get_supplier_ids_with_supplier_permission": {
+ get: {
+ parameters: [
+ {
+ format: "text",
+ in: "query",
+ name: "permission",
+ 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) get_supplier_ids_with_supplier_permission"],
+ },
post: {
parameters: [
{
@@ -58316,6 +59479,28 @@ export default {
},
},
"/rpc/get_job_operation_by_id": {
+ get: {
+ parameters: [
+ {
+ format: "text",
+ in: "query",
+ name: "operation_id",
+ 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) get_job_operation_by_id"],
+ },
post: {
parameters: [
{
@@ -58351,6 +59536,28 @@ export default {
},
},
"/rpc/increment_webhook_error": {
+ get: {
+ parameters: [
+ {
+ format: "text",
+ in: "query",
+ name: "webhook_id",
+ 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) increment_webhook_error"],
+ },
post: {
parameters: [
{
@@ -58386,6 +59593,35 @@ export default {
},
},
"/rpc/journalLinesByAccountNumber": {
+ get: {
+ parameters: [
+ {
+ format: "date",
+ in: "query",
+ name: "from_date",
+ required: false,
+ type: "string",
+ },
+ {
+ format: "date",
+ in: "query",
+ name: "to_date",
+ required: false,
+ type: "string",
+ },
+ ],
+ produces: [
+ "application/json",
+ "application/vnd.pgrst.object+json;nulls=stripped",
+ "application/vnd.pgrst.object+json",
+ ],
+ responses: {
+ "200": {
+ description: "OK",
+ },
+ },
+ tags: ["(rpc) journalLinesByAccountNumber"],
+ },
post: {
parameters: [
{
@@ -58424,6 +59660,28 @@ export default {
},
},
"/rpc/xid_machine": {
+ get: {
+ parameters: [
+ {
+ format: "public.xid",
+ in: "query",
+ name: "_xid",
+ 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) xid_machine"],
+ },
post: {
parameters: [
{
@@ -58459,6 +59717,28 @@ export default {
},
},
"/rpc/get_my_claim": {
+ get: {
+ parameters: [
+ {
+ format: "text",
+ in: "query",
+ name: "claim",
+ 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) get_my_claim"],
+ },
post: {
parameters: [
{
@@ -58494,6 +59774,42 @@ export default {
},
},
"/rpc/get_job_quantity_on_hand": {
+ get: {
+ parameters: [
+ {
+ format: "text",
+ in: "query",
+ name: "job_id",
+ required: true,
+ type: "string",
+ },
+ {
+ format: "text",
+ in: "query",
+ name: "company_id",
+ required: true,
+ type: "string",
+ },
+ {
+ format: "text",
+ in: "query",
+ name: "location_id",
+ 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) get_job_quantity_on_hand"],
+ },
post: {
parameters: [
{
@@ -58651,6 +59967,28 @@ export default {
},
},
"/rpc/increment_webhook_success": {
+ get: {
+ parameters: [
+ {
+ format: "text",
+ in: "query",
+ name: "webhook_id",
+ 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) increment_webhook_success"],
+ },
post: {
parameters: [
{
@@ -58727,6 +60065,28 @@ export default {
},
},
"/rpc/is_last_job_operation": {
+ get: {
+ parameters: [
+ {
+ format: "text",
+ in: "query",
+ name: "operation_id",
+ 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) is_last_job_operation"],
+ },
post: {
parameters: [
{
@@ -58762,6 +60122,35 @@ export default {
},
},
"/rpc/get_next_sequence": {
+ get: {
+ parameters: [
+ {
+ format: "text",
+ in: "query",
+ name: "sequence_name",
+ required: true,
+ type: "string",
+ },
+ {
+ format: "text",
+ in: "query",
+ name: "company_id",
+ 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) get_next_sequence"],
+ },
post: {
parameters: [
{
@@ -58858,6 +60247,49 @@ export default {
},
},
"/rpc/nanoid": {
+ get: {
+ parameters: [
+ {
+ format: "text",
+ in: "query",
+ name: "prefix",
+ required: false,
+ type: "string",
+ },
+ {
+ format: "integer",
+ in: "query",
+ name: "size",
+ required: false,
+ type: "integer",
+ },
+ {
+ format: "text",
+ in: "query",
+ name: "alphabet",
+ required: false,
+ type: "string",
+ },
+ {
+ format: "double precision",
+ in: "query",
+ name: "additionalbytesfactor",
+ required: false,
+ type: "number",
+ },
+ ],
+ produces: [
+ "application/json",
+ "application/vnd.pgrst.object+json;nulls=stripped",
+ "application/vnd.pgrst.object+json",
+ ],
+ responses: {
+ "200": {
+ description: "OK",
+ },
+ },
+ tags: ["(rpc) nanoid"],
+ },
post: {
parameters: [
{
@@ -58904,6 +60336,35 @@ export default {
},
},
"/rpc/has_role": {
+ get: {
+ parameters: [
+ {
+ format: "text",
+ in: "query",
+ name: "required_role",
+ required: true,
+ type: "string",
+ },
+ {
+ format: "text",
+ in: "query",
+ name: "company",
+ 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) has_role"],
+ },
post: {
parameters: [
{
@@ -58943,6 +60404,28 @@ export default {
},
},
"/rpc/has_valid_api_key_for_company": {
+ get: {
+ parameters: [
+ {
+ format: "text",
+ in: "query",
+ name: "company",
+ 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) has_valid_api_key_for_company"],
+ },
post: {
parameters: [
{
@@ -59035,6 +60518,35 @@ export default {
},
},
"/rpc/groups_query": {
+ get: {
+ parameters: [
+ {
+ format: "text",
+ in: "query",
+ name: "_name",
+ required: false,
+ type: "string",
+ },
+ {
+ format: "text",
+ in: "query",
+ name: "_uid",
+ required: false,
+ type: "string",
+ },
+ ],
+ produces: [
+ "application/json",
+ "application/vnd.pgrst.object+json;nulls=stripped",
+ "application/vnd.pgrst.object+json",
+ ],
+ responses: {
+ "200": {
+ description: "OK",
+ },
+ },
+ tags: ["(rpc) groups_query"],
+ },
post: {
parameters: [
{
@@ -59073,6 +60585,42 @@ export default {
},
},
"/rpc/get_next_prefixed_sequence": {
+ get: {
+ parameters: [
+ {
+ format: "text",
+ in: "query",
+ name: "company_id",
+ required: true,
+ type: "string",
+ },
+ {
+ format: '"itemType"',
+ in: "query",
+ name: "item_type",
+ required: true,
+ type: "string",
+ },
+ {
+ format: "text",
+ in: "query",
+ name: "prefix",
+ 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) get_next_prefixed_sequence"],
+ },
post: {
parameters: [
{
@@ -59116,6 +60664,35 @@ export default {
},
},
"/rpc/get_active_job_operations_by_employee": {
+ get: {
+ parameters: [
+ {
+ format: "text",
+ in: "query",
+ name: "employee_id",
+ required: true,
+ type: "string",
+ },
+ {
+ format: "text",
+ in: "query",
+ name: "company_id",
+ 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) get_active_job_operations_by_employee"],
+ },
post: {
parameters: [
{
@@ -59212,6 +60789,28 @@ export default {
},
},
"/rpc/xid_counter": {
+ get: {
+ parameters: [
+ {
+ format: "public.xid",
+ in: "query",
+ name: "_xid",
+ 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) xid_counter"],
+ },
post: {
parameters: [
{
@@ -59247,6 +60846,42 @@ export default {
},
},
"/rpc/get_production_planning": {
+ get: {
+ parameters: [
+ {
+ format: "text",
+ in: "query",
+ name: "company_id",
+ required: true,
+ type: "string",
+ },
+ {
+ format: "text",
+ in: "query",
+ name: "location_id",
+ required: true,
+ type: "string",
+ },
+ {
+ format: "text[]",
+ in: "query",
+ name: "periods",
+ 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) get_production_planning"],
+ },
post: {
parameters: [
{
@@ -59293,6 +60928,63 @@ export default {
},
},
"/rpc/update_receipt_line_batch_tracking": {
+ get: {
+ parameters: [
+ {
+ format: "text",
+ in: "query",
+ name: "p_receipt_line_id",
+ required: true,
+ type: "string",
+ },
+ {
+ format: "text",
+ in: "query",
+ name: "p_receipt_id",
+ required: true,
+ type: "string",
+ },
+ {
+ format: "text",
+ in: "query",
+ name: "p_batch_number",
+ required: true,
+ type: "string",
+ },
+ {
+ format: "numeric",
+ in: "query",
+ name: "p_quantity",
+ required: true,
+ type: "number",
+ },
+ {
+ format: "text",
+ in: "query",
+ name: "p_tracked_entity_id",
+ required: false,
+ type: "string",
+ },
+ {
+ format: "jsonb",
+ in: "query",
+ name: "p_properties",
+ required: false,
+ type: "string",
+ },
+ ],
+ produces: [
+ "application/json",
+ "application/vnd.pgrst.object+json;nulls=stripped",
+ "application/vnd.pgrst.object+json",
+ ],
+ responses: {
+ "200": {
+ description: "OK",
+ },
+ },
+ tags: ["(rpc) update_receipt_line_batch_tracking"],
+ },
post: {
parameters: [
{
@@ -59352,6 +61044,42 @@ export default {
},
},
"/rpc/get_purchasing_planning": {
+ get: {
+ parameters: [
+ {
+ format: "text",
+ in: "query",
+ name: "company_id",
+ required: true,
+ type: "string",
+ },
+ {
+ format: "text",
+ in: "query",
+ name: "location_id",
+ required: true,
+ type: "string",
+ },
+ {
+ format: "text[]",
+ in: "query",
+ name: "periods",
+ 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) get_purchasing_planning"],
+ },
post: {
parameters: [
{
@@ -59398,6 +61126,28 @@ export default {
},
},
"/rpc/id": {
+ get: {
+ parameters: [
+ {
+ format: "text",
+ in: "query",
+ name: "_prefix",
+ required: false,
+ type: "string",
+ },
+ ],
+ produces: [
+ "application/json",
+ "application/vnd.pgrst.object+json;nulls=stripped",
+ "application/vnd.pgrst.object+json",
+ ],
+ responses: {
+ "200": {
+ description: "OK",
+ },
+ },
+ tags: ["(rpc) id"],
+ },
post: {
parameters: [
{
@@ -59432,6 +61182,42 @@ export default {
},
},
"/rpc/get_custom_field_unique_values": {
+ get: {
+ parameters: [
+ {
+ format: "text",
+ in: "query",
+ name: "table_name",
+ required: true,
+ type: "string",
+ },
+ {
+ format: "text",
+ in: "query",
+ name: "field_key",
+ required: true,
+ type: "string",
+ },
+ {
+ format: "text",
+ in: "query",
+ name: "company_id",
+ 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) get_custom_field_unique_values"],
+ },
post: {
parameters: [
{
@@ -59475,6 +61261,35 @@ export default {
},
},
"/rpc/get_claims": {
+ get: {
+ parameters: [
+ {
+ format: "text",
+ in: "query",
+ name: "uid",
+ required: true,
+ type: "string",
+ },
+ {
+ format: "text",
+ in: "query",
+ name: "company",
+ 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) get_claims"],
+ },
post: {
parameters: [
{
@@ -59514,6 +61329,28 @@ export default {
},
},
"/rpc/get_opportunity_with_related_records": {
+ get: {
+ parameters: [
+ {
+ format: "text",
+ in: "query",
+ name: "opportunity_id",
+ 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) get_opportunity_with_related_records"],
+ },
post: {
parameters: [
{
@@ -59644,6 +61481,28 @@ export default {
},
},
"/rpc/get_direct_ancestors_of_tracked_entity_strict": {
+ get: {
+ parameters: [
+ {
+ format: "text",
+ in: "query",
+ name: "p_tracked_entity_id",
+ 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) get_direct_ancestors_of_tracked_entity_strict"],
+ },
post: {
parameters: [
{
@@ -63171,7 +65030,7 @@ export default {
properties: {
id: {
description:
- "Note:\nThis is a Foreign Key to `supplierLocation.id`.<fk table='supplierLocation' column='id'/>",
+ "Note:\nThis is a Primary Key.<pk/>\nThis is a Foreign Key to `supplierLocation.id`.<fk table='supplierLocation' column='id'/>",
format: "text",
type: "string",
},
@@ -63220,7 +65079,7 @@ export default {
},
supplierLocationId: {
description:
- "Note:\nThis is a Primary Key.<pk/>\nThis is a Foreign Key to `supplierLocation.id`.<fk table='supplierLocation' column='id'/>",
+ "Note:\nThis is a Foreign Key to `supplierLocation.id`.<fk table='supplierLocation' column='id'/>",
format: "text",
type: "string",
},
@@ -82176,89 +84035,6 @@ export default {
},
type: "object",
},
- pickList: {
- required: [
- "id",
- "pickListId",
- "locationId",
- "status",
- "companyId",
- "createdAt",
- "createdBy",
- ],
- properties: {
- id: {
- default: "public.xid()",
- description: "Note:\nThis is a Primary Key.<pk/>",
- format: "text",
- type: "string",
- },
- pickListId: {
- format: "text",
- type: "string",
- },
- locationId: {
- description:
- "Note:\nThis is a Foreign Key to `location.id`.<fk table='location' column='id'/>",
- format: "text",
- type: "string",
- },
- status: {
- default: "Draft",
- enum: ["Draft", "Released", "In Progress", "Completed"],
- format: 'public."pickListStatus"',
- type: "string",
- },
- completedAt: {
- format: "timestamp with time zone",
- type: "string",
- },
- companyId: {
- description:
- "Note:\nThis is a Primary Key.<pk/>\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: {
- 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",
- },
- assignee: {
- description:
- "Note:\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",
- format: "text",
- type: "string",
- },
- customFields: {
- format: "jsonb",
- },
- tags: {
- format: "text[]",
- items: {
- type: "string",
- },
- type: "array",
- },
- },
- type: "object",
- },
salesInvoiceShipment: {
required: [
"id",
@@ -83278,6 +85054,89 @@ export default {
},
type: "object",
},
+ stockTransfer: {
+ required: [
+ "id",
+ "stockTransferId",
+ "locationId",
+ "status",
+ "companyId",
+ "createdAt",
+ "createdBy",
+ ],
+ properties: {
+ id: {
+ default: "public.xid()",
+ description: "Note:\nThis is a Primary Key.<pk/>",
+ format: "text",
+ type: "string",
+ },
+ stockTransferId: {
+ format: "text",
+ type: "string",
+ },
+ locationId: {
+ description:
+ "Note:\nThis is a Foreign Key to `location.id`.<fk table='location' column='id'/>",
+ format: "text",
+ type: "string",
+ },
+ status: {
+ default: "Draft",
+ enum: ["Draft", "Released", "In Progress", "Completed"],
+ format: 'public."stockTransferStatus"',
+ type: "string",
+ },
+ completedAt: {
+ format: "timestamp with time zone",
+ type: "string",
+ },
+ companyId: {
+ description:
+ "Note:\nThis is a Primary Key.<pk/>\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: {
+ 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",
+ },
+ assignee: {
+ description:
+ "Note:\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",
+ format: "text",
+ type: "string",
+ },
+ customFields: {
+ format: "jsonb",
+ },
+ tags: {
+ format: "text[]",
+ items: {
+ type: "string",
+ },
+ type: "array",
+ },
+ },
+ type: "object",
+ },
jobOperationsWithMakeMethods: {
properties: {
makeMethodId: {
@@ -83639,98 +85498,6 @@ export default {
},
type: "object",
},
- pickListLine: {
- required: [
- "id",
- "pickListId",
- "itemId",
- "quantity",
- "pickedQuantity",
- "companyId",
- "createdAt",
- "createdBy",
- ],
- properties: {
- id: {
- default: "public.xid()",
- description: "Note:\nThis is a Primary Key.<pk/>",
- format: "text",
- type: "string",
- },
- pickListId: {
- format: "text",
- type: "string",
- },
- jobId: {
- description:
- "Note:\nThis is a Foreign Key to `job.id`.<fk table='job' column='id'/>",
- format: "text",
- type: "string",
- },
- jobMaterialId: {
- description:
- "Note:\nThis is a Foreign Key to `jobMaterial.id`.<fk table='jobMaterial' column='id'/>",
- format: "text",
- type: "string",
- },
- itemId: {
- description:
- "Note:\nThis is a Foreign Key to `item.id`.<fk table='item' column='id'/>",
- format: "text",
- type: "string",
- },
- fromShelfId: {
- description:
- "Note:\nThis is a Foreign Key to `shelf.id`.<fk table='shelf' column='id'/>",
- format: "text",
- type: "string",
- },
- toShelfId: {
- description:
- "Note:\nThis is a Foreign Key to `shelf.id`.<fk table='shelf' column='id'/>",
- format: "text",
- type: "string",
- },
- quantity: {
- default: 0,
- format: "numeric",
- type: "number",
- },
- pickedQuantity: {
- default: 0,
- format: "numeric",
- type: "number",
- },
- companyId: {
- description:
- "Note:\nThis is a Primary Key.<pk/>\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: {
- 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",
- },
item: {
required: [
"id",
@@ -84451,6 +86218,98 @@ export default {
},
type: "object",
},
+ stockTransferLine: {
+ required: [
+ "id",
+ "stockTransferId",
+ "itemId",
+ "quantity",
+ "pickedQuantity",
+ "companyId",
+ "createdAt",
+ "createdBy",
+ ],
+ properties: {
+ id: {
+ default: "public.xid()",
+ description: "Note:\nThis is a Primary Key.<pk/>",
+ format: "text",
+ type: "string",
+ },
+ stockTransferId: {
+ format: "text",
+ type: "string",
+ },
+ jobId: {
+ description:
+ "Note:\nThis is a Foreign Key to `job.id`.<fk table='job' column='id'/>",
+ format: "text",
+ type: "string",
+ },
+ jobMaterialId: {
+ description:
+ "Note:\nThis is a Foreign Key to `jobMaterial.id`.<fk table='jobMaterial' column='id'/>",
+ format: "text",
+ type: "string",
+ },
+ itemId: {
+ description:
+ "Note:\nThis is a Foreign Key to `item.id`.<fk table='item' column='id'/>",
+ format: "text",
+ type: "string",
+ },
+ fromShelfId: {
+ description:
+ "Note:\nThis is a Foreign Key to `shelf.id`.<fk table='shelf' column='id'/>",
+ format: "text",
+ type: "string",
+ },
+ toShelfId: {
+ description:
+ "Note:\nThis is a Foreign Key to `shelf.id`.<fk table='shelf' column='id'/>",
+ format: "text",
+ type: "string",
+ },
+ quantity: {
+ default: 0,
+ format: "numeric",
+ type: "number",
+ },
+ pickedQuantity: {
+ default: 0,
+ format: "numeric",
+ type: "number",
+ },
+ companyId: {
+ description:
+ "Note:\nThis is a Primary Key.<pk/>\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: {
+ 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",
+ },
webhook: {
required: [
"id",
@@ -86075,6 +87934,7 @@ export default {
name: "Prefer",
description: "Preference",
required: false,
+ enum: ["params=single-object"],
in: "header",
type: "string",
},
@@ -111622,93 +113482,6 @@ export default {
in: "query",
type: "string",
},
- "body.pickList": {
- name: "pickList",
- description: "pickList",
- required: false,
- in: "body",
- schema: {
- $ref: "#/definitions/pickList",
- },
- },
- "rowFilter.pickList.id": {
- name: "id",
- required: false,
- in: "query",
- type: "string",
- },
- "rowFilter.pickList.pickListId": {
- name: "pickListId",
- required: false,
- in: "query",
- type: "string",
- },
- "rowFilter.pickList.locationId": {
- name: "locationId",
- required: false,
- in: "query",
- type: "string",
- },
- "rowFilter.pickList.status": {
- name: "status",
- required: false,
- in: "query",
- type: "string",
- },
- "rowFilter.pickList.completedAt": {
- name: "completedAt",
- required: false,
- in: "query",
- type: "string",
- },
- "rowFilter.pickList.companyId": {
- name: "companyId",
- required: false,
- in: "query",
- type: "string",
- },
- "rowFilter.pickList.createdAt": {
- name: "createdAt",
- required: false,
- in: "query",
- type: "string",
- },
- "rowFilter.pickList.createdBy": {
- name: "createdBy",
- required: false,
- in: "query",
- type: "string",
- },
- "rowFilter.pickList.updatedAt": {
- name: "updatedAt",
- required: false,
- in: "query",
- type: "string",
- },
- "rowFilter.pickList.updatedBy": {
- name: "updatedBy",
- required: false,
- in: "query",
- type: "string",
- },
- "rowFilter.pickList.assignee": {
- name: "assignee",
- required: false,
- in: "query",
- type: "string",
- },
- "rowFilter.pickList.customFields": {
- name: "customFields",
- required: false,
- in: "query",
- type: "string",
- },
- "rowFilter.pickList.tags": {
- name: "tags",
- required: false,
- in: "query",
- type: "string",
- },
"body.salesInvoiceShipment": {
name: "salesInvoiceShipment",
description: "salesInvoiceShipment",
@@ -112876,6 +114649,93 @@ export default {
in: "query",
type: "string",
},
+ "body.stockTransfer": {
+ name: "stockTransfer",
+ description: "stockTransfer",
+ required: false,
+ in: "body",
+ schema: {
+ $ref: "#/definitions/stockTransfer",
+ },
+ },
+ "rowFilter.stockTransfer.id": {
+ name: "id",
+ required: false,
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.stockTransfer.stockTransferId": {
+ name: "stockTransferId",
+ required: false,
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.stockTransfer.locationId": {
+ name: "locationId",
+ required: false,
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.stockTransfer.status": {
+ name: "status",
+ required: false,
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.stockTransfer.completedAt": {
+ name: "completedAt",
+ required: false,
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.stockTransfer.companyId": {
+ name: "companyId",
+ required: false,
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.stockTransfer.createdAt": {
+ name: "createdAt",
+ required: false,
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.stockTransfer.createdBy": {
+ name: "createdBy",
+ required: false,
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.stockTransfer.updatedAt": {
+ name: "updatedAt",
+ required: false,
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.stockTransfer.updatedBy": {
+ name: "updatedBy",
+ required: false,
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.stockTransfer.assignee": {
+ name: "assignee",
+ required: false,
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.stockTransfer.customFields": {
+ name: "customFields",
+ required: false,
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.stockTransfer.tags": {
+ name: "tags",
+ required: false,
+ in: "query",
+ type: "string",
+ },
"body.jobOperationsWithMakeMethods": {
name: "jobOperationsWithMakeMethods",
description: "jobOperationsWithMakeMethods",
@@ -113251,99 +115111,6 @@ export default {
in: "query",
type: "string",
},
- "body.pickListLine": {
- name: "pickListLine",
- description: "pickListLine",
- required: false,
- in: "body",
- schema: {
- $ref: "#/definitions/pickListLine",
- },
- },
- "rowFilter.pickListLine.id": {
- name: "id",
- required: false,
- in: "query",
- type: "string",
- },
- "rowFilter.pickListLine.pickListId": {
- name: "pickListId",
- required: false,
- in: "query",
- type: "string",
- },
- "rowFilter.pickListLine.jobId": {
- name: "jobId",
- required: false,
- in: "query",
- type: "string",
- },
- "rowFilter.pickListLine.jobMaterialId": {
- name: "jobMaterialId",
- required: false,
- in: "query",
- type: "string",
- },
- "rowFilter.pickListLine.itemId": {
- name: "itemId",
- required: false,
- in: "query",
- type: "string",
- },
- "rowFilter.pickListLine.fromShelfId": {
- name: "fromShelfId",
- required: false,
- in: "query",
- type: "string",
- },
- "rowFilter.pickListLine.toShelfId": {
- name: "toShelfId",
- required: false,
- in: "query",
- type: "string",
- },
- "rowFilter.pickListLine.quantity": {
- name: "quantity",
- required: false,
- in: "query",
- type: "string",
- },
- "rowFilter.pickListLine.pickedQuantity": {
- name: "pickedQuantity",
- required: false,
- in: "query",
- type: "string",
- },
- "rowFilter.pickListLine.companyId": {
- name: "companyId",
- required: false,
- in: "query",
- type: "string",
- },
- "rowFilter.pickListLine.createdAt": {
- name: "createdAt",
- required: false,
- in: "query",
- type: "string",
- },
- "rowFilter.pickListLine.createdBy": {
- name: "createdBy",
- required: false,
- in: "query",
- type: "string",
- },
- "rowFilter.pickListLine.updatedAt": {
- name: "updatedAt",
- required: false,
- in: "query",
- type: "string",
- },
- "rowFilter.pickListLine.updatedBy": {
- name: "updatedBy",
- required: false,
- in: "query",
- type: "string",
- },
"body.item": {
name: "item",
description: "item",
@@ -114199,6 +115966,99 @@ export default {
in: "query",
type: "string",
},
+ "body.stockTransferLine": {
+ name: "stockTransferLine",
+ description: "stockTransferLine",
+ required: false,
+ in: "body",
+ schema: {
+ $ref: "#/definitions/stockTransferLine",
+ },
+ },
+ "rowFilter.stockTransferLine.id": {
+ name: "id",
+ required: false,
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.stockTransferLine.stockTransferId": {
+ name: "stockTransferId",
+ required: false,
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.stockTransferLine.jobId": {
+ name: "jobId",
+ required: false,
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.stockTransferLine.jobMaterialId": {
+ name: "jobMaterialId",
+ required: false,
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.stockTransferLine.itemId": {
+ name: "itemId",
+ required: false,
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.stockTransferLine.fromShelfId": {
+ name: "fromShelfId",
+ required: false,
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.stockTransferLine.toShelfId": {
+ name: "toShelfId",
+ required: false,
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.stockTransferLine.quantity": {
+ name: "quantity",
+ required: false,
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.stockTransferLine.pickedQuantity": {
+ name: "pickedQuantity",
+ required: false,
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.stockTransferLine.companyId": {
+ name: "companyId",
+ required: false,
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.stockTransferLine.createdAt": {
+ name: "createdAt",
+ required: false,
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.stockTransferLine.createdBy": {
+ name: "createdBy",
+ required: false,
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.stockTransferLine.updatedAt": {
+ name: "updatedAt",
+ required: false,
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.stockTransferLine.updatedBy": {
+ name: "updatedBy",
+ required: false,
+ in: "query",
+ type: "string",
+ },
"body.webhook": {
name: "webhook",
description: "webhook",
@@ -115897,6 +117757,6 @@ export default {
},
externalDocs: {
description: "PostgREST Documentation",
- url: "https://postgrest.org/en/v13/references/api.html",
+ url: "https://postgrest.org/en/v12/references/api.html",
},
};
diff --git a/packages/database/src/types.ts b/packages/database/src/types.ts
index 62bb3cb52e..32c47683a0 100644
--- a/packages/database/src/types.ts
+++ b/packages/database/src/types.ts
@@ -17,10 +17,10 @@ export type Database = {
Functions: {
graphql: {
Args: {
- extensions?: Json
operationName?: string
query?: string
variables?: Json
+ extensions?: Json
}
Returns: Json
}
@@ -18495,443 +18495,6 @@ export type Database = {
}
Relationships: []
}
- pickList: {
- Row: {
- assignee: string | null
- companyId: string
- completedAt: string | null
- createdAt: string
- createdBy: string
- customFields: Json | null
- id: string
- locationId: string
- pickListId: string
- status: Database["public"]["Enums"]["pickListStatus"]
- tags: string[] | null
- updatedAt: string | null
- updatedBy: string | null
- }
- Insert: {
- assignee?: string | null
- companyId: string
- completedAt?: string | null
- createdAt?: string
- createdBy: string
- customFields?: Json | null
- id?: string
- locationId: string
- pickListId: string
- status?: Database["public"]["Enums"]["pickListStatus"]
- tags?: string[] | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
- Update: {
- assignee?: string | null
- companyId?: string
- completedAt?: string | null
- createdAt?: string
- createdBy?: string
- customFields?: Json | null
- id?: string
- locationId?: string
- pickListId?: string
- status?: Database["public"]["Enums"]["pickListStatus"]
- tags?: string[] | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
- Relationships: [
- {
- foreignKeyName: "pickList_assignee_fkey"
- columns: ["assignee"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickList_assignee_fkey"
- columns: ["assignee"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickList_assignee_fkey"
- columns: ["assignee"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickList_assignee_fkey"
- columns: ["assignee"]
- isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickList_assignee_fkey"
- columns: ["assignee"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- {
- foreignKeyName: "pickList_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "companies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickList_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "company"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickList_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "pickList_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "pickList_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickList_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickList_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickList_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickList_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- {
- foreignKeyName: "pickList_locationId_fkey"
- columns: ["locationId"]
- isOneToOne: false
- referencedRelation: "location"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickList_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickList_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickList_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickList_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickList_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- ]
- }
- pickListLine: {
- Row: {
- companyId: string
- createdAt: string
- createdBy: string
- fromShelfId: string | null
- id: string
- itemId: string
- jobId: string | null
- jobMaterialId: string | null
- pickedQuantity: number
- pickListId: string
- quantity: number
- toShelfId: string | null
- updatedAt: string | null
- updatedBy: string | null
- }
- Insert: {
- companyId: string
- createdAt?: string
- createdBy: string
- fromShelfId?: string | null
- id?: string
- itemId: string
- jobId?: string | null
- jobMaterialId?: string | null
- pickedQuantity?: number
- pickListId: string
- quantity?: number
- toShelfId?: string | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
- Update: {
- companyId?: string
- createdAt?: string
- createdBy?: string
- fromShelfId?: string | null
- id?: string
- itemId?: string
- jobId?: string | null
- jobMaterialId?: string | null
- pickedQuantity?: number
- pickListId?: string
- quantity?: number
- toShelfId?: string | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
- Relationships: [
- {
- foreignKeyName: "pickListLine_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "companies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickListLine_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "company"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickListLine_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "pickListLine_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "pickListLine_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickListLine_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickListLine_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickListLine_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickListLine_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- {
- foreignKeyName: "pickListLine_fromShelfId_fkey"
- columns: ["fromShelfId"]
- isOneToOne: false
- referencedRelation: "shelf"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickListLine_itemId_fkey"
- columns: ["itemId"]
- isOneToOne: false
- referencedRelation: "consumables"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickListLine_itemId_fkey"
- columns: ["itemId"]
- isOneToOne: false
- referencedRelation: "item"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickListLine_itemId_fkey"
- columns: ["itemId"]
- isOneToOne: false
- referencedRelation: "materials"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickListLine_itemId_fkey"
- columns: ["itemId"]
- isOneToOne: false
- referencedRelation: "parts"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickListLine_itemId_fkey"
- columns: ["itemId"]
- isOneToOne: false
- referencedRelation: "tools"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickListLine_jobId_fkey"
- columns: ["jobId"]
- isOneToOne: false
- referencedRelation: "job"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickListLine_jobId_fkey"
- columns: ["jobId"]
- isOneToOne: false
- referencedRelation: "jobs"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickListLine_jobId_fkey"
- columns: ["jobId"]
- isOneToOne: false
- referencedRelation: "openProductionOrders"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickListLine_jobMaterialId_fkey"
- columns: ["jobMaterialId"]
- isOneToOne: false
- referencedRelation: "jobMaterial"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickListLine_jobMaterialId_fkey"
- columns: ["jobMaterialId"]
- isOneToOne: false
- referencedRelation: "jobMaterialWithMakeMethodId"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickListLine_jobMaterialId_fkey"
- columns: ["jobMaterialId"]
- isOneToOne: false
- referencedRelation: "openJobMaterialLines"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickListLine_pickListId_fkey"
- columns: ["pickListId", "companyId"]
- isOneToOne: false
- referencedRelation: "pickList"
- referencedColumns: ["id", "companyId"]
- },
- {
- foreignKeyName: "pickListLine_toShelfId_fkey"
- columns: ["toShelfId"]
- isOneToOne: false
- referencedRelation: "shelf"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickListLine_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickListLine_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickListLine_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickListLine_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickListLine_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- ]
- }
pickMethod: {
Row: {
companyId: string
@@ -31250,6 +30813,443 @@ export type Database = {
},
]
}
+ stockTransfer: {
+ Row: {
+ assignee: string | null
+ companyId: string
+ completedAt: string | null
+ createdAt: string
+ createdBy: string
+ customFields: Json | null
+ id: string
+ locationId: string
+ status: Database["public"]["Enums"]["stockTransferStatus"]
+ stockTransferId: string
+ tags: string[] | null
+ updatedAt: string | null
+ updatedBy: string | null
+ }
+ Insert: {
+ assignee?: string | null
+ companyId: string
+ completedAt?: string | null
+ createdAt?: string
+ createdBy: string
+ customFields?: Json | null
+ id?: string
+ locationId: string
+ status?: Database["public"]["Enums"]["stockTransferStatus"]
+ stockTransferId: string
+ tags?: string[] | null
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Update: {
+ assignee?: string | null
+ companyId?: string
+ completedAt?: string | null
+ createdAt?: string
+ createdBy?: string
+ customFields?: Json | null
+ id?: string
+ locationId?: string
+ status?: Database["public"]["Enums"]["stockTransferStatus"]
+ stockTransferId?: string
+ tags?: string[] | null
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Relationships: [
+ {
+ foreignKeyName: "stockTransfer_assignee_fkey"
+ columns: ["assignee"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransfer_assignee_fkey"
+ columns: ["assignee"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransfer_assignee_fkey"
+ columns: ["assignee"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransfer_assignee_fkey"
+ columns: ["assignee"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransfer_assignee_fkey"
+ columns: ["assignee"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "stockTransfer_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransfer_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "company"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransfer_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "stockTransfer_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "stockTransfer_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransfer_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransfer_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransfer_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransfer_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "stockTransfer_locationId_fkey"
+ columns: ["locationId"]
+ isOneToOne: false
+ referencedRelation: "location"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransfer_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransfer_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransfer_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransfer_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransfer_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ ]
+ }
+ stockTransferLine: {
+ Row: {
+ companyId: string
+ createdAt: string
+ createdBy: string
+ fromShelfId: string | null
+ id: string
+ itemId: string
+ jobId: string | null
+ jobMaterialId: string | null
+ pickedQuantity: number
+ quantity: number
+ stockTransferId: string
+ toShelfId: string | null
+ updatedAt: string | null
+ updatedBy: string | null
+ }
+ Insert: {
+ companyId: string
+ createdAt?: string
+ createdBy: string
+ fromShelfId?: string | null
+ id?: string
+ itemId: string
+ jobId?: string | null
+ jobMaterialId?: string | null
+ pickedQuantity?: number
+ quantity?: number
+ stockTransferId: string
+ toShelfId?: string | null
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Update: {
+ companyId?: string
+ createdAt?: string
+ createdBy?: string
+ fromShelfId?: string | null
+ id?: string
+ itemId?: string
+ jobId?: string | null
+ jobMaterialId?: string | null
+ pickedQuantity?: number
+ quantity?: number
+ stockTransferId?: string
+ toShelfId?: string | null
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Relationships: [
+ {
+ foreignKeyName: "stockTransferLine_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransferLine_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "company"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransferLine_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "stockTransferLine_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "stockTransferLine_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransferLine_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransferLine_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransferLine_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransferLine_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "stockTransferLine_fromShelfId_fkey"
+ columns: ["fromShelfId"]
+ isOneToOne: false
+ referencedRelation: "shelf"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransferLine_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "consumables"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransferLine_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "item"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransferLine_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "materials"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransferLine_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "parts"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransferLine_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "tools"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransferLine_jobId_fkey"
+ columns: ["jobId"]
+ isOneToOne: false
+ referencedRelation: "job"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransferLine_jobId_fkey"
+ columns: ["jobId"]
+ isOneToOne: false
+ referencedRelation: "jobs"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransferLine_jobId_fkey"
+ columns: ["jobId"]
+ isOneToOne: false
+ referencedRelation: "openProductionOrders"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransferLine_jobMaterialId_fkey"
+ columns: ["jobMaterialId"]
+ isOneToOne: false
+ referencedRelation: "jobMaterial"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransferLine_jobMaterialId_fkey"
+ columns: ["jobMaterialId"]
+ isOneToOne: false
+ referencedRelation: "jobMaterialWithMakeMethodId"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransferLine_jobMaterialId_fkey"
+ columns: ["jobMaterialId"]
+ isOneToOne: false
+ referencedRelation: "openJobMaterialLines"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransferLine_stockTransferId_fkey"
+ columns: ["stockTransferId", "companyId"]
+ isOneToOne: false
+ referencedRelation: "stockTransfer"
+ referencedColumns: ["id", "companyId"]
+ },
+ {
+ foreignKeyName: "stockTransferLine_toShelfId_fkey"
+ columns: ["toShelfId"]
+ isOneToOne: false
+ referencedRelation: "shelf"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransferLine_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransferLine_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransferLine_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransferLine_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransferLine_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ ]
+ }
supplier: {
Row: {
accountManagerId: string | null
@@ -42894,14 +42894,14 @@ export type Database = {
Relationships: [
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["supplierCountryCode"]
+ columns: ["customerCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["alpha2"]
},
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["customerCountryCode"]
+ columns: ["supplierCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["alpha2"]
@@ -45956,14 +45956,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"]
@@ -48201,7 +48201,9 @@ export type Database = {
Returns: number
}
check_operation_dependencies: {
- Args: { operation_id: string }
+ Args: {
+ operation_id: string
+ }
Returns: boolean
}
create_rfq_from_model_v1: {
@@ -48210,158 +48212,173 @@ export type Database = {
customer_part_id: string
email: string
model_id: string
- notes?: Json
sequence_number: string
unit_of_measure: string
+ notes?: Json
}
Returns: {
rfq_id: string
- rfq_line_id: string
rfq_readable_id: string
+ rfq_line_id: string
}[]
}
create_rfq_from_models_v1: {
Args: {
company_id: string
email: string
- model_data: Json[]
sequence_number: string
+ model_data: Json[]
}
Returns: {
rfq_id: string
- rfq_line_ids: string[]
rfq_readable_id: string
+ rfq_line_ids: string[]
}[]
}
create_rfq_from_models_v2: {
Args: {
company_id: string
email: string
- model_data: Json[]
sequence_number: string
+ model_data: Json[]
}
Returns: {
rfq_id: string
- rfq_line_ids: string[]
rfq_readable_id: string
+ rfq_line_ids: string[]
}[]
}
get_active_job_count: {
- Args: { company_id: string; employee_id: string }
+ Args: {
+ employee_id: string
+ company_id: string
+ }
Returns: number
}
get_active_job_operations_by_employee: {
- Args: { company_id: string; employee_id: string }
+ Args: {
+ employee_id: string
+ company_id: string
+ }
Returns: {
- assignee: string
- description: string
id: string
- itemDescription: string
- itemReadableId: string
- jobCustomerId: string
- jobDeadlineType: Database["public"]["Enums"]["deadlineType"]
- jobDueDate: string
jobId: string
- jobReadableId: string
- jobStatus: Database["public"]["Enums"]["jobStatus"]
+ operationOrder: number
+ processId: string
+ workCenterId: string
+ description: string
+ setupTime: number
+ setupUnit: Database["public"]["Enums"]["factor"]
laborTime: number
laborUnit: Database["public"]["Enums"]["factor"]
machineTime: number
machineUnit: Database["public"]["Enums"]["factor"]
- operationOrder: number
operationOrderType: Database["public"]["Enums"]["methodOperationOrder"]
- operationQuantity: number
- operationStatus: Database["public"]["Enums"]["jobOperationStatus"]
+ jobReadableId: string
+ jobStatus: Database["public"]["Enums"]["jobStatus"]
+ jobDueDate: string
+ jobDeadlineType: Database["public"]["Enums"]["deadlineType"]
+ jobCustomerId: string
+ salesOrderReadableId: string
+ salesOrderId: string
+ salesOrderLineId: string
parentMaterialId: string
- processId: string
+ itemReadableId: string
+ itemDescription: string
+ operationStatus: Database["public"]["Enums"]["jobOperationStatus"]
+ operationQuantity: number
quantityComplete: number
quantityScrapped: number
- salesOrderId: string
- salesOrderLineId: string
- salesOrderReadableId: string
- setupTime: number
- setupUnit: Database["public"]["Enums"]["factor"]
- tags: string[]
thumbnailPath: string
- workCenterId: string
+ assignee: string
+ tags: string[]
}[]
}
get_active_job_operations_by_location: {
- Args: { location_id: string; work_center_ids: string[] }
+ Args: {
+ location_id: string
+ work_center_ids: string[]
+ }
Returns: {
- assignee: string
- description: string
id: string
- itemDescription: string
- itemReadableId: string
- jobCustomerId: string
- jobDeadlineType: Database["public"]["Enums"]["deadlineType"]
- jobDueDate: string
jobId: string
- jobMakeMethodId: string
- jobReadableId: string
- jobStatus: Database["public"]["Enums"]["jobStatus"]
+ operationOrder: number
+ priority: number
+ processId: string
+ workCenterId: string
+ description: string
+ setupTime: number
+ setupUnit: Database["public"]["Enums"]["factor"]
laborTime: number
laborUnit: Database["public"]["Enums"]["factor"]
machineTime: number
machineUnit: Database["public"]["Enums"]["factor"]
- operationOrder: number
operationOrderType: Database["public"]["Enums"]["methodOperationOrder"]
- operationQuantity: number
- operationStatus: Database["public"]["Enums"]["jobOperationStatus"]
+ jobMakeMethodId: string
+ assignee: string
+ tags: string[]
+ jobReadableId: string
+ jobStatus: Database["public"]["Enums"]["jobStatus"]
+ jobDueDate: string
+ jobDeadlineType: Database["public"]["Enums"]["deadlineType"]
+ jobCustomerId: string
+ salesOrderReadableId: string
+ salesOrderId: string
+ salesOrderLineId: string
parentMaterialId: string
- priority: number
- processId: string
+ itemReadableId: string
+ itemDescription: string
+ operationStatus: Database["public"]["Enums"]["jobOperationStatus"]
+ operationQuantity: number
quantityComplete: number
quantityScrapped: number
- salesOrderId: string
- salesOrderLineId: string
- salesOrderReadableId: string
- setupTime: number
- setupUnit: Database["public"]["Enums"]["factor"]
- tags: string[]
thumbnailPath: string
- workCenterId: string
}[]
}
get_assigned_job_operations: {
- Args: { company_id: string; user_id: string }
+ Args: {
+ user_id: string
+ company_id: string
+ }
Returns: {
- assignee: string
- description: string
id: string
- itemDescription: string
- itemReadableId: string
- jobCustomerId: string
- jobDeadlineType: Database["public"]["Enums"]["deadlineType"]
- jobDueDate: string
jobId: string
- jobReadableId: string
- jobStatus: Database["public"]["Enums"]["jobStatus"]
+ operationOrder: number
+ processId: string
+ workCenterId: string
+ description: string
+ setupTime: number
+ setupUnit: Database["public"]["Enums"]["factor"]
laborTime: number
laborUnit: Database["public"]["Enums"]["factor"]
machineTime: number
machineUnit: Database["public"]["Enums"]["factor"]
- operationOrder: number
operationOrderType: Database["public"]["Enums"]["methodOperationOrder"]
- operationQuantity: number
- operationStatus: Database["public"]["Enums"]["jobOperationStatus"]
+ jobReadableId: string
+ jobStatus: Database["public"]["Enums"]["jobStatus"]
+ jobDueDate: string
+ jobDeadlineType: Database["public"]["Enums"]["deadlineType"]
+ jobCustomerId: string
+ salesOrderReadableId: string
+ salesOrderId: string
+ salesOrderLineId: string
parentMaterialId: string
- processId: string
+ itemReadableId: string
+ itemDescription: string
+ operationStatus: Database["public"]["Enums"]["jobOperationStatus"]
+ operationQuantity: number
quantityComplete: number
quantityScrapped: number
- salesOrderId: string
- salesOrderLineId: string
- salesOrderReadableId: string
- setupTime: number
- setupUnit: Database["public"]["Enums"]["factor"]
- tags: string[]
thumbnailPath: string
- workCenterId: string
+ assignee: string
+ tags: string[]
}[]
}
get_claims: {
- Args: { company: string; uid: string }
+ Args: {
+ uid: string
+ company: string
+ }
Returns: Json
}
get_companies_with_any_role: {
@@ -48369,7 +48386,9 @@ export type Database = {
Returns: string[]
}
get_companies_with_employee_permission: {
- Args: { permission: string }
+ Args: {
+ permission: string
+ }
Returns: string[]
}
get_companies_with_employee_role: {
@@ -48377,7 +48396,9 @@ export type Database = {
Returns: string[]
}
get_companies_with_permission: {
- Args: { permission: string }
+ Args: {
+ permission: string
+ }
Returns: string[]
}
get_company_id_from_api_key: {
@@ -48385,392 +48406,441 @@ export type Database = {
Returns: string
}
get_company_id_from_foreign_key: {
- Args: { foreign_key: string; tbl: string }
+ Args: {
+ foreign_key: string
+ tbl: string
+ }
Returns: string
}
get_consumable_details: {
- Args: { item_id: string }
+ Args: {
+ item_id: string
+ }
Returns: {
active: boolean
assignee: string
- companyId: string
- createdAt: string
- createdBy: string
- customFields: Json
defaultMethodType: Database["public"]["Enums"]["methodType"]
description: string
- id: string
itemTrackingType: Database["public"]["Enums"]["itemTrackingType"]
- modelName: string
- modelPath: string
- modelSize: number
- modelUploadId: string
name: string
+ replenishmentSystem: Database["public"]["Enums"]["itemReplenishmentSystem"]
+ unitOfMeasureCode: string
notes: Json
+ thumbnailPath: string
+ modelUploadId: string
+ modelPath: string
+ modelName: string
+ modelSize: number
+ id: string
+ companyId: string
readableId: string
- readableIdWithRevision: string
- replenishmentSystem: Database["public"]["Enums"]["itemReplenishmentSystem"]
revision: string
- revisions: Json
+ readableIdWithRevision: string
supplierIds: string
- tags: string[]
- thumbnailPath: string
unitOfMeasure: string
- unitOfMeasureCode: string
- updatedAt: string
+ revisions: Json
+ customFields: Json
+ tags: string[]
+ createdBy: string
+ createdAt: string
updatedBy: string
+ updatedAt: string
}[]
}
get_custom_field_unique_values: {
- Args: { company_id: string; field_key: string; table_name: string }
+ Args: {
+ table_name: string
+ field_key: string
+ company_id: string
+ }
Returns: {
value: Json
}[]
}
get_customer_ids_with_customer_permission: {
- Args: { permission: string }
+ Args: {
+ permission: string
+ }
Returns: string[]
}
get_direct_ancestors_of_tracked_entity: {
- Args: { p_tracked_entity_id: string }
+ Args: {
+ p_tracked_entity_id: string
+ }
Returns: {
- activityAttributes: Json
- attributes: Json
+ trackedActivityId: string
id: string
quantity: number
+ status: Database["public"]["Enums"]["trackedEntityStatus"]
sourceDocument: string
sourceDocumentId: string
sourceDocumentReadableId: string
- status: Database["public"]["Enums"]["trackedEntityStatus"]
- trackedActivityId: string
+ activityAttributes: Json
+ attributes: Json
}[]
}
get_direct_ancestors_of_tracked_entity_strict: {
- Args: { p_tracked_entity_id: string }
+ Args: {
+ p_tracked_entity_id: string
+ }
Returns: {
- activityAttributes: Json
- attributes: Json
+ trackedActivityId: string
id: string
quantity: number
+ status: Database["public"]["Enums"]["trackedEntityStatus"]
sourceDocument: string
sourceDocumentId: string
sourceDocumentReadableId: string
- status: Database["public"]["Enums"]["trackedEntityStatus"]
- trackedActivityId: string
+ activityAttributes: Json
+ attributes: Json
}[]
}
get_direct_descendants_of_tracked_entity: {
- Args: { p_tracked_entity_id: string }
+ Args: {
+ p_tracked_entity_id: string
+ }
Returns: {
- activityAttributes: Json
- attributes: Json
+ trackedActivityId: string
id: string
quantity: number
+ status: Database["public"]["Enums"]["trackedEntityStatus"]
sourceDocument: string
sourceDocumentId: string
sourceDocumentReadableId: string
- status: Database["public"]["Enums"]["trackedEntityStatus"]
- trackedActivityId: string
+ activityAttributes: Json
+ attributes: Json
}[]
}
get_direct_descendants_of_tracked_entity_strict: {
- Args: { p_tracked_entity_id: string }
+ Args: {
+ p_tracked_entity_id: string
+ }
Returns: {
- activityAttributes: Json
- attributes: Json
+ trackedActivityId: string
id: string
quantity: number
+ status: Database["public"]["Enums"]["trackedEntityStatus"]
sourceDocument: string
sourceDocumentId: string
sourceDocumentReadableId: string
- status: Database["public"]["Enums"]["trackedEntityStatus"]
- trackedActivityId: string
+ activityAttributes: Json
+ attributes: Json
}[]
}
get_inventory_quantities: {
- Args: { company_id: string; location_id: string }
+ Args: {
+ company_id: string
+ location_id: string
+ }
Returns: {
+ id: string
+ readableId: string
+ readableIdWithRevision: string
+ name: string
active: boolean
- daysRemaining: number
- demandAccumulationPeriod: number
- demandAccumulationSafetyStock: number
- dimension: string
+ type: Database["public"]["Enums"]["itemType"]
+ itemTrackingType: Database["public"]["Enums"]["itemTrackingType"]
+ replenishmentSystem: Database["public"]["Enums"]["itemReplenishmentSystem"]
+ materialSubstanceId: string
+ materialFormId: string
dimensionId: string
- finish: string
+ dimension: string
finishId: string
- grade: string
+ finish: string
gradeId: string
- id: string
- itemTrackingType: Database["public"]["Enums"]["itemTrackingType"]
- leadTime: number
- lotSize: number
- materialFormId: string
- materialSubstanceId: string
+ grade: string
materialType: string
materialTypeId: string
- maximumInventoryQuantity: number
- maximumOrderQuantity: number
+ thumbnailPath: string
+ unitOfMeasureCode: string
+ leadTime: number
+ lotSize: number
+ reorderingPolicy: Database["public"]["Enums"]["itemReorderingPolicy"]
+ demandAccumulationPeriod: number
+ demandAccumulationSafetyStock: number
+ reorderPoint: number
+ reorderQuantity: number
minimumOrderQuantity: number
- name: string
+ maximumOrderQuantity: number
+ maximumInventoryQuantity: number
orderMultiple: number
quantityOnHand: number
- quantityOnProductionDemand: number
- quantityOnProductionOrder: number
- quantityOnPurchaseOrder: number
quantityOnSalesOrder: number
- readableId: string
- readableIdWithRevision: string
- reorderingPolicy: Database["public"]["Enums"]["itemReorderingPolicy"]
- reorderPoint: number
- reorderQuantity: number
- replenishmentSystem: Database["public"]["Enums"]["itemReplenishmentSystem"]
- thumbnailPath: string
- type: Database["public"]["Enums"]["itemType"]
- unitOfMeasureCode: string
+ quantityOnPurchaseOrder: number
+ quantityOnProductionOrder: number
+ quantityOnProductionDemand: number
usageLast30Days: number
usageLast90Days: number
+ daysRemaining: number
}[]
}
get_item_quantities_by_tracking_id: {
- Args: { company_id: string; item_id: string; location_id: string }
+ Args: {
+ item_id: string
+ company_id: string
+ location_id: string
+ }
Returns: {
itemId: string
- quantity: number
shelfId: string
shelfName: string
trackedEntityId: string
+ quantity: number
}[]
}
get_job_method: {
- Args: { jid: string }
+ Args: {
+ jid: string
+ }
Returns: {
- description: string
- isRoot: boolean
- itemId: string
- itemReadableId: string
- itemType: string
jobId: string
+ methodMaterialId: string
jobMakeMethodId: string
jobMaterialMakeMethodId: string
- kit: boolean
- methodMaterialId: string
+ itemId: string
+ itemReadableId: string
+ description: string
+ itemType: string
+ quantity: number
+ unitCost: number
methodType: Database["public"]["Enums"]["methodType"]
- order: number
parentMaterialId: string
- quantity: number
+ order: number
+ isRoot: boolean
+ kit: boolean
revision: string
- shelfId: string
- unitCost: number
version: number
+ shelfId: string
}[]
}
get_job_methods_by_method_id: {
- Args: { mid: string }
+ Args: {
+ mid: string
+ }
Returns: {
- description: string
- isRoot: boolean
- itemId: string
- itemReadableId: string
- itemType: string
jobId: string
+ methodMaterialId: string
jobMakeMethodId: string
jobMaterialMakeMethodId: string
- kit: boolean
- methodMaterialId: string
+ itemId: string
+ itemReadableId: string
+ description: string
+ unitOfMeasureCode: string
+ itemType: string
+ quantity: number
+ unitCost: number
methodType: Database["public"]["Enums"]["methodType"]
- order: number
parentMaterialId: string
- quantity: number
+ order: number
+ kit: boolean
+ isRoot: boolean
shelfId: string
- unitCost: number
- unitOfMeasureCode: string
}[]
}
get_job_operation_by_id: {
- Args: { operation_id: string }
+ Args: {
+ operation_id: string
+ }
Returns: {
- description: string
id: string
- itemDescription: string
- itemId: string
- itemModelId: string
- itemModelName: string
- itemModelPath: string
- itemModelSize: number
- itemReadableId: string
- itemUnitOfMeasure: string
- jobDeadlineType: Database["public"]["Enums"]["deadlineType"]
- jobDueDate: string
jobId: string
jobMakeMethodId: string
- jobReadableId: string
- jobStatus: Database["public"]["Enums"]["jobStatus"]
+ operationOrder: number
+ processId: string
+ workCenterId: string
+ description: string
+ setupTime: number
+ setupUnit: Database["public"]["Enums"]["factor"]
laborTime: number
laborUnit: Database["public"]["Enums"]["factor"]
machineTime: number
machineUnit: Database["public"]["Enums"]["factor"]
- operationOrder: number
operationOrderType: Database["public"]["Enums"]["methodOperationOrder"]
- operationQuantity: number
- operationStatus: Database["public"]["Enums"]["jobOperationStatus"]
+ jobReadableId: string
+ jobStatus: Database["public"]["Enums"]["jobStatus"]
+ jobDueDate: string
+ jobDeadlineType: Database["public"]["Enums"]["deadlineType"]
parentMaterialId: string
- processId: string
+ itemId: string
+ itemReadableId: string
+ itemDescription: string
+ itemUnitOfMeasure: string
+ itemModelPath: string
+ itemModelId: string
+ itemModelName: string
+ itemModelSize: number
+ operationStatus: Database["public"]["Enums"]["jobOperationStatus"]
+ operationQuantity: number
quantityComplete: number
quantityReworked: number
quantityScrapped: number
- setupTime: number
- setupUnit: Database["public"]["Enums"]["factor"]
- workCenterId: string
workInstruction: Json
}[]
}
get_job_operations_by_work_center: {
- Args: { location_id: string; work_center_id: string }
+ Args: {
+ work_center_id: string
+ location_id: string
+ }
Returns: {
- description: string
id: string
- itemReadableId: string
- jobDeadlineType: Database["public"]["Enums"]["deadlineType"]
- jobDueDate: string
jobId: string
- jobReadableId: string
- jobStatus: Database["public"]["Enums"]["jobStatus"]
+ operationOrder: number
+ processId: string
+ workCenterId: string
+ description: string
+ setupTime: number
+ setupUnit: Database["public"]["Enums"]["factor"]
laborTime: number
laborUnit: Database["public"]["Enums"]["factor"]
machineTime: number
machineUnit: Database["public"]["Enums"]["factor"]
- operationOrder: number
operationOrderType: Database["public"]["Enums"]["methodOperationOrder"]
- operationQuantity: number
- operationStatus: Database["public"]["Enums"]["jobOperationStatus"]
+ jobReadableId: string
+ jobStatus: Database["public"]["Enums"]["jobStatus"]
+ jobDueDate: string
+ jobDeadlineType: Database["public"]["Enums"]["deadlineType"]
parentMaterialId: string
- processId: string
+ itemReadableId: string
+ operationStatus: Database["public"]["Enums"]["jobOperationStatus"]
+ operationQuantity: number
quantityComplete: number
quantityScrapped: number
- setupTime: number
- setupUnit: Database["public"]["Enums"]["factor"]
- workCenterId: string
}[]
}
get_job_quantity_on_hand: {
- Args: { company_id: string; job_id: string; location_id: string }
+ Args: {
+ job_id: string
+ company_id: string
+ location_id: string
+ }
Returns: {
- description: string
- estimatedQuantity: number
id: string
+ jobMaterialItemId: string
+ jobMakeMethodId: string
itemReadableId: string
+ name: string
+ description: string
itemTrackingType: Database["public"]["Enums"]["itemTrackingType"]
- jobMakeMethodId: string
- jobMaterialItemId: string
methodType: Database["public"]["Enums"]["methodType"]
- name: string
- quantityFromProductionOrderInShelf: number
- quantityFromProductionOrderNotInShelf: number
+ type: Database["public"]["Enums"]["itemType"]
+ thumbnailPath: string
+ unitOfMeasureCode: string
+ quantityPerParent: number
+ estimatedQuantity: number
quantityIssued: number
quantityOnHandInShelf: number
quantityOnHandNotInShelf: number
- quantityOnProductionOrder: number
- quantityOnPurchaseOrder: number
quantityOnSalesOrder: number
- quantityPerParent: number
+ quantityOnPurchaseOrder: number
+ quantityOnProductionOrder: number
+ quantityFromProductionOrderInShelf: number
+ quantityFromProductionOrderNotInShelf: number
shelfName: string
- thumbnailPath: string
- type: Database["public"]["Enums"]["itemType"]
- unitOfMeasureCode: string
}[]
}
get_material_details: {
- Args: { item_id: string }
+ Args: {
+ item_id: string
+ }
Returns: {
active: boolean
assignee: string
- companyId: string
- createdAt: string
- createdBy: string
- customFields: Json
defaultMethodType: Database["public"]["Enums"]["methodType"]
description: string
- dimensionId: string
- dimensions: string
- finish: string
- finishId: string
- grade: string
- gradeId: string
- id: string
itemTrackingType: Database["public"]["Enums"]["itemTrackingType"]
- materialForm: string
- materialFormId: string
- materialSubstance: string
- materialSubstanceId: string
- materialType: string
- materialTypeId: string
- modelName: string
- modelPath: string
- modelSize: number
- modelUploadId: string
name: string
+ replenishmentSystem: Database["public"]["Enums"]["itemReplenishmentSystem"]
+ unitOfMeasureCode: string
notes: Json
+ thumbnailPath: string
+ modelUploadId: string
+ modelPath: string
+ modelName: string
+ modelSize: number
+ id: string
+ companyId: string
readableId: string
- readableIdWithRevision: string
- replenishmentSystem: Database["public"]["Enums"]["itemReplenishmentSystem"]
revision: string
- revisions: Json
+ readableIdWithRevision: string
supplierIds: string
- tags: string[]
- thumbnailPath: string
unitOfMeasure: string
- unitOfMeasureCode: string
- updatedAt: string
+ revisions: Json
+ materialForm: string
+ materialSubstance: string
+ finish: string
+ grade: string
+ dimensions: string
+ materialType: string
+ materialSubstanceId: string
+ materialFormId: string
+ materialTypeId: string
+ dimensionId: string
+ gradeId: string
+ finishId: string
+ customFields: Json
+ tags: string[]
+ createdBy: string
+ createdAt: string
updatedBy: string
+ updatedAt: string
}[]
}
get_material_naming_details: {
- Args: { readable_id: string }
- Returns: {
- dimensions: string
- finish: string
- grade: string
+ Args: {
+ readable_id: string
+ }
+ Returns: {
id: string
- materialType: string
- materialTypeCode: string
shape: string
shapeCode: string
substance: string
substanceCode: string
+ finish: string
+ grade: string
+ dimensions: string
+ materialType: string
+ materialTypeCode: string
}[]
}
get_method_tree: {
- Args: { uid: string }
+ Args: {
+ uid: string
+ }
Returns: {
- description: string
- externalId: Json
- isRoot: boolean
+ methodMaterialId: string
+ makeMethodId: string
+ materialMakeMethodId: string
itemId: string
itemReadableId: string
- itemTrackingType: string
itemType: string
- kit: boolean
- makeMethodId: string
- materialMakeMethodId: string
- methodMaterialId: string
+ description: string
+ unitOfMeasureCode: string
+ unitCost: number
+ quantity: number
methodType: Database["public"]["Enums"]["methodType"]
- operationId: string
- order: number
+ itemTrackingType: string
parentMaterialId: string
- quantity: number
+ order: number
+ operationId: string
+ isRoot: boolean
+ kit: boolean
revision: string
- shelfIds: Json
- unitCost: number
- unitOfMeasureCode: string
+ externalId: Json
version: number
+ shelfIds: Json
}[]
}
get_my_claim: {
- Args: { claim: string }
+ Args: {
+ claim: string
+ }
Returns: Json
}
get_my_permission: {
- Args: { claim: string }
+ Args: {
+ claim: string
+ }
Returns: Json
}
get_next_numeric_sequence: {
@@ -48789,84 +48859,105 @@ export type Database = {
Returns: string
}
get_next_sequence: {
- Args: { company_id: string; sequence_name: string }
+ Args: {
+ sequence_name: string
+ company_id: string
+ }
Returns: string
}
get_opportunity_with_related_records: {
- Args: { opportunity_id: string }
+ Args: {
+ opportunity_id: string
+ }
Returns: {
+ id: string
companyId: string
customerId: string
- id: string
purchaseOrderDocumentPath: string
- quotes: Json
requestForQuoteDocumentPath: string
- salesOrders: Json
salesRfqs: Json
+ quotes: Json
+ salesOrders: Json
}[]
}
get_part_details: {
- Args: { item_id: string }
+ Args: {
+ item_id: string
+ }
Returns: {
active: boolean
assignee: string
- companyId: string
- createdAt: string
- createdBy: string
- customFields: Json
defaultMethodType: Database["public"]["Enums"]["methodType"]
description: string
- id: string
itemTrackingType: Database["public"]["Enums"]["itemTrackingType"]
+ name: string
+ replenishmentSystem: Database["public"]["Enums"]["itemReplenishmentSystem"]
+ unitOfMeasureCode: string
+ notes: Json
+ thumbnailPath: string
modelId: string
- modelName: string
modelPath: string
+ modelName: string
modelSize: number
- name: string
- notes: Json
+ id: string
+ companyId: string
+ unitOfMeasure: string
readableId: string
- readableIdWithRevision: string
- replenishmentSystem: Database["public"]["Enums"]["itemReplenishmentSystem"]
revision: string
+ readableIdWithRevision: string
revisions: Json
+ customFields: Json
tags: string[]
- thumbnailPath: string
- unitOfMeasure: string
- unitOfMeasureCode: string
- updatedAt: string
+ createdBy: string
+ createdAt: string
updatedBy: string
+ updatedAt: string
}[]
}
get_permission_companies: {
- Args: { claim: string }
+ Args: {
+ claim: string
+ }
Returns: string[]
}
get_production_planning: {
- Args: { company_id: string; location_id: string; periods: string[] }
+ Args: {
+ company_id: string
+ location_id: string
+ periods: string[]
+ }
Returns: {
- active: boolean
- demandAccumulationPeriod: number
- demandAccumulationSafetyStock: number
id: string
+ readableIdWithRevision: string
+ name: string
+ active: boolean
+ type: Database["public"]["Enums"]["itemType"]
itemTrackingType: Database["public"]["Enums"]["itemTrackingType"]
+ replenishmentSystem: Database["public"]["Enums"]["itemReplenishmentSystem"]
+ thumbnailPath: string
+ unitOfMeasureCode: string
leadTime: number
- lotSize: number
manufacturingBlocked: boolean
- maximumInventoryQuantity: number
- maximumOrderQuantity: number
- minimumOrderQuantity: number
- name: string
- orderMultiple: number
- quantityOnHand: number
- readableIdWithRevision: string
+ lotSize: number
reorderingPolicy: Database["public"]["Enums"]["itemReorderingPolicy"]
+ demandAccumulationPeriod: number
+ demandAccumulationSafetyStock: number
reorderPoint: number
reorderQuantity: number
- replenishmentSystem: Database["public"]["Enums"]["itemReplenishmentSystem"]
- thumbnailPath: string
- type: Database["public"]["Enums"]["itemType"]
- unitOfMeasureCode: string
+ minimumOrderQuantity: number
+ maximumOrderQuantity: number
+ orderMultiple: number
+ quantityOnHand: number
+ maximumInventoryQuantity: number
week1: number
+ week2: number
+ week3: number
+ week4: number
+ week5: number
+ week6: number
+ week7: number
+ week8: number
+ week9: number
week10: number
week11: number
week12: number
@@ -48877,7 +48968,6 @@ export type Database = {
week17: number
week18: number
week19: number
- week2: number
week20: number
week21: number
week22: number
@@ -48888,7 +48978,6 @@ export type Database = {
week27: number
week28: number
week29: number
- week3: number
week30: number
week31: number
week32: number
@@ -48899,7 +48988,6 @@ export type Database = {
week37: number
week38: number
week39: number
- week4: number
week40: number
week41: number
week42: number
@@ -48910,42 +48998,49 @@ export type Database = {
week47: number
week48: number
week49: number
- week5: number
week50: number
week51: number
week52: number
- week6: number
- week7: number
- week8: number
- week9: number
}[]
}
get_production_projections: {
- Args: { company_id: string; location_id: string; periods: string[] }
+ Args: {
+ company_id: string
+ location_id: string
+ periods: string[]
+ }
Returns: {
- active: boolean
- demandAccumulationPeriod: number
- demandAccumulationSafetyStock: number
id: string
+ readableIdWithRevision: string
+ name: string
+ active: boolean
+ type: Database["public"]["Enums"]["itemType"]
itemTrackingType: Database["public"]["Enums"]["itemTrackingType"]
+ replenishmentSystem: Database["public"]["Enums"]["itemReplenishmentSystem"]
+ thumbnailPath: string
+ unitOfMeasureCode: string
leadTime: number
- lotSize: number
manufacturingBlocked: boolean
- maximumInventoryQuantity: number
- maximumOrderQuantity: number
- minimumOrderQuantity: number
- name: string
- orderMultiple: number
- quantityOnHand: number
- readableIdWithRevision: string
+ lotSize: number
reorderingPolicy: Database["public"]["Enums"]["itemReorderingPolicy"]
+ demandAccumulationPeriod: number
+ demandAccumulationSafetyStock: number
reorderPoint: number
reorderQuantity: number
- replenishmentSystem: Database["public"]["Enums"]["itemReplenishmentSystem"]
- thumbnailPath: string
- type: Database["public"]["Enums"]["itemType"]
- unitOfMeasureCode: string
+ minimumOrderQuantity: number
+ maximumOrderQuantity: number
+ orderMultiple: number
+ quantityOnHand: number
+ maximumInventoryQuantity: number
week1: number
+ week2: number
+ week3: number
+ week4: number
+ week5: number
+ week6: number
+ week7: number
+ week8: number
+ week9: number
week10: number
week11: number
week12: number
@@ -48956,7 +49051,6 @@ export type Database = {
week17: number
week18: number
week19: number
- week2: number
week20: number
week21: number
week22: number
@@ -48967,7 +49061,6 @@ export type Database = {
week27: number
week28: number
week29: number
- week3: number
week30: number
week31: number
week32: number
@@ -48978,7 +49071,6 @@ export type Database = {
week37: number
week38: number
week39: number
- week4: number
week40: number
week41: number
week42: number
@@ -48989,46 +49081,53 @@ export type Database = {
week47: number
week48: number
week49: number
- week5: number
week50: number
week51: number
week52: number
- week6: number
- week7: number
- week8: number
- week9: number
}[]
}
get_purchasing_planning: {
- Args: { company_id: string; location_id: string; periods: string[] }
+ Args: {
+ company_id: string
+ location_id: string
+ periods: string[]
+ }
Returns: {
- active: boolean
- conversionFactor: number
- demandAccumulationPeriod: number
- demandAccumulationSafetyStock: number
id: string
+ readableIdWithRevision: string
+ name: string
+ active: boolean
+ type: Database["public"]["Enums"]["itemType"]
itemTrackingType: Database["public"]["Enums"]["itemTrackingType"]
+ replenishmentSystem: Database["public"]["Enums"]["itemReplenishmentSystem"]
+ thumbnailPath: string
+ unitOfMeasureCode: string
leadTime: number
- lotSize: number
- maximumInventoryQuantity: number
- maximumOrderQuantity: number
- minimumOrderQuantity: number
- name: string
- orderMultiple: number
- preferredSupplierId: string
purchasingBlocked: boolean
- purchasingUnitOfMeasureCode: string
- quantityOnHand: number
- readableIdWithRevision: string
+ lotSize: number
reorderingPolicy: Database["public"]["Enums"]["itemReorderingPolicy"]
+ demandAccumulationPeriod: number
+ demandAccumulationSafetyStock: number
reorderPoint: number
reorderQuantity: number
- replenishmentSystem: Database["public"]["Enums"]["itemReplenishmentSystem"]
+ minimumOrderQuantity: number
+ maximumOrderQuantity: number
+ orderMultiple: number
+ quantityOnHand: number
+ maximumInventoryQuantity: number
suppliers: Json
- thumbnailPath: string
- type: Database["public"]["Enums"]["itemType"]
- unitOfMeasureCode: string
+ preferredSupplierId: string
+ purchasingUnitOfMeasureCode: string
+ conversionFactor: number
week1: number
+ week2: number
+ week3: number
+ week4: number
+ week5: number
+ week6: number
+ week7: number
+ week8: number
+ week9: number
week10: number
week11: number
week12: number
@@ -49039,7 +49138,6 @@ export type Database = {
week17: number
week18: number
week19: number
- week2: number
week20: number
week21: number
week22: number
@@ -49050,7 +49148,6 @@ export type Database = {
week27: number
week28: number
week29: number
- week3: number
week30: number
week31: number
week32: number
@@ -49061,7 +49158,6 @@ export type Database = {
week37: number
week38: number
week39: number
- week4: number
week40: number
week41: number
week42: number
@@ -49072,273 +49168,307 @@ export type Database = {
week47: number
week48: number
week49: number
- week5: number
week50: number
week51: number
week52: number
- week6: number
- week7: number
- week8: number
- week9: number
}[]
}
get_quote_methods: {
- Args: { qid: string }
+ Args: {
+ qid: string
+ }
Returns: {
- description: string
- externalId: Json
- isRoot: boolean
+ quoteId: string
+ quoteLineId: string
+ methodMaterialId: string
+ quoteMakeMethodId: string
+ quoteMaterialMakeMethodId: string
itemId: string
itemReadableId: string
+ description: string
itemType: string
- kit: boolean
- methodMaterialId: string
+ quantity: number
+ unitCost: number
methodType: Database["public"]["Enums"]["methodType"]
- order: number
parentMaterialId: string
- quantity: number
- quoteId: string
- quoteLineId: string
- quoteMakeMethodId: string
- quoteMaterialMakeMethodId: string
+ order: number
+ isRoot: boolean
+ kit: boolean
revision: string
- shelfId: string
- unitCost: number
+ externalId: Json
version: number
+ shelfId: string
}[]
}
get_quote_methods_by_method_id: {
- Args: { mid: string }
+ Args: {
+ mid: string
+ }
Returns: {
- description: string
- externalId: Json
- isRoot: boolean
+ quoteId: string
+ quoteLineId: string
+ methodMaterialId: string
+ quoteMakeMethodId: string
+ quoteMaterialMakeMethodId: string
itemId: string
itemReadableId: string
- itemTrackingType: string
+ description: string
+ unitOfMeasureCode: string
itemType: string
- kit: boolean
- methodMaterialId: string
+ itemTrackingType: string
+ quantity: number
+ unitCost: number
methodType: Database["public"]["Enums"]["methodType"]
- order: number
parentMaterialId: string
- quantity: number
- quoteId: string
- quoteLineId: string
- quoteMakeMethodId: string
- quoteMaterialMakeMethodId: string
+ order: number
+ isRoot: boolean
+ kit: boolean
revision: string
- shelfId: string
- unitCost: number
- unitOfMeasureCode: string
+ externalId: Json
version: number
+ shelfId: string
}[]
}
get_radan_v1: {
- Args: { company_id: string; processes: string[] }
+ Args: {
+ company_id: string
+ processes: string[]
+ }
Returns: {
- assignee: string
- description: string
id: string
- itemDescription: string
- itemId: string
- itemReadableId: string
- jobCustomerId: string
- jobDeadlineType: Database["public"]["Enums"]["deadlineType"]
- jobDueDate: string
jobId: string
- jobLocationName: string
- jobMakeMethodId: string
- jobReadableId: string
- jobStatus: Database["public"]["Enums"]["jobStatus"]
+ operationOrder: number
+ priority: number
+ processId: string
+ workCenterId: string
+ description: string
+ setupTime: number
+ setupUnit: Database["public"]["Enums"]["factor"]
laborTime: number
laborUnit: Database["public"]["Enums"]["factor"]
machineTime: number
machineUnit: Database["public"]["Enums"]["factor"]
- materialDimension: string
- materialFinish: string
- materialForm: string
- materialGrade: string
- materialItemDescription: string
- materialItemReadableId: string
- materialSubstance: string
- operationOrder: number
operationOrderType: Database["public"]["Enums"]["methodOperationOrder"]
- operationQuantity: number
- operationStatus: Database["public"]["Enums"]["jobOperationStatus"]
+ jobMakeMethodId: string
+ assignee: string
+ tags: string[]
+ jobReadableId: string
+ jobStatus: Database["public"]["Enums"]["jobStatus"]
+ jobDueDate: string
+ jobDeadlineType: Database["public"]["Enums"]["deadlineType"]
+ jobCustomerId: string
+ jobLocationName: string
+ salesOrderReadableId: string
+ salesOrderId: string
+ salesOrderLineId: string
parentMaterialId: string
- priority: number
- processId: string
+ itemId: string
+ itemReadableId: string
+ itemDescription: string
+ operationStatus: Database["public"]["Enums"]["jobOperationStatus"]
+ operationQuantity: number
quantityComplete: number
quantityScrapped: number
- salesOrderId: string
- salesOrderLineId: string
- salesOrderReadableId: string
- setupTime: number
- setupUnit: Database["public"]["Enums"]["factor"]
- tags: string[]
- workCenterId: string
+ materialItemReadableId: string
+ materialItemDescription: string
+ materialSubstance: string
+ materialForm: string
+ materialDimension: string
+ materialFinish: string
+ materialGrade: string
}[]
}
get_recent_job_operations_by_employee: {
- Args: { company_id: string; employee_id: string }
+ Args: {
+ employee_id: string
+ company_id: string
+ }
Returns: {
- assignee: string
- description: string
id: string
- itemDescription: string
- itemReadableId: string
- jobCustomerId: string
- jobDeadlineType: Database["public"]["Enums"]["deadlineType"]
- jobDueDate: string
jobId: string
- jobReadableId: string
- jobStatus: Database["public"]["Enums"]["jobStatus"]
+ operationOrder: number
+ processId: string
+ workCenterId: string
+ description: string
+ setupTime: number
+ setupUnit: Database["public"]["Enums"]["factor"]
laborTime: number
laborUnit: Database["public"]["Enums"]["factor"]
machineTime: number
machineUnit: Database["public"]["Enums"]["factor"]
- operationOrder: number
operationOrderType: Database["public"]["Enums"]["methodOperationOrder"]
- operationQuantity: number
- operationStatus: Database["public"]["Enums"]["jobOperationStatus"]
+ jobReadableId: string
+ jobStatus: Database["public"]["Enums"]["jobStatus"]
+ jobDueDate: string
+ jobDeadlineType: Database["public"]["Enums"]["deadlineType"]
+ jobCustomerId: string
+ salesOrderReadableId: string
+ salesOrderId: string
+ salesOrderLineId: string
parentMaterialId: string
- processId: string
+ itemReadableId: string
+ itemDescription: string
+ operationStatus: Database["public"]["Enums"]["jobOperationStatus"]
+ operationQuantity: number
quantityComplete: number
quantityScrapped: number
- salesOrderId: string
- salesOrderLineId: string
- salesOrderReadableId: string
- setupTime: number
- setupUnit: Database["public"]["Enums"]["factor"]
- tags: string[]
thumbnailPath: string
- workCenterId: string
+ assignee: string
+ tags: string[]
}[]
}
get_sales_order_lines_by_customer_id: {
- Args: { customer_id: string }
+ Args: {
+ customer_id: string
+ }
Returns: {
+ customerReference: string
+ salesOrderId: string
customerContactName: string
customerEngineeringContactName: string
- customerId: string
- customerReference: string
- jobOperations: Json
- jobProductionQuantity: number
- jobQuantityComplete: number
- jobQuantityShipped: number
- jobStatus: Database["public"]["Enums"]["jobStatus"]
+ saleQuantity: number
+ quantityToSend: number
+ quantitySent: number
+ quantityInvoiced: number
+ unitPrice: number
+ unitOfMeasureCode: string
locationId: string
orderDate: string
promisedDate: string
- quantityInvoiced: number
- quantitySent: number
- quantityToSend: number
- readableId: string
- readableIdWithRevision: string
- receiptPromisedDate: string
receiptRequestedDate: string
- revision: string
- saleQuantity: number
- salesOrderId: string
+ receiptPromisedDate: string
salesOrderStatus: Database["public"]["Enums"]["salesOrderStatus"]
+ readableId: string
+ revision: string
+ readableIdWithRevision: string
+ customerId: string
thumbnailPath: string
- unitOfMeasureCode: string
- unitPrice: number
+ jobOperations: Json
+ jobQuantityShipped: number
+ jobQuantityComplete: number
+ jobProductionQuantity: number
+ jobStatus: Database["public"]["Enums"]["jobStatus"]
}[]
}
get_supplier_ids_with_supplier_permission: {
- Args: { permission: string }
+ Args: {
+ permission: string
+ }
Returns: string[]
}
get_supplier_interaction_with_related_records: {
- Args: { supplier_interaction_id: string }
+ Args: {
+ supplier_interaction_id: string
+ }
Returns: {
- companyId: string
id: string
- purchaseInvoices: Json
- purchaseOrders: Json
+ companyId: string
supplierId: string
supplierQuotes: Json
+ purchaseOrders: Json
+ purchaseInvoices: Json
}[]
}
get_tool_details: {
- Args: { item_id: string }
+ Args: {
+ item_id: string
+ }
Returns: {
active: boolean
assignee: string
- companyId: string
- createdAt: string
- createdBy: string
- customFields: Json
defaultMethodType: Database["public"]["Enums"]["methodType"]
description: string
- id: string
itemTrackingType: Database["public"]["Enums"]["itemTrackingType"]
+ name: string
+ replenishmentSystem: Database["public"]["Enums"]["itemReplenishmentSystem"]
+ unitOfMeasureCode: string
+ notes: Json
+ thumbnailPath: string
modelId: string
- modelName: string
modelPath: string
+ modelName: string
modelSize: number
- name: string
- notes: Json
+ id: string
+ companyId: string
+ unitOfMeasure: string
readableId: string
- readableIdWithRevision: string
- replenishmentSystem: Database["public"]["Enums"]["itemReplenishmentSystem"]
revision: string
+ readableIdWithRevision: string
revisions: Json
+ customFields: Json
tags: string[]
- thumbnailPath: string
- unitOfMeasure: string
- unitOfMeasureCode: string
- updatedAt: string
+ createdBy: string
+ createdAt: string
updatedBy: string
+ updatedAt: string
}[]
}
groups_for_user: {
- Args: { uid: string }
+ Args: {
+ uid: string
+ }
Returns: string[]
}
groups_query: {
- Args: { _name?: string; _uid?: string }
+ Args: {
+ _name?: string
+ _uid?: string
+ }
Returns: {
- companyId: string
id: string
+ name: string
+ companyId: string
+ parentId: string
+ isEmployeeTypeGroup: boolean
isCustomerOrgGroup: boolean
isCustomerTypeGroup: boolean
- isEmployeeTypeGroup: boolean
isSupplierOrgGroup: boolean
isSupplierTypeGroup: boolean
- name: string
- parentId: string
users: Json
}[]
}
has_any_company_permission: {
- Args: { claim: string }
+ Args: {
+ claim: string
+ }
Returns: boolean
}
has_company_permission: {
- Args: { claim: string; company: string }
+ Args: {
+ claim: string
+ company: string
+ }
Returns: boolean
}
has_role: {
- Args: { company: string; required_role: string }
+ Args: {
+ required_role: string
+ company: string
+ }
Returns: boolean
}
has_valid_api_key_for_company: {
- Args: { company: string }
+ Args: {
+ company: string
+ }
Returns: boolean
}
id: {
- Args: { _prefix?: string }
+ Args: {
+ _prefix?: string
+ }
Returns: string
}
increment_webhook_error: {
- Args: { webhook_id: string }
+ Args: {
+ webhook_id: string
+ }
Returns: undefined
}
increment_webhook_success: {
- Args: { webhook_id: string }
+ Args: {
+ webhook_id: string
+ }
Returns: undefined
}
is_claims_admin: {
@@ -49346,57 +49476,69 @@ export type Database = {
Returns: boolean
}
is_last_job_operation: {
- Args: { operation_id: string }
+ Args: {
+ operation_id: string
+ }
Returns: boolean
}
items_search: {
Args: {
- match_count: number
+ query_embedding: string
match_threshold: number
+ match_count: number
p_company_id: string
- query_embedding: string
}
Returns: {
- description: string
id: string
- name: string
readableId: string
+ name: string
+ description: string
similarity: number
}[]
}
journalLinesByAccountNumber: {
- Args: { from_date?: string; to_date?: string }
+ Args: {
+ from_date?: string
+ to_date?: string
+ }
Returns: {
+ number: string
+ companyId: string
balance: number
balanceAtDate: number
- companyId: string
netChange: number
- number: string
}[]
}
jsonb_to_text_array: {
- Args: { "": Json }
+ Args: {
+ "": Json
+ }
Returns: string[]
}
nanoid: {
Args: {
- additionalbytesfactor?: number
- alphabet?: string
prefix?: string
size?: number
+ alphabet?: string
+ additionalbytesfactor?: number
}
Returns: string
}
nanoid_optimized: {
- Args: { alphabet: string; mask: number; size: number; step: number }
+ Args: {
+ size: number
+ alphabet: string
+ mask: number
+ step: number
+ }
Returns: string
}
suppliers_search: {
Args: {
- match_count: number
+ query_embedding: string
match_threshold: number
+ match_count: number
p_company_id: string
- query_embedding: string
}
Returns: {
id: string
@@ -49406,27 +49548,29 @@ export type Database = {
}
update_receipt_line_batch_tracking: {
Args: {
+ p_receipt_line_id: string
+ p_receipt_id: string
p_batch_number: string
- p_properties?: Json
p_quantity: number
- p_receipt_id: string
- p_receipt_line_id: string
p_tracked_entity_id?: string
+ p_properties?: Json
}
Returns: undefined
}
update_receipt_line_serial_tracking: {
Args: {
- p_index: number
- p_receipt_id: string
p_receipt_line_id: string
+ p_receipt_id: string
p_serial_number: string
+ p_index: number
p_tracked_entity_id?: string
}
Returns: undefined
}
users_for_groups: {
- Args: { groups: string[] }
+ Args: {
+ groups: string[]
+ }
Returns: Json
}
uuid_generate_v4: {
@@ -49434,35 +49578,51 @@ export type Database = {
Returns: string
}
uuid_to_base58: {
- Args: { _uuid: string }
+ Args: {
+ _uuid: string
+ }
Returns: string
}
xid: {
- Args: { _at?: string }
+ Args: {
+ _at?: string
+ }
Returns: unknown
}
xid_counter: {
- Args: { _xid: unknown }
+ Args: {
+ _xid: unknown
+ }
Returns: number
}
xid_decode: {
- Args: { _xid: unknown }
+ Args: {
+ _xid: unknown
+ }
Returns: number[]
}
xid_encode: {
- Args: { _id: number[] }
+ Args: {
+ _id: number[]
+ }
Returns: unknown
}
xid_machine: {
- Args: { _xid: unknown }
+ Args: {
+ _xid: unknown
+ }
Returns: number[]
}
xid_pid: {
- Args: { _xid: unknown }
+ Args: {
+ _xid: unknown
+ }
Returns: number
}
xid_time: {
- Args: { _xid: unknown }
+ Args: {
+ _xid: unknown
+ }
Returns: string
}
}
@@ -49718,7 +49878,6 @@ export type Database = {
| "Fixture"
paymentTermCalculationMethod: "Net" | "End of Month" | "Day of Month"
periodType: "Week" | "Day" | "Month"
- pickListStatus: "Draft" | "Released" | "In Progress" | "Completed"
procedureStatus: "Draft" | "Active" | "Archived"
procedureStepType:
| "Value"
@@ -49876,6 +50035,7 @@ export type Database = {
| "Outbound Transfer"
shipmentStatus: "Draft" | "Pending" | "Posted" | "Voided"
shippingCarrier: "UPS" | "FedEx" | "USPS" | "DHL" | "Other"
+ stockTransferStatus: "Draft" | "Released" | "In Progress" | "Completed"
supplierLedgerDocumentType:
| "Payment"
| "Invoice"
@@ -49913,7 +50073,6 @@ export type Database = {
owner: string | null
owner_id: string | null
public: boolean | null
- type: Database["storage"]["Enums"]["buckettype"]
updated_at: string | null
}
Insert: {
@@ -49926,7 +50085,6 @@ export type Database = {
owner?: string | null
owner_id?: string | null
public?: boolean | null
- type?: Database["storage"]["Enums"]["buckettype"]
updated_at?: string | null
}
Update: {
@@ -49939,112 +50097,10 @@ export type Database = {
owner?: string | null
owner_id?: string | null
public?: boolean | null
- type?: Database["storage"]["Enums"]["buckettype"]
updated_at?: string | null
}
Relationships: []
}
- buckets_analytics: {
- Row: {
- created_at: string
- format: string
- id: string
- type: Database["storage"]["Enums"]["buckettype"]
- updated_at: string
- }
- Insert: {
- created_at?: string
- format?: string
- id: string
- type?: Database["storage"]["Enums"]["buckettype"]
- updated_at?: string
- }
- Update: {
- created_at?: string
- format?: string
- id?: string
- type?: Database["storage"]["Enums"]["buckettype"]
- updated_at?: string
- }
- Relationships: []
- }
- iceberg_namespaces: {
- Row: {
- bucket_id: string
- created_at: string
- id: string
- name: string
- updated_at: string
- }
- Insert: {
- bucket_id: string
- created_at?: string
- id?: string
- name: string
- updated_at?: string
- }
- Update: {
- bucket_id?: string
- created_at?: string
- id?: string
- name?: string
- updated_at?: string
- }
- Relationships: [
- {
- foreignKeyName: "iceberg_namespaces_bucket_id_fkey"
- columns: ["bucket_id"]
- isOneToOne: false
- referencedRelation: "buckets_analytics"
- referencedColumns: ["id"]
- },
- ]
- }
- iceberg_tables: {
- Row: {
- bucket_id: string
- created_at: string
- id: string
- location: string
- name: string
- namespace_id: string
- updated_at: string
- }
- Insert: {
- bucket_id: string
- created_at?: string
- id?: string
- location: string
- name: string
- namespace_id: string
- updated_at?: string
- }
- Update: {
- bucket_id?: string
- created_at?: string
- id?: string
- location?: string
- name?: string
- namespace_id?: string
- updated_at?: string
- }
- Relationships: [
- {
- foreignKeyName: "iceberg_tables_bucket_id_fkey"
- columns: ["bucket_id"]
- isOneToOne: false
- referencedRelation: "buckets_analytics"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "iceberg_tables_namespace_id_fkey"
- columns: ["namespace_id"]
- isOneToOne: false
- referencedRelation: "iceberg_namespaces"
- referencedColumns: ["id"]
- },
- ]
- }
migrations: {
Row: {
executed_at: string | null
@@ -50258,76 +50314,99 @@ export type Database = {
}
Functions: {
add_prefixes: {
- Args: { _bucket_id: string; _name: string }
+ Args: {
+ _bucket_id: string
+ _name: string
+ }
Returns: undefined
}
can_insert_object: {
- Args: { bucketid: string; metadata: Json; name: string; owner: string }
+ Args: {
+ bucketid: string
+ name: string
+ owner: string
+ metadata: Json
+ }
Returns: undefined
}
delete_prefix: {
- Args: { _bucket_id: string; _name: string }
+ Args: {
+ _bucket_id: string
+ _name: string
+ }
Returns: boolean
}
extension: {
- Args: { name: string }
+ Args: {
+ name: string
+ }
Returns: string
}
filename: {
- Args: { name: string }
+ Args: {
+ name: string
+ }
Returns: string
}
foldername: {
- Args: { name: string }
+ Args: {
+ name: string
+ }
Returns: string[]
}
get_level: {
- Args: { name: string }
+ Args: {
+ name: string
+ }
Returns: number
}
get_prefix: {
- Args: { name: string }
+ Args: {
+ name: string
+ }
Returns: string
}
get_prefixes: {
- Args: { name: string }
+ Args: {
+ name: string
+ }
Returns: string[]
}
get_size_by_bucket: {
Args: Record<PropertyKey, never>
Returns: {
- bucket_id: string
size: number
+ bucket_id: string
}[]
}
list_multipart_uploads_with_delimiter: {
Args: {
bucket_id: string
+ prefix_param: string
delimiter_param: string
max_keys?: number
next_key_token?: string
next_upload_token?: string
- prefix_param: string
}
Returns: {
- created_at: string
- id: string
key: string
+ id: string
+ created_at: string
}[]
}
list_objects_with_delimiter: {
Args: {
bucket_id: string
+ prefix_param: string
delimiter_param: string
max_keys?: number
- next_token?: string
- prefix_param: string
start_after?: string
+ next_token?: string
}
Returns: {
+ name: string
id: string
metadata: Json
- name: string
updated_at: string
}[]
}
@@ -50337,84 +50416,84 @@ export type Database = {
}
search: {
Args: {
+ prefix: string
bucketname: string
- levels?: number
limits?: number
+ levels?: number
offsets?: number
- prefix: string
search?: string
sortcolumn?: string
sortorder?: string
}
Returns: {
- created_at: string
+ name: string
id: string
+ updated_at: string
+ created_at: string
last_accessed_at: string
metadata: Json
- name: string
- updated_at: string
}[]
}
search_legacy_v1: {
Args: {
+ prefix: string
bucketname: string
- levels?: number
limits?: number
+ levels?: number
offsets?: number
- prefix: string
search?: string
sortcolumn?: string
sortorder?: string
}
Returns: {
- created_at: string
+ name: string
id: string
+ updated_at: string
+ created_at: string
last_accessed_at: string
metadata: Json
- name: string
- updated_at: string
}[]
}
search_v1_optimised: {
Args: {
+ prefix: string
bucketname: string
- levels?: number
limits?: number
+ levels?: number
offsets?: number
- prefix: string
search?: string
sortcolumn?: string
sortorder?: string
}
Returns: {
- created_at: string
+ name: string
id: string
+ updated_at: string
+ created_at: string
last_accessed_at: string
metadata: Json
- name: string
- updated_at: string
}[]
}
search_v2: {
Args: {
+ prefix: string
bucket_name: string
- levels?: number
limits?: number
- prefix: string
+ levels?: number
start_after?: string
}
Returns: {
- created_at: string
- id: string
key: string
- metadata: Json
name: string
+ id: string
updated_at: string
+ created_at: string
+ metadata: Json
}[]
}
}
Enums: {
- buckettype: "STANDARD" | "ANALYTICS"
+ [_ in never]: never
}
CompositeTypes: {
[_ in never]: never
@@ -50422,33 +50501,27 @@ export type Database = {
}
}
-type DatabaseWithoutInternals = Omit<Database, "__InternalSupabase">
-
-type DefaultSchema = DatabaseWithoutInternals[Extract<keyof Database, "public">]
+type PublicSchema = Database[Extract<keyof Database, "public">]
export type Tables<
- DefaultSchemaTableNameOrOptions extends
- | keyof (DefaultSchema["Tables"] & DefaultSchema["Views"])
- | { schema: keyof DatabaseWithoutInternals },
- TableName extends DefaultSchemaTableNameOrOptions extends {
- schema: keyof DatabaseWithoutInternals
- }
- ? keyof (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] &
- DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Views"])
+ PublicTableNameOrOptions extends
+ | keyof (PublicSchema["Tables"] & PublicSchema["Views"])
+ | { schema: keyof Database },
+ TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
+ ? keyof (Database[PublicTableNameOrOptions["schema"]]["Tables"] &
+ Database[PublicTableNameOrOptions["schema"]]["Views"])
: never = never,
-> = DefaultSchemaTableNameOrOptions extends {
- schema: keyof DatabaseWithoutInternals
-}
- ? (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] &
- DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Views"])[TableName] extends {
+> = PublicTableNameOrOptions extends { schema: keyof Database }
+ ? (Database[PublicTableNameOrOptions["schema"]]["Tables"] &
+ Database[PublicTableNameOrOptions["schema"]]["Views"])[TableName] extends {
Row: infer R
}
? R
: never
- : DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema["Tables"] &
- DefaultSchema["Views"])
- ? (DefaultSchema["Tables"] &
- DefaultSchema["Views"])[DefaultSchemaTableNameOrOptions] extends {
+ : PublicTableNameOrOptions extends keyof (PublicSchema["Tables"] &
+ PublicSchema["Views"])
+ ? (PublicSchema["Tables"] &
+ PublicSchema["Views"])[PublicTableNameOrOptions] extends {
Row: infer R
}
? R
@@ -50456,24 +50529,20 @@ export type Tables<
: never
export type TablesInsert<
- DefaultSchemaTableNameOrOptions extends
- | keyof DefaultSchema["Tables"]
- | { schema: keyof DatabaseWithoutInternals },
- TableName extends DefaultSchemaTableNameOrOptions extends {
- schema: keyof DatabaseWithoutInternals
- }
- ? keyof DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"]
+ PublicTableNameOrOptions extends
+ | keyof PublicSchema["Tables"]
+ | { schema: keyof Database },
+ TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
+ ? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"]
: never = never,
-> = DefaultSchemaTableNameOrOptions extends {
- schema: keyof DatabaseWithoutInternals
-}
- ? DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
+> = PublicTableNameOrOptions extends { schema: keyof Database }
+ ? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
Insert: infer I
}
? I
: never
- : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"]
- ? DefaultSchema["Tables"][DefaultSchemaTableNameOrOptions] extends {
+ : PublicTableNameOrOptions extends keyof PublicSchema["Tables"]
+ ? PublicSchema["Tables"][PublicTableNameOrOptions] extends {
Insert: infer I
}
? I
@@ -50481,24 +50550,20 @@ export type TablesInsert<
: never
export type TablesUpdate<
- DefaultSchemaTableNameOrOptions extends
- | keyof DefaultSchema["Tables"]
- | { schema: keyof DatabaseWithoutInternals },
- TableName extends DefaultSchemaTableNameOrOptions extends {
- schema: keyof DatabaseWithoutInternals
- }
- ? keyof DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"]
+ PublicTableNameOrOptions extends
+ | keyof PublicSchema["Tables"]
+ | { schema: keyof Database },
+ TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
+ ? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"]
: never = never,
-> = DefaultSchemaTableNameOrOptions extends {
- schema: keyof DatabaseWithoutInternals
-}
- ? DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
+> = PublicTableNameOrOptions extends { schema: keyof Database }
+ ? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
Update: infer U
}
? U
: never
- : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"]
- ? DefaultSchema["Tables"][DefaultSchemaTableNameOrOptions] extends {
+ : PublicTableNameOrOptions extends keyof PublicSchema["Tables"]
+ ? PublicSchema["Tables"][PublicTableNameOrOptions] extends {
Update: infer U
}
? U
@@ -50506,518 +50571,30 @@ export type TablesUpdate<
: never
export type Enums<
- DefaultSchemaEnumNameOrOptions extends
- | keyof DefaultSchema["Enums"]
- | { schema: keyof DatabaseWithoutInternals },
- EnumName extends DefaultSchemaEnumNameOrOptions extends {
- schema: keyof DatabaseWithoutInternals
- }
- ? keyof DatabaseWithoutInternals[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"]
+ PublicEnumNameOrOptions extends
+ | keyof PublicSchema["Enums"]
+ | { schema: keyof Database },
+ EnumName extends PublicEnumNameOrOptions extends { schema: keyof Database }
+ ? keyof Database[PublicEnumNameOrOptions["schema"]]["Enums"]
: never = never,
-> = DefaultSchemaEnumNameOrOptions extends {
- schema: keyof DatabaseWithoutInternals
-}
- ? DatabaseWithoutInternals[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"][EnumName]
- : DefaultSchemaEnumNameOrOptions extends keyof DefaultSchema["Enums"]
- ? DefaultSchema["Enums"][DefaultSchemaEnumNameOrOptions]
+> = PublicEnumNameOrOptions extends { schema: keyof Database }
+ ? Database[PublicEnumNameOrOptions["schema"]]["Enums"][EnumName]
+ : PublicEnumNameOrOptions extends keyof PublicSchema["Enums"]
+ ? PublicSchema["Enums"][PublicEnumNameOrOptions]
: never
export type CompositeTypes<
PublicCompositeTypeNameOrOptions extends
- | keyof DefaultSchema["CompositeTypes"]
- | { schema: keyof DatabaseWithoutInternals },
+ | keyof PublicSchema["CompositeTypes"]
+ | { schema: keyof Database },
CompositeTypeName extends PublicCompositeTypeNameOrOptions extends {
- schema: keyof DatabaseWithoutInternals
+ schema: keyof Database
}
- ? keyof DatabaseWithoutInternals[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"]
+ ? keyof Database[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"]
: never = never,
-> = PublicCompositeTypeNameOrOptions extends {
- schema: keyof DatabaseWithoutInternals
-}
- ? DatabaseWithoutInternals[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"][CompositeTypeName]
- : PublicCompositeTypeNameOrOptions extends keyof DefaultSchema["CompositeTypes"]
- ? DefaultSchema["CompositeTypes"][PublicCompositeTypeNameOrOptions]
+> = PublicCompositeTypeNameOrOptions extends { schema: keyof Database }
+ ? Database[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"][CompositeTypeName]
+ : PublicCompositeTypeNameOrOptions extends keyof PublicSchema["CompositeTypes"]
+ ? PublicSchema["CompositeTypes"][PublicCompositeTypeNameOrOptions]
: never
-export const Constants = {
- graphql_public: {
- Enums: {},
- },
- public: {
- Enums: {
- accountingPeriodStatus: ["Inactive", "Active"],
- configurationParameterDataType: [
- "text",
- "numeric",
- "boolean",
- "list",
- "date",
- "material",
- ],
- costLedgerType: [
- "Direct Cost",
- "Revaluation",
- "Rounding",
- "Indirect Cost",
- "Variance",
- "Total",
- ],
- deadlineType: ["No Deadline", "ASAP", "Soft Deadline", "Hard Deadline"],
- demandSourceType: ["Sales Order", "Job Material"],
- documentSourceType: [
- "Job",
- "Part",
- "Purchase Order",
- "Purchase Invoice",
- "Purchase Return Order",
- "Quote",
- "Receipt",
- "Request for Quote",
- "Sales Order",
- "Sales Invoice",
- "Sales Return Order",
- "Service",
- "Shipment",
- "Material",
- "Tool",
- "Fixture",
- "Consumable",
- ],
- documentthreadtype: [
- "nonConformance",
- "quote",
- "salesOrder",
- "job",
- "purchaseOrder",
- "invoice",
- "receipt",
- "shipment",
- ],
- documentTransactionType: [
- "Download",
- "Edit",
- "Favorite",
- "Label",
- "Unfavorite",
- "Upload",
- ],
- documentType: [
- "Archive",
- "Document",
- "Presentation",
- "PDF",
- "Spreadsheet",
- "Text",
- "Image",
- "Video",
- "Audio",
- "Other",
- "Model",
- ],
- externalLinkDocumentType: ["Quote", "SupplierQuote", "Customer"],
- factor: [
- "Hours/Piece",
- "Hours/100 Pieces",
- "Hours/1000 Pieces",
- "Minutes/Piece",
- "Minutes/100 Pieces",
- "Minutes/1000 Pieces",
- "Pieces/Hour",
- "Pieces/Minute",
- "Seconds/Piece",
- "Total Hours",
- "Total Minutes",
- ],
- fulfillmentType: ["Inventory", "Job"],
- gaugeCalibrationStatus: [
- "Pending",
- "In-Calibration",
- "Out-of-Calibration",
- ],
- gaugeRole: ["Master", "Standard"],
- gaugeStatus: ["Active", "Inactive"],
- glAccountCategory: [
- "Bank",
- "Accounts Receivable",
- "Inventory",
- "Other Current Asset",
- "Fixed Asset",
- "Accumulated Depreciation",
- "Other Asset",
- "Accounts Payable",
- "Other Current Liability",
- "Long Term Liability",
- "Equity - No Close",
- "Equity - Close",
- "Retained Earnings",
- "Income",
- "Cost of Goods Sold",
- "Expense",
- "Other Income",
- "Other Expense",
- ],
- glAccountClass: ["Asset", "Liability", "Equity", "Revenue", "Expense"],
- glAccountType: ["Posting", "Total", "Begin Total", "End Total"],
- glConsolidatedRate: ["Average", "Current", "Historical"],
- glIncomeBalance: ["Balance Sheet", "Income Statement"],
- inspectionStatus: ["Pass", "Fail"],
- itemCostingMethod: ["Standard", "Average", "LIFO", "FIFO"],
- itemLedgerDocumentType: [
- "Sales Shipment",
- "Sales Invoice",
- "Sales Return Receipt",
- "Sales Credit Memo",
- "Purchase Receipt",
- "Purchase Invoice",
- "Purchase Return Shipment",
- "Purchase Credit Memo",
- "Transfer Shipment",
- "Transfer Receipt",
- "Service Shipment",
- "Service Invoice",
- "Service Credit Memo",
- "Posted Assembly",
- "Inventory Receipt",
- "Inventory Shipment",
- "Direct Transfer",
- "Job Consumption",
- "Job Receipt",
- "Batch Split",
- ],
- itemLedgerType: [
- "Purchase",
- "Sale",
- "Positive Adjmt.",
- "Negative Adjmt.",
- "Transfer",
- "Consumption",
- "Output",
- "Assembly Consumption",
- "Assembly Output",
- ],
- itemReorderingPolicy: [
- "Manual Reorder",
- "Demand-Based Reorder",
- "Fixed Reorder Quantity",
- "Maximum Quantity",
- ],
- itemReplenishmentSystem: ["Buy", "Make", "Buy and Make"],
- itemTrackingSourceDocument: [
- "Receipt",
- "Job Production",
- "Job Material",
- "Shipment",
- ],
- itemTrackingType: ["Inventory", "Non-Inventory", "Serial", "Batch"],
- itemType: [
- "Part",
- "Material",
- "Tool",
- "Service",
- "Consumable",
- "Fixture",
- ],
- jobOperationStatus: [
- "Canceled",
- "Done",
- "In Progress",
- "Paused",
- "Ready",
- "Todo",
- "Waiting",
- ],
- jobStatus: [
- "Draft",
- "Ready",
- "In Progress",
- "Paused",
- "Completed",
- "Cancelled",
- "Overdue",
- "Due Today",
- "Planned",
- ],
- journalLineDocumentType: [
- "Receipt",
- "Invoice",
- "Credit Memo",
- "Blanket Order",
- "Return Order",
- ],
- kanbanOutput: ["label", "qrcode", "url"],
- makeMethodStatus: ["Draft", "Active", "Archived"],
- methodOperationOrder: ["After Previous", "With Previous"],
- methodType: ["Buy", "Make", "Pick"],
- module: [
- "Accounting",
- "Documents",
- "Invoicing",
- "Inventory",
- "Items",
- "Messaging",
- "Parts",
- "People",
- "Production",
- "Purchasing",
- "Resources",
- "Sales",
- "Settings",
- "Users",
- "Quality",
- ],
- month: [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December",
- ],
- nonConformanceAction: [
- "Corrective Action",
- "Preventive Action",
- "Containment Action",
- "Verification",
- "Customer Communication",
- ],
- nonConformanceApproval: ["MRB"],
- nonConformanceInvestigation: [
- "Root Cause Analysis",
- "Inventory",
- "WIP",
- "Finished Goods",
- "Incoming Materials",
- "Process",
- "Documentation",
- ],
- nonConformancePriority: ["Low", "Medium", "High", "Critical"],
- nonConformanceSource: ["Internal", "External"],
- nonConformanceStatus: ["Registered", "In Progress", "Closed"],
- nonConformanceTaskStatus: [
- "Pending",
- "In Progress",
- "Completed",
- "Skipped",
- ],
- operationType: ["Inside", "Outside"],
- payableLineType: [
- "Comment",
- "G/L Account",
- "Fixed Asset",
- "Part",
- "Material",
- "Tool",
- "Service",
- "Consumable",
- "Fixture",
- ],
- paymentTermCalculationMethod: ["Net", "End of Month", "Day of Month"],
- periodType: ["Week", "Day", "Month"],
- pickListStatus: ["Draft", "Released", "In Progress", "Completed"],
- procedureStatus: ["Draft", "Active", "Archived"],
- procedureStepType: [
- "Value",
- "Measurement",
- "Checkbox",
- "Timestamp",
- "Person",
- "List",
- "File",
- "Task",
- ],
- processType: ["Inside", "Outside", "Inside and Outside"],
- productionEventType: ["Setup", "Labor", "Machine"],
- productionQuantityType: ["Rework", "Scrap", "Production"],
- purchaseInvoiceStatus: [
- "Draft",
- "Pending",
- "Submitted",
- "Return",
- "Debit Note Issued",
- "Paid",
- "Partially Paid",
- "Overdue",
- "Voided",
- ],
- purchaseOrderLineType: [
- "Comment",
- "G/L Account",
- "Fixed Asset",
- "Part",
- "Material",
- "Tool",
- "Service",
- "Consumable",
- "Fixture",
- ],
- purchaseOrderStatus: [
- "Draft",
- "To Review",
- "Rejected",
- "To Receive",
- "To Receive and Invoice",
- "To Invoice",
- "Completed",
- "Closed",
- "Planned",
- ],
- purchaseOrderTransactionType: [
- "Edit",
- "Favorite",
- "Unfavorite",
- "Approved",
- "Reject",
- "Request Approval",
- ],
- purchaseOrderType: ["Purchase", "Return", "Outside Processing"],
- qualityDocumentStatus: ["Draft", "Active", "Archived"],
- quoteLineStatus: ["Not Started", "In Progress", "Complete", "No Quote"],
- quoteStatus: [
- "Draft",
- "Sent",
- "Ordered",
- "Partial",
- "Lost",
- "Cancelled",
- "Expired",
- ],
- receiptSourceDocument: [
- "Sales Order",
- "Sales Invoice",
- "Sales Return Order",
- "Purchase Order",
- "Purchase Invoice",
- "Purchase Return Order",
- "Inbound Transfer",
- "Outbound Transfer",
- "Manufacturing Consumption",
- "Manufacturing Output",
- ],
- receiptStatus: ["Draft", "Pending", "Posted"],
- role: ["customer", "employee", "supplier"],
- salesInvoiceLineType: [
- "Comment",
- "Part",
- "Material",
- "Tool",
- "Service",
- "Consumable",
- "Fixture",
- "Fixed Asset",
- ],
- salesInvoiceStatus: [
- "Draft",
- "Pending",
- "Submitted",
- "Return",
- "Credit Note Issued",
- "Paid",
- "Partially Paid",
- "Overdue",
- "Voided",
- ],
- salesOrderLineStatus: ["Ordered", "In Progress", "Completed"],
- salesOrderLineType: [
- "Comment",
- "Part",
- "Material",
- "Tool",
- "Service",
- "Consumable",
- "Fixture",
- "Fixed Asset",
- ],
- salesOrderStatus: [
- "Draft",
- "Needs Approval",
- "Confirmed",
- "In Progress",
- "Completed",
- "Invoiced",
- "Cancelled",
- "Closed",
- "To Ship and Invoice",
- "To Ship",
- "To Invoice",
- ],
- salesOrderTransactionType: [
- "Edit",
- "Favorite",
- "Unfavorite",
- "Approved",
- "Reject",
- "Request Approval",
- ],
- salesRfqStatus: ["Draft", "Ready for Quote", "Closed", "Quoted"],
- searchEntity: [
- "Resource",
- "Person",
- "Customer",
- "Supplier",
- "Job",
- "Part",
- "Purchase Order",
- "Lead",
- "Opportunity",
- "Quotation",
- "Sales Order",
- "Request for Quotation",
- "Sales Invoice",
- "Purchase Invoice",
- "Document",
- "Sales RFQ",
- "Service",
- "Tool",
- "Consumable",
- "Material",
- "Fixture",
- ],
- serviceType: ["Internal", "External"],
- shipmentSourceDocument: [
- "Sales Order",
- "Sales Invoice",
- "Sales Return Order",
- "Purchase Order",
- "Purchase Invoice",
- "Purchase Return Order",
- "Inbound Transfer",
- "Outbound Transfer",
- ],
- shipmentStatus: ["Draft", "Pending", "Posted", "Voided"],
- shippingCarrier: ["UPS", "FedEx", "USPS", "DHL", "Other"],
- supplierLedgerDocumentType: [
- "Payment",
- "Invoice",
- "Credit Memo",
- "Finance Charge Memo",
- "Reminder",
- "Refund",
- ],
- supplierQuoteStatus: ["Active", "Expired"],
- supplySourceType: ["Purchase Order", "Production Order"],
- tableViewType: ["Public", "Private"],
- trackedEntityStatus: ["Available", "Reserved", "On Hold", "Consumed"],
- trackingSource: ["Purchased", "Manufactured"],
- warehouseTransferStatus: [
- "Draft",
- "To Ship and Receive",
- "To Ship",
- "To Receive",
- "Completed",
- "Cancelled",
- ],
- },
- },
- storage: {
- Enums: {
- buckettype: ["STANDARD", "ANALYTICS"],
- },
- },
-} as const
-
diff --git a/packages/database/supabase/functions/lib/types.ts b/packages/database/supabase/functions/lib/types.ts
index 62bb3cb52e..32c47683a0 100644
--- a/packages/database/supabase/functions/lib/types.ts
+++ b/packages/database/supabase/functions/lib/types.ts
@@ -17,10 +17,10 @@ export type Database = {
Functions: {
graphql: {
Args: {
- extensions?: Json
operationName?: string
query?: string
variables?: Json
+ extensions?: Json
}
Returns: Json
}
@@ -18495,443 +18495,6 @@ export type Database = {
}
Relationships: []
}
- pickList: {
- Row: {
- assignee: string | null
- companyId: string
- completedAt: string | null
- createdAt: string
- createdBy: string
- customFields: Json | null
- id: string
- locationId: string
- pickListId: string
- status: Database["public"]["Enums"]["pickListStatus"]
- tags: string[] | null
- updatedAt: string | null
- updatedBy: string | null
- }
- Insert: {
- assignee?: string | null
- companyId: string
- completedAt?: string | null
- createdAt?: string
- createdBy: string
- customFields?: Json | null
- id?: string
- locationId: string
- pickListId: string
- status?: Database["public"]["Enums"]["pickListStatus"]
- tags?: string[] | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
- Update: {
- assignee?: string | null
- companyId?: string
- completedAt?: string | null
- createdAt?: string
- createdBy?: string
- customFields?: Json | null
- id?: string
- locationId?: string
- pickListId?: string
- status?: Database["public"]["Enums"]["pickListStatus"]
- tags?: string[] | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
- Relationships: [
- {
- foreignKeyName: "pickList_assignee_fkey"
- columns: ["assignee"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickList_assignee_fkey"
- columns: ["assignee"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickList_assignee_fkey"
- columns: ["assignee"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickList_assignee_fkey"
- columns: ["assignee"]
- isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickList_assignee_fkey"
- columns: ["assignee"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- {
- foreignKeyName: "pickList_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "companies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickList_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "company"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickList_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "pickList_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "pickList_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickList_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickList_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickList_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickList_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- {
- foreignKeyName: "pickList_locationId_fkey"
- columns: ["locationId"]
- isOneToOne: false
- referencedRelation: "location"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickList_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickList_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickList_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickList_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickList_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- ]
- }
- pickListLine: {
- Row: {
- companyId: string
- createdAt: string
- createdBy: string
- fromShelfId: string | null
- id: string
- itemId: string
- jobId: string | null
- jobMaterialId: string | null
- pickedQuantity: number
- pickListId: string
- quantity: number
- toShelfId: string | null
- updatedAt: string | null
- updatedBy: string | null
- }
- Insert: {
- companyId: string
- createdAt?: string
- createdBy: string
- fromShelfId?: string | null
- id?: string
- itemId: string
- jobId?: string | null
- jobMaterialId?: string | null
- pickedQuantity?: number
- pickListId: string
- quantity?: number
- toShelfId?: string | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
- Update: {
- companyId?: string
- createdAt?: string
- createdBy?: string
- fromShelfId?: string | null
- id?: string
- itemId?: string
- jobId?: string | null
- jobMaterialId?: string | null
- pickedQuantity?: number
- pickListId?: string
- quantity?: number
- toShelfId?: string | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
- Relationships: [
- {
- foreignKeyName: "pickListLine_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "companies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickListLine_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "company"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickListLine_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "pickListLine_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "pickListLine_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickListLine_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickListLine_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickListLine_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickListLine_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- {
- foreignKeyName: "pickListLine_fromShelfId_fkey"
- columns: ["fromShelfId"]
- isOneToOne: false
- referencedRelation: "shelf"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickListLine_itemId_fkey"
- columns: ["itemId"]
- isOneToOne: false
- referencedRelation: "consumables"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickListLine_itemId_fkey"
- columns: ["itemId"]
- isOneToOne: false
- referencedRelation: "item"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickListLine_itemId_fkey"
- columns: ["itemId"]
- isOneToOne: false
- referencedRelation: "materials"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickListLine_itemId_fkey"
- columns: ["itemId"]
- isOneToOne: false
- referencedRelation: "parts"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickListLine_itemId_fkey"
- columns: ["itemId"]
- isOneToOne: false
- referencedRelation: "tools"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickListLine_jobId_fkey"
- columns: ["jobId"]
- isOneToOne: false
- referencedRelation: "job"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickListLine_jobId_fkey"
- columns: ["jobId"]
- isOneToOne: false
- referencedRelation: "jobs"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickListLine_jobId_fkey"
- columns: ["jobId"]
- isOneToOne: false
- referencedRelation: "openProductionOrders"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickListLine_jobMaterialId_fkey"
- columns: ["jobMaterialId"]
- isOneToOne: false
- referencedRelation: "jobMaterial"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickListLine_jobMaterialId_fkey"
- columns: ["jobMaterialId"]
- isOneToOne: false
- referencedRelation: "jobMaterialWithMakeMethodId"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickListLine_jobMaterialId_fkey"
- columns: ["jobMaterialId"]
- isOneToOne: false
- referencedRelation: "openJobMaterialLines"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickListLine_pickListId_fkey"
- columns: ["pickListId", "companyId"]
- isOneToOne: false
- referencedRelation: "pickList"
- referencedColumns: ["id", "companyId"]
- },
- {
- foreignKeyName: "pickListLine_toShelfId_fkey"
- columns: ["toShelfId"]
- isOneToOne: false
- referencedRelation: "shelf"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickListLine_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickListLine_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickListLine_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickListLine_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickListLine_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- ]
- }
pickMethod: {
Row: {
companyId: string
@@ -31250,6 +30813,443 @@ export type Database = {
},
]
}
+ stockTransfer: {
+ Row: {
+ assignee: string | null
+ companyId: string
+ completedAt: string | null
+ createdAt: string
+ createdBy: string
+ customFields: Json | null
+ id: string
+ locationId: string
+ status: Database["public"]["Enums"]["stockTransferStatus"]
+ stockTransferId: string
+ tags: string[] | null
+ updatedAt: string | null
+ updatedBy: string | null
+ }
+ Insert: {
+ assignee?: string | null
+ companyId: string
+ completedAt?: string | null
+ createdAt?: string
+ createdBy: string
+ customFields?: Json | null
+ id?: string
+ locationId: string
+ status?: Database["public"]["Enums"]["stockTransferStatus"]
+ stockTransferId: string
+ tags?: string[] | null
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Update: {
+ assignee?: string | null
+ companyId?: string
+ completedAt?: string | null
+ createdAt?: string
+ createdBy?: string
+ customFields?: Json | null
+ id?: string
+ locationId?: string
+ status?: Database["public"]["Enums"]["stockTransferStatus"]
+ stockTransferId?: string
+ tags?: string[] | null
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Relationships: [
+ {
+ foreignKeyName: "stockTransfer_assignee_fkey"
+ columns: ["assignee"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransfer_assignee_fkey"
+ columns: ["assignee"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransfer_assignee_fkey"
+ columns: ["assignee"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransfer_assignee_fkey"
+ columns: ["assignee"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransfer_assignee_fkey"
+ columns: ["assignee"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "stockTransfer_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransfer_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "company"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransfer_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "stockTransfer_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "stockTransfer_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransfer_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransfer_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransfer_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransfer_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "stockTransfer_locationId_fkey"
+ columns: ["locationId"]
+ isOneToOne: false
+ referencedRelation: "location"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransfer_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransfer_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransfer_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransfer_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransfer_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ ]
+ }
+ stockTransferLine: {
+ Row: {
+ companyId: string
+ createdAt: string
+ createdBy: string
+ fromShelfId: string | null
+ id: string
+ itemId: string
+ jobId: string | null
+ jobMaterialId: string | null
+ pickedQuantity: number
+ quantity: number
+ stockTransferId: string
+ toShelfId: string | null
+ updatedAt: string | null
+ updatedBy: string | null
+ }
+ Insert: {
+ companyId: string
+ createdAt?: string
+ createdBy: string
+ fromShelfId?: string | null
+ id?: string
+ itemId: string
+ jobId?: string | null
+ jobMaterialId?: string | null
+ pickedQuantity?: number
+ quantity?: number
+ stockTransferId: string
+ toShelfId?: string | null
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Update: {
+ companyId?: string
+ createdAt?: string
+ createdBy?: string
+ fromShelfId?: string | null
+ id?: string
+ itemId?: string
+ jobId?: string | null
+ jobMaterialId?: string | null
+ pickedQuantity?: number
+ quantity?: number
+ stockTransferId?: string
+ toShelfId?: string | null
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Relationships: [
+ {
+ foreignKeyName: "stockTransferLine_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransferLine_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "company"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransferLine_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "stockTransferLine_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "stockTransferLine_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransferLine_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransferLine_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransferLine_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransferLine_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "stockTransferLine_fromShelfId_fkey"
+ columns: ["fromShelfId"]
+ isOneToOne: false
+ referencedRelation: "shelf"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransferLine_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "consumables"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransferLine_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "item"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransferLine_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "materials"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransferLine_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "parts"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransferLine_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "tools"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransferLine_jobId_fkey"
+ columns: ["jobId"]
+ isOneToOne: false
+ referencedRelation: "job"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransferLine_jobId_fkey"
+ columns: ["jobId"]
+ isOneToOne: false
+ referencedRelation: "jobs"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransferLine_jobId_fkey"
+ columns: ["jobId"]
+ isOneToOne: false
+ referencedRelation: "openProductionOrders"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransferLine_jobMaterialId_fkey"
+ columns: ["jobMaterialId"]
+ isOneToOne: false
+ referencedRelation: "jobMaterial"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransferLine_jobMaterialId_fkey"
+ columns: ["jobMaterialId"]
+ isOneToOne: false
+ referencedRelation: "jobMaterialWithMakeMethodId"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransferLine_jobMaterialId_fkey"
+ columns: ["jobMaterialId"]
+ isOneToOne: false
+ referencedRelation: "openJobMaterialLines"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransferLine_stockTransferId_fkey"
+ columns: ["stockTransferId", "companyId"]
+ isOneToOne: false
+ referencedRelation: "stockTransfer"
+ referencedColumns: ["id", "companyId"]
+ },
+ {
+ foreignKeyName: "stockTransferLine_toShelfId_fkey"
+ columns: ["toShelfId"]
+ isOneToOne: false
+ referencedRelation: "shelf"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransferLine_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransferLine_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransferLine_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransferLine_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "stockTransferLine_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ ]
+ }
supplier: {
Row: {
accountManagerId: string | null
@@ -42894,14 +42894,14 @@ export type Database = {
Relationships: [
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["supplierCountryCode"]
+ columns: ["customerCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["alpha2"]
},
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["customerCountryCode"]
+ columns: ["supplierCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["alpha2"]
@@ -45956,14 +45956,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"]
@@ -48201,7 +48201,9 @@ export type Database = {
Returns: number
}
check_operation_dependencies: {
- Args: { operation_id: string }
+ Args: {
+ operation_id: string
+ }
Returns: boolean
}
create_rfq_from_model_v1: {
@@ -48210,158 +48212,173 @@ export type Database = {
customer_part_id: string
email: string
model_id: string
- notes?: Json
sequence_number: string
unit_of_measure: string
+ notes?: Json
}
Returns: {
rfq_id: string
- rfq_line_id: string
rfq_readable_id: string
+ rfq_line_id: string
}[]
}
create_rfq_from_models_v1: {
Args: {
company_id: string
email: string
- model_data: Json[]
sequence_number: string
+ model_data: Json[]
}
Returns: {
rfq_id: string
- rfq_line_ids: string[]
rfq_readable_id: string
+ rfq_line_ids: string[]
}[]
}
create_rfq_from_models_v2: {
Args: {
company_id: string
email: string
- model_data: Json[]
sequence_number: string
+ model_data: Json[]
}
Returns: {
rfq_id: string
- rfq_line_ids: string[]
rfq_readable_id: string
+ rfq_line_ids: string[]
}[]
}
get_active_job_count: {
- Args: { company_id: string; employee_id: string }
+ Args: {
+ employee_id: string
+ company_id: string
+ }
Returns: number
}
get_active_job_operations_by_employee: {
- Args: { company_id: string; employee_id: string }
+ Args: {
+ employee_id: string
+ company_id: string
+ }
Returns: {
- assignee: string
- description: string
id: string
- itemDescription: string
- itemReadableId: string
- jobCustomerId: string
- jobDeadlineType: Database["public"]["Enums"]["deadlineType"]
- jobDueDate: string
jobId: string
- jobReadableId: string
- jobStatus: Database["public"]["Enums"]["jobStatus"]
+ operationOrder: number
+ processId: string
+ workCenterId: string
+ description: string
+ setupTime: number
+ setupUnit: Database["public"]["Enums"]["factor"]
laborTime: number
laborUnit: Database["public"]["Enums"]["factor"]
machineTime: number
machineUnit: Database["public"]["Enums"]["factor"]
- operationOrder: number
operationOrderType: Database["public"]["Enums"]["methodOperationOrder"]
- operationQuantity: number
- operationStatus: Database["public"]["Enums"]["jobOperationStatus"]
+ jobReadableId: string
+ jobStatus: Database["public"]["Enums"]["jobStatus"]
+ jobDueDate: string
+ jobDeadlineType: Database["public"]["Enums"]["deadlineType"]
+ jobCustomerId: string
+ salesOrderReadableId: string
+ salesOrderId: string
+ salesOrderLineId: string
parentMaterialId: string
- processId: string
+ itemReadableId: string
+ itemDescription: string
+ operationStatus: Database["public"]["Enums"]["jobOperationStatus"]
+ operationQuantity: number
quantityComplete: number
quantityScrapped: number
- salesOrderId: string
- salesOrderLineId: string
- salesOrderReadableId: string
- setupTime: number
- setupUnit: Database["public"]["Enums"]["factor"]
- tags: string[]
thumbnailPath: string
- workCenterId: string
+ assignee: string
+ tags: string[]
}[]
}
get_active_job_operations_by_location: {
- Args: { location_id: string; work_center_ids: string[] }
+ Args: {
+ location_id: string
+ work_center_ids: string[]
+ }
Returns: {
- assignee: string
- description: string
id: string
- itemDescription: string
- itemReadableId: string
- jobCustomerId: string
- jobDeadlineType: Database["public"]["Enums"]["deadlineType"]
- jobDueDate: string
jobId: string
- jobMakeMethodId: string
- jobReadableId: string
- jobStatus: Database["public"]["Enums"]["jobStatus"]
+ operationOrder: number
+ priority: number
+ processId: string
+ workCenterId: string
+ description: string
+ setupTime: number
+ setupUnit: Database["public"]["Enums"]["factor"]
laborTime: number
laborUnit: Database["public"]["Enums"]["factor"]
machineTime: number
machineUnit: Database["public"]["Enums"]["factor"]
- operationOrder: number
operationOrderType: Database["public"]["Enums"]["methodOperationOrder"]
- operationQuantity: number
- operationStatus: Database["public"]["Enums"]["jobOperationStatus"]
+ jobMakeMethodId: string
+ assignee: string
+ tags: string[]
+ jobReadableId: string
+ jobStatus: Database["public"]["Enums"]["jobStatus"]
+ jobDueDate: string
+ jobDeadlineType: Database["public"]["Enums"]["deadlineType"]
+ jobCustomerId: string
+ salesOrderReadableId: string
+ salesOrderId: string
+ salesOrderLineId: string
parentMaterialId: string
- priority: number
- processId: string
+ itemReadableId: string
+ itemDescription: string
+ operationStatus: Database["public"]["Enums"]["jobOperationStatus"]
+ operationQuantity: number
quantityComplete: number
quantityScrapped: number
- salesOrderId: string
- salesOrderLineId: string
- salesOrderReadableId: string
- setupTime: number
- setupUnit: Database["public"]["Enums"]["factor"]
- tags: string[]
thumbnailPath: string
- workCenterId: string
}[]
}
get_assigned_job_operations: {
- Args: { company_id: string; user_id: string }
+ Args: {
+ user_id: string
+ company_id: string
+ }
Returns: {
- assignee: string
- description: string
id: string
- itemDescription: string
- itemReadableId: string
- jobCustomerId: string
- jobDeadlineType: Database["public"]["Enums"]["deadlineType"]
- jobDueDate: string
jobId: string
- jobReadableId: string
- jobStatus: Database["public"]["Enums"]["jobStatus"]
+ operationOrder: number
+ processId: string
+ workCenterId: string
+ description: string
+ setupTime: number
+ setupUnit: Database["public"]["Enums"]["factor"]
laborTime: number
laborUnit: Database["public"]["Enums"]["factor"]
machineTime: number
machineUnit: Database["public"]["Enums"]["factor"]
- operationOrder: number
operationOrderType: Database["public"]["Enums"]["methodOperationOrder"]
- operationQuantity: number
- operationStatus: Database["public"]["Enums"]["jobOperationStatus"]
+ jobReadableId: string
+ jobStatus: Database["public"]["Enums"]["jobStatus"]
+ jobDueDate: string
+ jobDeadlineType: Database["public"]["Enums"]["deadlineType"]
+ jobCustomerId: string
+ salesOrderReadableId: string
+ salesOrderId: string
+ salesOrderLineId: string
parentMaterialId: string
- processId: string
+ itemReadableId: string
+ itemDescription: string
+ operationStatus: Database["public"]["Enums"]["jobOperationStatus"]
+ operationQuantity: number
quantityComplete: number
quantityScrapped: number
- salesOrderId: string
- salesOrderLineId: string
- salesOrderReadableId: string
- setupTime: number
- setupUnit: Database["public"]["Enums"]["factor"]
- tags: string[]
thumbnailPath: string
- workCenterId: string
+ assignee: string
+ tags: string[]
}[]
}
get_claims: {
- Args: { company: string; uid: string }
+ Args: {
+ uid: string
+ company: string
+ }
Returns: Json
}
get_companies_with_any_role: {
@@ -48369,7 +48386,9 @@ export type Database = {
Returns: string[]
}
get_companies_with_employee_permission: {
- Args: { permission: string }
+ Args: {
+ permission: string
+ }
Returns: string[]
}
get_companies_with_employee_role: {
@@ -48377,7 +48396,9 @@ export type Database = {
Returns: string[]
}
get_companies_with_permission: {
- Args: { permission: string }
+ Args: {
+ permission: string
+ }
Returns: string[]
}
get_company_id_from_api_key: {
@@ -48385,392 +48406,441 @@ export type Database = {
Returns: string
}
get_company_id_from_foreign_key: {
- Args: { foreign_key: string; tbl: string }
+ Args: {
+ foreign_key: string
+ tbl: string
+ }
Returns: string
}
get_consumable_details: {
- Args: { item_id: string }
+ Args: {
+ item_id: string
+ }
Returns: {
active: boolean
assignee: string
- companyId: string
- createdAt: string
- createdBy: string
- customFields: Json
defaultMethodType: Database["public"]["Enums"]["methodType"]
description: string
- id: string
itemTrackingType: Database["public"]["Enums"]["itemTrackingType"]
- modelName: string
- modelPath: string
- modelSize: number
- modelUploadId: string
name: string
+ replenishmentSystem: Database["public"]["Enums"]["itemReplenishmentSystem"]
+ unitOfMeasureCode: string
notes: Json
+ thumbnailPath: string
+ modelUploadId: string
+ modelPath: string
+ modelName: string
+ modelSize: number
+ id: string
+ companyId: string
readableId: string
- readableIdWithRevision: string
- replenishmentSystem: Database["public"]["Enums"]["itemReplenishmentSystem"]
revision: string
- revisions: Json
+ readableIdWithRevision: string
supplierIds: string
- tags: string[]
- thumbnailPath: string
unitOfMeasure: string
- unitOfMeasureCode: string
- updatedAt: string
+ revisions: Json
+ customFields: Json
+ tags: string[]
+ createdBy: string
+ createdAt: string
updatedBy: string
+ updatedAt: string
}[]
}
get_custom_field_unique_values: {
- Args: { company_id: string; field_key: string; table_name: string }
+ Args: {
+ table_name: string
+ field_key: string
+ company_id: string
+ }
Returns: {
value: Json
}[]
}
get_customer_ids_with_customer_permission: {
- Args: { permission: string }
+ Args: {
+ permission: string
+ }
Returns: string[]
}
get_direct_ancestors_of_tracked_entity: {
- Args: { p_tracked_entity_id: string }
+ Args: {
+ p_tracked_entity_id: string
+ }
Returns: {
- activityAttributes: Json
- attributes: Json
+ trackedActivityId: string
id: string
quantity: number
+ status: Database["public"]["Enums"]["trackedEntityStatus"]
sourceDocument: string
sourceDocumentId: string
sourceDocumentReadableId: string
- status: Database["public"]["Enums"]["trackedEntityStatus"]
- trackedActivityId: string
+ activityAttributes: Json
+ attributes: Json
}[]
}
get_direct_ancestors_of_tracked_entity_strict: {
- Args: { p_tracked_entity_id: string }
+ Args: {
+ p_tracked_entity_id: string
+ }
Returns: {
- activityAttributes: Json
- attributes: Json
+ trackedActivityId: string
id: string
quantity: number
+ status: Database["public"]["Enums"]["trackedEntityStatus"]
sourceDocument: string
sourceDocumentId: string
sourceDocumentReadableId: string
- status: Database["public"]["Enums"]["trackedEntityStatus"]
- trackedActivityId: string
+ activityAttributes: Json
+ attributes: Json
}[]
}
get_direct_descendants_of_tracked_entity: {
- Args: { p_tracked_entity_id: string }
+ Args: {
+ p_tracked_entity_id: string
+ }
Returns: {
- activityAttributes: Json
- attributes: Json
+ trackedActivityId: string
id: string
quantity: number
+ status: Database["public"]["Enums"]["trackedEntityStatus"]
sourceDocument: string
sourceDocumentId: string
sourceDocumentReadableId: string
- status: Database["public"]["Enums"]["trackedEntityStatus"]
- trackedActivityId: string
+ activityAttributes: Json
+ attributes: Json
}[]
}
get_direct_descendants_of_tracked_entity_strict: {
- Args: { p_tracked_entity_id: string }
+ Args: {
+ p_tracked_entity_id: string
+ }
Returns: {
- activityAttributes: Json
- attributes: Json
+ trackedActivityId: string
id: string
quantity: number
+ status: Database["public"]["Enums"]["trackedEntityStatus"]
sourceDocument: string
sourceDocumentId: string
sourceDocumentReadableId: string
- status: Database["public"]["Enums"]["trackedEntityStatus"]
- trackedActivityId: string
+ activityAttributes: Json
+ attributes: Json
}[]
}
get_inventory_quantities: {
- Args: { company_id: string; location_id: string }
+ Args: {
+ company_id: string
+ location_id: string
+ }
Returns: {
+ id: string
+ readableId: string
+ readableIdWithRevision: string
+ name: string
active: boolean
- daysRemaining: number
- demandAccumulationPeriod: number
- demandAccumulationSafetyStock: number
- dimension: string
+ type: Database["public"]["Enums"]["itemType"]
+ itemTrackingType: Database["public"]["Enums"]["itemTrackingType"]
+ replenishmentSystem: Database["public"]["Enums"]["itemReplenishmentSystem"]
+ materialSubstanceId: string
+ materialFormId: string
dimensionId: string
- finish: string
+ dimension: string
finishId: string
- grade: string
+ finish: string
gradeId: string
- id: string
- itemTrackingType: Database["public"]["Enums"]["itemTrackingType"]
- leadTime: number
- lotSize: number
- materialFormId: string
- materialSubstanceId: string
+ grade: string
materialType: string
materialTypeId: string
- maximumInventoryQuantity: number
- maximumOrderQuantity: number
+ thumbnailPath: string
+ unitOfMeasureCode: string
+ leadTime: number
+ lotSize: number
+ reorderingPolicy: Database["public"]["Enums"]["itemReorderingPolicy"]
+ demandAccumulationPeriod: number
+ demandAccumulationSafetyStock: number
+ reorderPoint: number
+ reorderQuantity: number
minimumOrderQuantity: number
- name: string
+ maximumOrderQuantity: number
+ maximumInventoryQuantity: number
orderMultiple: number
quantityOnHand: number
- quantityOnProductionDemand: number
- quantityOnProductionOrder: number
- quantityOnPurchaseOrder: number
quantityOnSalesOrder: number
- readableId: string
- readableIdWithRevision: string
- reorderingPolicy: Database["public"]["Enums"]["itemReorderingPolicy"]
- reorderPoint: number
- reorderQuantity: number
- replenishmentSystem: Database["public"]["Enums"]["itemReplenishmentSystem"]
- thumbnailPath: string
- type: Database["public"]["Enums"]["itemType"]
- unitOfMeasureCode: string
+ quantityOnPurchaseOrder: number
+ quantityOnProductionOrder: number
+ quantityOnProductionDemand: number
usageLast30Days: number
usageLast90Days: number
+ daysRemaining: number
}[]
}
get_item_quantities_by_tracking_id: {
- Args: { company_id: string; item_id: string; location_id: string }
+ Args: {
+ item_id: string
+ company_id: string
+ location_id: string
+ }
Returns: {
itemId: string
- quantity: number
shelfId: string
shelfName: string
trackedEntityId: string
+ quantity: number
}[]
}
get_job_method: {
- Args: { jid: string }
+ Args: {
+ jid: string
+ }
Returns: {
- description: string
- isRoot: boolean
- itemId: string
- itemReadableId: string
- itemType: string
jobId: string
+ methodMaterialId: string
jobMakeMethodId: string
jobMaterialMakeMethodId: string
- kit: boolean
- methodMaterialId: string
+ itemId: string
+ itemReadableId: string
+ description: string
+ itemType: string
+ quantity: number
+ unitCost: number
methodType: Database["public"]["Enums"]["methodType"]
- order: number
parentMaterialId: string
- quantity: number
+ order: number
+ isRoot: boolean
+ kit: boolean
revision: string
- shelfId: string
- unitCost: number
version: number
+ shelfId: string
}[]
}
get_job_methods_by_method_id: {
- Args: { mid: string }
+ Args: {
+ mid: string
+ }
Returns: {
- description: string
- isRoot: boolean
- itemId: string
- itemReadableId: string
- itemType: string
jobId: string
+ methodMaterialId: string
jobMakeMethodId: string
jobMaterialMakeMethodId: string
- kit: boolean
- methodMaterialId: string
+ itemId: string
+ itemReadableId: string
+ description: string
+ unitOfMeasureCode: string
+ itemType: string
+ quantity: number
+ unitCost: number
methodType: Database["public"]["Enums"]["methodType"]
- order: number
parentMaterialId: string
- quantity: number
+ order: number
+ kit: boolean
+ isRoot: boolean
shelfId: string
- unitCost: number
- unitOfMeasureCode: string
}[]
}
get_job_operation_by_id: {
- Args: { operation_id: string }
+ Args: {
+ operation_id: string
+ }
Returns: {
- description: string
id: string
- itemDescription: string
- itemId: string
- itemModelId: string
- itemModelName: string
- itemModelPath: string
- itemModelSize: number
- itemReadableId: string
- itemUnitOfMeasure: string
- jobDeadlineType: Database["public"]["Enums"]["deadlineType"]
- jobDueDate: string
jobId: string
jobMakeMethodId: string
- jobReadableId: string
- jobStatus: Database["public"]["Enums"]["jobStatus"]
+ operationOrder: number
+ processId: string
+ workCenterId: string
+ description: string
+ setupTime: number
+ setupUnit: Database["public"]["Enums"]["factor"]
laborTime: number
laborUnit: Database["public"]["Enums"]["factor"]
machineTime: number
machineUnit: Database["public"]["Enums"]["factor"]
- operationOrder: number
operationOrderType: Database["public"]["Enums"]["methodOperationOrder"]
- operationQuantity: number
- operationStatus: Database["public"]["Enums"]["jobOperationStatus"]
+ jobReadableId: string
+ jobStatus: Database["public"]["Enums"]["jobStatus"]
+ jobDueDate: string
+ jobDeadlineType: Database["public"]["Enums"]["deadlineType"]
parentMaterialId: string
- processId: string
+ itemId: string
+ itemReadableId: string
+ itemDescription: string
+ itemUnitOfMeasure: string
+ itemModelPath: string
+ itemModelId: string
+ itemModelName: string
+ itemModelSize: number
+ operationStatus: Database["public"]["Enums"]["jobOperationStatus"]
+ operationQuantity: number
quantityComplete: number
quantityReworked: number
quantityScrapped: number
- setupTime: number
- setupUnit: Database["public"]["Enums"]["factor"]
- workCenterId: string
workInstruction: Json
}[]
}
get_job_operations_by_work_center: {
- Args: { location_id: string; work_center_id: string }
+ Args: {
+ work_center_id: string
+ location_id: string
+ }
Returns: {
- description: string
id: string
- itemReadableId: string
- jobDeadlineType: Database["public"]["Enums"]["deadlineType"]
- jobDueDate: string
jobId: string
- jobReadableId: string
- jobStatus: Database["public"]["Enums"]["jobStatus"]
+ operationOrder: number
+ processId: string
+ workCenterId: string
+ description: string
+ setupTime: number
+ setupUnit: Database["public"]["Enums"]["factor"]
laborTime: number
laborUnit: Database["public"]["Enums"]["factor"]
machineTime: number
machineUnit: Database["public"]["Enums"]["factor"]
- operationOrder: number
operationOrderType: Database["public"]["Enums"]["methodOperationOrder"]
- operationQuantity: number
- operationStatus: Database["public"]["Enums"]["jobOperationStatus"]
+ jobReadableId: string
+ jobStatus: Database["public"]["Enums"]["jobStatus"]
+ jobDueDate: string
+ jobDeadlineType: Database["public"]["Enums"]["deadlineType"]
parentMaterialId: string
- processId: string
+ itemReadableId: string
+ operationStatus: Database["public"]["Enums"]["jobOperationStatus"]
+ operationQuantity: number
quantityComplete: number
quantityScrapped: number
- setupTime: number
- setupUnit: Database["public"]["Enums"]["factor"]
- workCenterId: string
}[]
}
get_job_quantity_on_hand: {
- Args: { company_id: string; job_id: string; location_id: string }
+ Args: {
+ job_id: string
+ company_id: string
+ location_id: string
+ }
Returns: {
- description: string
- estimatedQuantity: number
id: string
+ jobMaterialItemId: string
+ jobMakeMethodId: string
itemReadableId: string
+ name: string
+ description: string
itemTrackingType: Database["public"]["Enums"]["itemTrackingType"]
- jobMakeMethodId: string
- jobMaterialItemId: string
methodType: Database["public"]["Enums"]["methodType"]
- name: string
- quantityFromProductionOrderInShelf: number
- quantityFromProductionOrderNotInShelf: number
+ type: Database["public"]["Enums"]["itemType"]
+ thumbnailPath: string
+ unitOfMeasureCode: string
+ quantityPerParent: number
+ estimatedQuantity: number
quantityIssued: number
quantityOnHandInShelf: number
quantityOnHandNotInShelf: number
- quantityOnProductionOrder: number
- quantityOnPurchaseOrder: number
quantityOnSalesOrder: number
- quantityPerParent: number
+ quantityOnPurchaseOrder: number
+ quantityOnProductionOrder: number
+ quantityFromProductionOrderInShelf: number
+ quantityFromProductionOrderNotInShelf: number
shelfName: string
- thumbnailPath: string
- type: Database["public"]["Enums"]["itemType"]
- unitOfMeasureCode: string
}[]
}
get_material_details: {
- Args: { item_id: string }
+ Args: {
+ item_id: string
+ }
Returns: {
active: boolean
assignee: string
- companyId: string
- createdAt: string
- createdBy: string
- customFields: Json
defaultMethodType: Database["public"]["Enums"]["methodType"]
description: string
- dimensionId: string
- dimensions: string
- finish: string
- finishId: string
- grade: string
- gradeId: string
- id: string
itemTrackingType: Database["public"]["Enums"]["itemTrackingType"]
- materialForm: string
- materialFormId: string
- materialSubstance: string
- materialSubstanceId: string
- materialType: string
- materialTypeId: string
- modelName: string
- modelPath: string
- modelSize: number
- modelUploadId: string
name: string
+ replenishmentSystem: Database["public"]["Enums"]["itemReplenishmentSystem"]
+ unitOfMeasureCode: string
notes: Json
+ thumbnailPath: string
+ modelUploadId: string
+ modelPath: string
+ modelName: string
+ modelSize: number
+ id: string
+ companyId: string
readableId: string
- readableIdWithRevision: string
- replenishmentSystem: Database["public"]["Enums"]["itemReplenishmentSystem"]
revision: string
- revisions: Json
+ readableIdWithRevision: string
supplierIds: string
- tags: string[]
- thumbnailPath: string
unitOfMeasure: string
- unitOfMeasureCode: string
- updatedAt: string
+ revisions: Json
+ materialForm: string
+ materialSubstance: string
+ finish: string
+ grade: string
+ dimensions: string
+ materialType: string
+ materialSubstanceId: string
+ materialFormId: string
+ materialTypeId: string
+ dimensionId: string
+ gradeId: string
+ finishId: string
+ customFields: Json
+ tags: string[]
+ createdBy: string
+ createdAt: string
updatedBy: string
+ updatedAt: string
}[]
}
get_material_naming_details: {
- Args: { readable_id: string }
- Returns: {
- dimensions: string
- finish: string
- grade: string
+ Args: {
+ readable_id: string
+ }
+ Returns: {
id: string
- materialType: string
- materialTypeCode: string
shape: string
shapeCode: string
substance: string
substanceCode: string
+ finish: string
+ grade: string
+ dimensions: string
+ materialType: string
+ materialTypeCode: string
}[]
}
get_method_tree: {
- Args: { uid: string }
+ Args: {
+ uid: string
+ }
Returns: {
- description: string
- externalId: Json
- isRoot: boolean
+ methodMaterialId: string
+ makeMethodId: string
+ materialMakeMethodId: string
itemId: string
itemReadableId: string
- itemTrackingType: string
itemType: string
- kit: boolean
- makeMethodId: string
- materialMakeMethodId: string
- methodMaterialId: string
+ description: string
+ unitOfMeasureCode: string
+ unitCost: number
+ quantity: number
methodType: Database["public"]["Enums"]["methodType"]
- operationId: string
- order: number
+ itemTrackingType: string
parentMaterialId: string
- quantity: number
+ order: number
+ operationId: string
+ isRoot: boolean
+ kit: boolean
revision: string
- shelfIds: Json
- unitCost: number
- unitOfMeasureCode: string
+ externalId: Json
version: number
+ shelfIds: Json
}[]
}
get_my_claim: {
- Args: { claim: string }
+ Args: {
+ claim: string
+ }
Returns: Json
}
get_my_permission: {
- Args: { claim: string }
+ Args: {
+ claim: string
+ }
Returns: Json
}
get_next_numeric_sequence: {
@@ -48789,84 +48859,105 @@ export type Database = {
Returns: string
}
get_next_sequence: {
- Args: { company_id: string; sequence_name: string }
+ Args: {
+ sequence_name: string
+ company_id: string
+ }
Returns: string
}
get_opportunity_with_related_records: {
- Args: { opportunity_id: string }
+ Args: {
+ opportunity_id: string
+ }
Returns: {
+ id: string
companyId: string
customerId: string
- id: string
purchaseOrderDocumentPath: string
- quotes: Json
requestForQuoteDocumentPath: string
- salesOrders: Json
salesRfqs: Json
+ quotes: Json
+ salesOrders: Json
}[]
}
get_part_details: {
- Args: { item_id: string }
+ Args: {
+ item_id: string
+ }
Returns: {
active: boolean
assignee: string
- companyId: string
- createdAt: string
- createdBy: string
- customFields: Json
defaultMethodType: Database["public"]["Enums"]["methodType"]
description: string
- id: string
itemTrackingType: Database["public"]["Enums"]["itemTrackingType"]
+ name: string
+ replenishmentSystem: Database["public"]["Enums"]["itemReplenishmentSystem"]
+ unitOfMeasureCode: string
+ notes: Json
+ thumbnailPath: string
modelId: string
- modelName: string
modelPath: string
+ modelName: string
modelSize: number
- name: string
- notes: Json
+ id: string
+ companyId: string
+ unitOfMeasure: string
readableId: string
- readableIdWithRevision: string
- replenishmentSystem: Database["public"]["Enums"]["itemReplenishmentSystem"]
revision: string
+ readableIdWithRevision: string
revisions: Json
+ customFields: Json
tags: string[]
- thumbnailPath: string
- unitOfMeasure: string
- unitOfMeasureCode: string
- updatedAt: string
+ createdBy: string
+ createdAt: string
updatedBy: string
+ updatedAt: string
}[]
}
get_permission_companies: {
- Args: { claim: string }
+ Args: {
+ claim: string
+ }
Returns: string[]
}
get_production_planning: {
- Args: { company_id: string; location_id: string; periods: string[] }
+ Args: {
+ company_id: string
+ location_id: string
+ periods: string[]
+ }
Returns: {
- active: boolean
- demandAccumulationPeriod: number
- demandAccumulationSafetyStock: number
id: string
+ readableIdWithRevision: string
+ name: string
+ active: boolean
+ type: Database["public"]["Enums"]["itemType"]
itemTrackingType: Database["public"]["Enums"]["itemTrackingType"]
+ replenishmentSystem: Database["public"]["Enums"]["itemReplenishmentSystem"]
+ thumbnailPath: string
+ unitOfMeasureCode: string
leadTime: number
- lotSize: number
manufacturingBlocked: boolean
- maximumInventoryQuantity: number
- maximumOrderQuantity: number
- minimumOrderQuantity: number
- name: string
- orderMultiple: number
- quantityOnHand: number
- readableIdWithRevision: string
+ lotSize: number
reorderingPolicy: Database["public"]["Enums"]["itemReorderingPolicy"]
+ demandAccumulationPeriod: number
+ demandAccumulationSafetyStock: number
reorderPoint: number
reorderQuantity: number
- replenishmentSystem: Database["public"]["Enums"]["itemReplenishmentSystem"]
- thumbnailPath: string
- type: Database["public"]["Enums"]["itemType"]
- unitOfMeasureCode: string
+ minimumOrderQuantity: number
+ maximumOrderQuantity: number
+ orderMultiple: number
+ quantityOnHand: number
+ maximumInventoryQuantity: number
week1: number
+ week2: number
+ week3: number
+ week4: number
+ week5: number
+ week6: number
+ week7: number
+ week8: number
+ week9: number
week10: number
week11: number
week12: number
@@ -48877,7 +48968,6 @@ export type Database = {
week17: number
week18: number
week19: number
- week2: number
week20: number
week21: number
week22: number
@@ -48888,7 +48978,6 @@ export type Database = {
week27: number
week28: number
week29: number
- week3: number
week30: number
week31: number
week32: number
@@ -48899,7 +48988,6 @@ export type Database = {
week37: number
week38: number
week39: number
- week4: number
week40: number
week41: number
week42: number
@@ -48910,42 +48998,49 @@ export type Database = {
week47: number
week48: number
week49: number
- week5: number
week50: number
week51: number
week52: number
- week6: number
- week7: number
- week8: number
- week9: number
}[]
}
get_production_projections: {
- Args: { company_id: string; location_id: string; periods: string[] }
+ Args: {
+ company_id: string
+ location_id: string
+ periods: string[]
+ }
Returns: {
- active: boolean
- demandAccumulationPeriod: number
- demandAccumulationSafetyStock: number
id: string
+ readableIdWithRevision: string
+ name: string
+ active: boolean
+ type: Database["public"]["Enums"]["itemType"]
itemTrackingType: Database["public"]["Enums"]["itemTrackingType"]
+ replenishmentSystem: Database["public"]["Enums"]["itemReplenishmentSystem"]
+ thumbnailPath: string
+ unitOfMeasureCode: string
leadTime: number
- lotSize: number
manufacturingBlocked: boolean
- maximumInventoryQuantity: number
- maximumOrderQuantity: number
- minimumOrderQuantity: number
- name: string
- orderMultiple: number
- quantityOnHand: number
- readableIdWithRevision: string
+ lotSize: number
reorderingPolicy: Database["public"]["Enums"]["itemReorderingPolicy"]
+ demandAccumulationPeriod: number
+ demandAccumulationSafetyStock: number
reorderPoint: number
reorderQuantity: number
- replenishmentSystem: Database["public"]["Enums"]["itemReplenishmentSystem"]
- thumbnailPath: string
- type: Database["public"]["Enums"]["itemType"]
- unitOfMeasureCode: string
+ minimumOrderQuantity: number
+ maximumOrderQuantity: number
+ orderMultiple: number
+ quantityOnHand: number
+ maximumInventoryQuantity: number
week1: number
+ week2: number
+ week3: number
+ week4: number
+ week5: number
+ week6: number
+ week7: number
+ week8: number
+ week9: number
week10: number
week11: number
week12: number
@@ -48956,7 +49051,6 @@ export type Database = {
week17: number
week18: number
week19: number
- week2: number
week20: number
week21: number
week22: number
@@ -48967,7 +49061,6 @@ export type Database = {
week27: number
week28: number
week29: number
- week3: number
week30: number
week31: number
week32: number
@@ -48978,7 +49071,6 @@ export type Database = {
week37: number
week38: number
week39: number
- week4: number
week40: number
week41: number
week42: number
@@ -48989,46 +49081,53 @@ export type Database = {
week47: number
week48: number
week49: number
- week5: number
week50: number
week51: number
week52: number
- week6: number
- week7: number
- week8: number
- week9: number
}[]
}
get_purchasing_planning: {
- Args: { company_id: string; location_id: string; periods: string[] }
+ Args: {
+ company_id: string
+ location_id: string
+ periods: string[]
+ }
Returns: {
- active: boolean
- conversionFactor: number
- demandAccumulationPeriod: number
- demandAccumulationSafetyStock: number
id: string
+ readableIdWithRevision: string
+ name: string
+ active: boolean
+ type: Database["public"]["Enums"]["itemType"]
itemTrackingType: Database["public"]["Enums"]["itemTrackingType"]
+ replenishmentSystem: Database["public"]["Enums"]["itemReplenishmentSystem"]
+ thumbnailPath: string
+ unitOfMeasureCode: string
leadTime: number
- lotSize: number
- maximumInventoryQuantity: number
- maximumOrderQuantity: number
- minimumOrderQuantity: number
- name: string
- orderMultiple: number
- preferredSupplierId: string
purchasingBlocked: boolean
- purchasingUnitOfMeasureCode: string
- quantityOnHand: number
- readableIdWithRevision: string
+ lotSize: number
reorderingPolicy: Database["public"]["Enums"]["itemReorderingPolicy"]
+ demandAccumulationPeriod: number
+ demandAccumulationSafetyStock: number
reorderPoint: number
reorderQuantity: number
- replenishmentSystem: Database["public"]["Enums"]["itemReplenishmentSystem"]
+ minimumOrderQuantity: number
+ maximumOrderQuantity: number
+ orderMultiple: number
+ quantityOnHand: number
+ maximumInventoryQuantity: number
suppliers: Json
- thumbnailPath: string
- type: Database["public"]["Enums"]["itemType"]
- unitOfMeasureCode: string
+ preferredSupplierId: string
+ purchasingUnitOfMeasureCode: string
+ conversionFactor: number
week1: number
+ week2: number
+ week3: number
+ week4: number
+ week5: number
+ week6: number
+ week7: number
+ week8: number
+ week9: number
week10: number
week11: number
week12: number
@@ -49039,7 +49138,6 @@ export type Database = {
week17: number
week18: number
week19: number
- week2: number
week20: number
week21: number
week22: number
@@ -49050,7 +49148,6 @@ export type Database = {
week27: number
week28: number
week29: number
- week3: number
week30: number
week31: number
week32: number
@@ -49061,7 +49158,6 @@ export type Database = {
week37: number
week38: number
week39: number
- week4: number
week40: number
week41: number
week42: number
@@ -49072,273 +49168,307 @@ export type Database = {
week47: number
week48: number
week49: number
- week5: number
week50: number
week51: number
week52: number
- week6: number
- week7: number
- week8: number
- week9: number
}[]
}
get_quote_methods: {
- Args: { qid: string }
+ Args: {
+ qid: string
+ }
Returns: {
- description: string
- externalId: Json
- isRoot: boolean
+ quoteId: string
+ quoteLineId: string
+ methodMaterialId: string
+ quoteMakeMethodId: string
+ quoteMaterialMakeMethodId: string
itemId: string
itemReadableId: string
+ description: string
itemType: string
- kit: boolean
- methodMaterialId: string
+ quantity: number
+ unitCost: number
methodType: Database["public"]["Enums"]["methodType"]
- order: number
parentMaterialId: string
- quantity: number
- quoteId: string
- quoteLineId: string
- quoteMakeMethodId: string
- quoteMaterialMakeMethodId: string
+ order: number
+ isRoot: boolean
+ kit: boolean
revision: string
- shelfId: string
- unitCost: number
+ externalId: Json
version: number
+ shelfId: string
}[]
}
get_quote_methods_by_method_id: {
- Args: { mid: string }
+ Args: {
+ mid: string
+ }
Returns: {
- description: string
- externalId: Json
- isRoot: boolean
+ quoteId: string
+ quoteLineId: string
+ methodMaterialId: string
+ quoteMakeMethodId: string
+ quoteMaterialMakeMethodId: string
itemId: string
itemReadableId: string
- itemTrackingType: string
+ description: string
+ unitOfMeasureCode: string
itemType: string
- kit: boolean
- methodMaterialId: string
+ itemTrackingType: string
+ quantity: number
+ unitCost: number
methodType: Database["public"]["Enums"]["methodType"]
- order: number
parentMaterialId: string
- quantity: number
- quoteId: string
- quoteLineId: string
- quoteMakeMethodId: string
- quoteMaterialMakeMethodId: string
+ order: number
+ isRoot: boolean
+ kit: boolean
revision: string
- shelfId: string
- unitCost: number
- unitOfMeasureCode: string
+ externalId: Json
version: number
+ shelfId: string
}[]
}
get_radan_v1: {
- Args: { company_id: string; processes: string[] }
+ Args: {
+ company_id: string
+ processes: string[]
+ }
Returns: {
- assignee: string
- description: string
id: string
- itemDescription: string
- itemId: string
- itemReadableId: string
- jobCustomerId: string
- jobDeadlineType: Database["public"]["Enums"]["deadlineType"]
- jobDueDate: string
jobId: string
- jobLocationName: string
- jobMakeMethodId: string
- jobReadableId: string
- jobStatus: Database["public"]["Enums"]["jobStatus"]
+ operationOrder: number
+ priority: number
+ processId: string
+ workCenterId: string
+ description: string
+ setupTime: number
+ setupUnit: Database["public"]["Enums"]["factor"]
laborTime: number
laborUnit: Database["public"]["Enums"]["factor"]
machineTime: number
machineUnit: Database["public"]["Enums"]["factor"]
- materialDimension: string
- materialFinish: string
- materialForm: string
- materialGrade: string
- materialItemDescription: string
- materialItemReadableId: string
- materialSubstance: string
- operationOrder: number
operationOrderType: Database["public"]["Enums"]["methodOperationOrder"]
- operationQuantity: number
- operationStatus: Database["public"]["Enums"]["jobOperationStatus"]
+ jobMakeMethodId: string
+ assignee: string
+ tags: string[]
+ jobReadableId: string
+ jobStatus: Database["public"]["Enums"]["jobStatus"]
+ jobDueDate: string
+ jobDeadlineType: Database["public"]["Enums"]["deadlineType"]
+ jobCustomerId: string
+ jobLocationName: string
+ salesOrderReadableId: string
+ salesOrderId: string
+ salesOrderLineId: string
parentMaterialId: string
- priority: number
- processId: string
+ itemId: string
+ itemReadableId: string
+ itemDescription: string
+ operationStatus: Database["public"]["Enums"]["jobOperationStatus"]
+ operationQuantity: number
quantityComplete: number
quantityScrapped: number
- salesOrderId: string
- salesOrderLineId: string
- salesOrderReadableId: string
- setupTime: number
- setupUnit: Database["public"]["Enums"]["factor"]
- tags: string[]
- workCenterId: string
+ materialItemReadableId: string
+ materialItemDescription: string
+ materialSubstance: string
+ materialForm: string
+ materialDimension: string
+ materialFinish: string
+ materialGrade: string
}[]
}
get_recent_job_operations_by_employee: {
- Args: { company_id: string; employee_id: string }
+ Args: {
+ employee_id: string
+ company_id: string
+ }
Returns: {
- assignee: string
- description: string
id: string
- itemDescription: string
- itemReadableId: string
- jobCustomerId: string
- jobDeadlineType: Database["public"]["Enums"]["deadlineType"]
- jobDueDate: string
jobId: string
- jobReadableId: string
- jobStatus: Database["public"]["Enums"]["jobStatus"]
+ operationOrder: number
+ processId: string
+ workCenterId: string
+ description: string
+ setupTime: number
+ setupUnit: Database["public"]["Enums"]["factor"]
laborTime: number
laborUnit: Database["public"]["Enums"]["factor"]
machineTime: number
machineUnit: Database["public"]["Enums"]["factor"]
- operationOrder: number
operationOrderType: Database["public"]["Enums"]["methodOperationOrder"]
- operationQuantity: number
- operationStatus: Database["public"]["Enums"]["jobOperationStatus"]
+ jobReadableId: string
+ jobStatus: Database["public"]["Enums"]["jobStatus"]
+ jobDueDate: string
+ jobDeadlineType: Database["public"]["Enums"]["deadlineType"]
+ jobCustomerId: string
+ salesOrderReadableId: string
+ salesOrderId: string
+ salesOrderLineId: string
parentMaterialId: string
- processId: string
+ itemReadableId: string
+ itemDescription: string
+ operationStatus: Database["public"]["Enums"]["jobOperationStatus"]
+ operationQuantity: number
quantityComplete: number
quantityScrapped: number
- salesOrderId: string
- salesOrderLineId: string
- salesOrderReadableId: string
- setupTime: number
- setupUnit: Database["public"]["Enums"]["factor"]
- tags: string[]
thumbnailPath: string
- workCenterId: string
+ assignee: string
+ tags: string[]
}[]
}
get_sales_order_lines_by_customer_id: {
- Args: { customer_id: string }
+ Args: {
+ customer_id: string
+ }
Returns: {
+ customerReference: string
+ salesOrderId: string
customerContactName: string
customerEngineeringContactName: string
- customerId: string
- customerReference: string
- jobOperations: Json
- jobProductionQuantity: number
- jobQuantityComplete: number
- jobQuantityShipped: number
- jobStatus: Database["public"]["Enums"]["jobStatus"]
+ saleQuantity: number
+ quantityToSend: number
+ quantitySent: number
+ quantityInvoiced: number
+ unitPrice: number
+ unitOfMeasureCode: string
locationId: string
orderDate: string
promisedDate: string
- quantityInvoiced: number
- quantitySent: number
- quantityToSend: number
- readableId: string
- readableIdWithRevision: string
- receiptPromisedDate: string
receiptRequestedDate: string
- revision: string
- saleQuantity: number
- salesOrderId: string
+ receiptPromisedDate: string
salesOrderStatus: Database["public"]["Enums"]["salesOrderStatus"]
+ readableId: string
+ revision: string
+ readableIdWithRevision: string
+ customerId: string
thumbnailPath: string
- unitOfMeasureCode: string
- unitPrice: number
+ jobOperations: Json
+ jobQuantityShipped: number
+ jobQuantityComplete: number
+ jobProductionQuantity: number
+ jobStatus: Database["public"]["Enums"]["jobStatus"]
}[]
}
get_supplier_ids_with_supplier_permission: {
- Args: { permission: string }
+ Args: {
+ permission: string
+ }
Returns: string[]
}
get_supplier_interaction_with_related_records: {
- Args: { supplier_interaction_id: string }
+ Args: {
+ supplier_interaction_id: string
+ }
Returns: {
- companyId: string
id: string
- purchaseInvoices: Json
- purchaseOrders: Json
+ companyId: string
supplierId: string
supplierQuotes: Json
+ purchaseOrders: Json
+ purchaseInvoices: Json
}[]
}
get_tool_details: {
- Args: { item_id: string }
+ Args: {
+ item_id: string
+ }
Returns: {
active: boolean
assignee: string
- companyId: string
- createdAt: string
- createdBy: string
- customFields: Json
defaultMethodType: Database["public"]["Enums"]["methodType"]
description: string
- id: string
itemTrackingType: Database["public"]["Enums"]["itemTrackingType"]
+ name: string
+ replenishmentSystem: Database["public"]["Enums"]["itemReplenishmentSystem"]
+ unitOfMeasureCode: string
+ notes: Json
+ thumbnailPath: string
modelId: string
- modelName: string
modelPath: string
+ modelName: string
modelSize: number
- name: string
- notes: Json
+ id: string
+ companyId: string
+ unitOfMeasure: string
readableId: string
- readableIdWithRevision: string
- replenishmentSystem: Database["public"]["Enums"]["itemReplenishmentSystem"]
revision: string
+ readableIdWithRevision: string
revisions: Json
+ customFields: Json
tags: string[]
- thumbnailPath: string
- unitOfMeasure: string
- unitOfMeasureCode: string
- updatedAt: string
+ createdBy: string
+ createdAt: string
updatedBy: string
+ updatedAt: string
}[]
}
groups_for_user: {
- Args: { uid: string }
+ Args: {
+ uid: string
+ }
Returns: string[]
}
groups_query: {
- Args: { _name?: string; _uid?: string }
+ Args: {
+ _name?: string
+ _uid?: string
+ }
Returns: {
- companyId: string
id: string
+ name: string
+ companyId: string
+ parentId: string
+ isEmployeeTypeGroup: boolean
isCustomerOrgGroup: boolean
isCustomerTypeGroup: boolean
- isEmployeeTypeGroup: boolean
isSupplierOrgGroup: boolean
isSupplierTypeGroup: boolean
- name: string
- parentId: string
users: Json
}[]
}
has_any_company_permission: {
- Args: { claim: string }
+ Args: {
+ claim: string
+ }
Returns: boolean
}
has_company_permission: {
- Args: { claim: string; company: string }
+ Args: {
+ claim: string
+ company: string
+ }
Returns: boolean
}
has_role: {
- Args: { company: string; required_role: string }
+ Args: {
+ required_role: string
+ company: string
+ }
Returns: boolean
}
has_valid_api_key_for_company: {
- Args: { company: string }
+ Args: {
+ company: string
+ }
Returns: boolean
}
id: {
- Args: { _prefix?: string }
+ Args: {
+ _prefix?: string
+ }
Returns: string
}
increment_webhook_error: {
- Args: { webhook_id: string }
+ Args: {
+ webhook_id: string
+ }
Returns: undefined
}
increment_webhook_success: {
- Args: { webhook_id: string }
+ Args: {
+ webhook_id: string
+ }
Returns: undefined
}
is_claims_admin: {
@@ -49346,57 +49476,69 @@ export type Database = {
Returns: boolean
}
is_last_job_operation: {
- Args: { operation_id: string }
+ Args: {
+ operation_id: string
+ }
Returns: boolean
}
items_search: {
Args: {
- match_count: number
+ query_embedding: string
match_threshold: number
+ match_count: number
p_company_id: string
- query_embedding: string
}
Returns: {
- description: string
id: string
- name: string
readableId: string
+ name: string
+ description: string
similarity: number
}[]
}
journalLinesByAccountNumber: {
- Args: { from_date?: string; to_date?: string }
+ Args: {
+ from_date?: string
+ to_date?: string
+ }
Returns: {
+ number: string
+ companyId: string
balance: number
balanceAtDate: number
- companyId: string
netChange: number
- number: string
}[]
}
jsonb_to_text_array: {
- Args: { "": Json }
+ Args: {
+ "": Json
+ }
Returns: string[]
}
nanoid: {
Args: {
- additionalbytesfactor?: number
- alphabet?: string
prefix?: string
size?: number
+ alphabet?: string
+ additionalbytesfactor?: number
}
Returns: string
}
nanoid_optimized: {
- Args: { alphabet: string; mask: number; size: number; step: number }
+ Args: {
+ size: number
+ alphabet: string
+ mask: number
+ step: number
+ }
Returns: string
}
suppliers_search: {
Args: {
- match_count: number
+ query_embedding: string
match_threshold: number
+ match_count: number
p_company_id: string
- query_embedding: string
}
Returns: {
id: string
@@ -49406,27 +49548,29 @@ export type Database = {
}
update_receipt_line_batch_tracking: {
Args: {
+ p_receipt_line_id: string
+ p_receipt_id: string
p_batch_number: string
- p_properties?: Json
p_quantity: number
- p_receipt_id: string
- p_receipt_line_id: string
p_tracked_entity_id?: string
+ p_properties?: Json
}
Returns: undefined
}
update_receipt_line_serial_tracking: {
Args: {
- p_index: number
- p_receipt_id: string
p_receipt_line_id: string
+ p_receipt_id: string
p_serial_number: string
+ p_index: number
p_tracked_entity_id?: string
}
Returns: undefined
}
users_for_groups: {
- Args: { groups: string[] }
+ Args: {
+ groups: string[]
+ }
Returns: Json
}
uuid_generate_v4: {
@@ -49434,35 +49578,51 @@ export type Database = {
Returns: string
}
uuid_to_base58: {
- Args: { _uuid: string }
+ Args: {
+ _uuid: string
+ }
Returns: string
}
xid: {
- Args: { _at?: string }
+ Args: {
+ _at?: string
+ }
Returns: unknown
}
xid_counter: {
- Args: { _xid: unknown }
+ Args: {
+ _xid: unknown
+ }
Returns: number
}
xid_decode: {
- Args: { _xid: unknown }
+ Args: {
+ _xid: unknown
+ }
Returns: number[]
}
xid_encode: {
- Args: { _id: number[] }
+ Args: {
+ _id: number[]
+ }
Returns: unknown
}
xid_machine: {
- Args: { _xid: unknown }
+ Args: {
+ _xid: unknown
+ }
Returns: number[]
}
xid_pid: {
- Args: { _xid: unknown }
+ Args: {
+ _xid: unknown
+ }
Returns: number
}
xid_time: {
- Args: { _xid: unknown }
+ Args: {
+ _xid: unknown
+ }
Returns: string
}
}
@@ -49718,7 +49878,6 @@ export type Database = {
| "Fixture"
paymentTermCalculationMethod: "Net" | "End of Month" | "Day of Month"
periodType: "Week" | "Day" | "Month"
- pickListStatus: "Draft" | "Released" | "In Progress" | "Completed"
procedureStatus: "Draft" | "Active" | "Archived"
procedureStepType:
| "Value"
@@ -49876,6 +50035,7 @@ export type Database = {
| "Outbound Transfer"
shipmentStatus: "Draft" | "Pending" | "Posted" | "Voided"
shippingCarrier: "UPS" | "FedEx" | "USPS" | "DHL" | "Other"
+ stockTransferStatus: "Draft" | "Released" | "In Progress" | "Completed"
supplierLedgerDocumentType:
| "Payment"
| "Invoice"
@@ -49913,7 +50073,6 @@ export type Database = {
owner: string | null
owner_id: string | null
public: boolean | null
- type: Database["storage"]["Enums"]["buckettype"]
updated_at: string | null
}
Insert: {
@@ -49926,7 +50085,6 @@ export type Database = {
owner?: string | null
owner_id?: string | null
public?: boolean | null
- type?: Database["storage"]["Enums"]["buckettype"]
updated_at?: string | null
}
Update: {
@@ -49939,112 +50097,10 @@ export type Database = {
owner?: string | null
owner_id?: string | null
public?: boolean | null
- type?: Database["storage"]["Enums"]["buckettype"]
updated_at?: string | null
}
Relationships: []
}
- buckets_analytics: {
- Row: {
- created_at: string
- format: string
- id: string
- type: Database["storage"]["Enums"]["buckettype"]
- updated_at: string
- }
- Insert: {
- created_at?: string
- format?: string
- id: string
- type?: Database["storage"]["Enums"]["buckettype"]
- updated_at?: string
- }
- Update: {
- created_at?: string
- format?: string
- id?: string
- type?: Database["storage"]["Enums"]["buckettype"]
- updated_at?: string
- }
- Relationships: []
- }
- iceberg_namespaces: {
- Row: {
- bucket_id: string
- created_at: string
- id: string
- name: string
- updated_at: string
- }
- Insert: {
- bucket_id: string
- created_at?: string
- id?: string
- name: string
- updated_at?: string
- }
- Update: {
- bucket_id?: string
- created_at?: string
- id?: string
- name?: string
- updated_at?: string
- }
- Relationships: [
- {
- foreignKeyName: "iceberg_namespaces_bucket_id_fkey"
- columns: ["bucket_id"]
- isOneToOne: false
- referencedRelation: "buckets_analytics"
- referencedColumns: ["id"]
- },
- ]
- }
- iceberg_tables: {
- Row: {
- bucket_id: string
- created_at: string
- id: string
- location: string
- name: string
- namespace_id: string
- updated_at: string
- }
- Insert: {
- bucket_id: string
- created_at?: string
- id?: string
- location: string
- name: string
- namespace_id: string
- updated_at?: string
- }
- Update: {
- bucket_id?: string
- created_at?: string
- id?: string
- location?: string
- name?: string
- namespace_id?: string
- updated_at?: string
- }
- Relationships: [
- {
- foreignKeyName: "iceberg_tables_bucket_id_fkey"
- columns: ["bucket_id"]
- isOneToOne: false
- referencedRelation: "buckets_analytics"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "iceberg_tables_namespace_id_fkey"
- columns: ["namespace_id"]
- isOneToOne: false
- referencedRelation: "iceberg_namespaces"
- referencedColumns: ["id"]
- },
- ]
- }
migrations: {
Row: {
executed_at: string | null
@@ -50258,76 +50314,99 @@ export type Database = {
}
Functions: {
add_prefixes: {
- Args: { _bucket_id: string; _name: string }
+ Args: {
+ _bucket_id: string
+ _name: string
+ }
Returns: undefined
}
can_insert_object: {
- Args: { bucketid: string; metadata: Json; name: string; owner: string }
+ Args: {
+ bucketid: string
+ name: string
+ owner: string
+ metadata: Json
+ }
Returns: undefined
}
delete_prefix: {
- Args: { _bucket_id: string; _name: string }
+ Args: {
+ _bucket_id: string
+ _name: string
+ }
Returns: boolean
}
extension: {
- Args: { name: string }
+ Args: {
+ name: string
+ }
Returns: string
}
filename: {
- Args: { name: string }
+ Args: {
+ name: string
+ }
Returns: string
}
foldername: {
- Args: { name: string }
+ Args: {
+ name: string
+ }
Returns: string[]
}
get_level: {
- Args: { name: string }
+ Args: {
+ name: string
+ }
Returns: number
}
get_prefix: {
- Args: { name: string }
+ Args: {
+ name: string
+ }
Returns: string
}
get_prefixes: {
- Args: { name: string }
+ Args: {
+ name: string
+ }
Returns: string[]
}
get_size_by_bucket: {
Args: Record<PropertyKey, never>
Returns: {
- bucket_id: string
size: number
+ bucket_id: string
}[]
}
list_multipart_uploads_with_delimiter: {
Args: {
bucket_id: string
+ prefix_param: string
delimiter_param: string
max_keys?: number
next_key_token?: string
next_upload_token?: string
- prefix_param: string
}
Returns: {
- created_at: string
- id: string
key: string
+ id: string
+ created_at: string
}[]
}
list_objects_with_delimiter: {
Args: {
bucket_id: string
+ prefix_param: string
delimiter_param: string
max_keys?: number
- next_token?: string
- prefix_param: string
start_after?: string
+ next_token?: string
}
Returns: {
+ name: string
id: string
metadata: Json
- name: string
updated_at: string
}[]
}
@@ -50337,84 +50416,84 @@ export type Database = {
}
search: {
Args: {
+ prefix: string
bucketname: string
- levels?: number
limits?: number
+ levels?: number
offsets?: number
- prefix: string
search?: string
sortcolumn?: string
sortorder?: string
}
Returns: {
- created_at: string
+ name: string
id: string
+ updated_at: string
+ created_at: string
last_accessed_at: string
metadata: Json
- name: string
- updated_at: string
}[]
}
search_legacy_v1: {
Args: {
+ prefix: string
bucketname: string
- levels?: number
limits?: number
+ levels?: number
offsets?: number
- prefix: string
search?: string
sortcolumn?: string
sortorder?: string
}
Returns: {
- created_at: string
+ name: string
id: string
+ updated_at: string
+ created_at: string
last_accessed_at: string
metadata: Json
- name: string
- updated_at: string
}[]
}
search_v1_optimised: {
Args: {
+ prefix: string
bucketname: string
- levels?: number
limits?: number
+ levels?: number
offsets?: number
- prefix: string
search?: string
sortcolumn?: string
sortorder?: string
}
Returns: {
- created_at: string
+ name: string
id: string
+ updated_at: string
+ created_at: string
last_accessed_at: string
metadata: Json
- name: string
- updated_at: string
}[]
}
search_v2: {
Args: {
+ prefix: string
bucket_name: string
- levels?: number
limits?: number
- prefix: string
+ levels?: number
start_after?: string
}
Returns: {
- created_at: string
- id: string
key: string
- metadata: Json
name: string
+ id: string
updated_at: string
+ created_at: string
+ metadata: Json
}[]
}
}
Enums: {
- buckettype: "STANDARD" | "ANALYTICS"
+ [_ in never]: never
}
CompositeTypes: {
[_ in never]: never
@@ -50422,33 +50501,27 @@ export type Database = {
}
}
-type DatabaseWithoutInternals = Omit<Database, "__InternalSupabase">
-
-type DefaultSchema = DatabaseWithoutInternals[Extract<keyof Database, "public">]
+type PublicSchema = Database[Extract<keyof Database, "public">]
export type Tables<
- DefaultSchemaTableNameOrOptions extends
- | keyof (DefaultSchema["Tables"] & DefaultSchema["Views"])
- | { schema: keyof DatabaseWithoutInternals },
- TableName extends DefaultSchemaTableNameOrOptions extends {
- schema: keyof DatabaseWithoutInternals
- }
- ? keyof (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] &
- DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Views"])
+ PublicTableNameOrOptions extends
+ | keyof (PublicSchema["Tables"] & PublicSchema["Views"])
+ | { schema: keyof Database },
+ TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
+ ? keyof (Database[PublicTableNameOrOptions["schema"]]["Tables"] &
+ Database[PublicTableNameOrOptions["schema"]]["Views"])
: never = never,
-> = DefaultSchemaTableNameOrOptions extends {
- schema: keyof DatabaseWithoutInternals
-}
- ? (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] &
- DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Views"])[TableName] extends {
+> = PublicTableNameOrOptions extends { schema: keyof Database }
+ ? (Database[PublicTableNameOrOptions["schema"]]["Tables"] &
+ Database[PublicTableNameOrOptions["schema"]]["Views"])[TableName] extends {
Row: infer R
}
? R
: never
- : DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema["Tables"] &
- DefaultSchema["Views"])
- ? (DefaultSchema["Tables"] &
- DefaultSchema["Views"])[DefaultSchemaTableNameOrOptions] extends {
+ : PublicTableNameOrOptions extends keyof (PublicSchema["Tables"] &
+ PublicSchema["Views"])
+ ? (PublicSchema["Tables"] &
+ PublicSchema["Views"])[PublicTableNameOrOptions] extends {
Row: infer R
}
? R
@@ -50456,24 +50529,20 @@ export type Tables<
: never
export type TablesInsert<
- DefaultSchemaTableNameOrOptions extends
- | keyof DefaultSchema["Tables"]
- | { schema: keyof DatabaseWithoutInternals },
- TableName extends DefaultSchemaTableNameOrOptions extends {
- schema: keyof DatabaseWithoutInternals
- }
- ? keyof DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"]
+ PublicTableNameOrOptions extends
+ | keyof PublicSchema["Tables"]
+ | { schema: keyof Database },
+ TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
+ ? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"]
: never = never,
-> = DefaultSchemaTableNameOrOptions extends {
- schema: keyof DatabaseWithoutInternals
-}
- ? DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
+> = PublicTableNameOrOptions extends { schema: keyof Database }
+ ? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
Insert: infer I
}
? I
: never
- : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"]
- ? DefaultSchema["Tables"][DefaultSchemaTableNameOrOptions] extends {
+ : PublicTableNameOrOptions extends keyof PublicSchema["Tables"]
+ ? PublicSchema["Tables"][PublicTableNameOrOptions] extends {
Insert: infer I
}
? I
@@ -50481,24 +50550,20 @@ export type TablesInsert<
: never
export type TablesUpdate<
- DefaultSchemaTableNameOrOptions extends
- | keyof DefaultSchema["Tables"]
- | { schema: keyof DatabaseWithoutInternals },
- TableName extends DefaultSchemaTableNameOrOptions extends {
- schema: keyof DatabaseWithoutInternals
- }
- ? keyof DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"]
+ PublicTableNameOrOptions extends
+ | keyof PublicSchema["Tables"]
+ | { schema: keyof Database },
+ TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
+ ? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"]
: never = never,
-> = DefaultSchemaTableNameOrOptions extends {
- schema: keyof DatabaseWithoutInternals
-}
- ? DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
+> = PublicTableNameOrOptions extends { schema: keyof Database }
+ ? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
Update: infer U
}
? U
: never
- : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"]
- ? DefaultSchema["Tables"][DefaultSchemaTableNameOrOptions] extends {
+ : PublicTableNameOrOptions extends keyof PublicSchema["Tables"]
+ ? PublicSchema["Tables"][PublicTableNameOrOptions] extends {
Update: infer U
}
? U
@@ -50506,518 +50571,30 @@ export type TablesUpdate<
: never
export type Enums<
- DefaultSchemaEnumNameOrOptions extends
- | keyof DefaultSchema["Enums"]
- | { schema: keyof DatabaseWithoutInternals },
- EnumName extends DefaultSchemaEnumNameOrOptions extends {
- schema: keyof DatabaseWithoutInternals
- }
- ? keyof DatabaseWithoutInternals[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"]
+ PublicEnumNameOrOptions extends
+ | keyof PublicSchema["Enums"]
+ | { schema: keyof Database },
+ EnumName extends PublicEnumNameOrOptions extends { schema: keyof Database }
+ ? keyof Database[PublicEnumNameOrOptions["schema"]]["Enums"]
: never = never,
-> = DefaultSchemaEnumNameOrOptions extends {
- schema: keyof DatabaseWithoutInternals
-}
- ? DatabaseWithoutInternals[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"][EnumName]
- : DefaultSchemaEnumNameOrOptions extends keyof DefaultSchema["Enums"]
- ? DefaultSchema["Enums"][DefaultSchemaEnumNameOrOptions]
+> = PublicEnumNameOrOptions extends { schema: keyof Database }
+ ? Database[PublicEnumNameOrOptions["schema"]]["Enums"][EnumName]
+ : PublicEnumNameOrOptions extends keyof PublicSchema["Enums"]
+ ? PublicSchema["Enums"][PublicEnumNameOrOptions]
: never
export type CompositeTypes<
PublicCompositeTypeNameOrOptions extends
- | keyof DefaultSchema["CompositeTypes"]
- | { schema: keyof DatabaseWithoutInternals },
+ | keyof PublicSchema["CompositeTypes"]
+ | { schema: keyof Database },
CompositeTypeName extends PublicCompositeTypeNameOrOptions extends {
- schema: keyof DatabaseWithoutInternals
+ schema: keyof Database
}
- ? keyof DatabaseWithoutInternals[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"]
+ ? keyof Database[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"]
: never = never,
-> = PublicCompositeTypeNameOrOptions extends {
- schema: keyof DatabaseWithoutInternals
-}
- ? DatabaseWithoutInternals[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"][CompositeTypeName]
- : PublicCompositeTypeNameOrOptions extends keyof DefaultSchema["CompositeTypes"]
- ? DefaultSchema["CompositeTypes"][PublicCompositeTypeNameOrOptions]
+> = PublicCompositeTypeNameOrOptions extends { schema: keyof Database }
+ ? Database[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"][CompositeTypeName]
+ : PublicCompositeTypeNameOrOptions extends keyof PublicSchema["CompositeTypes"]
+ ? PublicSchema["CompositeTypes"][PublicCompositeTypeNameOrOptions]
: never
-export const Constants = {
- graphql_public: {
- Enums: {},
- },
- public: {
- Enums: {
- accountingPeriodStatus: ["Inactive", "Active"],
- configurationParameterDataType: [
- "text",
- "numeric",
- "boolean",
- "list",
- "date",
- "material",
- ],
- costLedgerType: [
- "Direct Cost",
- "Revaluation",
- "Rounding",
- "Indirect Cost",
- "Variance",
- "Total",
- ],
- deadlineType: ["No Deadline", "ASAP", "Soft Deadline", "Hard Deadline"],
- demandSourceType: ["Sales Order", "Job Material"],
- documentSourceType: [
- "Job",
- "Part",
- "Purchase Order",
- "Purchase Invoice",
- "Purchase Return Order",
- "Quote",
- "Receipt",
- "Request for Quote",
- "Sales Order",
- "Sales Invoice",
- "Sales Return Order",
- "Service",
- "Shipment",
- "Material",
- "Tool",
- "Fixture",
- "Consumable",
- ],
- documentthreadtype: [
- "nonConformance",
- "quote",
- "salesOrder",
- "job",
- "purchaseOrder",
- "invoice",
- "receipt",
- "shipment",
- ],
- documentTransactionType: [
- "Download",
- "Edit",
- "Favorite",
- "Label",
- "Unfavorite",
- "Upload",
- ],
- documentType: [
- "Archive",
- "Document",
- "Presentation",
- "PDF",
- "Spreadsheet",
- "Text",
- "Image",
- "Video",
- "Audio",
- "Other",
- "Model",
- ],
- externalLinkDocumentType: ["Quote", "SupplierQuote", "Customer"],
- factor: [
- "Hours/Piece",
- "Hours/100 Pieces",
- "Hours/1000 Pieces",
- "Minutes/Piece",
- "Minutes/100 Pieces",
- "Minutes/1000 Pieces",
- "Pieces/Hour",
- "Pieces/Minute",
- "Seconds/Piece",
- "Total Hours",
- "Total Minutes",
- ],
- fulfillmentType: ["Inventory", "Job"],
- gaugeCalibrationStatus: [
- "Pending",
- "In-Calibration",
- "Out-of-Calibration",
- ],
- gaugeRole: ["Master", "Standard"],
- gaugeStatus: ["Active", "Inactive"],
- glAccountCategory: [
- "Bank",
- "Accounts Receivable",
- "Inventory",
- "Other Current Asset",
- "Fixed Asset",
- "Accumulated Depreciation",
- "Other Asset",
- "Accounts Payable",
- "Other Current Liability",
- "Long Term Liability",
- "Equity - No Close",
- "Equity - Close",
- "Retained Earnings",
- "Income",
- "Cost of Goods Sold",
- "Expense",
- "Other Income",
- "Other Expense",
- ],
- glAccountClass: ["Asset", "Liability", "Equity", "Revenue", "Expense"],
- glAccountType: ["Posting", "Total", "Begin Total", "End Total"],
- glConsolidatedRate: ["Average", "Current", "Historical"],
- glIncomeBalance: ["Balance Sheet", "Income Statement"],
- inspectionStatus: ["Pass", "Fail"],
- itemCostingMethod: ["Standard", "Average", "LIFO", "FIFO"],
- itemLedgerDocumentType: [
- "Sales Shipment",
- "Sales Invoice",
- "Sales Return Receipt",
- "Sales Credit Memo",
- "Purchase Receipt",
- "Purchase Invoice",
- "Purchase Return Shipment",
- "Purchase Credit Memo",
- "Transfer Shipment",
- "Transfer Receipt",
- "Service Shipment",
- "Service Invoice",
- "Service Credit Memo",
- "Posted Assembly",
- "Inventory Receipt",
- "Inventory Shipment",
- "Direct Transfer",
- "Job Consumption",
- "Job Receipt",
- "Batch Split",
- ],
- itemLedgerType: [
- "Purchase",
- "Sale",
- "Positive Adjmt.",
- "Negative Adjmt.",
- "Transfer",
- "Consumption",
- "Output",
- "Assembly Consumption",
- "Assembly Output",
- ],
- itemReorderingPolicy: [
- "Manual Reorder",
- "Demand-Based Reorder",
- "Fixed Reorder Quantity",
- "Maximum Quantity",
- ],
- itemReplenishmentSystem: ["Buy", "Make", "Buy and Make"],
- itemTrackingSourceDocument: [
- "Receipt",
- "Job Production",
- "Job Material",
- "Shipment",
- ],
- itemTrackingType: ["Inventory", "Non-Inventory", "Serial", "Batch"],
- itemType: [
- "Part",
- "Material",
- "Tool",
- "Service",
- "Consumable",
- "Fixture",
- ],
- jobOperationStatus: [
- "Canceled",
- "Done",
- "In Progress",
- "Paused",
- "Ready",
- "Todo",
- "Waiting",
- ],
- jobStatus: [
- "Draft",
- "Ready",
- "In Progress",
- "Paused",
- "Completed",
- "Cancelled",
- "Overdue",
- "Due Today",
- "Planned",
- ],
- journalLineDocumentType: [
- "Receipt",
- "Invoice",
- "Credit Memo",
- "Blanket Order",
- "Return Order",
- ],
- kanbanOutput: ["label", "qrcode", "url"],
- makeMethodStatus: ["Draft", "Active", "Archived"],
- methodOperationOrder: ["After Previous", "With Previous"],
- methodType: ["Buy", "Make", "Pick"],
- module: [
- "Accounting",
- "Documents",
- "Invoicing",
- "Inventory",
- "Items",
- "Messaging",
- "Parts",
- "People",
- "Production",
- "Purchasing",
- "Resources",
- "Sales",
- "Settings",
- "Users",
- "Quality",
- ],
- month: [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December",
- ],
- nonConformanceAction: [
- "Corrective Action",
- "Preventive Action",
- "Containment Action",
- "Verification",
- "Customer Communication",
- ],
- nonConformanceApproval: ["MRB"],
- nonConformanceInvestigation: [
- "Root Cause Analysis",
- "Inventory",
- "WIP",
- "Finished Goods",
- "Incoming Materials",
- "Process",
- "Documentation",
- ],
- nonConformancePriority: ["Low", "Medium", "High", "Critical"],
- nonConformanceSource: ["Internal", "External"],
- nonConformanceStatus: ["Registered", "In Progress", "Closed"],
- nonConformanceTaskStatus: [
- "Pending",
- "In Progress",
- "Completed",
- "Skipped",
- ],
- operationType: ["Inside", "Outside"],
- payableLineType: [
- "Comment",
- "G/L Account",
- "Fixed Asset",
- "Part",
- "Material",
- "Tool",
- "Service",
- "Consumable",
- "Fixture",
- ],
- paymentTermCalculationMethod: ["Net", "End of Month", "Day of Month"],
- periodType: ["Week", "Day", "Month"],
- pickListStatus: ["Draft", "Released", "In Progress", "Completed"],
- procedureStatus: ["Draft", "Active", "Archived"],
- procedureStepType: [
- "Value",
- "Measurement",
- "Checkbox",
- "Timestamp",
- "Person",
- "List",
- "File",
- "Task",
- ],
- processType: ["Inside", "Outside", "Inside and Outside"],
- productionEventType: ["Setup", "Labor", "Machine"],
- productionQuantityType: ["Rework", "Scrap", "Production"],
- purchaseInvoiceStatus: [
- "Draft",
- "Pending",
- "Submitted",
- "Return",
- "Debit Note Issued",
- "Paid",
- "Partially Paid",
- "Overdue",
- "Voided",
- ],
- purchaseOrderLineType: [
- "Comment",
- "G/L Account",
- "Fixed Asset",
- "Part",
- "Material",
- "Tool",
- "Service",
- "Consumable",
- "Fixture",
- ],
- purchaseOrderStatus: [
- "Draft",
- "To Review",
- "Rejected",
- "To Receive",
- "To Receive and Invoice",
- "To Invoice",
- "Completed",
- "Closed",
- "Planned",
- ],
- purchaseOrderTransactionType: [
- "Edit",
- "Favorite",
- "Unfavorite",
- "Approved",
- "Reject",
- "Request Approval",
- ],
- purchaseOrderType: ["Purchase", "Return", "Outside Processing"],
- qualityDocumentStatus: ["Draft", "Active", "Archived"],
- quoteLineStatus: ["Not Started", "In Progress", "Complete", "No Quote"],
- quoteStatus: [
- "Draft",
- "Sent",
- "Ordered",
- "Partial",
- "Lost",
- "Cancelled",
- "Expired",
- ],
- receiptSourceDocument: [
- "Sales Order",
- "Sales Invoice",
- "Sales Return Order",
- "Purchase Order",
- "Purchase Invoice",
- "Purchase Return Order",
- "Inbound Transfer",
- "Outbound Transfer",
- "Manufacturing Consumption",
- "Manufacturing Output",
- ],
- receiptStatus: ["Draft", "Pending", "Posted"],
- role: ["customer", "employee", "supplier"],
- salesInvoiceLineType: [
- "Comment",
- "Part",
- "Material",
- "Tool",
- "Service",
- "Consumable",
- "Fixture",
- "Fixed Asset",
- ],
- salesInvoiceStatus: [
- "Draft",
- "Pending",
- "Submitted",
- "Return",
- "Credit Note Issued",
- "Paid",
- "Partially Paid",
- "Overdue",
- "Voided",
- ],
- salesOrderLineStatus: ["Ordered", "In Progress", "Completed"],
- salesOrderLineType: [
- "Comment",
- "Part",
- "Material",
- "Tool",
- "Service",
- "Consumable",
- "Fixture",
- "Fixed Asset",
- ],
- salesOrderStatus: [
- "Draft",
- "Needs Approval",
- "Confirmed",
- "In Progress",
- "Completed",
- "Invoiced",
- "Cancelled",
- "Closed",
- "To Ship and Invoice",
- "To Ship",
- "To Invoice",
- ],
- salesOrderTransactionType: [
- "Edit",
- "Favorite",
- "Unfavorite",
- "Approved",
- "Reject",
- "Request Approval",
- ],
- salesRfqStatus: ["Draft", "Ready for Quote", "Closed", "Quoted"],
- searchEntity: [
- "Resource",
- "Person",
- "Customer",
- "Supplier",
- "Job",
- "Part",
- "Purchase Order",
- "Lead",
- "Opportunity",
- "Quotation",
- "Sales Order",
- "Request for Quotation",
- "Sales Invoice",
- "Purchase Invoice",
- "Document",
- "Sales RFQ",
- "Service",
- "Tool",
- "Consumable",
- "Material",
- "Fixture",
- ],
- serviceType: ["Internal", "External"],
- shipmentSourceDocument: [
- "Sales Order",
- "Sales Invoice",
- "Sales Return Order",
- "Purchase Order",
- "Purchase Invoice",
- "Purchase Return Order",
- "Inbound Transfer",
- "Outbound Transfer",
- ],
- shipmentStatus: ["Draft", "Pending", "Posted", "Voided"],
- shippingCarrier: ["UPS", "FedEx", "USPS", "DHL", "Other"],
- supplierLedgerDocumentType: [
- "Payment",
- "Invoice",
- "Credit Memo",
- "Finance Charge Memo",
- "Reminder",
- "Refund",
- ],
- supplierQuoteStatus: ["Active", "Expired"],
- supplySourceType: ["Purchase Order", "Production Order"],
- tableViewType: ["Public", "Private"],
- trackedEntityStatus: ["Available", "Reserved", "On Hold", "Consumed"],
- trackingSource: ["Purchased", "Manufactured"],
- warehouseTransferStatus: [
- "Draft",
- "To Ship and Receive",
- "To Ship",
- "To Receive",
- "Completed",
- "Cancelled",
- ],
- },
- },
- storage: {
- Enums: {
- buckettype: ["STANDARD", "ANALYTICS"],
- },
- },
-} as const
-
diff --git a/packages/database/supabase/functions/pick/index.ts b/packages/database/supabase/functions/pick/index.ts
index 4449eacfb7..939f24fd51 100644
--- a/packages/database/supabase/functions/pick/index.ts
+++ b/packages/database/supabase/functions/pick/index.ts
@@ -17,7 +17,7 @@ const payloadValidator = z.discriminatedUnion("type", [
userId: z.string(),
}),
z.object({
- type: z.literal("generatePickList"),
+ type: z.literal("generateStockTransfer"),
locationId: z.string(),
jobIds: z.array(z.string()).optional(),
companyId: z.string(),
@@ -25,14 +25,14 @@ const payloadValidator = z.discriminatedUnion("type", [
}),
z.object({
type: z.literal("executePick"),
- pickListLineId: z.string(),
+ stockTransferLineId: z.string(),
pickedQuantity: z.number(),
companyId: z.string(),
userId: z.string(),
}),
z.object({
- type: z.literal("completePickList"),
- pickListId: z.string(),
+ type: z.literal("completeStockTransfer"),
+ stockTransferId: z.string(),
companyId: z.string(),
userId: z.string(),
}),
@@ -62,9 +62,9 @@ serve(async (req: Request) => {
switch (type) {
case "stageJob":
- case "generatePickList":
+ case "generateStockTransfer":
case "executePick":
- case "completePickList":
+ case "completeStockTransfer":
default:
return new Response(
JSON.stringify({ error: "Invalid operation type" }),
diff --git a/packages/database/supabase/migrations/20251007014240_pick-lists.sql b/packages/database/supabase/migrations/20251007014240_stock-transfers.sql
similarity index 56%
rename from packages/database/supabase/migrations/20251007014240_pick-lists.sql
rename to packages/database/supabase/migrations/20251007014240_stock-transfers.sql
index 3278a3b1d7..d9a070c4f8 100644
--- a/packages/database/supabase/migrations/20251007014240_pick-lists.sql
+++ b/packages/database/supabase/migrations/20251007014240_stock-transfers.sql
@@ -63,8 +63,8 @@ CREATE OR REPLACE VIEW "quoteMaterialWithMakeMethodId" WITH(SECURITY_INVOKER=tru
LEFT JOIN "quoteMakeMethod" qmm
ON qmm."parentMaterialId" = qm."id";
--- Create pick list status enum
-CREATE TYPE "pickListStatus" AS ENUM (
+-- Create stock transfer status enum
+CREATE TYPE "stockTransferStatus" AS ENUM (
'Draft',
'Released',
'In Progress',
@@ -72,11 +72,11 @@ CREATE TYPE "pickListStatus" AS ENUM (
);
-CREATE TABLE "pickList" (
+CREATE TABLE "stockTransfer" (
"id" TEXT NOT NULL DEFAULT xid(),
- "pickListId" TEXT NOT NULL,
+ "stockTransferId" TEXT NOT NULL,
"locationId" TEXT NOT NULL,
- "status" "pickListStatus" NOT NULL DEFAULT 'Draft',
+ "status" "stockTransferStatus" NOT NULL DEFAULT 'Draft',
"completedAt" TIMESTAMP WITH TIME ZONE,
"companyId" TEXT NOT NULL,
"createdAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
@@ -87,19 +87,20 @@ CREATE TABLE "pickList" (
"customFields" JSONB,
"tags" TEXT[],
- CONSTRAINT "pickList_pkey" PRIMARY KEY ("id", "companyId"),
- CONSTRAINT "pickList_assignee_fkey" FOREIGN KEY ("assignee") REFERENCES "user" ("id") ON DELETE SET NULL ON UPDATE CASCADE,
- CONSTRAINT "pickList_locationId_fkey" FOREIGN KEY ("locationId") REFERENCES "location" ("id") ON DELETE RESTRICT ON UPDATE CASCADE,
- CONSTRAINT "pickList_companyId_fkey" FOREIGN KEY ("companyId") REFERENCES "company" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
- CONSTRAINT "pickList_createdBy_fkey" FOREIGN KEY ("createdBy") REFERENCES "user" ("id") ON DELETE RESTRICT ON UPDATE CASCADE,
- CONSTRAINT "pickList_updatedBy_fkey" FOREIGN KEY ("updatedBy") REFERENCES "user" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
+ CONSTRAINT "stockTransfer_pkey" PRIMARY KEY ("id", "companyId"),
+ CONSTRAINT "stockTransfer_assignee_fkey" FOREIGN KEY ("assignee") REFERENCES "user" ("id") ON DELETE SET NULL ON UPDATE CASCADE,
+ CONSTRAINT "stockTransfer_locationId_fkey" FOREIGN KEY ("locationId") REFERENCES "location" ("id") ON DELETE RESTRICT ON UPDATE CASCADE,
+ CONSTRAINT "stockTransfer_companyId_fkey" FOREIGN KEY ("companyId") REFERENCES "company" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT "stockTransfer_createdBy_fkey" FOREIGN KEY ("createdBy") REFERENCES "user" ("id") ON DELETE RESTRICT ON UPDATE CASCADE,
+ CONSTRAINT "stockTransfer_updatedBy_fkey" FOREIGN KEY ("updatedBy") REFERENCES "user" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
);
-CREATE INDEX "pickList_locationId_idx" ON "pickList" ("locationId");
-CREATE INDEX "pickList_status_idx" ON "pickList" ("status");
+CREATE INDEX "stockTransfer_locationId_idx" ON "stockTransfer" ("locationId");
+CREATE INDEX "stockTransfer_status_idx" ON "stockTransfer" ("status");
+ALTER TABLE "stockTransfer" ENABLE ROW LEVEL SECURITY;
-CREATE POLICY "SELECT" ON "public"."pickList"
+CREATE POLICY "SELECT" ON "public"."stockTransfer"
FOR SELECT USING (
"companyId" = ANY (
(
@@ -109,7 +110,7 @@ FOR SELECT USING (
)
);
-CREATE POLICY "INSERT" ON "public"."pickList"
+CREATE POLICY "INSERT" ON "public"."stockTransfer"
FOR INSERT WITH CHECK (
"companyId" = ANY (
(
@@ -119,7 +120,7 @@ FOR INSERT WITH CHECK (
)
);
-CREATE POLICY "UPDATE" ON "public"."pickList"
+CREATE POLICY "UPDATE" ON "public"."stockTransfer"
FOR UPDATE USING (
"companyId" = ANY (
(
@@ -129,7 +130,7 @@ FOR UPDATE USING (
)
);
-CREATE POLICY "DELETE" ON "public"."pickList"
+CREATE POLICY "DELETE" ON "public"."stockTransfer"
FOR DELETE USING (
"companyId" = ANY (
(
@@ -140,9 +141,10 @@ FOR DELETE USING (
);
-CREATE TABLE "pickListLine" (
+
+CREATE TABLE "stockTransferLine" (
"id" TEXT NOT NULL DEFAULT xid(),
- "pickListId" TEXT NOT NULL,
+ "stockTransferId" TEXT NOT NULL,
"jobId" TEXT,
"jobMaterialId" TEXT,
"itemId" TEXT NOT NULL,
@@ -156,26 +158,26 @@ CREATE TABLE "pickListLine" (
"updatedAt" TIMESTAMP WITH TIME ZONE,
"updatedBy" TEXT,
- CONSTRAINT "pickListLine_pkey" PRIMARY KEY ("id", "companyId"),
- CONSTRAINT "pickListLine_pickListId_fkey" FOREIGN KEY ("pickListId", "companyId") REFERENCES "pickList" ("id", "companyId") ON DELETE CASCADE ON UPDATE CASCADE,
- CONSTRAINT "pickListLine_jobId_fkey" FOREIGN KEY ("jobId") REFERENCES "job" ("id") ON DELETE SET NULL ON UPDATE CASCADE,
- CONSTRAINT "pickListLine_jobMaterialId_fkey" FOREIGN KEY ("jobMaterialId") REFERENCES "jobMaterial" ("id") ON DELETE SET NULL ON UPDATE CASCADE,
- CONSTRAINT "pickListLine_itemId_fkey" FOREIGN KEY ("itemId") REFERENCES "item" ("id") ON DELETE RESTRICT ON UPDATE CASCADE,
- CONSTRAINT "pickListLine_fromShelfId_fkey" FOREIGN KEY ("fromShelfId") REFERENCES "shelf" ("id") ON DELETE SET NULL ON UPDATE CASCADE,
- CONSTRAINT "pickListLine_toShelfId_fkey" FOREIGN KEY ("toShelfId") REFERENCES "shelf" ("id") ON DELETE SET NULL ON UPDATE CASCADE,
- CONSTRAINT "pickListLine_companyId_fkey" FOREIGN KEY ("companyId") REFERENCES "company" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
- CONSTRAINT "pickListLine_createdBy_fkey" FOREIGN KEY ("createdBy") REFERENCES "user" ("id") ON DELETE RESTRICT ON UPDATE CASCADE,
- CONSTRAINT "pickListLine_updatedBy_fkey" FOREIGN KEY ("updatedBy") REFERENCES "user" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
+ CONSTRAINT "stockTransferLine_pkey" PRIMARY KEY ("id", "companyId"),
+ CONSTRAINT "stockTransferLine_stockTransferId_fkey" FOREIGN KEY ("stockTransferId", "companyId") REFERENCES "stockTransfer" ("id", "companyId") ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT "stockTransferLine_jobId_fkey" FOREIGN KEY ("jobId") REFERENCES "job" ("id") ON DELETE SET NULL ON UPDATE CASCADE,
+ CONSTRAINT "stockTransferLine_jobMaterialId_fkey" FOREIGN KEY ("jobMaterialId") REFERENCES "jobMaterial" ("id") ON DELETE SET NULL ON UPDATE CASCADE,
+ CONSTRAINT "stockTransferLine_itemId_fkey" FOREIGN KEY ("itemId") REFERENCES "item" ("id") ON DELETE RESTRICT ON UPDATE CASCADE,
+ CONSTRAINT "stockTransferLine_fromShelfId_fkey" FOREIGN KEY ("fromShelfId") REFERENCES "shelf" ("id") ON DELETE SET NULL ON UPDATE CASCADE,
+ CONSTRAINT "stockTransferLine_toShelfId_fkey" FOREIGN KEY ("toShelfId") REFERENCES "shelf" ("id") ON DELETE SET NULL ON UPDATE CASCADE,
+ CONSTRAINT "stockTransferLine_companyId_fkey" FOREIGN KEY ("companyId") REFERENCES "company" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT "stockTransferLine_createdBy_fkey" FOREIGN KEY ("createdBy") REFERENCES "user" ("id") ON DELETE RESTRICT ON UPDATE CASCADE,
+ CONSTRAINT "stockTransferLine_updatedBy_fkey" FOREIGN KEY ("updatedBy") REFERENCES "user" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
);
-CREATE INDEX "pickListLine_pickListId_idx" ON "pickListLine" ("pickListId");
-CREATE INDEX "pickListLine_jobId_idx" ON "pickListLine" ("jobId");
-CREATE INDEX "pickListLine_itemId_idx" ON "pickListLine" ("itemId");
-
+CREATE INDEX "stockTransferLine_stockTransferId_idx" ON "stockTransferLine" ("stockTransferId");
+CREATE INDEX "stockTransferLine_jobId_idx" ON "stockTransferLine" ("jobId");
+CREATE INDEX "stockTransferLine_itemId_idx" ON "stockTransferLine" ("itemId");
+ALTER TABLE "stockTransferLine" ENABLE ROW LEVEL SECURITY;
-CREATE POLICY "SELECT" ON "public"."pickListLine"
+CREATE POLICY "SELECT" ON "public"."stockTransferLine"
FOR SELECT USING (
"companyId" = ANY (
(
@@ -185,7 +187,7 @@ FOR SELECT USING (
)
);
-CREATE POLICY "INSERT" ON "public"."pickListLine"
+CREATE POLICY "INSERT" ON "public"."stockTransferLine"
FOR INSERT WITH CHECK (
"companyId" = ANY (
(
@@ -195,7 +197,7 @@ FOR INSERT WITH CHECK (
)
);
-CREATE POLICY "UPDATE" ON "public"."pickListLine"
+CREATE POLICY "UPDATE" ON "public"."stockTransferLine"
FOR UPDATE USING (
"companyId" = ANY (
(
@@ -205,7 +207,7 @@ FOR UPDATE USING (
)
);
-CREATE POLICY "DELETE" ON "public"."pickListLine"
+CREATE POLICY "DELETE" ON "public"."stockTransferLine"
FOR DELETE USING (
"companyId" = ANY (
(