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.

tighten documentation

Brad Barbincb78be4ef1cd
diff --git a/README.md b/README.md
index e0dca8ce6a..5184a2d651 100644
--- a/README.md
+++ b/README.md
@@ -117,21 +117,3 @@ For example, to run the `carbon` app you can run:
```
$ yarn workspace carbon dev
```
-
-The generalized command for workspaces is:
-
-```
-$ yarn workspace <package name> <dev|build|lint|test>
-```
-
-In order to import a package from the repo into another package/app from
-the repo, use the convention of using `"*"` for the version number.
-
-For example, in order to include the `@carbon/react` package, add this line
-to the `package.json`:
-
-```
-{
- "@carbon/react": "*"
-}
-```
diff --git a/SCHEMA.md b/SCHEMA.md
index bc0ce1b57f..c65fa6f70c 100644
--- a/SCHEMA.md
+++ b/SCHEMA.md
@@ -1475,13 +1475,37 @@ CREATE POLICY "Employees with sales_view can search for customers and sales orde
FOR SELECT
USING (coalesce(get_my_claim('sales_view')::boolean, false) = true AND entity IN ('Customer', 'Sales Order') AND (get_my_claim('role'::text)) = '"employee"'::jsonb);
--- TODO: customers should be able to search for their sales orders
+-- TODO: customers should be able to search for their own sales orders
+-- CREATE POLICY "Customers with sales_view can search for their own sales orders" ON "search"
+-- FOR SELECT
+-- USING (
+-- coalesce(get_my_claim('sales_view')::boolean, false) = true
+-- AND entity = 'Sales Order'
+-- AND (get_my_claim('role'::text)) = '"customer"'::jsonb
+-- AND uuid IN (
+-- SELECT "customerId" FROM "salesOrder" WHERE "customerId" IN (
+-- SELECT "customerId" FROM "customerAccount" WHERE id::uuid = auth.uid()
+-- )
+-- )
+-- )
CREATE POLICY "Employees with purchasing_view can search for suppliers and purchase orders" ON "search"
FOR SELECT
USING (coalesce(get_my_claim('purchasing_view')::boolean, false) = true AND entity IN ('Supplier', 'Purchase Order') AND (get_my_claim('role'::text)) = '"employee"'::jsonb);
-- TODO: suppliers should be able to search for their purchase orders
+-- CREATE POLICY "Suppliers with purchasing_view can search for their own purchase orders" ON "search"
+-- FOR SELECT
+-- USING (
+-- coalesce(get_my_claim('purchasing_view')::boolean, false) = true
+-- AND entity = 'Purchase Order'
+-- AND (get_my_claim('role'::text)) = '"supplier"'::jsonb
+-- AND uuid IN (
+-- SELECT "supplierId" FROM "purchaseOrder" WHERE "supplierId" IN (
+-- SELECT "supplierId" FROM "supplierAccount" WHERE id::uuid = auth.uid()
+-- )
+-- )
+-- )
CREATE POLICY "Employees with resources_view can search for resources" ON "search"
FOR SELECT
diff --git a/docs/pages/_meta.json b/docs/pages/_meta.json
index b2c9748423..08c84f5418 100644
--- a/docs/pages/_meta.json
+++ b/docs/pages/_meta.json
@@ -1,6 +1,7 @@
{
"index": "Introduction",
- "get-started": "Getting Started",
+ "stack": "Tech Stack",
+ "getting-started": "Getting Started",
"principles": "Principles",
"core-concepts": "Core Concepts"
}
diff --git a/docs/pages/get-started.mdx b/docs/pages/getting-started.mdx
similarity index 82%
rename from docs/pages/get-started.mdx
rename to docs/pages/getting-started.mdx
index 591050c412..11be163b1d 100644
--- a/docs/pages/get-started.mdx
+++ b/docs/pages/getting-started.mdx
@@ -1,6 +1,13 @@
+---
+title: Getting started with Carbon ERP
+description: Carbon ERP is a high-performance, open-source ERP for manufacturing.
+---
+
# Getting Started
-Make sure that you have [Docker installed](https://docs.docker.com/desktop/install/mac-install/) and [yarn installed](https://yarnpkg.com/lang/en/docs/install/#debian-stable)
+Before getting started with development, it's good to have a basic understanding of our [tech stack](/stack)
+
+You'll also need to have [Docker installed](https://docs.docker.com/desktop/install/mac-install/) and [yarn installed](https://yarnpkg.com/lang/en/docs/install/#debian-stable)
on your system since this monorepo uses the yarn package manager.
After running the steps below you should be able to access the following apps/containers locally:
@@ -51,17 +58,3 @@ To restart and reseed the database, you can run:
```bash
$ yarn db:build # runs db:kill, db:start, and setup
```
-
-To run a particular application, use the `yarn workspace` command.
-
-For example, to run the `carbon` app you can run:
-
-```bash
-$ yarn workspace carbon dev
-```
-
-The generalized command for workspaces is:
-
-```bash
-$ yarn workspace <package name> <dev|build|lint|test>
-```
diff --git a/docs/pages/index.mdx b/docs/pages/index.mdx
index edd6207aa5..be807e216b 100644
--- a/docs/pages/index.mdx
+++ b/docs/pages/index.mdx
@@ -1,5 +1,5 @@
---
-title: What is Carbon ERP
+title: What is Carbon ERP?
description: Carbon ERP is a high-performance, open-source ERP for manufacturing.
---
@@ -21,10 +21,6 @@ For us, open source means [honesty](/principles/open-source). We've seen too man
We think manufacturing is hard enough, and we'd love it if we could help make it easier. We're always looking for new contributors to help us build the best ERP for manufacturing.
-### Cloud Native
-
-The applications are designed to be accessed securely from anywhere, while removing the need to manage servers and databases. To do this, we use some incredible serverless technology providers like [Vercel](https://vercel.com), [Supabase](https://supabase.com), and [Upstash](https://upstash.com).
-
### Single Tenant
Unlike most cloud-based ERP systems, Carbon ERP is designed to be a single-tenant system. This means that all of your data is stored in a single database, which is private to your company. This allows you to have complete control over your data, and to keep it secure.
diff --git a/packages/carbon-database/src/types.ts b/packages/carbon-database/src/types.ts
index d5ef9924c3..e69de29bb2 100644
--- a/packages/carbon-database/src/types.ts
+++ b/packages/carbon-database/src/types.ts
@@ -1,1453 +0,0 @@
-export type Json =
- | string
- | number
- | boolean
- | null
- | { [key: string]: Json }
- | Json[];
-
-export interface Database {
- public: {
- Tables: {
- ability: {
- Row: {
- name: string;
- createdBy: string;
- updatedAt: string | null;
- updatedBy: string | null;
- id: string;
- curve: Json;
- shadowWeeks: number;
- active: boolean;
- createdAt: string;
- };
- Insert: {
- name: string;
- createdBy: string;
- updatedAt?: string | null;
- updatedBy?: string | null;
- id?: string;
- curve?: Json;
- shadowWeeks?: number;
- active?: boolean;
- createdAt?: string;
- };
- Update: {
- name?: string;
- createdBy?: string;
- updatedAt?: string | null;
- updatedBy?: string | null;
- id?: string;
- curve?: Json;
- shadowWeeks?: number;
- active?: boolean;
- createdAt?: string;
- };
- };
- address: {
- Row: {
- addressLine1: string | null;
- addressLine2: string | null;
- city: string | null;
- state: string | null;
- postalCode: string | null;
- countryId: number | null;
- phone: string | null;
- fax: string | null;
- id: string;
- };
- Insert: {
- addressLine1?: string | null;
- addressLine2?: string | null;
- city?: string | null;
- state?: string | null;
- postalCode?: string | null;
- countryId?: number | null;
- phone?: string | null;
- fax?: string | null;
- id?: string;
- };
- Update: {
- addressLine1?: string | null;
- addressLine2?: string | null;
- city?: string | null;
- state?: string | null;
- postalCode?: string | null;
- countryId?: number | null;
- phone?: string | null;
- fax?: string | null;
- id?: string;
- };
- };
- attributeDataType: {
- Row: {
- label: string;
- id: number;
- isBoolean: boolean;
- isDate: boolean;
- isList: boolean;
- isNumeric: boolean;
- isText: boolean;
- isUser: boolean;
- };
- Insert: {
- label: string;
- id?: number;
- isBoolean?: boolean;
- isDate?: boolean;
- isList?: boolean;
- isNumeric?: boolean;
- isText?: boolean;
- isUser?: boolean;
- };
- Update: {
- label?: string;
- id?: number;
- isBoolean?: boolean;
- isDate?: boolean;
- isList?: boolean;
- isNumeric?: boolean;
- isText?: boolean;
- isUser?: boolean;
- };
- };
- contact: {
- Row: {
- firstName: string;
- lastName: string;
- email: string;
- title: string | null;
- mobilePhone: string | null;
- homePhone: string | null;
- workPhone: string | null;
- fax: string | null;
- addressLine1: string | null;
- addressLine2: string | null;
- city: string | null;
- state: string | null;
- postalCode: string | null;
- countryId: number | null;
- birthday: string | null;
- notes: string | null;
- id: string;
- };
- Insert: {
- firstName: string;
- lastName: string;
- email: string;
- title?: string | null;
- mobilePhone?: string | null;
- homePhone?: string | null;
- workPhone?: string | null;
- fax?: string | null;
- addressLine1?: string | null;
- addressLine2?: string | null;
- city?: string | null;
- state?: string | null;
- postalCode?: string | null;
- countryId?: number | null;
- birthday?: string | null;
- notes?: string | null;
- id?: string;
- };
- Update: {
- firstName?: string;
- lastName?: string;
- email?: string;
- title?: string | null;
- mobilePhone?: string | null;
- homePhone?: string | null;
- workPhone?: string | null;
- fax?: string | null;
- addressLine1?: string | null;
- addressLine2?: string | null;
- city?: string | null;
- state?: string | null;
- postalCode?: string | null;
- countryId?: number | null;
- birthday?: string | null;
- notes?: string | null;
- id?: string;
- };
- };
- country: {
- Row: {
- name: string;
- code: string;
- id: number;
- };
- Insert: {
- name: string;
- code: string;
- id?: number;
- };
- Update: {
- name?: string;
- code?: string;
- id?: number;
- };
- };
- crew: {
- Row: {
- name: string;
- description: string | null;
- crewLeaderId: string | null;
- groupId: string;
- workCellId: string | null;
- id: string;
- };
- Insert: {
- name: string;
- description?: string | null;
- crewLeaderId?: string | null;
- groupId: string;
- workCellId?: string | null;
- id?: string;
- };
- Update: {
- name?: string;
- description?: string | null;
- crewLeaderId?: string | null;
- groupId?: string;
- workCellId?: string | null;
- id?: string;
- };
- };
- crewAbility: {
- Row: {
- crewId: string;
- abilityId: string;
- id: string;
- active: boolean;
- };
- Insert: {
- crewId: string;
- abilityId: string;
- id?: string;
- active?: boolean;
- };
- Update: {
- crewId?: string;
- abilityId?: string;
- id?: string;
- active?: boolean;
- };
- };
- customer: {
- Row: {
- name: string;
- description: string | null;
- customerTypeId: string | null;
- customerStatusId: string | null;
- taxId: string | null;
- accountManagerId: string | null;
- logo: string | null;
- createdBy: string | null;
- updatedAt: string | null;
- updatedBy: string | null;
- id: string;
- createdAt: string;
- };
- Insert: {
- name: string;
- description?: string | null;
- customerTypeId?: string | null;
- customerStatusId?: string | null;
- taxId?: string | null;
- accountManagerId?: string | null;
- logo?: string | null;
- createdBy?: string | null;
- updatedAt?: string | null;
- updatedBy?: string | null;
- id?: string;
- createdAt?: string;
- };
- Update: {
- name?: string;
- description?: string | null;
- customerTypeId?: string | null;
- customerStatusId?: string | null;
- taxId?: string | null;
- accountManagerId?: string | null;
- logo?: string | null;
- createdBy?: string | null;
- updatedAt?: string | null;
- updatedBy?: string | null;
- id?: string;
- createdAt?: string;
- };
- };
- customerAccount: {
- Row: {
- id: string;
- customerId: string;
- };
- Insert: {
- id: string;
- customerId: string;
- };
- Update: {
- id?: string;
- customerId?: string;
- };
- };
- customerContact: {
- Row: {
- customerId: string;
- contactId: string;
- customerLocationId: string | null;
- userId: string | null;
- id: string;
- };
- Insert: {
- customerId: string;
- contactId: string;
- customerLocationId?: string | null;
- userId?: string | null;
- id?: string;
- };
- Update: {
- customerId?: string;
- contactId?: string;
- customerLocationId?: string | null;
- userId?: string | null;
- id?: string;
- };
- };
- customerLocation: {
- Row: {
- customerId: string;
- addressId: string;
- id: string;
- };
- Insert: {
- customerId: string;
- addressId: string;
- id?: string;
- };
- Update: {
- customerId?: string;
- addressId?: string;
- id?: string;
- };
- };
- customerStatus: {
- Row: {
- name: string;
- updatedAt: string | null;
- id: string;
- createdAt: string;
- };
- Insert: {
- name: string;
- updatedAt?: string | null;
- id?: string;
- createdAt?: string;
- };
- Update: {
- name?: string;
- updatedAt?: string | null;
- id?: string;
- createdAt?: string;
- };
- };
- customerType: {
- Row: {
- name: string;
- updatedAt: string | null;
- id: string;
- color: string | null;
- protected: boolean;
- createdAt: string;
- };
- Insert: {
- name: string;
- updatedAt?: string | null;
- id?: string;
- color?: string | null;
- protected?: boolean;
- createdAt?: string;
- };
- Update: {
- name?: string;
- updatedAt?: string | null;
- id?: string;
- color?: string | null;
- protected?: boolean;
- createdAt?: string;
- };
- };
- department: {
- Row: {
- name: string;
- parentDepartmentId: string | null;
- createdBy: string;
- updatedBy: string | null;
- updatedAt: string | null;
- id: string;
- color: string;
- createdAt: string;
- };
- Insert: {
- name: string;
- parentDepartmentId?: string | null;
- createdBy: string;
- updatedBy?: string | null;
- updatedAt?: string | null;
- id?: string;
- color?: string;
- createdAt?: string;
- };
- Update: {
- name?: string;
- parentDepartmentId?: string | null;
- createdBy?: string;
- updatedBy?: string | null;
- updatedAt?: string | null;
- id?: string;
- color?: string;
- createdAt?: string;
- };
- };
- employee: {
- Row: {
- id: string;
- employeeTypeId: string;
- };
- Insert: {
- id: string;
- employeeTypeId: string;
- };
- Update: {
- id?: string;
- employeeTypeId?: string;
- };
- };
- employeeAbility: {
- Row: {
- employeeId: string;
- abilityId: string;
- lastTrainingDate: string | null;
- id: string;
- active: boolean;
- trainingDays: number;
- trainingCompleted: boolean | null;
- };
- Insert: {
- employeeId: string;
- abilityId: string;
- lastTrainingDate?: string | null;
- id?: string;
- active?: boolean;
- trainingDays?: number;
- trainingCompleted?: boolean | null;
- };
- Update: {
- employeeId?: string;
- abilityId?: string;
- lastTrainingDate?: string | null;
- id?: string;
- active?: boolean;
- trainingDays?: number;
- trainingCompleted?: boolean | null;
- };
- };
- employeeJob: {
- Row: {
- id: string;
- locationId: string | null;
- shiftId: string | null;
- managerId: string | null;
- title: string | null;
- departmentId: string | null;
- workCellId: string | null;
- };
- Insert: {
- id: string;
- locationId?: string | null;
- shiftId?: string | null;
- managerId?: string | null;
- title?: string | null;
- departmentId?: string | null;
- workCellId?: string | null;
- };
- Update: {
- id?: string;
- locationId?: string | null;
- shiftId?: string | null;
- managerId?: string | null;
- title?: string | null;
- departmentId?: string | null;
- workCellId?: string | null;
- };
- };
- employeeShift: {
- Row: {
- employeeId: string;
- shiftId: string;
- id: string;
- };
- Insert: {
- employeeId: string;
- shiftId: string;
- id?: string;
- };
- Update: {
- employeeId?: string;
- shiftId?: string;
- id?: string;
- };
- };
- employeeType: {
- Row: {
- name: string;
- updatedAt: string | null;
- id: string;
- color: string;
- protected: boolean;
- createdAt: string;
- };
- Insert: {
- name: string;
- updatedAt?: string | null;
- id?: string;
- color?: string;
- protected?: boolean;
- createdAt?: string;
- };
- Update: {
- name?: string;
- updatedAt?: string | null;
- id?: string;
- color?: string;
- protected?: boolean;
- createdAt?: string;
- };
- };
- employeeTypePermission: {
- Row: {
- employeeTypeId: string;
- featureId: string;
- updatedAt: string | null;
- create: boolean;
- delete: boolean;
- update: boolean;
- view: boolean;
- createdAt: string;
- };
- Insert: {
- employeeTypeId: string;
- featureId: string;
- updatedAt?: string | null;
- create?: boolean;
- delete?: boolean;
- update?: boolean;
- view?: boolean;
- createdAt?: string;
- };
- Update: {
- employeeTypeId?: string;
- featureId?: string;
- updatedAt?: string | null;
- create?: boolean;
- delete?: boolean;
- update?: boolean;
- view?: boolean;
- createdAt?: string;
- };
- };
- equipment: {
- Row: {
- name: string;
- description: string | null;
- equipmentTypeId: string;
- locationId: string;
- workCellId: string | null;
- activeDate: string | null;
- createdBy: string;
- updatedBy: string | null;
- updatedAt: string | null;
- id: string;
- operatorsRequired: number;
- setupHours: number;
- active: boolean;
- createdAt: string;
- };
- Insert: {
- name: string;
- description?: string | null;
- equipmentTypeId: string;
- locationId: string;
- workCellId?: string | null;
- activeDate?: string | null;
- createdBy: string;
- updatedBy?: string | null;
- updatedAt?: string | null;
- id?: string;
- operatorsRequired?: number;
- setupHours?: number;
- active?: boolean;
- createdAt?: string;
- };
- Update: {
- name?: string;
- description?: string | null;
- equipmentTypeId?: string;
- locationId?: string;
- workCellId?: string | null;
- activeDate?: string | null;
- createdBy?: string;
- updatedBy?: string | null;
- updatedAt?: string | null;
- id?: string;
- operatorsRequired?: number;
- setupHours?: number;
- active?: boolean;
- createdAt?: string;
- };
- };
- equipmentType: {
- Row: {
- name: string;
- description: string | null;
- requiredAbility: string | null;
- createdBy: string;
- updatedBy: string | null;
- updatedAt: string | null;
- id: string;
- color: string;
- active: boolean;
- createdAt: string;
- };
- Insert: {
- name: string;
- description?: string | null;
- requiredAbility?: string | null;
- createdBy: string;
- updatedBy?: string | null;
- updatedAt?: string | null;
- id?: string;
- color?: string;
- active?: boolean;
- createdAt?: string;
- };
- Update: {
- name?: string;
- description?: string | null;
- requiredAbility?: string | null;
- createdBy?: string;
- updatedBy?: string | null;
- updatedAt?: string | null;
- id?: string;
- color?: string;
- active?: boolean;
- createdAt?: string;
- };
- };
- feature: {
- Row: {
- name: string;
- updatedAt: string | null;
- id: string;
- createdAt: string;
- };
- Insert: {
- name: string;
- updatedAt?: string | null;
- id?: string;
- createdAt?: string;
- };
- Update: {
- name?: string;
- updatedAt?: string | null;
- id?: string;
- createdAt?: string;
- };
- };
- group: {
- Row: {
- name: string;
- id: string;
- updatedAt: string | null;
- isIdentityGroup: boolean;
- isEmployeeTypeGroup: boolean;
- isCustomerOrgGroup: boolean;
- isCustomerTypeGroup: boolean;
- isSupplierTypeGroup: boolean;
- isSupplierOrgGroup: boolean;
- createdAt: string;
- };
- Insert: {
- name: string;
- id?: string;
- updatedAt?: string | null;
- isIdentityGroup?: boolean;
- isEmployeeTypeGroup?: boolean;
- isCustomerOrgGroup?: boolean;
- isCustomerTypeGroup?: boolean;
- isSupplierTypeGroup?: boolean;
- isSupplierOrgGroup?: boolean;
- createdAt?: string;
- };
- Update: {
- name?: string;
- id?: string;
- updatedAt?: string | null;
- isIdentityGroup?: boolean;
- isEmployeeTypeGroup?: boolean;
- isCustomerOrgGroup?: boolean;
- isCustomerTypeGroup?: boolean;
- isSupplierTypeGroup?: boolean;
- isSupplierOrgGroup?: boolean;
- createdAt?: string;
- };
- };
- holiday: {
- Row: {
- name: string;
- date: string;
- createdBy: string;
- updatedBy: string | null;
- updatedAt: string | null;
- id: string;
- year: number | null;
- createdAt: string;
- };
- Insert: {
- name: string;
- date: string;
- createdBy: string;
- updatedBy?: string | null;
- updatedAt?: string | null;
- id?: string;
- year?: number | null;
- createdAt?: string;
- };
- Update: {
- name?: string;
- date?: string;
- createdBy?: string;
- updatedBy?: string | null;
- updatedAt?: string | null;
- id?: string;
- year?: number | null;
- createdAt?: string;
- };
- };
- location: {
- Row: {
- name: string;
- timezone: string;
- latitude: number | null;
- longitude: number | null;
- createdBy: string;
- updatedBy: string | null;
- updatedAt: string | null;
- id: string;
- createdAt: string;
- };
- Insert: {
- name: string;
- timezone: string;
- latitude?: number | null;
- longitude?: number | null;
- createdBy: string;
- updatedBy?: string | null;
- updatedAt?: string | null;
- id?: string;
- createdAt?: string;
- };
- Update: {
- name?: string;
- timezone?: string;
- latitude?: number | null;
- longitude?: number | null;
- createdBy?: string;
- updatedBy?: string | null;
- updatedAt?: string | null;
- id?: string;
- createdAt?: string;
- };
- };
- membership: {
- Row: {
- groupId: string;
- memberGroupId: string | null;
- memberUserId: string | null;
- id: number;
- };
- Insert: {
- groupId: string;
- memberGroupId?: string | null;
- memberUserId?: string | null;
- id?: number;
- };
- Update: {
- groupId?: string;
- memberGroupId?: string | null;
- memberUserId?: string | null;
- id?: number;
- };
- };
- search: {
- Row: {
- id: number;
- name: string;
- entity: Database["public"]["Enums"]["search_entity"] | null;
- uuid: string | null;
- link: string;
- description: string | null;
- fts: unknown | null;
- };
- Insert: {
- id?: number;
- name: string;
- entity?: Database["public"]["Enums"]["search_entity"] | null;
- uuid?: string | null;
- link: string;
- description?: string | null;
- fts?: unknown | null;
- };
- Update: {
- id?: number;
- name?: string;
- entity?: Database["public"]["Enums"]["search_entity"] | null;
- uuid?: string | null;
- link?: string;
- description?: string | null;
- fts?: unknown | null;
- };
- };
- shift: {
- Row: {
- name: string;
- startTime: string;
- endTime: string;
- locationId: string;
- id: string;
- sunday: boolean;
- monday: boolean;
- tuesday: boolean;
- wednesday: boolean;
- thursday: boolean;
- friday: boolean;
- saturday: boolean;
- active: boolean;
- };
- Insert: {
- name: string;
- startTime: string;
- endTime: string;
- locationId: string;
- id?: string;
- sunday?: boolean;
- monday?: boolean;
- tuesday?: boolean;
- wednesday?: boolean;
- thursday?: boolean;
- friday?: boolean;
- saturday?: boolean;
- active?: boolean;
- };
- Update: {
- name?: string;
- startTime?: string;
- endTime?: string;
- locationId?: string;
- id?: string;
- sunday?: boolean;
- monday?: boolean;
- tuesday?: boolean;
- wednesday?: boolean;
- thursday?: boolean;
- friday?: boolean;
- saturday?: boolean;
- active?: boolean;
- };
- };
- supplier: {
- Row: {
- name: string;
- description: string | null;
- supplierTypeId: string | null;
- supplierStatusId: string | null;
- taxId: string | null;
- accountManagerId: string | null;
- logo: string | null;
- createdBy: string | null;
- updatedAt: string | null;
- updatedBy: string | null;
- id: string;
- createdAt: string;
- };
- Insert: {
- name: string;
- description?: string | null;
- supplierTypeId?: string | null;
- supplierStatusId?: string | null;
- taxId?: string | null;
- accountManagerId?: string | null;
- logo?: string | null;
- createdBy?: string | null;
- updatedAt?: string | null;
- updatedBy?: string | null;
- id?: string;
- createdAt?: string;
- };
- Update: {
- name?: string;
- description?: string | null;
- supplierTypeId?: string | null;
- supplierStatusId?: string | null;
- taxId?: string | null;
- accountManagerId?: string | null;
- logo?: string | null;
- createdBy?: string | null;
- updatedAt?: string | null;
- updatedBy?: string | null;
- id?: string;
- createdAt?: string;
- };
- };
- supplierAccount: {
- Row: {
- id: string;
- supplierId: string;
- };
- Insert: {
- id: string;
- supplierId: string;
- };
- Update: {
- id?: string;
- supplierId?: string;
- };
- };
- supplierContact: {
- Row: {
- supplierId: string;
- contactId: string;
- supplierLocationId: string | null;
- userId: string | null;
- id: string;
- };
- Insert: {
- supplierId: string;
- contactId: string;
- supplierLocationId?: string | null;
- userId?: string | null;
- id?: string;
- };
- Update: {
- supplierId?: string;
- contactId?: string;
- supplierLocationId?: string | null;
- userId?: string | null;
- id?: string;
- };
- };
- supplierLocation: {
- Row: {
- supplierId: string;
- addressId: string;
- id: string;
- };
- Insert: {
- supplierId: string;
- addressId: string;
- id?: string;
- };
- Update: {
- supplierId?: string;
- addressId?: string;
- id?: string;
- };
- };
- supplierStatus: {
- Row: {
- name: string;
- updatedAt: string | null;
- id: string;
- createdAt: string;
- };
- Insert: {
- name: string;
- updatedAt?: string | null;
- id?: string;
- createdAt?: string;
- };
- Update: {
- name?: string;
- updatedAt?: string | null;
- id?: string;
- createdAt?: string;
- };
- };
- supplierType: {
- Row: {
- name: string;
- updatedAt: string | null;
- id: string;
- color: string | null;
- protected: boolean;
- createdAt: string;
- };
- Insert: {
- name: string;
- updatedAt?: string | null;
- id?: string;
- color?: string | null;
- protected?: boolean;
- createdAt?: string;
- };
- Update: {
- name?: string;
- updatedAt?: string | null;
- id?: string;
- color?: string | null;
- protected?: boolean;
- createdAt?: string;
- };
- };
- user: {
- Row: {
- id: string;
- email: string;
- firstName: string;
- lastName: string;
- avatarUrl: string | null;
- emailVerified: string | null;
- updatedAt: string | null;
- fullName: string | null;
- about: string;
- active: boolean | null;
- createdAt: string;
- };
- Insert: {
- id: string;
- email: string;
- firstName: string;
- lastName: string;
- avatarUrl?: string | null;
- emailVerified?: string | null;
- updatedAt?: string | null;
- fullName?: string | null;
- about?: string;
- active?: boolean | null;
- createdAt?: string;
- };
- Update: {
- id?: string;
- email?: string;
- firstName?: string;
- lastName?: string;
- avatarUrl?: string | null;
- emailVerified?: string | null;
- updatedAt?: string | null;
- fullName?: string | null;
- about?: string;
- active?: boolean | null;
- createdAt?: string;
- };
- };
- userAttribute: {
- Row: {
- name: string;
- userAttributeCategoryId: string;
- attributeDataTypeId: number;
- listOptions: string[] | null;
- createdBy: string;
- updatedAt: string | null;
- updatedBy: string | null;
- id: string;
- sortOrder: number;
- canSelfManage: boolean | null;
- active: boolean | null;
- createdAt: string;
- };
- Insert: {
- name: string;
- userAttributeCategoryId: string;
- attributeDataTypeId: number;
- listOptions?: string[] | null;
- createdBy: string;
- updatedAt?: string | null;
- updatedBy?: string | null;
- id?: string;
- sortOrder?: number;
- canSelfManage?: boolean | null;
- active?: boolean | null;
- createdAt?: string;
- };
- Update: {
- name?: string;
- userAttributeCategoryId?: string;
- attributeDataTypeId?: number;
- listOptions?: string[] | null;
- createdBy?: string;
- updatedAt?: string | null;
- updatedBy?: string | null;
- id?: string;
- sortOrder?: number;
- canSelfManage?: boolean | null;
- active?: boolean | null;
- createdAt?: string;
- };
- };
- userAttributeCategory: {
- Row: {
- name: string;
- createdBy: string;
- updatedAt: string | null;
- updatedBy: string | null;
- id: string;
- public: boolean | null;
- protected: boolean | null;
- active: boolean | null;
- createdAt: string;
- };
- Insert: {
- name: string;
- createdBy: string;
- updatedAt?: string | null;
- updatedBy?: string | null;
- id?: string;
- public?: boolean | null;
- protected?: boolean | null;
- active?: boolean | null;
- createdAt?: string;
- };
- Update: {
- name?: string;
- createdBy?: string;
- updatedAt?: string | null;
- updatedBy?: string | null;
- id?: string;
- public?: boolean | null;
- protected?: boolean | null;
- active?: boolean | null;
- createdAt?: string;
- };
- };
- userAttributeValue: {
- Row: {
- userAttributeId: string;
- userId: string;
- valueBoolean: boolean | null;
- valueDate: string | null;
- valueNumeric: number | null;
- valueText: string | null;
- valueUser: string | null;
- createdBy: string;
- updatedAt: string | null;
- updatedBy: string | null;
- id: string;
- createdAt: string;
- };
- Insert: {
- userAttributeId: string;
- userId: string;
- valueBoolean?: boolean | null;
- valueDate?: string | null;
- valueNumeric?: number | null;
- valueText?: string | null;
- valueUser?: string | null;
- createdBy: string;
- updatedAt?: string | null;
- updatedBy?: string | null;
- id?: string;
- createdAt?: string;
- };
- Update: {
- userAttributeId?: string;
- userId?: string;
- valueBoolean?: boolean | null;
- valueDate?: string | null;
- valueNumeric?: number | null;
- valueText?: string | null;
- valueUser?: string | null;
- createdBy?: string;
- updatedAt?: string | null;
- updatedBy?: string | null;
- id?: string;
- createdAt?: string;
- };
- };
- userNote: {
- Row: {
- userId: string;
- note: string;
- createdBy: string;
- id: string;
- noteRichText: Json;
- active: boolean;
- createdAt: string;
- updatedAt: string | null;
- };
- Insert: {
- userId: string;
- note: string;
- createdBy: string;
- id?: string;
- noteRichText?: Json;
- active?: boolean;
- createdAt?: string;
- updatedAt?: string | null;
- };
- Update: {
- userId?: string;
- note?: string;
- createdBy?: string;
- id?: string;
- noteRichText?: Json;
- active?: boolean;
- createdAt?: string;
- updatedAt?: string | null;
- };
- };
- workCell: {
- Row: {
- name: string;
- description: string | null;
- departmentId: string;
- locationId: string | null;
- workCellTypeId: string;
- activeDate: string | null;
- createdBy: string;
- updatedBy: string | null;
- updatedAt: string | null;
- id: string;
- defaultStandardFactor: Database["public"]["Enums"]["factor"];
- active: boolean;
- createdAt: string;
- };
- Insert: {
- name: string;
- description?: string | null;
- departmentId: string;
- locationId?: string | null;
- workCellTypeId: string;
- activeDate?: string | null;
- createdBy: string;
- updatedBy?: string | null;
- updatedAt?: string | null;
- id?: string;
- defaultStandardFactor?: Database["public"]["Enums"]["factor"];
- active?: boolean;
- createdAt?: string;
- };
- Update: {
- name?: string;
- description?: string | null;
- departmentId?: string;
- locationId?: string | null;
- workCellTypeId?: string;
- activeDate?: string | null;
- createdBy?: string;
- updatedBy?: string | null;
- updatedAt?: string | null;
- id?: string;
- defaultStandardFactor?: Database["public"]["Enums"]["factor"];
- active?: boolean;
- createdAt?: string;
- };
- };
- workCellType: {
- Row: {
- name: string;
- description: string | null;
- requiredAbility: string | null;
- createdBy: string;
- updatedBy: string | null;
- updatedAt: string | null;
- id: string;
- color: string;
- active: boolean;
- createdAt: string;
- };
- Insert: {
- name: string;
- description?: string | null;
- requiredAbility?: string | null;
- createdBy: string;
- updatedBy?: string | null;
- updatedAt?: string | null;
- id?: string;
- color?: string;
- active?: boolean;
- createdAt?: string;
- };
- Update: {
- name?: string;
- description?: string | null;
- requiredAbility?: string | null;
- createdBy?: string;
- updatedBy?: string | null;
- updatedAt?: string | null;
- id?: string;
- color?: string;
- active?: boolean;
- createdAt?: string;
- };
- };
- };
- Views: {
- group_member: {
- Row: {
- id: number | null;
- name: string | null;
- isIdentityGroup: boolean | null;
- isEmployeeTypeGroup: boolean | null;
- isCustomerOrgGroup: boolean | null;
- isCustomerTypeGroup: boolean | null;
- isSupplierOrgGroup: boolean | null;
- isSupplierTypeGroup: boolean | null;
- groupId: string | null;
- memberGroupId: string | null;
- memberUserId: string | null;
- user: Json | null;
- };
- };
- groups_recursive: {
- Row: {
- groupId: string | null;
- name: string | null;
- parentId: string | null;
- isIdentityGroup: boolean | null;
- isEmployeeTypeGroup: boolean | null;
- isCustomerOrgGroup: boolean | null;
- isCustomerTypeGroup: boolean | null;
- isSupplierOrgGroup: boolean | null;
- isSupplierTypeGroup: boolean | null;
- user: Json | null;
- };
- };
- groups_view: {
- Row: {
- id: string | null;
- isEmployeeTypeGroup: boolean | null;
- isCustomerOrgGroup: boolean | null;
- isCustomerTypeGroup: boolean | null;
- isSupplierOrgGroup: boolean | null;
- isSupplierTypeGroup: boolean | null;
- name: string | null;
- parentId: string | null;
- users: Json | null;
- };
- };
- holiday_years: {
- Row: {
- year: number | null;
- };
- };
- };
- Functions: {
- _xid_machine_id: {
- Args: Record<PropertyKey, never>;
- Returns: number;
- };
- delete_claim: {
- Args: { uid: string; claim: string };
- Returns: string;
- };
- get_claim: {
- Args: { uid: string; claim: string };
- Returns: Json;
- };
- get_claims: {
- Args: { uid: string };
- Returns: Json;
- };
- get_my_claim: {
- Args: { claim: string };
- Returns: Json;
- };
- get_my_claims: {
- Args: Record<PropertyKey, never>;
- Returns: Json;
- };
- groups_for_user: {
- Args: { uid: string };
- Returns: Json;
- };
- groups_query: {
- Args: { _name: string; _uid: string };
- Returns: {
- id: string;
- name: string;
- parentId: string;
- isEmployeeTypeGroup: boolean;
- isCustomerOrgGroup: boolean;
- isCustomerTypeGroup: boolean;
- isSupplierOrgGroup: boolean;
- isSupplierTypeGroup: boolean;
- users: Json;
- }[];
- };
- is_claims_admin: {
- Args: Record<PropertyKey, never>;
- Returns: boolean;
- };
- set_claim: {
- Args: { uid: string; claim: string; value: Json };
- Returns: string;
- };
- users_for_groups: {
- Args: { groups: string[] };
- Returns: Json;
- };
- xid: {
- Args: { _at: string };
- Returns: unknown;
- };
- xid_counter: {
- Args: { _xid: unknown };
- Returns: number;
- };
- xid_decode: {
- Args: { _xid: unknown };
- Returns: number[];
- };
- xid_encode: {
- Args: { _id: number[] };
- Returns: unknown;
- };
- xid_machine: {
- Args: { _xid: unknown };
- Returns: number[];
- };
- xid_pid: {
- Args: { _xid: unknown };
- Returns: number;
- };
- xid_time: {
- Args: { _xid: unknown };
- Returns: string;
- };
- };
- Enums: {
- 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";
- search_entity:
- | "Resource"
- | "Person"
- | "Customer"
- | "Supplier"
- | "Job"
- | "Part"
- | "Purchase Order"
- | "Sales Order"
- | "Document";
- };
- };
-}
diff --git a/packages/carbon-database/supabase/.branches/_current_branch b/packages/carbon-database/supabase/.branches/_current_branch
new file mode 100644
index 0000000000..88d050b190
--- /dev/null
+++ b/packages/carbon-database/supabase/.branches/_current_branch
@@ -0,0 +1 @@
+main
\ No newline at end of file