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.

chore: remove trigger.dev (#607)

Sid3caabaf5792a
diff --git a/.env.example b/.env.example
index 4a57642c76..8a6508133e 100644
--- a/.env.example
+++ b/.env.example
@@ -4,7 +4,7 @@ CARBON_EDITION="community" # "community" | "cloud" | "enterprise"
CLOUDFLARE_TURNSTILE_SITE_KEY="1x00000000000000000000AA"
CLOUDFLARE_TURNSTILE_SECRET_KEY="********************"
-DOMAIN="localhost:3000"
+DOMAIN="localhost"
ERP_URL="http://localhost:3000"
MES_URL="http://localhost:3001"
@@ -38,9 +38,10 @@ SUPABASE_AUTH_EXTERNAL_AZURE_CLIENT_ID="***************************************"
SUPABASE_AUTH_EXTERNAL_AZURE_CLIENT_SECRET="***********************************"
SUPABASE_AUTH_EXTERNAL_AZURE_REDIRECT_URI="http://127.0.0.1:54321/auth/v1/callback"
-TRIGGER_SECRET_KEY="tr_dev_********************"
-TRIGGER_API_URL="https://api.trigger.dev"
-TRIGGER_PROJECT_ID="proj_**********************"
+# INNGEST_SIGNING_KEY="signkey-****-********************"
+# INNGEST_EVENT_KEY="********************"
+INNGEST_DEV=1
+INNGEST_BASE_URL=http://localhost:8288
REDIS_URL="redis://localhost:6379"
diff --git a/.github/workflows/inngest.yml b/.github/workflows/inngest.yml
new file mode 100644
index 0000000000..980a0800fb
--- /dev/null
+++ b/.github/workflows/inngest.yml
@@ -0,0 +1,45 @@
+name: Sync Inngest Functions
+
+on:
+ # Run after the Deploy Apps workflow completes
+ workflow_run:
+ workflows: ["Deploy Apps"]
+ types:
+ - completed
+ branches:
+ - main
+ # Also trigger on jobs package changes pushed to main
+ push:
+ branches:
+ - main
+ paths:
+ - "packages/jobs/**"
+ workflow_dispatch:
+
+jobs:
+ sync:
+ name: Sync Inngest
+ runs-on: ubuntu-latest
+ # Only run if the triggering workflow succeeded (or if manually/push triggered)
+ if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+
+ - name: Setup Node.js
+ uses: actions/setup-node@v4
+ with:
+ node-version: "20"
+
+ - name: Install dependencies
+ run: |
+ npm install
+ npm install --prefix ci
+
+ - name: Sync Inngest functions
+ env:
+ SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
+ SUPABASE_SERVICE_ROLE_KEY: ${{ secrets.SUPABASE_SERVICE_ROLE_KEY }}
+ SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }}
+ run: npm run -w ci ci:jobs
diff --git a/.github/workflows/trigger.yml b/.github/workflows/trigger.yml
deleted file mode 100644
index ef7045a2d4..0000000000
--- a/.github/workflows/trigger.yml
+++ /dev/null
@@ -1,44 +0,0 @@
-name: Deploy Background Jobs
-
-on:
- push:
- branches:
- - main
- paths:
- - "packages/jobs/**"
- workflow_dispatch:
-
-jobs:
- deploy:
- runs-on: ubuntu-latest
- strategy:
- matrix:
- environment:
- - name: "production"
- access_token: TRIGGER_ACCESS_TOKEN
- project_id: TRIGGER_PROJECT_ID
- - name: "govcloud"
- access_token: TRIGGER_ACCESS_TOKEN
- project_id: GOVCLOUD_TRIGGER_PROJECT_ID
-
- steps:
- - uses: actions/checkout@v2
-
- - name: Use Node.js 20.x
- uses: actions/setup-node@v4
- with:
- node-version: "20.x"
-
- - name: Install dependencies
- run: npm install
-
- - name: Build packages
- run: npm run build:packages
-
- - name: 🚀 Deploy Trigger.dev (${{ matrix.environment.name }})
- env:
- TRIGGER_ACCESS_TOKEN: ${{ secrets[matrix.environment.access_token] }}
- TRIGGER_PROJECT_ID: ${{ secrets[matrix.environment.project_id] }}
- run: |
- cd packages/jobs
- npx [email protected] deploy
diff --git a/README.md b/README.md
index 70ba4ed944..68e7f4d90d 100644
--- a/README.md
+++ b/README.md
@@ -81,8 +81,7 @@ Technical highlights:
- [Radix UI](https://radix-ui.com) - behavior
- [Supabase](https://supabase.com) - database
- [Supabase](https://supabase.com) – auth
-- [Upstash](https://upstash.com) - cache
-- [Trigger](https://trigger.dev) - jobs
+- [Inngest](https://inngest.com) - jobs
- [Resend](https://resend.com) – email
- [Novu](https://novu.co) – notifications
- [Vercel](https://vercel.com) – hosting
@@ -140,13 +139,11 @@ Make sure that you have [Docker installed](https://docs.docker.com/desktop/insta
In addition you must configure the following external services:
-| Service | Purpose | URL |
-| ----------- | -------------------------- | ---------------------------------------------------------------------- |
-| Upstash | Serverless Redis | [https://console.upstash.com/login](https://console.upstash.com/login) |
-| Trigger.dev | Job runner | [https://cloud.trigger.dev/login](https://cloud.trigger.dev/login) |
-| Posthog | Product analytics platform | [https://us.posthog.com/signup](https://us.posthog.com/signup) |
+| Service | Purpose | URL |
+| ------- | -------------------------- | -------------------------------------------------------------- |
+| Posthog | Product analytics platform | [https://us.posthog.com/signup](https://us.posthog.com/signup) |
-Each of these services has a free tier which should be plenty to support local development. If you're self hosting, and you don't want to use Upstash or Posthog, it's pretty easy to replace upstash with a redis container in `@carbon/kv` and remove the Posthog analytics.
+Posthog has a free tier which should be plenty to support local development. If you're self hosting and you don't want to use Posthog, it's pretty easy to remove the analytics.
### Installation
@@ -169,27 +166,17 @@ $ cp ./.env.example ./.env
- `SUPABASE_SERVICE_ROLE_KEY=[service_role key]`
- `SUPABASE_ANON_KEY=[anon key]`
-2. Set up a Redis instance (local or cloud) and add the connection URL:
-
-- `REDIS_URL=[redis://user:password@host:port]`
-
-3. Navigate to the project you created in [https://cloud.trigger.dev](https://cloud.trigger.dev) and copy the following from the `Environments & API Keys` section:
-
-- `TRIGGER_SECRET_KEY=[Private 'dev' API Key, starting 'tr_dev_*']`
-- `TRIGGER_API_URL="https://api.trigger.dev"`
-- `TRIGGER_PROJECT_ID=[Public 'project' key, starting 'proj*]`
-
-4. In Posthog go to [https://[region].posthog.com/project/[project-id]/settings/project-details](https://[region].posthog.com/project/[project-id]/settings/project-details) to find your Project ID and Project API key:
+2. In Posthog go to [https://[region].posthog.com/project/[project-id]/settings/project-details](https://[region].posthog.com/project/[project-id]/settings/project-details) to find your Project ID and Project API key:
- `POSTHOG_API_HOST=[https://[region].posthog.com]`
- `POSTHOG_PROJECT_PUBLIC_KEY=[Project API Key starting 'phc*']`
-5. Add a `STRIPE_SECRET_KEY` from the Stripe admin interface, and then run `npm run -w @carbon/stripe register:stripe` to get a `STRIPE_WEBHOOK_SECRET`
+3. Add a `STRIPE_SECRET_KEY` from the Stripe admin interface, and then run `npm run -w @carbon/stripe register:stripe` to get a `STRIPE_WEBHOOK_SECRET`
- `STRIPE_SECRET_KEY="sk_test_*************"`
- `STRIPE_WEBHOOK_SECRET="whsec_************"`
-6. **Resend** (Email service) - [Create a Resend account](https://resend.com) and configure:
+4. **Resend** (Email service) - [Create a Resend account](https://resend.com) and configure:
- `RESEND_API_KEY="re_**********"`
- `RESEND_DOMAIN="carbon.ms"` (or your domain, no trailing slashes or protocols)
@@ -197,7 +184,7 @@ $ cp ./.env.example ./.env
Resend is used for transactional emails (user invitations, email verification, onboarding). All three variables are stored in `packages/auth/src/config/env.ts`.
-7. **Novu** (In-app notifications) - [Create a Novu account](https://novu.co) and configure:
+5. **Novu** (In-app notifications) - [Create a Novu account](https://novu.co) and configure:
- `NOVU_APPLICATION_ID="********************"` (Client-side, public)
- `NOVU_SECRET_KEY="********************"` (Server-side secret, backend only)
@@ -210,7 +197,7 @@ npm run novu:sync
This command syncs your Novu workflows with the Carbon application using the bridge URL.
-8. Signing in requires you to setup one of two methods:
+6. Signing in requires you to setup one of two methods:
- Email requires a Resend API key (configured in step 6 above)
- Sign-in with Google requires a [Google auth client](https://supabase.com/docs/guides/auth/social-login/auth-google) with these variables:
- `SUPABASE_AUTH_EXTERNAL_GOOGLE_CLIENT_ID="******.apps.googleusercontent.com"`
@@ -232,13 +219,13 @@ $ npm run dev:mes # npm run dev in all apps & packages
```
After installation you should be able run the apps locally.
-
| Application | URL |
| --------------- | ------------------------------------------------------------------------------------------------------------------ |
| ERP | [http://localhost:3000](http://localhost:3000) |
| MES | [http://localhost:3001](http://localhost:3001) |
| Academy | [http://localhost:4111](http://localhost:4111) |
| Starter | [http://localhost:4000](http://localhost:4000) |
+| Background Jobs | [http://localhost:8288](http://localhost:8288) |
| Postgres | [postgresql://postgres:postgres@localhost:54322/postgres](postgresql://postgres:postgres@localhost:54322/postgres) |
| Supabase Studio | [http://localhost:54323/project/default](http://localhost:54323/project/default) |
| Mailpit | [http://localhost:54324](http://localhost:54324) |
@@ -383,3 +370,18 @@ const { data, error } = await carbon
.select("*")
.eq("companyId", companyId);
```
+
+## Migration Notes
+
+### Trigger.dev to Inngest
+
+Background jobs have been migrated from [Trigger.dev](https://trigger.dev) to [Inngest](https://inngest.com). Key changes:
+
+- **Job definitions** moved from `packages/jobs/trigger/` to `packages/jobs/src/inngest/functions/`
+- **Triggering jobs** from app code uses `trigger()` and `batchTrigger()` from `@carbon/jobs` instead of `tasks.trigger()` from `@trigger.dev/sdk`
+- **Inngest dev server** runs via `npx inngest-cli@latest dev -u http://localhost:3000/api/inngest`
+- **Environment variables**: `TRIGGER_SECRET_KEY`, `TRIGGER_API_URL`, and `TRIGGER_PROJECT_ID` are no longer needed. Set `INNGEST_EVENT_KEY` and `INNGEST_SIGNING_KEY` instead (not required for local dev).
+
+### Upstash to Local Redis
+
+The caching layer (`@carbon/kv`) no longer depends on Upstash. A standard Redis instance is used instead. The `REDIS_URL` environment variable still applies, but you can point it at any Redis-compatible server (including a local Docker container).
diff --git a/apps/erp/app/hooks/useTrainingPanel.ts b/apps/erp/app/hooks/useTrainingPanel.ts
index 7f796e62c5..d7c8485544 100644
--- a/apps/erp/app/hooks/useTrainingPanel.ts
+++ b/apps/erp/app/hooks/useTrainingPanel.ts
@@ -19,7 +19,7 @@ function safeLocalSet(key: string, value: string) {
try {
localStorage.setItem(key, value);
} catch {
- /* intentionally ignore storage errors */
+ // localStorage may be unavailable
}
}
diff --git a/apps/erp/app/modules/production/production.server.ts b/apps/erp/app/modules/production/production.server.ts
index 38f55513f0..89ff3069a2 100644
--- a/apps/erp/app/modules/production/production.server.ts
+++ b/apps/erp/app/modules/production/production.server.ts
@@ -1,5 +1,7 @@
+import { trigger } from "@carbon/jobs";
+
/**
- * Triggers a job scheduling task via Trigger.dev.
+ * Triggers a job scheduling task via inngest.
* Supports both initial scheduling and rescheduling.
*/
export async function triggerJobSchedule(
@@ -9,9 +11,7 @@ export async function triggerJobSchedule(
mode: "initial" | "reschedule" = "reschedule",
direction: "backward" | "forward" = "backward"
) {
- const { scheduleJob } = await import("@carbon/jobs/trigger/reschedule-job");
-
- const handle = await scheduleJob.trigger({
+ const result = await trigger("schedule-job", {
jobId,
companyId,
userId,
@@ -19,7 +19,7 @@ export async function triggerJobSchedule(
direction
});
- return { success: true, runId: handle.id };
+ return { success: true, runId: result.ids[0] };
}
/**
diff --git a/apps/erp/app/modules/production/production.service.ts b/apps/erp/app/modules/production/production.service.ts
index 027d807ef4..23069fe211 100644
--- a/apps/erp/app/modules/production/production.service.ts
+++ b/apps/erp/app/modules/production/production.service.ts
@@ -3073,3 +3073,27 @@ export async function upsertDemandProjections(
error: hasError ? results.find((r) => r.error)?.error : null
};
}
+
+/**
+ * Trigger a job scheduling task via Inngest.
+ * Supports both initial scheduling and rescheduling.
+ */
+export async function triggerJobSchedule(
+ jobId: string,
+ companyId: string,
+ userId: string,
+ mode: "initial" | "reschedule" = "reschedule",
+ direction: "backward" | "forward" = "backward"
+) {
+ const { trigger } = await import("@carbon/jobs");
+
+ await trigger("schedule-job", {
+ jobId,
+ companyId,
+ userId,
+ mode,
+ direction
+ });
+
+ return { success: true };
+}
diff --git a/apps/erp/app/modules/shared/shared.server.ts b/apps/erp/app/modules/shared/shared.server.ts
index 3dd28530f2..46a2877076 100644
--- a/apps/erp/app/modules/shared/shared.server.ts
+++ b/apps/erp/app/modules/shared/shared.server.ts
@@ -1,10 +1,11 @@
import type { Database } from "@carbon/database";
import { SalesOrderEmail } from "@carbon/documents/email";
-import type { sendEmailResendTask } from "@carbon/jobs/trigger/send-email-resend";
+import { trigger } from "@carbon/jobs";
import { redis } from "@carbon/kv";
+import type { CalendarDate } from "@internationalized/date";
+import { startOfWeek } from "@internationalized/date";
import { renderAsync } from "@react-email/components";
import type { SupabaseClient } from "@supabase/supabase-js";
-import { tasks } from "@trigger.dev/sdk";
import type { LoaderFunctionArgs } from "react-router";
import { getPaymentTermsList } from "~/modules/accounting";
import {
@@ -15,6 +16,7 @@ import {
} from "~/modules/sales";
import { getCompany } from "~/modules/settings";
import { getUser } from "~/modules/users/users.server";
+import { getDatabaseClient } from "~/services/database.server";
import { stripSpecialCharacters } from "~/utils/string";
import { upsertDocument } from "../documents/documents.service";
import type { CustomFieldsTableType } from "../settings";
@@ -268,7 +270,7 @@ export async function sendSalesOrderEmail(args: {
const html = await renderAsync(emailTemplate);
const text = await renderAsync(emailTemplate, { plainText: true });
- await tasks.trigger<typeof sendEmailResendTask>("send-email-resend", {
+ await trigger("send-email-resend", {
to: [seller.data.email, customer.data.contact.email!],
cc: ccSelections?.length ? ccSelections : undefined,
from: seller.data.email,
@@ -286,3 +288,94 @@ export async function sendSalesOrderEmail(args: {
return { success: true };
}
+
+export async function getOrCreatePeriods(
+ today: CalendarDate,
+ weeksToProject: number
+) {
+ const start = startOfWeek(today, "en-US");
+
+ // Generate weekly date ranges
+ const ranges: { startDate: string; endDate: string }[] = [];
+ let currentStart = start;
+ for (let i = 0; i < weeksToProject; i++) {
+ const periodEnd = currentStart.add({ days: 6 });
+ ranges.push({
+ startDate: currentStart.toString(),
+ endDate: periodEnd.toString()
+ });
+ currentStart = periodEnd.add({ days: 1 });
+ }
+
+ const db = getDatabaseClient();
+
+ // Check which periods already exist
+ const existingPeriods = await db
+ .selectFrom("period")
+ .selectAll()
+ .where(
+ "startDate",
+ "in",
+ ranges.map((r) => r.startDate)
+ )
+ .where("periodType", "=", "Week")
+ .execute();
+
+ if (existingPeriods.length === ranges.length) {
+ return existingPeriods.map(toPlainPeriod);
+ }
+
+ // Find missing periods
+ const existingStartDates = new Set(
+ existingPeriods.map((p) => dateToString(p.startDate))
+ );
+
+ const periodsToCreate = ranges.filter(
+ (r) => !existingStartDates.has(r.startDate)
+ );
+
+ // Create missing periods in a transaction
+ const created = await db.transaction().execute(async (trx) => {
+ return await trx
+ .insertInto("period")
+ .values(
+ periodsToCreate.map((p) => ({
+ startDate: p.startDate,
+ endDate: p.endDate,
+ periodType: "Week" as const,
+ createdAt: new Date().toISOString()
+ }))
+ )
+ .returningAll()
+ .execute();
+ });
+
+ return [...existingPeriods, ...created].map(toPlainPeriod);
+}
+
+/** Convert a pg DATE value (Date object or string) to an ISO date string. */
+function dateToString(value: Date | string): string {
+ if (value instanceof Date) {
+ // Use local date parts to avoid timezone shift from toISOString()
+ const y = value.getFullYear();
+ const m = String(value.getMonth() + 1).padStart(2, "0");
+ const d = String(value.getDate()).padStart(2, "0");
+ return `${y}-${m}-${d}`;
+ }
+ return String(value);
+}
+
+/** Return a plain JSON-safe object with only the fields consumers need. */
+function toPlainPeriod(p: {
+ id: string;
+ startDate: Date | string;
+ endDate: Date | string;
+ periodType: string;
+}) {
+ return {
+ id: String(p.id),
+ startDate: dateToString(p.startDate),
+ endDate: dateToString(p.endDate),
+ periodType: p.periodType
+ };
+}
diff --git a/apps/erp/app/routes/api+/assign.ts b/apps/erp/app/routes/api+/assign.ts
index 2a99f1249d..72a0c365c5 100644
--- a/apps/erp/app/routes/api+/assign.ts
+++ b/apps/erp/app/routes/api+/assign.ts
@@ -1,8 +1,8 @@
import { error } from "@carbon/auth";
import { requirePermissions } from "@carbon/auth/auth.server";
import { flash } from "@carbon/auth/session.server";
+import { trigger } from "@carbon/jobs";
import { NotificationEvent } from "@carbon/notifications";
-import { tasks } from "@trigger.dev/sdk";
import type { ActionFunctionArgs } from "react-router";
import { data } from "react-router";
import { assign } from "~/modules/shared/shared.server";
@@ -56,7 +56,7 @@ export async function action({ request }: ActionFunctionArgs) {
const notificationEvent = getNotificationEvent(table);
if (notificationEvent) {
try {
- await tasks.trigger("notify", {
+ await trigger("notify", {
companyId,
documentId: id,
event: notificationEvent,
diff --git a/apps/erp/app/routes/api+/inngest.ts b/apps/erp/app/routes/api+/inngest.ts
new file mode 100644
index 0000000000..884b3b87d8
--- /dev/null
+++ b/apps/erp/app/routes/api+/inngest.ts
@@ -0,0 +1,26 @@
+import { functions, inngest } from "@carbon/jobs/inngest";
+import { serve } from "inngest/remix";
+
+/**
+ * Inngest API endpoint.
+ *
+ * Supports two modes via INNGEST_MODE env var:
+ * - "serve" (default): Handle function execution via HTTP
+ * - "connect": Return info message, execution handled by worker
+ *
+ * In "connect" mode, this endpoint still serves function discovery
+ * but actual execution happens via the WebSocket worker.
+ */
+
+// const mode = process.env.INNGEST_MODE?.toLowerCase() || "serve";
+
+const handler = serve({
+ client: inngest,
+ functions,
+ // Enable streaming for long-running functions on Vercel
+ streaming: "allow"
+});
+
+// In connect mode, we still serve for discovery but can log/track differently
+export const loader = handler;
+export const action = handler;
diff --git a/apps/erp/app/routes/api+/integrations.onshape.d.$did.v.$vid.elements.ts b/apps/erp/app/routes/api+/integrations.onshape.d.$did.v.$vid.elements.ts
index ea6ba73620..0a4a9c5a1a 100644
--- a/apps/erp/app/routes/api+/integrations.onshape.d.$did.v.$vid.elements.ts
+++ b/apps/erp/app/routes/api+/integrations.onshape.d.$did.v.$vid.elements.ts
@@ -1,7 +1,7 @@
import { requirePermissions } from "@carbon/auth/auth.server";
import {
getOnshapeClient,
- OnshapeDocument,
+ type OnshapeDocument,
OnshapeElementType,
OnshapeWVMType
} from "@carbon/ee/onshape";
@@ -50,7 +50,10 @@ export async function loader({ request, params }: LoaderFunctionArgs) {
};
try {
- const documentAssemblies = await onshapeClient.getElements(document, OnshapeElementType.ASSEMBLY);
+ const documentAssemblies = await onshapeClient.getElements(
+ document,
+ OnshapeElementType.ASSEMBLY
+ );
return {
data: documentAssemblies,
diff --git a/apps/erp/app/routes/api+/integrations.xero.backfill.ts b/apps/erp/app/routes/api+/integrations.xero.backfill.ts
index 414628c124..6cefd07ada 100644
--- a/apps/erp/app/routes/api+/integrations.xero.backfill.ts
+++ b/apps/erp/app/routes/api+/integrations.xero.backfill.ts
@@ -1,6 +1,6 @@
import { requirePermissions } from "@carbon/auth/auth.server";
import { ProviderID } from "@carbon/ee/accounting";
-import { runs, tasks } from "@trigger.dev/sdk/v3";
+import { trigger } from "@carbon/jobs";
import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";
import { data } from "react-router";
import { z } from "zod";
@@ -24,22 +24,8 @@ export async function loader({ request }: LoaderFunctionArgs) {
update: "settings"
});
- const url = new URL(request.url);
- const runId = url.searchParams.get("runId");
-
- if (runId) {
- try {
- const run = await runs.retrieve(runId);
- return data({
- status: run.status,
- metadata: run.metadata,
- output: run.output
- });
- } catch {
- return data({ error: "Failed to retrieve run status" }, { status: 500 });
- }
- }
-
+ // TODO: run status polling was trigger.dev specific (runs.retrieve) and has been removed.
+ // Reimplement with inngest if needed.
return data({ status: "idle" });
}
@@ -73,27 +59,19 @@ export async function action({ request }: ActionFunctionArgs) {
// Trigger the backfill task with settings
// The backfill task respects each entity's sync direction config from
// the integration metadata (pull-from-accounting, push-to-accounting, two-way)
- const handle = await tasks.trigger(
- "accounting-backfill",
- {
- companyId,
- provider: ProviderID.XERO,
- batchSize: 50,
- entityTypes: {
- customers: settings.backfillCustomers,
- vendors: settings.backfillVendors,
- items: settings.backfillItems
- }
- },
- {
- idempotencyKey: `backfill_${companyId}_${Date.now()}`,
- tags: [`company_${companyId}`, "backfill", "xero"]
+ await trigger("accounting-backfill", {
+ companyId,
+ provider: ProviderID.XERO,
+ batchSize: 50,
+ entityTypes: {
+ customers: settings.backfillCustomers,
+ vendors: settings.backfillVendors,
+ items: settings.backfillItems
}
- );
+ });
return data({
success: true,
- runId: handle.id,
message: "Contact import started"
});
} catch (error) {
diff --git a/apps/erp/app/routes/api+/items.$id.$locationId.forecast.ts b/apps/erp/app/routes/api+/items.$id.$locationId.forecast.ts
index 2cb4296a82..cb812853c1 100644
--- a/apps/erp/app/routes/api+/items.$id.$locationId.forecast.ts
+++ b/apps/erp/app/routes/api+/items.$id.$locationId.forecast.ts
@@ -1,7 +1,7 @@
import { error } from "@carbon/auth";
import { requirePermissions } from "@carbon/auth/auth.server";
import { flash } from "@carbon/auth/session.server";
-import { getLocalTimeZone, startOfWeek, today } from "@internationalized/date";
+import { getLocalTimeZone, today } from "@internationalized/date";
import type { LoaderFunctionArgs } from "react-router";
import { data } from "react-router";
import {
@@ -13,7 +13,7 @@ import {
getOpenPurchaseOrderLines,
getOpenSalesOrderLines
} from "~/modules/items/items.service";
-import { getPeriods } from "~/modules/shared/shared.service";
+import { getOrCreatePeriods } from "~/modules/shared/shared.server";
const defaultResponse = {
demand: [],
@@ -38,19 +38,10 @@ export async function loader({ request, params }: LoaderFunctionArgs) {
if (!itemId) throw new Error("Could not find itemId");
if (!locationId) throw new Error("Could not find locationId");
- const startDate = startOfWeek(today(getLocalTimeZone()), "en-US");
- const endDate = startDate.add({ weeks: WEEKS_TO_FORECAST });
- const periods = await getPeriods(client, {
- startDate: startDate.toString(),
- endDate: endDate.toString()
- });
-
- if (periods.error) {
- return data(
- defaultResponse,
- await flash(request, error(periods.error, "Failed to load periods"))
- );
- }
+ const periods = await getOrCreatePeriods(
+ today(getLocalTimeZone()),
+ WEEKS_TO_FORECAST
+ );
const [
demand,
@@ -64,13 +55,13 @@ export async function loader({ request, params }: LoaderFunctionArgs) {
getItemDemand(client, {
itemId,
locationId,
- periods: periods.data.map((p) => p.id ?? ""),
+ periods: periods.map((p) => p.id ?? ""),
companyId
}),
getItemSupply(client, {
itemId,
locationId,
- periods: periods.data.map((p) => p.id ?? ""),
+ periods: periods.map((p) => p.id ?? ""),
companyId
}),
getItemQuantities(client, itemId, companyId, locationId),
@@ -97,7 +88,7 @@ export async function loader({ request, params }: LoaderFunctionArgs) {
actualQuantity: f.forecastQuantity
}))
],
- periods: periods.data,
+ periods,
quantityOnHand: quantities.data?.quantityOnHand ?? 0,
openSalesOrderLines: openSalesOrderLines.data ?? [],
openJobMaterials: openJobMaterials.data ?? [],
diff --git a/apps/erp/app/routes/api+/kanban.$id.tsx b/apps/erp/app/routes/api+/kanban.$id.tsx
index 7ea67083b3..abd4e3f789 100644
--- a/apps/erp/app/routes/api+/kanban.$id.tsx
+++ b/apps/erp/app/routes/api+/kanban.$id.tsx
@@ -2,11 +2,11 @@ import { notFound } from "@carbon/auth";
import { requirePermissions } from "@carbon/auth/auth.server";
import { getCarbonServiceRole } from "@carbon/auth/client.server";
import type { Database } from "@carbon/database";
+import { trigger } from "@carbon/jobs";
import { Loading } from "@carbon/react";
import { getLocalTimeZone, today } from "@internationalized/date";
import type { SupabaseClient } from "@supabase/supabase-js";
import { FunctionRegion } from "@supabase/supabase-js";
-import { tasks } from "@trigger.dev/sdk";
import { Suspense } from "react";
import type { LoaderFunctionArgs } from "react-router";
import { Await, useLoaderData } from "react-router";
@@ -160,7 +160,7 @@ async function handleKanban({
if (!upsertMethod.error && kanban.data.autoRelease) {
await Promise.all([
- tasks.trigger("recalculate", {
+ trigger("recalculate", {
type: "jobRequirements",
id,
companyId,
diff --git a/apps/erp/app/routes/api+/mcp+/lib/server.ts b/apps/erp/app/routes/api+/mcp+/lib/server.ts
index 435fc5439e..568b92f293 100644
--- a/apps/erp/app/routes/api+/mcp+/lib/server.ts
+++ b/apps/erp/app/routes/api+/mcp+/lib/server.ts
@@ -30,21 +30,21 @@ Today is ${today}.
## Tool Organization
Tools are namespaced by module — use the prefix to discover related tools:
-- account_* — 6 read, 3 write, 1 delete tools
- accounting_* — 27 read, 8 write, 4 delete tools
-- documents_* — 4 read, 7 write, 3 delete tools
-- inventory_* — 45 read, 15 write, 12 delete tools
-- invoicing_* — 11 read, 13 write, 4 delete tools
-- items_* — 75 read, 44 write, 17 delete tools
-- people_* — 24 read, 14 write, 6 delete tools
-- production_* — 62 read, 44 write, 22 delete tools
-- purchasing_* — 51 read, 34 write, 11 delete tools
+- settings_* — 26 read, 40 write, 2 delete tools
+- sales_* — 78 read, 54 write, 18 delete tools
- quality_* — 38 read, 19 write, 11 delete tools
+- purchasing_* — 51 read, 34 write, 11 delete tools
- resources_* — 47 read, 27 write, 20 delete tools
-- sales_* — 78 read, 54 write, 18 delete tools
-- settings_* — 26 read, 40 write, 2 delete tools
- shared_* — 20 read, 20 write, 4 delete tools
+- inventory_* — 45 read, 15 write, 12 delete tools
- users_* — 17 read, 6 write, 2 delete tools
+- people_* — 24 read, 14 write, 6 delete tools
+- production_* — 62 read, 45 write, 22 delete tools
+- documents_* — 4 read, 7 write, 3 delete tools
+- account_* — 6 read, 3 write, 1 delete tools
+- items_* — 75 read, 44 write, 17 delete tools
+- invoicing_* — 11 read, 13 write, 4 delete tools
## Key Patterns
- All monetary amounts use the company's base currency unless specified.
@@ -67,21 +67,21 @@ export function createMcpServer(ctx: McpContext): McpServer {
},
);
- registerAccountTools(server, ctx);
registerAccountingTools(server, ctx);
- registerDocumentsTools(server, ctx);
- registerInventoryTools(server, ctx);
- registerInvoicingTools(server, ctx);
- registerItemsTools(server, ctx);
- registerPeopleTools(server, ctx);
- registerProductionTools(server, ctx);
- registerPurchasingTools(server, ctx);
+ registerSettingsTools(server, ctx);
+ registerSalesTools(server, ctx);
registerQualityTools(server, ctx);
+ registerPurchasingTools(server, ctx);
registerResourcesTools(server, ctx);
- registerSalesTools(server, ctx);
- registerSettingsTools(server, ctx);
registerSharedTools(server, ctx);
+ registerInventoryTools(server, ctx);
registerUsersTools(server, ctx);
+ registerPeopleTools(server, ctx);
+ registerProductionTools(server, ctx);
+ registerDocumentsTools(server, ctx);
+ registerAccountTools(server, ctx);
+ registerItemsTools(server, ctx);
+ registerInvoicingTools(server, ctx);
return server;
}
diff --git a/apps/erp/app/routes/api+/mcp+/lib/tools/index.ts b/apps/erp/app/routes/api+/mcp+/lib/tools/index.ts
index 7d88aae62a..b087e087bd 100644
--- a/apps/erp/app/routes/api+/mcp+/lib/tools/index.ts
+++ b/apps/erp/app/routes/api+/mcp+/lib/tools/index.ts
@@ -1,5 +1,6 @@
// @ts-nocheck
// AUTO-GENERATED by scripts/generate-mcp.ts — do not edit manually
+
export { registerAccountTools } from "./account";
export { registerAccountingTools } from "./accounting";
export { registerDocumentsTools } from "./documents";
diff --git a/apps/erp/app/routes/api+/mcp+/lib/tools/production.ts b/apps/erp/app/routes/api+/mcp+/lib/tools/production.ts
index f3cba16965..c2c6358f4d 100644
--- a/apps/erp/app/routes/api+/mcp+/lib/tools/production.ts
+++ b/apps/erp/app/routes/api+/mcp+/lib/tools/production.ts
@@ -100,6 +100,7 @@ import {
recalculateJobRequirements,
recalculateJobMakeMethodRequirements,
runMRP,
+ triggerJobSchedule,
updateJobBatchNumber,
updateJobStatus,
updateJobMaterialOrder,
@@ -2250,4 +2251,28 @@ export const registerProductionTools: RegisterTools = (server, ctx) => {
return toMcpResult(result);
}, "Failed: production_upsertDemandProjections"),
);
+
+ server.registerTool(
+ "production_triggerJobSchedule",
+ {
+ description: "trigger job schedule",
+ inputSchema: {
+ jobId: z.string(),
+ mode: z.string().optional(),
+ direction: z.string().optional()
+ },
+ annotations: WRITE_ANNOTATIONS
+ },
+ withErrorHandling(async (params) => {
+ const result = await triggerJobSchedule(
+ ctx.client,
+ params.jobId,
+ ctx.companyId,
+ ctx.userId,
+ params.mode,
+ params.direction
+ );
+ return toMcpResult(result);
+ }, "Failed: production_triggerJobSchedule")
+ );
};
diff --git a/apps/erp/app/routes/api+/messaging.notify.ts b/apps/erp/app/routes/api+/messaging.notify.ts
index 35dd6ddf95..457ca6b648 100644
--- a/apps/erp/app/routes/api+/messaging.notify.ts
+++ b/apps/erp/app/routes/api+/messaging.notify.ts
@@ -1,9 +1,8 @@
import { error } from "@carbon/auth";
import { requirePermissions } from "@carbon/auth/auth.server";
import { flash } from "@carbon/auth/session.server";
-import type { notifyTask } from "@carbon/jobs/trigger/notify";
+import { trigger } from "@carbon/jobs";
import { NotificationEvent } from "@carbon/notifications";
-import { tasks } from "@trigger.dev/sdk";
import type { ActionFunctionArgs } from "react-router";
import { data } from "react-router";
import { z } from "zod";
@@ -57,7 +56,7 @@ export async function action({ request }: ActionFunctionArgs) {
if (usersToNotify.length > 0) {
const notificationEvent = getNotificationEvent("jobOperationNote");
if (notificationEvent) {
- await tasks.trigger<typeof notifyTask>("notify", {
+ await trigger("notify", {
companyId,
documentId: `${jobId}:${operationId}:${makeMethodId}:${
materialId ?? ""
diff --git a/apps/erp/app/routes/api+/model.upload.ts b/apps/erp/app/routes/api+/model.upload.ts
index 8c397874f9..61329f58b4 100644
--- a/apps/erp/app/routes/api+/model.upload.ts
+++ b/apps/erp/app/routes/api+/model.upload.ts
@@ -1,7 +1,6 @@
// import { error } from "@carbon/auth";
import { requirePermissions } from "@carbon/auth/auth.server";
-import type { modelThumbnailTask } from "@carbon/jobs/trigger/model-thumbnail";
-import { tasks } from "@trigger.dev/sdk";
+import { trigger } from "@carbon/jobs";
import type { ActionFunctionArgs } from "react-router";
export async function action({ request }: ActionFunctionArgs) {
@@ -72,7 +71,7 @@ export async function action({ request }: ActionFunctionArgs) {
await client.from("job").update({ modelUploadId: modelId }).eq("id", jobId);
}
- await tasks.trigger<typeof modelThumbnailTask>("model-thumbnail", {
+ await trigger("model-thumbnail", {
companyId,
modelId
});
diff --git a/apps/erp/app/routes/api+/purchasing.digital-quote.$id.tsx b/apps/erp/app/routes/api+/purchasing.digital-quote.$id.tsx
index 51f55722f2..a15388bfee 100644
--- a/apps/erp/app/routes/api+/purchasing.digital-quote.$id.tsx
+++ b/apps/erp/app/routes/api+/purchasing.digital-quote.$id.tsx
@@ -1,9 +1,8 @@
import { assertIsPost, notFound } from "@carbon/auth";
import { getCarbonServiceRole } from "@carbon/auth/client.server";
import { validationError, validator } from "@carbon/form";
-import type { notifyTask } from "@carbon/jobs/trigger/notify";
+import { trigger } from "@carbon/jobs";
import { NotificationEvent } from "@carbon/notifications";
-import { tasks } from "@trigger.dev/sdk";
import type { ActionFunctionArgs } from "react-router";
import { z } from "zod";
import {
@@ -260,7 +259,7 @@ export async function action({ request, params }: ActionFunctionArgs) {
// Send notification to supplier quote notification group
if (companySettings.data?.supplierQuoteNotificationGroup?.length) {
try {
- await tasks.trigger<typeof notifyTask>("notify", {
+ await trigger("notify", {
companyId: companySettings.data.id,
documentId: quote.data.id,
event: NotificationEvent.SupplierQuoteResponse,
diff --git a/apps/erp/app/routes/api+/sales.digital-quote.$id.tsx b/apps/erp/app/routes/api+/sales.digital-quote.$id.tsx
index 957385d15b..9050941484 100644
--- a/apps/erp/app/routes/api+/sales.digital-quote.$id.tsx
+++ b/apps/erp/app/routes/api+/sales.digital-quote.$id.tsx
@@ -1,8 +1,7 @@
import { assertIsPost, notFound } from "@carbon/auth";
import { getCarbonServiceRole } from "@carbon/auth/client.server";
-import type { notifyTask } from "@carbon/jobs/trigger/notify";
+import { trigger } from "@carbon/jobs";
import { NotificationEvent } from "@carbon/notifications";
-import { tasks } from "@trigger.dev/sdk";
import type { ActionFunctionArgs } from "react-router";
import {
convertQuoteToOrder,
@@ -127,7 +126,7 @@ export async function action(args: ActionFunctionArgs) {
if (companySettings.data?.digitalQuoteNotificationGroup?.length) {
try {
- await tasks.trigger<typeof notifyTask>("notify", {
+ await trigger("notify", {
companyId: companySettings.data.id,
documentId: quote.data.id,
event: NotificationEvent.DigitalQuoteResponse,
@@ -208,7 +207,7 @@ export async function action(args: ActionFunctionArgs) {
if (companySettings.data?.digitalQuoteNotificationGroup?.length) {
try {
- await tasks.trigger<typeof notifyTask>("notify", {
+ await trigger("notify", {
companyId: companySettings.data.id,
documentId: quote.data.id,
event: NotificationEvent.DigitalQuoteResponse,
diff --git a/apps/erp/app/routes/api+/webhook.jira.$companyId.ts b/apps/erp/app/routes/api+/webhook.jira.$companyId.ts
index 4a9e75f2be..0c38b5c8a8 100644
--- a/apps/erp/app/routes/api+/webhook.jira.$companyId.ts
+++ b/apps/erp/app/routes/api+/webhook.jira.$companyId.ts
@@ -1,6 +1,5 @@
import { getCarbonServiceRole } from "@carbon/auth/client.server";
-import { syncIssueFromJiraSchema } from "@carbon/jobs/trigger/jira";
-import { tasks } from "@trigger.dev/sdk";
+import { syncIssueFromJiraSchema, trigger } from "@carbon/jobs";
import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";
import { data } from "react-router";
import { getIntegration } from "../../modules/settings";
@@ -62,7 +61,7 @@ export async function action({ request, params }: ActionFunctionArgs) {
}
try {
- await tasks.trigger("sync-issue-from-jira", parsed.data);
+ await trigger("sync-issue-from-jira", parsed.data);
return { success: true };
} catch (err) {
console.error(err);
diff --git a/apps/erp/app/routes/api+/webhook.linear.$companyId.ts b/apps/erp/app/routes/api+/webhook.linear.$companyId.ts
index 01fc36347b..72b13fd03b 100644
--- a/apps/erp/app/routes/api+/webhook.linear.$companyId.ts
+++ b/apps/erp/app/routes/api+/webhook.linear.$companyId.ts
@@ -1,6 +1,5 @@
import { getCarbonServiceRole } from "@carbon/auth/client.server";
-import { syncIssueFromLinearSchema } from "@carbon/jobs/trigger/linear";
-import { tasks } from "@trigger.dev/sdk";
+import { syncIssueFromLinearSchema, trigger } from "@carbon/jobs";
import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";
import { data } from "react-router";
import { getIntegration } from "../../modules/settings";
@@ -66,7 +65,7 @@ export async function action({ request, params }: ActionFunctionArgs) {
}
try {
- await tasks.trigger("sync-issue-from-linear", parsed.data);
+ await trigger("sync-issue-from-linear", parsed.data);
return { success: true };
} catch (err) {
console.error("Linear webhook: failed to trigger task", err);
diff --git a/apps/erp/app/routes/api+/webhook.paperless-parts.$companyId.ts b/apps/erp/app/routes/api+/webhook.paperless-parts.$companyId.ts
index 893595df9a..3a5308232b 100644
--- a/apps/erp/app/routes/api+/webhook.paperless-parts.$companyId.ts
+++ b/apps/erp/app/routes/api+/webhook.paperless-parts.$companyId.ts
@@ -1,6 +1,5 @@
import { getCarbonServiceRole } from "@carbon/auth/client.server";
-import type { paperlessPartsTask } from "@carbon/jobs/trigger/paperless-parts";
-import { tasks } from "@trigger.dev/sdk";
+import { trigger } from "@carbon/jobs";
import crypto from "crypto";
import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";
import { data } from "react-router";
@@ -100,7 +99,7 @@ export async function action({ request, params }: ActionFunctionArgs) {
const payload = JSON.parse(payloadText);
console.log("payload", payload);
- await tasks.trigger<typeof paperlessPartsTask>("paperless-parts", {
+ await trigger("paperless-parts", {
apiKey,
companyId,
payload
diff --git a/apps/erp/app/routes/api+/webhook.xero.ts b/apps/erp/app/routes/api+/webhook.xero.ts
index 90e2e2d524..2baa572c72 100644
--- a/apps/erp/app/routes/api+/webhook.xero.ts
+++ b/apps/erp/app/routes/api+/webhook.xero.ts
@@ -31,7 +31,7 @@ import {
getProviderIntegration,
ProviderID
} from "@carbon/ee/accounting";
-import { tasks } from "@trigger.dev/sdk/v3";
+import { trigger } from "@carbon/jobs";
import crypto from "crypto";
import type { ActionFunctionArgs } from "react-router";
import { data } from "react-router";
@@ -264,21 +264,13 @@ export async function action({ request }: ActionFunctionArgs) {
console.dir(payload, { depth: null });
// Trigger the background job using Trigger.dev
- const handle = await tasks.trigger(
- "sync-external-accounting",
- payload,
- {
- tags: [ProviderID.XERO, payload.syncType],
- concurrencyKey: `sync-external-accounting:${companyId}`
- }
- );
+ await trigger("sync-external-accounting", payload);
console.log(
- `Triggered accounting sync job ${handle.id} for ${entities.length} entities`
+ `Triggered accounting sync job for ${entities.length} entities`
);
syncJobs.push({
- id: handle.id,
companyId,
tenantId,
entityCount: entities.length
diff --git a/apps/erp/app/routes/onboarding+/company.tsx b/apps/erp/app/routes/onboarding+/company.tsx
index 40b938dc41..78a8dc67ef 100644
--- a/apps/erp/app/routes/onboarding+/company.tsx
+++ b/apps/erp/app/routes/onboarding+/company.tsx
@@ -4,6 +4,7 @@ import { getCarbonServiceRole } from "@carbon/auth/client.server";
import { setCompanyId } from "@carbon/auth/company.server";
import { updateCompanySession } from "@carbon/auth/session.server";
import { ValidatedForm, validationError, validator } from "@carbon/form";
+import { trigger } from "@carbon/jobs";
import {
Button,
Card,
@@ -16,7 +17,6 @@ import {
} from "@carbon/react";
import { Edition } from "@carbon/utils";
import { getLocalTimeZone } from "@internationalized/date";
-import { tasks } from "@trigger.dev/sdk";
import type { ActionFunctionArgs } from "react-router";
import { Link, redirect, useLoaderData } from "react-router";
import {
@@ -124,7 +124,7 @@ export async function action({ request }: ActionFunctionArgs) {
}
if (CarbonEdition === Edition.Cloud) {
- tasks.trigger("onboard", {
+ trigger("onboard", {
type: "lead",
companyId,
userId
diff --git a/apps/erp/app/routes/x+/job+/$jobId.configure.tsx b/apps/erp/app/routes/x+/job+/$jobId.configure.tsx
index b85b4ecc92..2faf10ed13 100644
--- a/apps/erp/app/routes/x+/job+/$jobId.configure.tsx
+++ b/apps/erp/app/routes/x+/job+/$jobId.configure.tsx
@@ -2,8 +2,7 @@ import { error, success } from "@carbon/auth";
import { requirePermissions } from "@carbon/auth/auth.server";
import { getCarbonServiceRole } from "@carbon/auth/client.server";
import { flash } from "@carbon/auth/session.server";
-import type { recalculateTask } from "@carbon/jobs/trigger/recalculate";
-import { tasks } from "@trigger.dev/sdk";
+import { trigger } from "@carbon/jobs";
import type { ActionFunctionArgs } from "react-router";
import { redirect } from "react-router";
import { upsertJobMethod } from "~/modules/production";
@@ -62,7 +61,7 @@ export async function action({ request, params }: ActionFunctionArgs) {
);
}
- await tasks.trigger<typeof recalculateTask>("recalculate", {
+ await trigger("recalculate", {
type: "jobRequirements",
id: jobId,
companyId,
diff --git a/apps/erp/app/routes/x+/job+/$jobId.materials.session.new.tsx b/apps/erp/app/routes/x+/job+/$jobId.materials.session.new.tsx
index 592e80a40b..fba606be18 100644
--- a/apps/erp/app/routes/x+/job+/$jobId.materials.session.new.tsx
+++ b/apps/erp/app/routes/x+/job+/$jobId.materials.session.new.tsx
@@ -18,7 +18,7 @@ import {
} from "~/modules/inventory";
import { getJob } from "~/modules/production";
import { getNextSequence } from "~/modules/settings";
-import { getPeriods } from "~/modules/shared/shared.service";
+import { getOrCreatePeriods } from "~/modules/shared/shared.server";
import { path } from "~/utils/path";
const jobMaterialsSessionValidator = z.object({
@@ -117,17 +117,20 @@ export async function action({ request, params }: ActionFunctionArgs) {
);
}
- const periods = await getPeriods(client, {
- startDate: startDate.toString(),
- endDate: (jobStartDate ?? startDate.add({ weeks: 8 })).toString()
- });
-
- if (periods.error || !periods.data) {
- return data(
- { success: false, message: "Failed to get periods" },
- await flash(request, error(periods.error, "Failed to get periods"))
- );
- }
+ const endDate = jobStartDate
+ ? new Date(String(jobStartDate))
+ : new Date(startDate.add({ weeks: 8 }).toString());
+ const weeksToProject = Math.max(
+ 1,
+ Math.ceil(
+ (endDate.getTime() - new Date(startDate.toString()).getTime()) /
+ (7 * 24 * 60 * 60 * 1000)
+ )
+ );
+ const periods = await getOrCreatePeriods(
+ today(getLocalTimeZone()),
+ weeksToProject
+ );
const transferItems = sessionItems.filter(
(item) => item.action === "transfer"
@@ -380,16 +383,16 @@ export async function action({ request, params }: ActionFunctionArgs) {
// Helper function to find period ID
const findPeriodId = (dueDate: string) => {
const dueDateParsed = parseDate(dueDate);
- const period = periods.data?.find((p) => {
+ const period = periods?.find((p) => {
const startDate = parseDate(p.startDate);
const endDate = parseDate(p.endDate);
return dueDateParsed >= startDate && dueDateParsed <= endDate;
});
if (!period) {
- if (periods.data && periods.data.length > 0) {
- const firstPeriod = periods.data[0];
- const lastPeriod = periods.data[periods.data.length - 1];
+ if (periods && periods.length > 0) {
+ const firstPeriod = periods[0];
+ const lastPeriod = periods[periods.length - 1];
const firstStartDate = parseDate(firstPeriod.startDate);
const lastEndDate = parseDate(lastPeriod.endDate);
@@ -399,7 +402,7 @@ export async function action({ request, params }: ActionFunctionArgs) {
return lastPeriod.id;
}
}
- return periods.data?.[0]?.id || "";
+ return periods?.[0]?.id || "";
}
return period.id;
@@ -512,7 +515,7 @@ export async function action({ request, params }: ActionFunctionArgs) {
// Find the correct period based on the production order due date
const findPeriodId = (dueDate: string) => {
const dueDateParsed = parseDate(dueDate);
- const period = periods.data?.find((p) => {
+ const period = periods?.find((p) => {
const startDate = parseDate(p.startDate);
const endDate = parseDate(p.endDate);
return dueDateParsed >= startDate && dueDateParsed <= endDate;
@@ -521,9 +524,9 @@ export async function action({ request, params }: ActionFunctionArgs) {
// If no matching period found, use the first period if due date is before it,
// or the last period if due date is after all periods
if (!period) {
- if (periods.data && periods.data.length > 0) {
- const firstPeriod = periods.data[0];
- const lastPeriod = periods.data[periods.data.length - 1];
+ if (periods && periods.length > 0) {
+ const firstPeriod = periods[0];
+ const lastPeriod = periods[periods.length - 1];
const firstStartDate = parseDate(firstPeriod.startDate);
const lastEndDate = parseDate(lastPeriod.endDate);
@@ -533,7 +536,7 @@ export async function action({ request, params }: ActionFunctionArgs) {
return lastPeriod.id;
}
}
- return periods.data?.[0]?.id || "";
+ return periods?.[0]?.id || "";
}
return period.id;
diff --git a/apps/erp/app/routes/x+/job+/bulk.new.tsx b/apps/erp/app/routes/x+/job+/bulk.new.tsx
index 8a1fda60bf..93e8dabffb 100644
--- a/apps/erp/app/routes/x+/job+/bulk.new.tsx
+++ b/apps/erp/app/routes/x+/job+/bulk.new.tsx
@@ -3,12 +3,12 @@ import { requirePermissions } from "@carbon/auth/auth.server";
import { getCarbonServiceRole } from "@carbon/auth/client.server";
import { flash } from "@carbon/auth/session.server";
import { validator } from "@carbon/form";
+import { batchTrigger } from "@carbon/jobs";
import {
parseDate,
parseDateTime,
toCalendarDateTime
} from "@internationalized/date";
-import { tasks } from "@trigger.dev/sdk";
import type { ActionFunctionArgs } from "react-router";
import { redirect } from "react-router";
import { getDefaultShelfForJob } from "~/modules/inventory";
@@ -177,7 +177,7 @@ export async function action({ request }: ActionFunctionArgs) {
jobIds.push(id);
}
- await tasks.batchTrigger(
+ await batchTrigger(
"recalculate",
jobIds.map((id) => ({
payload: {
diff --git a/apps/erp/app/routes/x+/job+/new.tsx b/apps/erp/app/routes/x+/job+/new.tsx
index 82a2591cb4..3e3cb46c76 100644
--- a/apps/erp/app/routes/x+/job+/new.tsx
+++ b/apps/erp/app/routes/x+/job+/new.tsx
@@ -3,9 +3,8 @@ import { requirePermissions } from "@carbon/auth/auth.server";
import { getCarbonServiceRole } from "@carbon/auth/client.server";
import { flash } from "@carbon/auth/session.server";
import { validationError, validator } from "@carbon/form";
-import type { recalculateTask } from "@carbon/jobs/trigger/recalculate";
+import { trigger } from "@carbon/jobs";
import { parseDate } from "@internationalized/date";
-import { tasks } from "@trigger.dev/sdk";
import type { ActionFunctionArgs } from "react-router";
import { redirect } from "react-router";
import { useUrlParams, useUser } from "~/hooks";
@@ -156,7 +155,7 @@ export async function action({ request }: ActionFunctionArgs) {
);
}
- await tasks.trigger<typeof recalculateTask>("recalculate", {
+ await trigger("recalculate", {
type: "jobRequirements",
id,
companyId,
diff --git a/apps/erp/app/routes/x+/job+/update.tsx b/apps/erp/app/routes/x+/job+/update.tsx
index df3156a8d8..2251e34233 100644
--- a/apps/erp/app/routes/x+/job+/update.tsx
+++ b/apps/erp/app/routes/x+/job+/update.tsx
@@ -1,7 +1,6 @@
import { requirePermissions } from "@carbon/auth/auth.server";
import { getCarbonServiceRole } from "@carbon/auth/client.server";
-import type { recalculateTask } from "@carbon/jobs/trigger/recalculate";
-import { tasks } from "@trigger.dev/sdk";
+import { trigger } from "@carbon/jobs";
import type { ActionFunctionArgs } from "react-router";
import {
calculateJobPriority,
@@ -126,7 +125,7 @@ export async function action({ request }: ActionFunctionArgs) {
upsertMethod.error;
}
- await tasks.trigger<typeof recalculateTask>("recalculate", {
+ await trigger("recalculate", {
type: "jobRequirements",
id: id as string,
companyId,
diff --git a/apps/erp/app/routes/x+/part+/new.tsx b/apps/erp/app/routes/x+/part+/new.tsx
index bc44517c80..40661cc0ee 100644
--- a/apps/erp/app/routes/x+/part+/new.tsx
+++ b/apps/erp/app/routes/x+/part+/new.tsx
@@ -2,8 +2,7 @@ import { assertIsPost, error } from "@carbon/auth";
import { requirePermissions } from "@carbon/auth/auth.server";
import { flash } from "@carbon/auth/session.server";
import { validationError, validator } from "@carbon/form";
-import type { modelThumbnailTask } from "@carbon/jobs/trigger/model-thumbnail";
-import { tasks } from "@trigger.dev/sdk";
+import { trigger } from "@carbon/jobs";
import type { ActionFunctionArgs } from "react-router";
import { data, redirect } from "react-router";
import { partValidator, upsertPart } from "~/modules/items";
@@ -52,7 +51,7 @@ export async function action({ request }: ActionFunctionArgs) {
}
if (validation.data.modelUploadId) {
- await tasks.trigger<typeof modelThumbnailTask>("model-thumbnail", {
+ await trigger("model-thumbnail", {
companyId,
modelId: validation.data.modelUploadId
});
diff --git a/apps/erp/app/routes/x+/production+/planning.tsx b/apps/erp/app/routes/x+/production+/planning.tsx
index 21842ed4e8..a28b3208b3 100644
--- a/apps/erp/app/routes/x+/production+/planning.tsx
+++ b/apps/erp/app/routes/x+/production+/planning.tsx
@@ -2,14 +2,14 @@ import { error } from "@carbon/auth";
import { requirePermissions } from "@carbon/auth/auth.server";
import { flash } from "@carbon/auth/session.server";
import { ResizablePanel, ResizablePanelGroup, VStack } from "@carbon/react";
-import { getLocalTimeZone, startOfWeek, today } from "@internationalized/date";
+import { getLocalTimeZone, today } from "@internationalized/date";
import type { LoaderFunctionArgs } from "react-router";
import { Outlet, redirect, useLoaderData } from "react-router";
import type { ProductionPlanningItem } from "~/modules/production";
import { getProductionPlanning } from "~/modules/production";
import ProductionPlanningTable from "~/modules/production/ui/Planning/ProductionPlanningTable";
import { getLocationsList } from "~/modules/resources";
-import { getPeriods } from "~/modules/shared/shared.service";
+import { getOrCreatePeriods } from "~/modules/shared/shared.server";
import { getUserDefaults } from "~/modules/users/users.server";
import type { Handle } from "~/utils/handle";
import { path } from "~/utils/path";
@@ -66,26 +66,17 @@ export async function loader({ request }: LoaderFunctionArgs) {
locationId = locations.data?.[0].id as string;
}
- const startDate = startOfWeek(today(getLocalTimeZone()), "en-US");
- const endDate = startDate.add({ weeks: WEEKS_TO_PLAN });
- const periods = await getPeriods(client, {
- startDate: startDate.toString(),
- endDate: endDate.toString()
- });
-
- if (periods.error) {
- redirect(
- path.to.authenticatedRoot,
- await flash(request, error(periods.error, "Failed to load periods"))
- );
- }
+ const periods = await getOrCreatePeriods(
+ today(getLocalTimeZone()),
+ WEEKS_TO_PLAN
+ );
const [items] = await Promise.all([
getProductionPlanning(
client,
locationId,
companyId,
- periods.data?.map((p) => p.id) ?? [],
+ periods.map((p) => p.id),
{
search,
limit,
@@ -106,7 +97,7 @@ export async function loader({ request }: LoaderFunctionArgs) {
return {
items: (items.data ?? []) as ProductionPlanningItem[],
count: items.count ?? 0,
- periods: periods.data ?? [],
+ periods,
locationId
};
}
diff --git a/apps/erp/app/routes/x+/production+/projections.$itemId.$locationId.tsx b/apps/erp/app/routes/x+/production+/projections.$itemId.$locationId.tsx
index 6beb16dd8f..81cb130c5f 100644
--- a/apps/erp/app/routes/x+/production+/projections.$itemId.$locationId.tsx
+++ b/apps/erp/app/routes/x+/production+/projections.$itemId.$locationId.tsx
@@ -2,7 +2,7 @@ import { assertIsPost, error, success } from "@carbon/auth";
import { requirePermissions } from "@carbon/auth/auth.server";
import { flash } from "@carbon/auth/session.server";
import { validationError, validator } from "@carbon/form";
-import { getLocalTimeZone, startOfWeek, today } from "@internationalized/date";
+import { getLocalTimeZone, today } from "@internationalized/date";
import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";
import { data, redirect, useLoaderData, useNavigate } from "react-router";
import { demandProjectionValidator } from "~/modules/production/production.models";
@@ -11,7 +11,7 @@ import {
upsertDemandProjections
} from "~/modules/production/production.service";
import DemandProjectionsForm from "~/modules/production/ui/Projection/DemandProjectionForm";
-import { getPeriods } from "~/modules/shared/shared.service";
+import { getOrCreatePeriods } from "~/modules/shared/shared.server";
import { path } from "~/utils/path";
const WEEKS_TO_PROJECT = 52;
@@ -27,29 +27,23 @@ export async function loader({ request, params }: LoaderFunctionArgs) {
throw new Error("Item ID and Location ID are required");
}
- const startDate = startOfWeek(today(getLocalTimeZone()), "en-US");
- const endDate = startDate.add({ weeks: WEEKS_TO_PROJECT });
- const periods = await getPeriods(client, {
- startDate: startDate.toString(),
- endDate: endDate.toString()
- });
-
- if (periods.error) {
- throw new Error("Failed to load periods");
- }
+ const periods = await getOrCreatePeriods(
+ today(getLocalTimeZone()),
+ WEEKS_TO_PROJECT
+ );
// Load existing demand forecasts for this item and location
const existingProjections = await getDemandProjections(client, {
itemId,
locationId,
companyId,
- periodIds: periods.data?.map((p) => p.id) ?? []
+ periodIds: periods.map((p) => p.id)
});
// Map existing forecasts to week fields
const weekValues: Record<string, number> = {};
- if (existingProjections.data && periods.data) {
- periods.data.forEach((period, index) => {
+ if (existingProjections.data) {
+ periods.forEach((period, index) => {
const forecast = existingProjections.data?.find(
(f) => f.periodId === period.id
);
@@ -64,7 +58,7 @@ export async function loader({ request, params }: LoaderFunctionArgs) {
};
return {
- periods: periods.data ?? [],
+ periods,
initialValues
};
}
diff --git a/apps/erp/app/routes/x+/production+/projections.delete.$itemId.$locationId.tsx b/apps/erp/app/routes/x+/production+/projections.delete.$itemId.$locationId.tsx
index 4f2e279432..2b23d3b582 100644
--- a/apps/erp/app/routes/x+/production+/projections.delete.$itemId.$locationId.tsx
+++ b/apps/erp/app/routes/x+/production+/projections.delete.$itemId.$locationId.tsx
@@ -1,11 +1,11 @@
import { assertIsPost, error, success } from "@carbon/auth";
import { requirePermissions } from "@carbon/auth/auth.server";
import { flash } from "@carbon/auth/session.server";
-import { getLocalTimeZone, startOfWeek, today } from "@internationalized/date";
+import { getLocalTimeZone, today } from "@internationalized/date";
import type { ActionFunctionArgs } from "react-router";
import { data, redirect } from "react-router";
import { deleteDemandProjections } from "~/modules/production/production.service";
-import { getPeriods } from "~/modules/shared/shared.service";
+import { getOrCreatePeriods } from "~/modules/shared/shared.server";
import { path } from "~/utils/path";
export async function action({ request, params }: ActionFunctionArgs) {
@@ -27,22 +27,10 @@ export async function action({ request, params }: ActionFunctionArgs) {
}
// Get current date to determine future periods
- const startDate = startOfWeek(today(getLocalTimeZone()), "en-US");
- const endDate = startDate.add({ weeks: 52 });
- const periods = await getPeriods(client, {
- startDate: startDate.toString(),
- endDate: endDate.toString()
- });
-
- if (periods.error) {
- return data(
- {},
- await flash(request, error(periods.error, "Failed to load periods"))
- );
- }
+ const periods = await getOrCreatePeriods(today(getLocalTimeZone()), 52);
// Only delete projections for future periods (current week and beyond)
- const futurePeriodIds = periods.data?.map((p) => p.id) ?? [];
+ const futurePeriodIds = periods.map((p) => p.id);
const result = await deleteDemandProjections(client, {
itemId,
diff --git a/apps/erp/app/routes/x+/production+/projections.new.tsx b/apps/erp/app/routes/x+/production+/projections.new.tsx
index cc14e5711e..366b54662d 100644
--- a/apps/erp/app/routes/x+/production+/projections.new.tsx
+++ b/apps/erp/app/routes/x+/production+/projections.new.tsx
@@ -3,34 +3,28 @@ import { requirePermissions } from "@carbon/auth/auth.server";
import { flash } from "@carbon/auth/session.server";
import { validationError, validator } from "@carbon/form";
import { useRouteData } from "@carbon/remix";
-import { getLocalTimeZone, startOfWeek, today } from "@internationalized/date";
+import { getLocalTimeZone, today } from "@internationalized/date";
import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";
import { data, redirect, useNavigate } from "react-router";
import { demandProjectionValidator } from "~/modules/production/production.models";
import { upsertDemandProjections } from "~/modules/production/production.service";
import DemandProjectionForm from "~/modules/production/ui/Projection/DemandProjectionForm";
-import { getPeriods } from "~/modules/shared/shared.service";
+import { getOrCreatePeriods } from "~/modules/shared/shared.server";
import { path } from "~/utils/path";
const WEEKS_TO_PROJECT = 52;
export async function loader({ request }: LoaderFunctionArgs) {
- const { client } = await requirePermissions(request, {
+ await requirePermissions(request, {
create: "production"
});
- const startDate = startOfWeek(today(getLocalTimeZone()), "en-US");
- const endDate = startDate.add({ weeks: WEEKS_TO_PROJECT });
- const periods = await getPeriods(client, {
- startDate: startDate.toString(),
- endDate: endDate.toString()
- });
-
- if (periods.error) {
- throw new Error("Failed to load periods");
- }
+ const periods = await getOrCreatePeriods(
+ today(getLocalTimeZone()),
+ WEEKS_TO_PROJECT
+ );
- return { periods: periods.data ?? [] };
+ return { periods };
}
export async function action({ request }: ActionFunctionArgs) {
diff --git a/apps/erp/app/routes/x+/production+/projections.tsx b/apps/erp/app/routes/x+/production+/projections.tsx
index bd961528b9..8554318ed8 100644
--- a/apps/erp/app/routes/x+/production+/projections.tsx
+++ b/apps/erp/app/routes/x+/production+/projections.tsx
@@ -2,14 +2,14 @@ import { error } from "@carbon/auth";
import { requirePermissions } from "@carbon/auth/auth.server";
import { flash } from "@carbon/auth/session.server";
import { VStack } from "@carbon/react";
-import { getLocalTimeZone, startOfWeek, today } from "@internationalized/date";
+import { getLocalTimeZone, today } from "@internationalized/date";
import type { LoaderFunctionArgs } from "react-router";
import { Outlet, redirect, useLoaderData } from "react-router";
import { getProductionProjections } from "~/modules/production";
import DemandProjectionsTable from "~/modules/production/ui/Projection/DemandProjectionTable";
import { getLocationsList } from "~/modules/resources";
-import { getPeriods } from "~/modules/shared/shared.service";
+import { getOrCreatePeriods } from "~/modules/shared/shared.server";
import { getUserDefaults } from "~/modules/users/users.server";
import type { Handle } from "~/utils/handle";
@@ -67,24 +67,15 @@ export async function loader({ request }: LoaderFunctionArgs) {
locationId = locations.data?.[0].id as string;
}
- const startDate = startOfWeek(today(getLocalTimeZone()), "en-US");
- const endDate = startDate.add({ weeks: WEEKS_TO_PROJECT });
- const periods = await getPeriods(client, {
- startDate: startDate.toString(),
- endDate: endDate.toString()
- });
-
- if (periods.error) {
- redirect(
- path.to.authenticatedRoot,
- await flash(request, error(periods.error, "Failed to load periods"))
- );
- }
+ const periods = await getOrCreatePeriods(
+ today(getLocalTimeZone()),
+ WEEKS_TO_PROJECT
+ );
const projections = await getProductionProjections(
client,
locationId,
- periods.data?.map((p) => p.id) ?? [],
+ periods.map((p) => p.id),
companyId,
{
search,
@@ -109,7 +100,7 @@ export async function loader({ request }: LoaderFunctionArgs) {
projections: projections.data ?? [],
count: projections.data?.length ?? 0,
locationId,
- periods: periods.data ?? []
+ periods
};
}
diff --git a/apps/erp/app/routes/x+/purchase-order+/$orderId.finalize.tsx b/apps/erp/app/routes/x+/purchase-order+/$orderId.finalize.tsx
index 2e233077d9..43017601a1 100644
--- a/apps/erp/app/routes/x+/purchase-order+/$orderId.finalize.tsx
+++ b/apps/erp/app/routes/x+/purchase-order+/$orderId.finalize.tsx
@@ -4,11 +4,10 @@ import { getCarbonServiceRole } from "@carbon/auth/client.server";
import { flash } from "@carbon/auth/session.server";
import { PurchaseOrderEmail } from "@carbon/documents/email";
import { validationError, validator } from "@carbon/form";
-import type { sendEmailResendTask } from "@carbon/jobs/trigger/send-email-resend";
+import { trigger } from "@carbon/jobs";
import { NotificationEvent } from "@carbon/notifications";
import { renderAsync } from "@react-email/components";
import { FunctionRegion } from "@supabase/supabase-js";
-import { tasks } from "@trigger.dev/sdk";
import { parseAcceptLanguage } from "intl-parse-accept-language";
import type { ActionFunctionArgs } from "react-router";
import { redirect } from "react-router";
@@ -147,7 +146,7 @@ export async function action(args: ActionFunctionArgs) {
if (approverIds.length > 0) {
try {
- await tasks.trigger("notify", {
+ await trigger("notify", {
event: NotificationEvent.ApprovalRequested,
companyId,
documentId: orderId,
@@ -333,7 +332,7 @@ export async function action(args: ActionFunctionArgs) {
const text = await renderAsync(emailTemplate, { plainText: true });
await Promise.all([
- tasks.trigger<typeof sendEmailResendTask>("send-email-resend", {
+ trigger("send-email-resend", {
to: [buyer.data.email, supplier.data.contact.email],
cc: ccSelections?.length ? ccSelections : undefined,
from: buyer.data.email,
diff --git a/apps/erp/app/routes/x+/purchase-order+/$orderId.tsx b/apps/erp/app/routes/x+/purchase-order+/$orderId.tsx
index e101401ac3..2be7608ffe 100644
--- a/apps/erp/app/routes/x+/purchase-order+/$orderId.tsx
+++ b/apps/erp/app/routes/x+/purchase-order+/$orderId.tsx
@@ -4,12 +4,11 @@ import { getCarbonServiceRole } from "@carbon/auth/client.server";
import { flash } from "@carbon/auth/session.server";
import { PurchaseOrderEmail } from "@carbon/documents/email";
import { validationError, validator } from "@carbon/form";
-import type { sendEmailResendTask } from "@carbon/jobs/trigger/send-email-resend";
+import { trigger } from "@carbon/jobs";
import { NotificationEvent } from "@carbon/notifications";
import { VStack } from "@carbon/react";
import { renderAsync } from "@react-email/components";
import { FunctionRegion } from "@supabase/supabase-js";
-import { tasks } from "@trigger.dev/sdk";
import { parseAcceptLanguage } from "intl-parse-accept-language";
import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";
import { Outlet, redirect, useParams } from "react-router";
@@ -138,7 +137,7 @@ export async function action(args: ActionFunctionArgs) {
const requestedBy = approvalRequest.data?.requestedBy;
if (requestedBy && requestedBy !== userId) {
try {
- await tasks.trigger("notify", {
+ await trigger("notify", {
event:
decision === "Approved"
? NotificationEvent.ApprovalApproved
@@ -256,24 +255,21 @@ export async function action(args: ActionFunctionArgs) {
const html = await renderAsync(emailTemplate);
const text = await renderAsync(emailTemplate, { plainText: true });
- await tasks.trigger<typeof sendEmailResendTask>(
- "send-email-resend",
- {
- to: [buyer.data.email, supplierEmail],
- cc: ccSelections?.length ? ccSelections : undefined,
- from: buyer.data.email,
- subject: `Purchase Order ${purchaseOrder.data.purchaseOrderId} from ${company.data.name}`,
- html,
- text,
- attachments: [
- {
- content: Buffer.from(file).toString("base64"),
- filename: fileName
- }
- ],
- companyId
- }
- );
+ await trigger("send-email-resend", {
+ to: [buyer.data.email, supplierEmail],
+ cc: ccSelections?.length ? ccSelections : undefined,
+ from: buyer.data.email,
+ subject: `Purchase Order ${purchaseOrder.data.purchaseOrderId} from ${company.data.name}`,
+ html,
+ text,
+ attachments: [
+ {
+ content: Buffer.from(file).toString("base64"),
+ filename: fileName
+ }
+ ],
+ companyId
+ });
}
} catch (err) {
console.error("Failed to send email after approval:", err);
diff --git a/apps/erp/app/routes/x+/purchasing+/planning.tsx b/apps/erp/app/routes/x+/purchasing+/planning.tsx
index 1c32e0dc1b..0bbaf36306 100644
--- a/apps/erp/app/routes/x+/purchasing+/planning.tsx
+++ b/apps/erp/app/routes/x+/purchasing+/planning.tsx
@@ -2,14 +2,14 @@ import { error } from "@carbon/auth";
import { requirePermissions } from "@carbon/auth/auth.server";
import { flash } from "@carbon/auth/session.server";
import { ResizablePanel, ResizablePanelGroup, VStack } from "@carbon/react";
-import { getLocalTimeZone, startOfWeek, today } from "@internationalized/date";
+import { getLocalTimeZone, today } from "@internationalized/date";
import type { LoaderFunctionArgs } from "react-router";
import { Outlet, redirect, useLoaderData } from "react-router";
import type { PurchasingPlanningItem } from "~/modules/purchasing";
import { getPurchasingPlanning } from "~/modules/purchasing";
import PurchasingPlanningTable from "~/modules/purchasing/ui/Planning/PurchasingPlanningTable";
import { getLocationsList } from "~/modules/resources";
-import { getPeriods } from "~/modules/shared/shared.service";
+import { getOrCreatePeriods } from "~/modules/shared/shared.server";
import { getUserDefaults } from "~/modules/users/users.server";
import type { Handle } from "~/utils/handle";
import { path } from "~/utils/path";
@@ -66,26 +66,17 @@ export async function loader({ request }: LoaderFunctionArgs) {
locationId = locations.data?.[0].id as string;
}
- const startDate = startOfWeek(today(getLocalTimeZone()), "en-US");
- const endDate = startDate.add({ weeks: WEEKS_TO_PLAN });
- const periods = await getPeriods(client, {
- startDate: startDate.toString(),
- endDate: endDate.toString()
- });
-
- if (periods.error) {
- redirect(
- path.to.authenticatedRoot,
- await flash(request, error(periods.error, "Failed to load periods"))
- );
- }
+ const periods = await getOrCreatePeriods(
+ today(getLocalTimeZone()),
+ WEEKS_TO_PLAN
+ );
const [items] = await Promise.all([
getPurchasingPlanning(
client,
locationId,
companyId,
- periods.data?.map((p) => p.id) ?? [],
+ periods.map((p) => p.id),
{
search,
limit,
@@ -106,7 +97,7 @@ export async function loader({ request }: LoaderFunctionArgs) {
return {
items: (items.data ?? []) as PurchasingPlanningItem[],
count: items.count ?? 0,
- periods: periods.data ?? [],
+ periods,
locationId
};
}
diff --git a/apps/erp/app/routes/x+/purchasing-rfq+/$rfqId.finalize.tsx b/apps/erp/app/routes/x+/purchasing-rfq+/$rfqId.finalize.tsx
index dbd3e21c8c..4377cf3fab 100644
--- a/apps/erp/app/routes/x+/purchasing-rfq+/$rfqId.finalize.tsx
+++ b/apps/erp/app/routes/x+/purchasing-rfq+/$rfqId.finalize.tsx
@@ -2,10 +2,9 @@ import { assertIsPost, error, success } from "@carbon/auth";
import { requirePermissions } from "@carbon/auth/auth.server";
import { flash } from "@carbon/auth/session.server";
import { validationError, validator } from "@carbon/form";
-import type { sendEmailResendTask } from "@carbon/jobs/trigger/send-email-resend";
+import { trigger } from "@carbon/jobs";
import { tiptapToHTML } from "@carbon/utils";
import type { JSONContent } from "@tiptap/react";
-import { tasks } from "@trigger.dev/sdk";
import type { ActionFunctionArgs } from "react-router";
import { redirect } from "react-router";
import {
@@ -294,7 +293,7 @@ export async function action({ request, params }: ActionFunctionArgs) {
htmlParts.push(`<br><br>${emailSignature.replace(/\n/g, "<br>")}`);
- await tasks.trigger<typeof sendEmailResendTask>("send-email-resend", {
+ await trigger("send-email-resend", {
to: [user.data.email, email.contactEmail],
from: user.data.email,
subject: emailSubject,
diff --git a/apps/erp/app/routes/x+/quality+/risks.$id.tsx b/apps/erp/app/routes/x+/quality+/risks.$id.tsx
index 4d656e8cf2..f9b67384a9 100644
--- a/apps/erp/app/routes/x+/quality+/risks.$id.tsx
+++ b/apps/erp/app/routes/x+/quality+/risks.$id.tsx
@@ -2,8 +2,8 @@ import { error, success } from "@carbon/auth";
import { requirePermissions } from "@carbon/auth/auth.server";
import { flash } from "@carbon/auth/session.server";
import { validationError, validator } from "@carbon/form";
+import { trigger } from "@carbon/jobs";
import { NotificationEvent } from "@carbon/notifications";
-import { tasks } from "@trigger.dev/sdk";
import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";
import { data, redirect, useLoaderData, useNavigate } from "react-router";
import invariant from "tiny-invariant";
@@ -71,7 +71,7 @@ export const action = async ({ request }: ActionFunctionArgs) => {
const newAssignee = validation.data.assignee;
if (newAssignee && newAssignee !== previousAssignee) {
try {
- await tasks.trigger("notify", {
+ await trigger("notify", {
companyId,
documentId: riskId,
event: NotificationEvent.RiskAssignment,
diff --git a/apps/erp/app/routes/x+/quality+/risks.new.tsx b/apps/erp/app/routes/x+/quality+/risks.new.tsx
index 2f5268d81d..0b918cf52b 100644
--- a/apps/erp/app/routes/x+/quality+/risks.new.tsx
+++ b/apps/erp/app/routes/x+/quality+/risks.new.tsx
@@ -2,9 +2,9 @@ import { error, success } from "@carbon/auth";
import { requirePermissions } from "@carbon/auth/auth.server";
import { flash } from "@carbon/auth/session.server";
import { validationError, validator } from "@carbon/form";
+import { trigger } from "@carbon/jobs";
import { NotificationEvent } from "@carbon/notifications";
import { useDisclosure } from "@carbon/react";
-import { tasks } from "@trigger.dev/sdk";
import type { ActionFunctionArgs } from "react-router";
import { redirect } from "react-router";
import { riskRegisterValidator } from "~/modules/quality/quality.models";
@@ -48,7 +48,7 @@ export const action = async ({ request }: ActionFunctionArgs) => {
// Notify the assignee if one was set
if (d.assignee && result.data?.id) {
try {
- await tasks.trigger("notify", {
+ await trigger("notify", {
companyId,
documentId: result.data.id,
event: NotificationEvent.RiskAssignment,
diff --git a/apps/erp/app/routes/x+/quality-document+/$id.tsx b/apps/erp/app/routes/x+/quality-document+/$id.tsx
index 1520dde1b9..95c175ee34 100644
--- a/apps/erp/app/routes/x+/quality-document+/$id.tsx
+++ b/apps/erp/app/routes/x+/quality-document+/$id.tsx
@@ -4,9 +4,9 @@ import { getCarbonServiceRole } from "@carbon/auth/client.server";
import { flash } from "@carbon/auth/session.server";
import type { Database } from "@carbon/database";
import { validationError, validator } from "@carbon/form";
+import { trigger } from "@carbon/jobs";
import { NotificationEvent } from "@carbon/notifications";
import type { SupabaseClient } from "@supabase/supabase-js";
-import { tasks } from "@trigger.dev/sdk";
import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";
import { Outlet, redirect, useLoaderData, useParams } from "react-router";
import { PanelProvider, ResizablePanels } from "~/components/Layout/Panels";
@@ -181,7 +181,7 @@ export async function action({ request, params }: ActionFunctionArgs) {
const companyId = approvalRequest.data?.companyId;
if (requestedBy && companyId && requestedBy !== userId) {
try {
- await tasks.trigger("notify", {
+ await trigger("notify", {
event:
decision === "Approved"
? NotificationEvent.ApprovalApproved
diff --git a/apps/erp/app/routes/x+/quality-document+/update.tsx b/apps/erp/app/routes/x+/quality-document+/update.tsx
index ecd005169b..c2fc15c350 100644
--- a/apps/erp/app/routes/x+/quality-document+/update.tsx
+++ b/apps/erp/app/routes/x+/quality-document+/update.tsx
@@ -1,9 +1,9 @@
import { requirePermissions } from "@carbon/auth/auth.server";
import { getCarbonServiceRole } from "@carbon/auth/client.server";
import type { Database } from "@carbon/database";
+import { trigger } from "@carbon/jobs";
import { NotificationEvent } from "@carbon/notifications";
import type { SupabaseClient } from "@supabase/supabase-js";
-import { tasks } from "@trigger.dev/sdk";
import type { ActionFunctionArgs } from "react-router";
import { qualityDocumentStatus } from "~/modules/quality/quality.models";
import {
@@ -76,7 +76,7 @@ async function processToActive(
if (approverIds.length > 0) {
try {
- await tasks.trigger("notify", {
+ await trigger("notify", {
event: NotificationEvent.ApprovalRequested,
companyId,
documentId: doc.id,
diff --git a/apps/erp/app/routes/x+/quote+/$quoteId.drag.tsx b/apps/erp/app/routes/x+/quote+/$quoteId.drag.tsx
index 4d62227257..b3e4b37a4d 100644
--- a/apps/erp/app/routes/x+/quote+/$quoteId.drag.tsx
+++ b/apps/erp/app/routes/x+/quote+/$quoteId.drag.tsx
@@ -3,9 +3,8 @@ import { assertIsPost, error } from "@carbon/auth";
import { requirePermissions } from "@carbon/auth/auth.server";
import { getCarbonServiceRole } from "@carbon/auth/client.server";
import { flash } from "@carbon/auth/session.server";
-import type { modelThumbnailTask } from "@carbon/jobs/trigger/model-thumbnail";
+import { trigger } from "@carbon/jobs";
import { supportedModelTypes } from "@carbon/utils";
-import { tasks } from "@trigger.dev/sdk";
import { generateObject } from "ai";
import { nanoid } from "nanoid";
import type { ActionFunctionArgs } from "react-router";
@@ -273,7 +272,7 @@ export async function action({ request, params }: ActionFunctionArgs) {
);
}
- await tasks.trigger<typeof modelThumbnailTask>("model-thumbnail", {
+ await trigger("model-thumbnail", {
companyId,
modelId
});
diff --git a/apps/erp/app/routes/x+/quote+/$quoteId.finalize.tsx b/apps/erp/app/routes/x+/quote+/$quoteId.finalize.tsx
index 8525a25932..68c46e5fd1 100644
--- a/apps/erp/app/routes/x+/quote+/$quoteId.finalize.tsx
+++ b/apps/erp/app/routes/x+/quote+/$quoteId.finalize.tsx
@@ -3,10 +3,9 @@ import { requirePermissions } from "@carbon/auth/auth.server";
import { flash } from "@carbon/auth/session.server";
import { QuoteEmail } from "@carbon/documents/email";
import { validationError, validator } from "@carbon/form";
-import type { sendEmailResendTask } from "@carbon/jobs/trigger/send-email-resend"; // Assuming you have this task defined
+import { trigger } from "@carbon/jobs";
import { getLocalTimeZone, now } from "@internationalized/date";
import { renderAsync } from "@react-email/components";
-import { tasks } from "@trigger.dev/sdk";
import type { ActionFunctionArgs } from "react-router";
import { redirect } from "react-router";
import { upsertDocument } from "~/modules/documents";
@@ -192,7 +191,7 @@ export async function action(args: ActionFunctionArgs) {
const html = await renderAsync(emailTemplate);
const text = await renderAsync(emailTemplate, { plainText: true });
- await tasks.trigger<typeof sendEmailResendTask>("send-email-resend", {
+ await trigger("send-email-resend", {
to: [user.data.email, customerContact.data.contact!.email!],
cc: ccSelections?.length ? ccSelections : undefined,
from: user.data.email,
diff --git a/apps/erp/app/routes/x+/resources+/_index.tsx b/apps/erp/app/routes/x+/resources+/_index.tsx
index 531a7b7dfe..9bad4d2cd5 100644
--- a/apps/erp/app/routes/x+/resources+/_index.tsx
+++ b/apps/erp/app/routes/x+/resources+/_index.tsx
@@ -176,7 +176,7 @@ export default function MaintenanceDashboard() {
const selectedKpiData =
MaintenanceKPIs.find((k) => k.key === selectedKpi) || MaintenanceKPIs[0];
- // biome-ignore lint/correctness/useExhaustiveDependencies: deps are intentionally limited
+ // biome-ignore lint/correctness/useExhaustiveDependencies: ignore
useEffect(() => {
kpiFetcher.load(
`${path.to.api.resourcesKpi(
diff --git a/apps/erp/app/routes/x+/resources+/assignments.assignment.$assignmentId.tsx b/apps/erp/app/routes/x+/resources+/assignments.assignment.$assignmentId.tsx
index 318f8716e2..478791f6ec 100644
--- a/apps/erp/app/routes/x+/resources+/assignments.assignment.$assignmentId.tsx
+++ b/apps/erp/app/routes/x+/resources+/assignments.assignment.$assignmentId.tsx
@@ -2,8 +2,8 @@ import { error, success } from "@carbon/auth";
import { requirePermissions } from "@carbon/auth/auth.server";
import { flash } from "@carbon/auth/session.server";
import { validationError, validator } from "@carbon/form";
+import { trigger } from "@carbon/jobs";
import { NotificationEvent } from "@carbon/notifications";
-import { tasks } from "@trigger.dev/sdk";
import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";
import {
data,
@@ -131,7 +131,7 @@ export async function action({ request, params }: ActionFunctionArgs) {
// Send notifications to all users in the assigned groups
try {
- await tasks.trigger("notify", {
+ await trigger("notify", {
companyId,
documentId: assignmentId,
event: NotificationEvent.TrainingAssignment,
diff --git a/apps/erp/app/routes/x+/resources+/assignments.new.tsx b/apps/erp/app/routes/x+/resources+/assignments.new.tsx
index 94a936fae0..0e1a3258fd 100644
--- a/apps/erp/app/routes/x+/resources+/assignments.new.tsx
+++ b/apps/erp/app/routes/x+/resources+/assignments.new.tsx
@@ -2,8 +2,8 @@ import { error, success } from "@carbon/auth";
import { requirePermissions } from "@carbon/auth/auth.server";
import { flash } from "@carbon/auth/session.server";
import { validationError, validator } from "@carbon/form";
+import { trigger } from "@carbon/jobs";
import { NotificationEvent } from "@carbon/notifications";
-import { tasks } from "@trigger.dev/sdk";
import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";
import { data, redirect, useLoaderData, useNavigate } from "react-router";
import {
@@ -82,7 +82,7 @@ export async function action({ request }: ActionFunctionArgs) {
// Send notifications to all users in the assigned groups
if (result.data?.id) {
try {
- await tasks.trigger("notify", {
+ await trigger("notify", {
companyId,
documentId: result.data.id,
event: NotificationEvent.TrainingAssignment,
diff --git a/apps/erp/app/routes/x+/resources+/suggestions.new.tsx b/apps/erp/app/routes/x+/resources+/suggestions.new.tsx
index 08f744bba9..0cccccfccd 100644
--- a/apps/erp/app/routes/x+/resources+/suggestions.new.tsx
+++ b/apps/erp/app/routes/x+/resources+/suggestions.new.tsx
@@ -1,9 +1,8 @@
import { requirePermissions } from "@carbon/auth/auth.server";
import { getCarbonServiceRole } from "@carbon/auth/client.server";
import { validator } from "@carbon/form";
-import type { notifyTask } from "@carbon/jobs/trigger/notify";
+import { trigger } from "@carbon/jobs";
import { NotificationEvent } from "@carbon/notifications";
-import { tasks } from "@trigger.dev/sdk";
import type { ActionFunctionArgs } from "react-router";
import { getCompany } from "~/modules/settings";
import { suggestionValidator } from "~/modules/shared";
@@ -56,7 +55,7 @@ export async function action({ request }: ActionFunctionArgs) {
if (!company.error && company.data?.suggestionNotificationGroup?.length) {
try {
- await tasks.trigger<typeof notifyTask>("notify", {
+ await trigger("notify", {
companyId,
documentId: insertSuggestion.data.id,
event: NotificationEvent.SuggestionResponse,
diff --git a/apps/erp/app/routes/x+/sales-invoice+/$invoiceId.post.tsx b/apps/erp/app/routes/x+/sales-invoice+/$invoiceId.post.tsx
index 1a3532b9ec..afed5aacd9 100644
--- a/apps/erp/app/routes/x+/sales-invoice+/$invoiceId.post.tsx
+++ b/apps/erp/app/routes/x+/sales-invoice+/$invoiceId.post.tsx
@@ -3,10 +3,9 @@ import { requirePermissions } from "@carbon/auth/auth.server";
import { getCarbonServiceRole } from "@carbon/auth/client.server";
import { SalesInvoiceEmail } from "@carbon/documents/email";
import { validator } from "@carbon/form";
-import type { sendEmailResendTask } from "@carbon/jobs/trigger/send-email-resend";
+import { trigger } from "@carbon/jobs";
import { renderAsync } from "@react-email/components";
import { FunctionRegion } from "@supabase/supabase-js";
-import { tasks } from "@trigger.dev/sdk";
import { parseAcceptLanguage } from "intl-parse-accept-language";
import type { ActionFunctionArgs } from "react-router";
import { getPaymentTermsList } from "~/modules/accounting";
@@ -296,9 +295,8 @@ export async function action(args: ActionFunctionArgs) {
const html = await renderAsync(emailTemplate);
const text = await renderAsync(emailTemplate, { plainText: true });
- await tasks.trigger<typeof sendEmailResendTask>("send-email-resend", {
- // @ts-expect-error TS2322 - TODO: fix type
- to: [seller.data.email, customer.data.contact.email],
+ await trigger("send-email-resend", {
+ to: [seller.data.email, customer.data.contact.email!],
cc: ccSelections?.length ? ccSelections : undefined,
from: seller.data.email,
subject: `Invoice ${salesInvoice.data.invoiceId} from ${company.data.name}`,
diff --git a/apps/erp/app/routes/x+/sales-order+/$orderId.$lineId.job.tsx b/apps/erp/app/routes/x+/sales-order+/$orderId.$lineId.job.tsx
index 9ceca23174..72e472bbf2 100644
--- a/apps/erp/app/routes/x+/sales-order+/$orderId.$lineId.job.tsx
+++ b/apps/erp/app/routes/x+/sales-order+/$orderId.$lineId.job.tsx
@@ -3,9 +3,8 @@ import { requirePermissions } from "@carbon/auth/auth.server";
import { getCarbonServiceRole } from "@carbon/auth/client.server";
import { flash } from "@carbon/auth/session.server";
import { validationError, validator } from "@carbon/form";
-import type { recalculateTask } from "@carbon/jobs/trigger/recalculate";
+import { trigger } from "@carbon/jobs";
import { parseDate } from "@internationalized/date";
-import { tasks } from "@trigger.dev/sdk";
import type { ActionFunctionArgs } from "react-router";
import { redirect } from "react-router";
import { getDefaultShelfForJob } from "~/modules/inventory";
@@ -137,7 +136,7 @@ export async function action({ request, params }: ActionFunctionArgs) {
}
}
- await tasks.trigger<typeof recalculateTask>("recalculate", {
+ await trigger("recalculate", {
type: "jobRequirements",
id,
companyId,
diff --git a/apps/erp/app/routes/x+/sales-rfq+/$rfqId.drag.tsx b/apps/erp/app/routes/x+/sales-rfq+/$rfqId.drag.tsx
index 2b215ba709..a159c66e31 100644
--- a/apps/erp/app/routes/x+/sales-rfq+/$rfqId.drag.tsx
+++ b/apps/erp/app/routes/x+/sales-rfq+/$rfqId.drag.tsx
@@ -1,8 +1,7 @@
import { assertIsPost, error } from "@carbon/auth";
import { requirePermissions } from "@carbon/auth/auth.server";
import { flash } from "@carbon/auth/session.server";
-import type { modelThumbnailTask } from "@carbon/jobs/trigger/model-thumbnail";
-import { tasks } from "@trigger.dev/sdk";
+import { trigger } from "@carbon/jobs";
import { nanoid } from "nanoid";
import type { ActionFunctionArgs } from "react-router";
import { redirect } from "react-router";
@@ -131,7 +130,7 @@ export async function action({ request, params }: ActionFunctionArgs) {
);
}
- await tasks.trigger<typeof modelThumbnailTask>("model-thumbnail", {
+ await trigger("model-thumbnail", {
companyId,
modelId
});
diff --git a/apps/erp/app/routes/x+/sales-rfq+/$rfqId.status.tsx b/apps/erp/app/routes/x+/sales-rfq+/$rfqId.status.tsx
index 7aae4c6459..9d7f33c728 100644
--- a/apps/erp/app/routes/x+/sales-rfq+/$rfqId.status.tsx
+++ b/apps/erp/app/routes/x+/sales-rfq+/$rfqId.status.tsx
@@ -1,9 +1,8 @@
import { assertIsPost, error, success } from "@carbon/auth";
import { requirePermissions } from "@carbon/auth/auth.server";
import { flash } from "@carbon/auth/session.server";
-import type { notifyTask } from "@carbon/jobs/trigger/notify";
+import { trigger } from "@carbon/jobs";
import { NotificationEvent } from "@carbon/notifications";
-import { tasks } from "@trigger.dev/sdk";
import type { ActionFunctionArgs } from "react-router";
import { redirect } from "react-router";
import { salesRFQStatusType, updateSalesRFQStatus } from "~/modules/sales";
@@ -40,7 +39,7 @@ export async function action({ request, params }: ActionFunctionArgs) {
const rfqReadyNotificationGroup =
companySettings.data.rfqReadyNotificationGroup;
try {
- await tasks.trigger<typeof notifyTask>("notify", {
+ await trigger("notify", {
companyId: companySettings.data.id,
documentId: id,
event: NotificationEvent.SalesRfqReady,
diff --git a/apps/erp/app/routes/x+/schedule+/dates.update.tsx b/apps/erp/app/routes/x+/schedule+/dates.update.tsx
index b4c8040f6b..9b5d0ebb49 100644
--- a/apps/erp/app/routes/x+/schedule+/dates.update.tsx
+++ b/apps/erp/app/routes/x+/schedule+/dates.update.tsx
@@ -2,7 +2,7 @@ import { requirePermissions } from "@carbon/auth/auth.server";
import { validator } from "@carbon/form";
import type { ActionFunctionArgs } from "react-router";
import { scheduleJobUpdateValidator } from "~/modules/production/production.models";
-import { triggerJobReschedule } from "~/modules/production/production.server";
+import { triggerJobSchedule } from "~/modules/production/production.service";
export async function action({ request }: ActionFunctionArgs) {
const { client, userId, companyId } = await requirePermissions(request, {
@@ -51,7 +51,7 @@ export async function action({ request }: ActionFunctionArgs) {
// Trigger background job rescheduling
try {
- await triggerJobReschedule(validation.data.id, companyId, userId);
+ await triggerJobSchedule(validation.data.id, companyId, userId);
} catch (rescheduleError) {
// Log error but don't fail the request - reschedule can retry
console.error("Failed to trigger job reschedule:", rescheduleError);
diff --git a/apps/erp/app/routes/x+/supplier+/$supplierId.approval.tsx b/apps/erp/app/routes/x+/supplier+/$supplierId.approval.tsx
index cc7129fa46..e1fbd6740c 100644
--- a/apps/erp/app/routes/x+/supplier+/$supplierId.approval.tsx
+++ b/apps/erp/app/routes/x+/supplier+/$supplierId.approval.tsx
@@ -3,9 +3,9 @@ import { requirePermissions } from "@carbon/auth/auth.server";
import { getCarbonServiceRole } from "@carbon/auth/client.server";
import { flash } from "@carbon/auth/session.server";
import { validationError, validator } from "@carbon/form";
+import { trigger } from "@carbon/jobs";
import { NotificationEvent } from "@carbon/notifications";
import { getLocalTimeZone, today } from "@internationalized/date";
-import { tasks } from "@trigger.dev/sdk";
import type { ActionFunctionArgs } from "react-router";
import { redirect } from "react-router";
import { supplierApprovalDecisionValidator } from "~/modules/purchasing";
@@ -84,7 +84,7 @@ export async function action({ request, params }: ActionFunctionArgs) {
if (approverIds.length > 0) {
try {
- await tasks.trigger("notify", {
+ await trigger("notify", {
event: NotificationEvent.ApprovalRequested,
companyId,
documentId: supplierId,
@@ -210,7 +210,7 @@ export async function action({ request, params }: ActionFunctionArgs) {
const requestCompanyId = approvalRequest.data?.companyId;
if (requestedBy && requestCompanyId && requestedBy !== userId) {
try {
- await tasks.trigger("notify", {
+ await trigger("notify", {
event:
decision === "Approved"
? NotificationEvent.ApprovalApproved
diff --git a/apps/erp/app/routes/x+/supplier-quote+/$id.send.tsx b/apps/erp/app/routes/x+/supplier-quote+/$id.send.tsx
index 272e110032..8c8ed0020f 100644
--- a/apps/erp/app/routes/x+/supplier-quote+/$id.send.tsx
+++ b/apps/erp/app/routes/x+/supplier-quote+/$id.send.tsx
@@ -2,8 +2,7 @@ import { assertIsPost, error, success } from "@carbon/auth";
import { requirePermissions } from "@carbon/auth/auth.server";
import { flash } from "@carbon/auth/session.server";
import { validationError, validator } from "@carbon/form";
-import type { sendEmailResendTask } from "@carbon/jobs/trigger/send-email-resend";
-import { tasks } from "@trigger.dev/sdk";
+import { trigger } from "@carbon/jobs";
import type { ActionFunctionArgs } from "react-router";
import { redirect } from "react-router";
import {
@@ -186,7 +185,7 @@ export async function action(args: ActionFunctionArgs) {
},\n\nPlease provide pricing and lead time(s) for the linked quote:`;
const emailSignature = `Thanks,\n${user.data.firstName} ${user.data.lastName}\n${company.data.name}`;
- await tasks.trigger<typeof sendEmailResendTask>("send-email-resend", {
+ await trigger("send-email-resend", {
to: [user.data.email, supplierContact.data.contact?.email ?? ""],
cc: ccSelections?.length ? ccSelections : undefined,
from: user.data.email,
diff --git a/apps/erp/app/routes/x+/users+/bulk-edit-permissions.tsx b/apps/erp/app/routes/x+/users+/bulk-edit-permissions.tsx
index 188b1a8266..f9a29c1b66 100644
--- a/apps/erp/app/routes/x+/users+/bulk-edit-permissions.tsx
+++ b/apps/erp/app/routes/x+/users+/bulk-edit-permissions.tsx
@@ -2,8 +2,7 @@ import { assertIsPost, error, success } from "@carbon/auth";
import { requirePermissions } from "@carbon/auth/auth.server";
import { flash } from "@carbon/auth/session.server";
import { validationError, validator } from "@carbon/form";
-import type { updatePermissionsTask } from "@carbon/jobs/trigger/update-permissions";
-import { tasks } from "@trigger.dev/sdk";
+import { batchTrigger } from "@carbon/jobs";
import type { ActionFunctionArgs } from "react-router";
import { redirect } from "react-router";
import {
@@ -58,10 +57,7 @@ export async function action({ request }: ActionFunctionArgs) {
}
}));
- await tasks.batchTrigger<typeof updatePermissionsTask>(
- "update-permissions",
- batchPayload
- );
+ await batchTrigger("update-permissions", batchPayload);
throw redirect(
`${path.to.employeeAccounts}?${getParams(request)}`,
diff --git a/apps/erp/app/routes/x+/users+/deactivate.tsx b/apps/erp/app/routes/x+/users+/deactivate.tsx
index c202960ae9..59d91f09e8 100644
--- a/apps/erp/app/routes/x+/users+/deactivate.tsx
+++ b/apps/erp/app/routes/x+/users+/deactivate.tsx
@@ -3,8 +3,7 @@ import { requirePermissions } from "@carbon/auth/auth.server";
import { flash } from "@carbon/auth/session.server";
import { deactivateUser } from "@carbon/auth/users.server";
import { validationError, validator } from "@carbon/form";
-import type { userAdminTask } from "@carbon/jobs/trigger/user-admin";
-import { tasks } from "@trigger.dev/sdk";
+import { batchTrigger } from "@carbon/jobs";
import type { ActionFunctionArgs } from "react-router";
import { redirect } from "react-router";
import { deactivateUsersValidator } from "~/modules/users";
@@ -40,10 +39,7 @@ export async function action({ request }: ActionFunctionArgs) {
}));
try {
- await tasks.batchTrigger<typeof userAdminTask>(
- "user-admin",
- batchPayload
- );
+ await batchTrigger("user-admin", batchPayload);
throw redirect(
safeRedirect(redirectTo),
await flash(
diff --git a/apps/erp/app/routes/x+/users+/resend-invite.tsx b/apps/erp/app/routes/x+/users+/resend-invite.tsx
index 35b0bed53a..4416352f8c 100644
--- a/apps/erp/app/routes/x+/users+/resend-invite.tsx
+++ b/apps/erp/app/routes/x+/users+/resend-invite.tsx
@@ -4,9 +4,9 @@ import { getCarbonServiceRole } from "@carbon/auth/client.server";
import { flash } from "@carbon/auth/session.server";
import { InviteEmail } from "@carbon/documents/email";
import { validationError, validator } from "@carbon/form";
+import { batchTrigger } from "@carbon/jobs";
import { sendEmail } from "@carbon/lib/resend.server";
import { render } from "@react-email/components";
-import { tasks } from "@trigger.dev/sdk";
import { nanoid } from "nanoid";
import type { ActionFunctionArgs } from "react-router";
import { data } from "react-router";
@@ -95,14 +95,18 @@ export async function action({ request }: ActionFunctionArgs) {
await flash(request, success("Successfully resent invite"))
);
} else {
+ const location = request.headers.get("x-vercel-ip-city") ?? "Unknown";
+ const ip = request.headers.get("x-forwarded-for") ?? "127.0.0.1";
try {
- await tasks.batchTrigger(
+ await batchTrigger(
"user-admin",
users.map((id) => ({
payload: {
id,
- type: "resend",
- companyId
+ type: "resend" as const,
+ companyId,
+ location,
+ ip
}
}))
);
diff --git a/apps/erp/app/routes/x+/users+/revoke-invite.tsx b/apps/erp/app/routes/x+/users+/revoke-invite.tsx
index a2f10ba5d1..6072c4ba10 100644
--- a/apps/erp/app/routes/x+/users+/revoke-invite.tsx
+++ b/apps/erp/app/routes/x+/users+/revoke-invite.tsx
@@ -4,10 +4,9 @@ import { getCarbonServiceRole } from "@carbon/auth/client.server";
import { flash } from "@carbon/auth/session.server";
import { deactivateUser } from "@carbon/auth/users.server";
import { validationError, validator } from "@carbon/form";
-import type { userAdminTask } from "@carbon/jobs/trigger/user-admin";
+import { batchTrigger } from "@carbon/jobs";
import { updateSubscriptionQuantityForCompany } from "@carbon/stripe/stripe.server";
import { Edition } from "@carbon/utils";
-import { tasks } from "@trigger.dev/sdk";
import type { ActionFunctionArgs } from "react-router";
import { data } from "react-router";
import { revokeInviteValidator } from "~/modules/users";
@@ -66,7 +65,7 @@ export async function action({ request }: ActionFunctionArgs) {
}
}));
- await tasks.batchTrigger<typeof userAdminTask>("user-admin", batchPayload);
+ await batchTrigger("user-admin", batchPayload);
}
const deleteInvites = await serviceRole
diff --git a/apps/erp/package.json b/apps/erp/package.json
index 2dd4ef1fb4..ce35b5204e 100644
--- a/apps/erp/package.json
+++ b/apps/erp/package.json
@@ -16,6 +16,7 @@
"@carbon/documents": "*",
"@carbon/form": "*",
"@carbon/jobs": "*",
+ "inngest": "^3.52.7",
"@carbon/kv": "*",
"@carbon/lib": "*",
"@carbon/notifications": "*",
@@ -48,8 +49,7 @@
"@tanstack/react-query": "^5.62.0",
"@tanstack/react-table": "^8.9.3",
"@tanstack/react-virtual": "^3.5.0",
- "@trigger.dev/react-hooks": "4.0.6",
- "@trigger.dev/sdk": "4.0.6",
+ "@upstash/ratelimit": "^2.0.5",
"@vercel/analytics": "^1.2.2",
"@vercel/react-router": "^1.2.4",
"@visx/responsive": "^2.1.0",
@@ -105,7 +105,6 @@
},
"devDependencies": {
"@carbon/config": "*",
- "@trigger.dev/build": "4.0.6",
"@types/d3": "^7.4.0",
"@types/nprogress": "^0.2.0",
"@types/papaparse": "^5.3.14",
diff --git a/apps/mes/app/components/JobOperation/components/IssueMaterialModal.tsx b/apps/mes/app/components/JobOperation/components/IssueMaterialModal.tsx
index f799b512b1..8615c2c99f 100644
--- a/apps/mes/app/components/JobOperation/components/IssueMaterialModal.tsx
+++ b/apps/mes/app/components/JobOperation/components/IssueMaterialModal.tsx
@@ -1688,7 +1688,7 @@ function useSerialNumbers(itemId?: string) {
const serialNumbersFetcher =
useFetcher<Awaited<ReturnType<typeof getSerialNumbersForItem>>>();
- // biome-ignore lint/correctness/useExhaustiveDependencies: deps are intentionally limited
+ // biome-ignore lint/correctness/useExhaustiveDependencies: ignore
useEffect(() => {
if (itemId) {
serialNumbersFetcher.load(path.to.api.serialNumbers(itemId));
diff --git a/apps/mes/app/components/JobOperation/components/MaintenanceDispatch.tsx b/apps/mes/app/components/JobOperation/components/MaintenanceDispatch.tsx
index 4e55f93fe0..f86fe02efc 100644
--- a/apps/mes/app/components/JobOperation/components/MaintenanceDispatch.tsx
+++ b/apps/mes/app/components/JobOperation/components/MaintenanceDispatch.tsx
@@ -123,7 +123,7 @@ export function MaintenanceDispatch({
toast.success("Maintenance dispatch created");
onClose();
}
- // biome-ignore lint/correctness/useExhaustiveDependencies: onClose is stable in practice
+ // biome-ignore lint/correctness/useExhaustiveDependencies: ignore
}, [fetcher.state, fetcher.data, onClose]);
const onUploadImage = async (file: File) => {
diff --git a/apps/mes/app/routes/x+/dispatch.new.tsx b/apps/mes/app/routes/x+/dispatch.new.tsx
index 3e3d9d97f8..ea4ab136fa 100644
--- a/apps/mes/app/routes/x+/dispatch.new.tsx
+++ b/apps/mes/app/routes/x+/dispatch.new.tsx
@@ -3,10 +3,9 @@ import { requirePermissions } from "@carbon/auth/auth.server";
import { getCarbonServiceRole } from "@carbon/auth/client.server";
import { flash } from "@carbon/auth/session.server";
import { validationError, validator } from "@carbon/form";
-import type { notifyTask } from "@carbon/jobs/trigger/notify";
+import { trigger } from "@carbon/jobs";
import { NotificationEvent } from "@carbon/notifications";
import { getLocalTimeZone, now } from "@internationalized/date";
-import { tasks } from "@trigger.dev/sdk";
import type { ActionFunctionArgs } from "react-router";
import { data, redirect } from "react-router";
import { maintenanceDispatchValidator } from "~/services/models";
@@ -173,7 +172,7 @@ export async function action({ request }: ActionFunctionArgs) {
// Send notification if there's a notification group configured
if (notificationGroup.length > 0) {
- await tasks.trigger<typeof notifyTask>("notify", {
+ await trigger("notify", {
companyId,
documentId: insertDispatch.data.id,
event: NotificationEvent.MaintenanceDispatchCreated,
diff --git a/apps/mes/app/routes/x+/suggestion.tsx b/apps/mes/app/routes/x+/suggestion.tsx
index 8f873a0b32..a02edf5001 100644
--- a/apps/mes/app/routes/x+/suggestion.tsx
+++ b/apps/mes/app/routes/x+/suggestion.tsx
@@ -1,9 +1,8 @@
import { requirePermissions } from "@carbon/auth/auth.server";
import { getCarbonServiceRole } from "@carbon/auth/client.server";
import { validator } from "@carbon/form";
-import type { notifyTask } from "@carbon/jobs/trigger/notify";
+import { trigger } from "@carbon/jobs";
import { NotificationEvent } from "@carbon/notifications";
-import { tasks } from "@trigger.dev/sdk";
import type { ActionFunctionArgs } from "react-router";
import { suggestionValidator } from "~/services/models";
@@ -59,7 +58,7 @@ export async function action({ request }: ActionFunctionArgs) {
if (!company.error && company.data?.suggestionNotificationGroup?.length) {
try {
- await tasks.trigger<typeof notifyTask>("notify", {
+ await trigger("notify", {
companyId,
documentId: insertSuggestion.data.id,
event: NotificationEvent.SuggestionResponse,
diff --git a/ci/package.json b/ci/package.json
index 29fe120bb9..42b035a88a 100644
--- a/ci/package.json
+++ b/ci/package.json
@@ -10,6 +10,7 @@
"scripts": {
"ci:migrations": "tsx src/migrations.ts",
"ci:deploy": "tsx src/deploy.ts",
+ "ci:jobs": "tsx src/jobs.ts",
"test": "echo \"no tests\""
}
}
diff --git a/ci/src/deploy.ts b/ci/src/deploy.ts
index 744708f28a..232390a0d9 100644
--- a/ci/src/deploy.ts
+++ b/ci/src/deploy.ts
@@ -64,9 +64,8 @@ export type Workspace = {
stripe_bypass_company_ids: string | null;
stripe_secret_key: string | null;
stripe_webhook_secret: string | null;
- trigger_api_url: string | null;
- trigger_project_id: string | null;
- trigger_secret_key: string | null;
+ inngest_signing_key: string | null;
+ inngest_event_key: string | null;
url_erp: string | null;
url_mes: string | null;
xero_client_id: string | null;
@@ -146,9 +145,8 @@ async function deploy(): Promise<void> {
stripe_bypass_company_ids,
stripe_secret_key,
stripe_webhook_secret,
- trigger_api_url,
- trigger_project_id,
- trigger_secret_key,
+ inngest_signing_key,
+ inngest_event_key,
redis_url,
url_erp,
url_mes,
@@ -225,18 +223,13 @@ async function deploy(): Promise<void> {
continue;
}
- if (!trigger_api_url) {
- console.log(`🔴🍳 Missing Trigger api url for ${workspace.id}`);
+ if (!inngest_signing_key) {
+ console.log(`🔴🍳 Missing Inngest signing key for ${workspace.id}`);
continue;
}
- if (!trigger_project_id) {
- console.log(`🔴🍳 Missing Trigger project id for ${workspace.id}`);
- continue;
- }
-
- if (!trigger_secret_key) {
- console.log(`🔴🍳 Missing Trigger secret key for ${workspace.id}`);
+ if (!inngest_event_key) {
+ console.log(`🔴🍳 Missing Inngest event key for ${workspace.id}`);
continue;
}
@@ -275,6 +268,8 @@ async function deploy(): Promise<void> {
DOMAIN: domain_name,
EXCHANGE_RATES_API_KEY: exchange_rates_api_key ?? undefined,
GOOGLE_PLACES_API_KEY: google_places_api_key ?? undefined,
+ INNGEST_EVENT_KEY: inngest_event_key,
+ INNGEST_SIGNING_KEY: inngest_signing_key,
JIRA_CLIENT_ID: jira_client_id ?? undefined,
JIRA_CLIENT_SECRET: jira_client_secret ?? undefined,
JIRA_OAUTH_REDIRECT_URL: jira_oauth_redirect_url ?? undefined,
@@ -305,9 +300,6 @@ async function deploy(): Promise<void> {
SUPABASE_DB_URL: database_connection_pooler_url,
SUPABASE_SERVICE_ROLE_KEY: service_role_key,
SUPABASE_URL: database_url,
- TRIGGER_API_URL: trigger_api_url,
- TRIGGER_PROJECT_ID: trigger_project_id,
- TRIGGER_SECRET_KEY: trigger_secret_key,
URL_ERP: url_erp,
URL_MES: url_mes,
VERCEL_ENV: "production",
diff --git a/ci/src/jobs.ts b/ci/src/jobs.ts
new file mode 100644
index 0000000000..33ee041d90
--- /dev/null
+++ b/ci/src/jobs.ts
@@ -0,0 +1,53 @@
+import { $ } from "execa";
+
+import { client } from "./client";
+
+type Workspace = {
+ id: number;
+ url_erp: string | null;
+};
+
+async function jobs(): Promise<void> {
+ console.log("✅ 🌱 Starting background jobs sync");
+
+ const { data: workspaces, error } = await client
+ .from("workspaces")
+ .select("id, url_erp");
+
+ if (error) {
+ console.error("🔴 🍳 Failed to fetch workspaces", error);
+ process.exit(1);
+ }
+
+ let hasErrors = false;
+
+ for (const workspace of workspaces as Workspace[]) {
+ const { id, url_erp } = workspace;
+
+ if (!url_erp) {
+ console.log(`⏭️ Skipping workspace ${id} — no url_erp`);
+ continue;
+ }
+
+ try {
+ console.log(`✅ 🔄 Syncing jobs for workspace ${id} (${url_erp})`);
+ await $`curl -X PUT ${url_erp}/api/inngest`;
+ console.log(`✅ 🐓 Successfully synced jobs for workspace ${id}`);
+ } catch (err) {
+ console.error(`🔴 🍳 Failed to sync jobs for workspace ${id}`, err);
+ hasErrors = true;
+ }
+ }
+
+ if (hasErrors) {
+ console.error("🔴 Jobs sync completed with errors");
+ process.exit(1);
+ }
+
+ console.log("✅ All jobs synced successfully");
+}
+
+jobs().catch((error) => {
+ console.error("🔴 Unexpected error during jobs sync", error);
+ process.exit(1);
+});
diff --git a/llm/cache/mcp-tools-reference.md b/llm/cache/mcp-tools-reference.md
index 7c54876198..e9f3024e38 100644
--- a/llm/cache/mcp-tools-reference.md
+++ b/llm/cache/mcp-tools-reference.md
@@ -1,74 +1,7 @@
# Carbon ERP MCP Tools Reference
> Auto-generated by scripts/generate-mcp.ts
-> Total: 1016 tools across 15 modules
-
-## account (10 tools)
-
-### account_deleteUserAttributeValue (DESTRUCTIVE)
-delete user attribute value
-**Parameters:**
-- `args`: {
- userId: string;
- userAttributeId: string;
- userAttributeValueId: string;
- }
-
-### account_getAccount (READ)
-get account
-**Parameters:**
-- `id`: string
-
-### account_getAttributes (READ)
-get attributes
-**Parameters:**
-- `isPublic`: boolean
-
-### account_getPrivateAttributes (READ)
-get private attributes
-**Parameters:** none (context auto-filled)
-
-### account_getPublicAttributes (READ)
-get public attributes
-**Parameters:** none (context auto-filled)
-
-### account_getAllAttributeCategories (READ)
-get all attribute categories
-**Parameters:** none (context auto-filled)
-
-### account_getAttributeCategoryWithValues (READ)
-get attribute category with values
-**Parameters:**
-- `categoryId`: string
-
-### account_updateAvatar (WRITE)
-update avatar
-**Parameters:**
-- `avatarUrl`: string | null
-
-### account_updatePublicAccount (WRITE)
-update public account
-**Parameters:**
-- `account`: {
- id: string;
- firstName: string;
- lastName: string;
- about?: string;
- }
-
-### account_upsertUserAttributeValue (WRITE)
-upsert user attribute value
-**Parameters:**
-- `update`: {
- userAttributeValueId?: string | undefined;
- userAttributeId: string;
- value: boolean | string | number;
- type: string;
- userId: string;
- updatedBy: string;
- }
-
----
+> Total: 1017 tools across 15 modules
## accounting (39 tools)
@@ -345,1363 +278,1123 @@ upsert payment term
---
-## documents (14 tools)
+## settings (68 tools)
-### documents_deleteDocument (DESTRUCTIVE)
-delete document
+### settings_getAccountsPayableBillingAddress (READ)
+get accounts payable billing address
+**Parameters:** none (context auto-filled)
+
+### settings_getAccountsReceivableBillingAddress (READ)
+get accounts receivable billing address
+**Parameters:** none (context auto-filled)
+
+### settings_updateAccountsPayableBillingAddress (WRITE)
+update accounts payable billing address
**Parameters:**
-- `id`: string
+- `data`: z.infer<typeof accountsPayableBillingAddressValidator>
-### documents_deleteDocumentFavorite (DESTRUCTIVE)
-delete document favorite
+### settings_updateAccountsReceivableBillingAddress (WRITE)
+update accounts receivable billing address
**Parameters:**
-- `id`: string
+- `data`: z.infer<typeof accountsReceivableBillingAddressValidator>
-### documents_deleteDocumentLabel (DESTRUCTIVE)
-delete document label
+### settings_deleteApiKey (DESTRUCTIVE)
+delete api key
**Parameters:**
- `id`: string
-- `label`: string
-### documents_getDocument (READ)
-get document
+### settings_deleteWebhook (DESTRUCTIVE)
+delete webhook
**Parameters:**
-- `documentId`: string
+- `id`: string
-### documents_getDocuments (READ)
-get documents
+### settings_deactivateWebhooks (WRITE)
+deactivate webhooks
+**Parameters:** none (context auto-filled)
+
+### settings_getApiKeys (READ)
+get api keys
**Parameters:**
-- `args`: GenericQueryFilters & {
- search: string | null;
- favorite?: boolean;
- recent?: boolean;
- createdBy?: string;
- active: boolean;
- }
+- `args`: GenericQueryFilters & { search: string | null } (optional)
-### documents_getDocumentExtensions (READ)
-get document extensions
+### settings_getCompanies (READ)
+get companies
**Parameters:** none (context auto-filled)
-### documents_getDocumentLabels (READ)
-get document labels
+### settings_getCompany (READ)
+get company
**Parameters:** none (context auto-filled)
-### documents_insertDocumentFavorite (WRITE)
-insert document favorite
-**Parameters:**
-- `id`: string
+### settings_getCompanyPlan (READ)
+get company plan
+**Parameters:** none (context auto-filled)
-### documents_insertDocumentLabel (WRITE)
-insert document label
-**Parameters:**
-- `id`: string
-- `label`: string
+### settings_getCompanySettings (READ)
+get company settings
+**Parameters:** none (context auto-filled)
-### documents_moveDocumentToTrash (WRITE)
-move document to trash
+### settings_getCompanyIntegrations (READ)
+get company integrations
+**Parameters:** none (context auto-filled)
+
+### settings_getConfig (READ)
+get config
+**Parameters:** none (context auto-filled)
+
+### settings_getCurrentSequence (READ)
+get current sequence
**Parameters:**
-- `id`: string
+- `table`: string
-### documents_restoreDocument (WRITE)
-restore document
+### settings_getCustomField (READ)
+get custom field
**Parameters:**
- `id`: string
-### documents_upsertDocument (WRITE)
-upsert document
+### settings_getCustomFields (READ)
+get custom fields
**Parameters:**
-- `document`: | (Omit<z.infer<typeof documentValidator>, "id"> & {
- path: string;
- size: number;
- companyId: string;
- createdBy: string;
- } & SourceDocumentData)
- | (Omit<z.infer<typeof documentValidator>, "id"> & {
- id: string;
- updatedBy: string;
- })
+- `table`: string
-### documents_updateDocumentFavorite (WRITE)
-update document favorite
+### settings_getCustomFieldsTables (READ)
+get custom fields tables
**Parameters:**
-- `args`: {
- id: string;
- favorite: boolean;
- userId: string;
+- `args`: GenericQueryFilters & {
+ search: string | null;
}
-### documents_updateDocumentLabels (WRITE)
-update document labels
+### settings_getIntegration (READ)
+get integration
**Parameters:**
-- `document`: z.infer<typeof documentLabelsValidator> & {
- userId: string;
- }
-
----
+- `id`: string
-## inventory (72 tools)
+### settings_getIntegrations (READ)
+get integrations
+**Parameters:** none (context auto-filled)
-### inventory_deleteBatchProperty (DESTRUCTIVE)
-delete batch property
-**Parameters:**
-- `id`: string
+### settings_getKanbanOutputSetting (READ)
+get kanban output setting
+**Parameters:** none (context auto-filled)
-### inventory_deleteKanban (DESTRUCTIVE)
-delete kanban
+### settings_getPlanById (READ)
+get plan by id
**Parameters:**
-- `kanbanId`: string
+- `planId`: string
-### inventory_deleteReceipt (DESTRUCTIVE)
-delete receipt
-**Parameters:**
-- `receiptId`: string
+### settings_getPlans (READ)
+get plans
+**Parameters:** none (context auto-filled)
-### inventory_deleteReceiptLine (DESTRUCTIVE)
-delete receipt line
+### settings_getNextSequence (READ)
+get next sequence
**Parameters:**
-- `receiptLineId`: string
+- `table`: string
-### inventory_deleteShelf (DESTRUCTIVE)
-delete shelf
+### settings_getSequence (READ)
+get sequence
**Parameters:**
-- `shelfId`: string
+- `table`: string
-### inventory_deleteShipment (DESTRUCTIVE)
-delete shipment
+### settings_getSequences (READ)
+get sequences
**Parameters:**
-- `shipmentId`: string
+- `args`: GenericQueryFilters & {
+ search: string | null;
+ }
-### inventory_deleteShipmentLine (DESTRUCTIVE)
-delete shipment line
+### settings_getSequencesList (READ)
+get sequences list
**Parameters:**
-- `shipmentLineId`: string
+- `table`: string
-### inventory_deleteShippingMethod (DESTRUCTIVE)
-delete shipping method
-**Parameters:**
-- `shippingMethodId`: string
+### settings_getTerms (READ)
+get terms
+**Parameters:** none (context auto-filled)
-### inventory_deleteStockTransfer (DESTRUCTIVE)
-delete stock transfer
+### settings_getWebhook (READ)
+get webhook
**Parameters:**
-- `stockTransferId`: string
+- `id`: string
-### inventory_deleteStockTransferLine (DESTRUCTIVE)
-delete stock transfer line
-**Parameters:**
-- `stockTransferLineId`: string
+### settings_getWebhookTables (READ)
+get webhook tables
+**Parameters:** none (context auto-filled)
-### inventory_deleteWarehouseTransfer (DESTRUCTIVE)
-delete warehouse transfer
+### settings_getWebhooks (READ)
+get webhooks
**Parameters:**
-- `transferId`: string
+- `args`: GenericQueryFilters & { search: string | null } (optional)
-### inventory_deleteWarehouseTransferLine (DESTRUCTIVE)
-delete warehouse transfer line
+### settings_insertCompany (WRITE)
+insert company
**Parameters:**
-- `transferLineId`: string
+- `company`: z.infer<typeof companyValidator>
+- `ownerId`: string (optional)
-### inventory_getItemLedgerPage (READ)
-get item ledger page
+### settings_updateCompanyPlan (WRITE)
+update company plan
**Parameters:**
-- `itemId`: string
-- `locationId`: string
-- `sortDescending`: boolean (optional)
-- `page`: number (optional)
+- `data`: {
+ companyId: string;
+ stripeCustomerId: string;
+ stripeSubscriptionId: string;
+ stripeSubscriptionStatus: string;
+ subscriptionStartDate: string;
+ }
-### inventory_getBatchProperties (READ)
-get batch properties
-**Parameters:**
-- `itemIds`: string[]
+### settings_seedCompany (WRITE)
+seed company
+**Parameters:** none (context auto-filled)
-### inventory_getInventoryItems (READ)
-get inventory items
+### settings_updateCompany (WRITE)
+update company
**Parameters:**
-- `locationId`: string
-- `args`: GenericQueryFilters & {
- search: string | null;
+- `company`: Partial<z.infer<typeof companyValidator>> & {
+ updatedBy: string;
}
-### inventory_getInventoryItemsCount (READ)
-get inventory items count
+### settings_updateKanbanOutputSetting (WRITE)
+update kanban output setting
**Parameters:**
-- `locationId`: string
-- `args`: GenericQueryFilters & {
- search: string | null;
- }
+- `kanbanOutput`: (typeof kanbanOutputTypes)[number]
-### inventory_getKanbans (READ)
-get kanbans
+### settings_updateMetricSettings (WRITE)
+update metric settings
**Parameters:**
-- `locationId`: string
-- `args`: GenericQueryFilters & {
- search: string | null;
- }
+- `useMetric`: boolean
-### inventory_getKanban (READ)
-get kanban
+### settings_upsertApiKey (WRITE)
+upsert api key
**Parameters:**
-- `kanbanId`: string
+- `apiKey`: | (Omit<z.infer<typeof apiKeyValidator>, "id" | "scopes" | "expiresAt"> & {
+ createdBy: string;
+ companyId: string;
+ scopes: Record<string, string[]>;
+ expiresAt?: string;
+ rawKey: string;
+ keyHash: string;
+ keyPreview: string;
+ })
+ | (Omit<z.infer<typeof apiKeyValidator>, "id" | "scopes" | "expiresAt"> & {
+ id: string;
+ scopes: Record<string, string[]>;
+ expiresAt?: string;
+ })
-### inventory_getStockTransfer (READ)
-get stock transfer
+### settings_updateDigitalQuoteSetting (WRITE)
+update digital quote setting
**Parameters:**
-- `stockTransferId`: string
+- `digitalQuoteEnabled`: boolean
+- `digitalQuoteNotificationGroup`: string[]
+- `digitalQuoteIncludesPurchaseOrders`: boolean
-### inventory_getStockTransferLine (READ)
-get stock transfer line
+### settings_updateLogoDark (WRITE)
+update logo dark
**Parameters:**
-- `stockTransferLineId`: string
+- `logoDark`: string | null
-### inventory_getStockTransferLines (READ)
-get stock transfer lines
+### settings_updateLogoLight (WRITE)
+update logo light
**Parameters:**
-- `stockTransferId`: string
+- `logoLight`: string | null
-### inventory_getStockTransferTracking (READ)
-get stock transfer tracking
+### settings_updateLogoDarkIcon (WRITE)
+update logo dark icon
**Parameters:**
-- `stockTransferId`: string
+- `logoDarkIcon`: string | null
-### inventory_getStockTransfers (READ)
-get stock transfers
+### settings_updateLogoLightIcon (WRITE)
+update logo light icon
**Parameters:**
-- `args`: GenericQueryFilters & {
- search: string | null;
- locationId: string | null;
- }
+- `logoLightIcon`: string | null
-### inventory_getDefaultShelfOrShelfWithHighestQuantity (READ)
-get default shelf or shelf with highest quantity
+### settings_updateMaterialGeneratedIdsSetting (WRITE)
+update material generated ids setting
**Parameters:**
-- `itemId`: string
-- `locationId`: string
+- `materialGeneratedIds`: boolean
-### inventory_getReceipts (READ)
-get receipts
+### settings_updateMaterialUnitsSetting (WRITE)
+update material units setting
**Parameters:**
-- `args`: GenericQueryFilters & {
- search: string | null;
- }
+- `useMetric`: boolean
-### inventory_getReceipt (READ)
-get receipt
+### settings_updateProductLabelSize (WRITE)
+update product label size
**Parameters:**
-- `receiptId`: string
+- `productLabelSize`: string
-### inventory_getReceiptLines (READ)
-get receipt lines
+### settings_updatePurchasingPdfThumbnails (WRITE)
+update purchasing pdf thumbnails
**Parameters:**
-- `receiptId`: string
+- `includeThumbnailsOnPurchasingPdfs`: boolean
-### inventory_getReceiptTracking (READ)
-get receipt tracking
+### settings_updateSalesPdfThumbnails (WRITE)
+update sales pdf thumbnails
**Parameters:**
-- `receiptId`: string
+- `includeThumbnailsOnSalesPdfs`: boolean
-### inventory_getReceiptLineTracking (READ)
-get receipt line tracking
+### settings_updateJobTravelerWorkInstructions (WRITE)
+update job traveler work instructions
**Parameters:**
-- `receiptLineId`: string
+- `jobTravelerIncludeWorkInstructions`: boolean
-### inventory_getReceiptFiles (READ)
-get receipt files
+### settings_updateTimeCardSetting (WRITE)
+update time card setting
**Parameters:**
-- `lineIds`: string[]
+- `timeCardEnabled`: boolean
-### inventory_getSerialNumbersForItem (READ)
-get serial numbers for item
+### settings_updateConsoleSetting (WRITE)
+update console setting
**Parameters:**
-- `args`: {
- itemId: string;
- companyId: string;
- }
+- `consoleEnabled`: boolean
-### inventory_getBatchNumbersForItem (READ)
-get batch numbers for item
+### settings_updateRfqReadySetting (WRITE)
+update rfq ready setting
**Parameters:**
-- `args`: {
- itemId: string;
- companyId: string;
- isReadOnly?: boolean;
- }
-
-### inventory_getShelvesList (READ)
-get shelves list
-**Parameters:** none (context auto-filled)
+- `rfqReadyNotificationGroup`: string[]
-### inventory_getShelvesListForLocation (READ)
-get shelves list for location
+### settings_updateSuggestionNotificationSetting (WRITE)
+update suggestion notification setting
**Parameters:**
-- `locationId`: string
+- `suggestionNotificationGroup`: string[]
-### inventory_getShelves (READ)
-get shelves
+### settings_updateMaintenanceDispatchNotificationSettings (WRITE)
+update maintenance dispatch notification settings
**Parameters:**
-- `locationId`: string
-- `args`: GenericQueryFilters & {
- search: string | null;
+- `settings`: {
+ maintenanceDispatchNotificationGroup?: string[];
+ qualityDispatchNotificationGroup?: string[];
+ operationsDispatchNotificationGroup?: string[];
+ otherDispatchNotificationGroup?: string[];
}
-### inventory_getShelf (READ)
-get shelf
+### settings_updateSupplierQuoteNotificationSetting (WRITE)
+update supplier quote notification setting
**Parameters:**
-- `shelfId`: string
+- `supplierQuoteNotificationGroup`: string[]
-### inventory_getShipments (READ)
-get shipments
+### settings_updatePurchasePriceUpdateTimingSetting (WRITE)
+update purchase price update timing setting
**Parameters:**
-- `args`: GenericQueryFilters & {
- search: string | null;
- }
+- `purchasePriceUpdateTiming`: (typeof purchasePriceUpdateTimingTypes)[number]
-### inventory_getShipment (READ)
-get shipment
+### settings_updateLeadTimesOnReceiptSetting (WRITE)
+update lead times on receipt setting
**Parameters:**
-- `shipmentId`: string
+- `updateLeadTimesOnReceipt`: boolean
-### inventory_getShipmentLines (READ)
-get shipment lines
+### settings_updateSupplierApprovalSetting (WRITE)
+update supplier approval setting
**Parameters:**
-- `shipmentId`: string
+- `supplierApproval`: boolean
-### inventory_getShipmentLinesWithDetails (READ)
-get shipment lines with details
+### settings_updateAccountsPayableAddressSetting (WRITE)
+update accounts payable address setting
**Parameters:**
-- `shipmentId`: string
+- `accountsPayableAddress`: boolean
-### inventory_getShipmentFiles (READ)
-get shipment files
+### settings_updateAccountsReceivableAddressSetting (WRITE)
+update accounts receivable address setting
**Parameters:**
-- `lineIds`: string[]
+- `accountsReceivableAddress`: boolean
-### inventory_getShipmentRelatedItems (READ)
-get shipment related items
+### settings_updateAccountsPayableEmail (WRITE)
+update accounts payable email
**Parameters:**
-- `shipmentId`: string
-- `sourceDocumentId`: string
+- `accountsPayableEmail`: string | undefined
-### inventory_getShipmentTracking (READ)
-get shipment tracking
-**Parameters:**
-- `shipmentId`: string
-
-### inventory_getShipmentLineTracking (READ)
-get shipment line tracking
-**Parameters:**
-- `shipmentLineId`: string
-
-### inventory_getShippingMethod (READ)
-get shipping method
+### settings_updateAccountsReceivableEmail (WRITE)
+update accounts receivable email
**Parameters:**
-- `shippingMethodId`: string
+- `accountsReceivableEmail`: string | undefined
-### inventory_getShippingMethods (READ)
-get shipping methods
+### settings_updateDefaultSupplierCc (WRITE)
+update default supplier cc
**Parameters:**
-- `args`: GenericQueryFilters & {
- search: string | null;
- }
-
-### inventory_getShippingMethodsList (READ)
-get shipping methods list
-**Parameters:** none (context auto-filled)
-
-### inventory_getShippingTermsList (READ)
-get shipping terms list
-**Parameters:** none (context auto-filled)
+- `defaultSupplierCc`: string[]
-### inventory_getTrackedEntities (READ)
-get tracked entities
+### settings_updateDefaultCustomerCc (WRITE)
+update default customer cc
**Parameters:**
-- `args`: GenericQueryFilters & {
- search: string | null;
- }
+- `defaultCustomerCc`: string[]
-### inventory_getTrackedEntitiesByMakeMethodId (READ)
-get tracked entities by make method id
+### settings_updateQuoteLineCategoryMarkups (WRITE)
+update quote line category markups
**Parameters:**
-- `jobMakeMethodId`: string
+- `quoteLineCategoryMarkups`: Record<string, number>
-### inventory_getTrackedEntity (READ)
-get tracked entity
+### settings_updateSequence (WRITE)
+update sequence
**Parameters:**
-- `trackedEntityId`: string
+- `table`: string
+- `sequence`: Partial<z.infer<typeof sequenceValidator>> & {
+ updatedBy: string;
+ }
-### inventory_getTrackedEntitiesByOperationId (READ)
-get tracked entities by operation id
+### settings_updateIntegrationMetadata (WRITE)
+update integration metadata
**Parameters:**
-- `operationId`: string
+- `integrationId`: string
+- `metadata`: any
-### inventory_getWarehouseTransfers (READ)
-get warehouse transfers
+### settings_upsertWebhook (WRITE)
+upsert webhook
**Parameters:**
-- `args`: GenericQueryFilters & {
- search: string | null;
- }
+- `webhook`: | (Omit<z.infer<typeof webhookValidator>, "id"> & {
+ createdBy: string;
+ companyId: string;
+ })
+ | (Omit<z.infer<typeof apiKeyValidator>, "id"> & {
+ id: string;
+ })
-### inventory_getWarehouseTransfer (READ)
-get warehouse transfer
-**Parameters:**
-- `transferId`: string
+---
-### inventory_getWarehouseTransferLine (READ)
-get warehouse transfer line
-**Parameters:**
-- `transferId`: string
-- `lineId`: string
+## sales (150 tools)
-### inventory_getWarehouseTransferLines (READ)
-get warehouse transfer lines
+### sales_closeSalesOrder (WRITE)
+close sales order
**Parameters:**
-- `transferId`: string
+- `salesOrderId`: string
-### inventory_insertManualInventoryAdjustment (WRITE)
-insert manual inventory adjustment
+### sales_convertSalesRfqToQuote (WRITE)
+convert sales rfq to quote
**Parameters:**
-- `inventoryAdjustment`: z.infer<typeof inventoryAdjustmentValidator> & {
+- `payload`: {
+ id: string;
companyId: string;
- createdBy: string;
+ userId: string;
}
-### inventory_updateBatchPropertyOrder (WRITE)
-update batch property order
+### sales_convertQuoteToOrder (WRITE)
+convert quote to order
**Parameters:**
-- `data`: Omit<
- z.infer<typeof batchPropertyOrderValidator>,
- "batchPropertyGroupId"
- > & {
- batchPropertyGroupId?: string | null;
- updatedBy: string;
+- `payload`: {
+ id: string;
+ selectedLines: z.infer<typeof selectedLinesValidator>;
+ companyId: string;
+ purchaseOrderNumber?: string;
+ userId: string;
+ digitalQuoteAcceptedBy?: string;
+ digitalQuoteAcceptedByEmail?: string;
}
-### inventory_updateStockTransferStatus (WRITE)
-update stock transfer status
+### sales_copyQuoteLine (WRITE)
+copy quote line
**Parameters:**
-- `args`: {
- id: string;
- status: Database["public"]["Enums"]["stockTransferStatus"];
- assignee?: string | null;
- completedAt: string | null;
- updatedBy: string;
+- `payload`: z.infer<typeof getMethodValidator> & {
+ companyId: string;
+ userId: string;
}
-### inventory_upsertBatchProperty (WRITE)
-upsert batch property
+### sales_copyQuote (WRITE)
+copy quote
**Parameters:**
-- `batchProperty`: z.infer<typeof batchPropertyValidator> & {
+- `payload`: Omit<z.infer<typeof getMethodValidator>, "type"> & {
companyId: string;
userId: string;
}
-### inventory_upsertKanban (WRITE)
-upsert kanban
+### sales_deleteCustomer (DESTRUCTIVE)
+delete customer
**Parameters:**
-- `kanban`: | (Omit<z.infer<typeof kanbanValidator>, "id"> & {
- companyId: string;
- createdBy: string;
- customFields?: Json;
- })
- | (Omit<z.infer<typeof kanbanValidator>, "id"> & {
- id: string;
- updatedBy: string;
- customFields?: Json;
- })
+- `customerId`: string
-### inventory_upsertReceipt (WRITE)
-upsert receipt
+### sales_deleteCustomerContact (DESTRUCTIVE)
+delete customer contact
**Parameters:**
-- `receipt`: | (Omit<z.infer<typeof receiptValidator>, "id" | "receiptId"> & {
- receiptId: string;
- companyId: string;
- createdBy: string;
- customFields?: Json;
- })
- | (Omit<z.infer<typeof receiptValidator>, "id" | "receiptId"> & {
- id: string;
- receiptId: string;
- updatedBy: string;
- customFields?: Json;
- })
+- `customerId`: string
+- `customerContactId`: string
-### inventory_upsertShelf (WRITE)
-upsert shelf
+### sales_deleteCustomerLocation (DESTRUCTIVE)
+delete customer location
**Parameters:**
-- `shelf`: | (Omit<z.infer<typeof shelfValidator>, "id"> & {
- companyId: string;
- createdBy: string;
- customFields?: Json;
- })
- | (Omit<z.infer<typeof shelfValidator>, "id"> & {
- id: string;
- updatedBy: string;
- customFields?: Json;
- })
+- `customerId`: string
+- `customerLocationId`: string
-### inventory_upsertShippingMethod (WRITE)
-upsert shipping method
+### sales_deleteCustomerStatus (DESTRUCTIVE)
+delete customer status
**Parameters:**
-- `shippingMethod`: | (Omit<z.infer<typeof shippingMethodValidator>, "id"> & {
- companyId: string;
- createdBy: string;
- customFields?: Json;
- })
- | (Omit<z.infer<typeof shippingMethodValidator>, "id"> & {
- id: string;
- updatedBy: string;
- customFields?: Json;
- })
+- `customerStatusId`: string
-### inventory_upsertShipment (WRITE)
-upsert shipment
+### sales_deleteCustomerType (DESTRUCTIVE)
+delete customer type
**Parameters:**
-- `shipment`: | (Omit<z.infer<typeof shipmentValidator>, "id" | "shipmentId"> & {
- shipmentId: string;
- companyId: string;
- createdBy: string;
- customFields?: Json;
- })
- | (Omit<z.infer<typeof shipmentValidator>, "id" | "shipmentId"> & {
- id: string;
- shipmentId: string;
- updatedBy: string;
- customFields?: Json;
- })
+- `customerTypeId`: string
-### inventory_upsertStockTransfer (WRITE)
-upsert stock transfer
+### sales_deleteNoQuoteReason (DESTRUCTIVE)
+delete no quote reason
**Parameters:**
-- `stockTransfer`: | {
- locationId: string;
- stockTransferId: string;
- companyId: string;
- createdBy: string;
- customFields?: Json;
- }
- | {
- id: string;
- locationId: string;
- stockTransferId: string;
- companyId: string;
- updatedBy: string;
- customFields?: Json;
- }
+- `noQuoteReasonId`: string
-### inventory_upsertStockTransferLine (WRITE)
-upsert stock transfer line
+### sales_deleteQuote (DESTRUCTIVE)
+delete quote
**Parameters:**
-- `stockTransferLine`: | (Omit<z.infer<typeof stockTransferLineValidator>, "id"> & {
- companyId: string;
- createdBy: string;
- })
- | (Omit<z.infer<typeof stockTransferLineValidator>, "id"> & {
- id: string;
- updatedBy: string;
- })
+- `quoteId`: string
-### inventory_upsertStockTransferLines (WRITE)
-upsert stock transfer lines
+### sales_deleteQuoteMakeMethod (DESTRUCTIVE)
+delete quote make method
**Parameters:**
-- `args`: {
- lines: z.infer<typeof stockTransferValidator>["lines"];
- stockTransferId: string;
- companyId: string;
- createdBy: string;
- }
+- `quoteMakeMethodId`: string
-### inventory_upsertWarehouseTransfer (WRITE)
-upsert warehouse transfer
+### sales_deleteQuoteLine (DESTRUCTIVE)
+delete quote line
**Parameters:**
-- `transfer`: | (Omit<z.infer<typeof warehouseTransferValidator>, "id" | "transferId"> & {
- transferId: string;
- companyId: string;
- createdBy: string;
- customFields?: Json;
- })
- | (Omit<z.infer<typeof warehouseTransferValidator>, "id" | "transferId"> & {
- id: string;
- transferId: string;
- updatedBy: string;
- customFields?: Json;
- })
+- `quoteLineId`: string
-### inventory_updateWarehouseTransferStatus (WRITE)
-update warehouse transfer status
+### sales_deleteQuoteMaterial (DESTRUCTIVE)
+delete quote material
**Parameters:**
-- `transferId`: string
-- `status`: Database["public"]["Tables"]["warehouseTransfer"]["Row"]["status"]
+- `quoteMaterialId`: string
-### inventory_upsertWarehouseTransferLine (WRITE)
-upsert warehouse transfer line
+### sales_deleteQuoteOperation (DESTRUCTIVE)
+delete quote operation
**Parameters:**
-- `line`: | Database["public"]["Tables"]["warehouseTransferLine"]["Insert"]
- | (Database["public"]["Tables"]["warehouseTransferLine"]["Update"] & {
- id: string;
- })
+- `quoteOperationId`: string
-### inventory_getDefaultShelfForJob (READ)
-get default shelf for job
+### sales_deleteQuoteOperationStep (DESTRUCTIVE)
+delete quote operation step
**Parameters:**
-- `itemId`: string
-- `locationId`: string
-
----
-
-## invoicing (28 tools)
+- `id`: string
-### invoicing_createPurchaseInvoiceFromPurchaseOrder (WRITE)
-create purchase invoice from purchase order
+### sales_deleteQuoteOperationParameter (DESTRUCTIVE)
+delete quote operation parameter
**Parameters:**
-- `purchaseOrderId`: string
+- `id`: string
-### invoicing_createSalesInvoiceFromSalesOrder (WRITE)
-create sales invoice from sales order
+### sales_deleteQuoteOperationTool (DESTRUCTIVE)
+delete quote operation tool
**Parameters:**
-- `salesOrderId`: string
+- `id`: string
-### invoicing_createSalesInvoiceFromShipment (WRITE)
-create sales invoice from shipment
+### sales_deleteSalesOrder (DESTRUCTIVE)
+delete sales order
**Parameters:**
-- `shipmentId`: string
+- `salesOrderId`: string
-### invoicing_deletePurchaseInvoice (DESTRUCTIVE)
-delete purchase invoice
+### sales_deleteSalesOrderLine (DESTRUCTIVE)
+delete sales order line
**Parameters:**
-- `purchaseInvoiceId`: string
+- `salesOrderLineId`: string
-### invoicing_deletePurchaseInvoiceLine (DESTRUCTIVE)
-delete purchase invoice line
+### sales_deleteSalesRFQ (DESTRUCTIVE)
+delete sales r f q
**Parameters:**
-- `purchaseInvoiceLineId`: string
+- `salesRfqId`: string
-### invoicing_deleteSalesInvoice (DESTRUCTIVE)
-delete sales invoice
+### sales_deleteSalesRFQLine (DESTRUCTIVE)
+delete sales r f q line
**Parameters:**
-- `salesInvoiceId`: string
+- `salesRFQLineId`: string
-### invoicing_deleteSalesInvoiceLine (DESTRUCTIVE)
-delete sales invoice line
+### sales_getConfigurationParametersByQuoteLineId (READ)
+get configuration parameters by quote line id
**Parameters:**
-- `salesInvoiceLineId`: string
+- `quoteLineId`: string
-### invoicing_getPurchaseInvoice (READ)
-get purchase invoice
+### sales_getCustomer (READ)
+get customer
**Parameters:**
-- `purchaseInvoiceId`: string
+- `customerId`: string
-### invoicing_getPurchaseInvoices (READ)
-get purchase invoices
+### sales_getCustomerContact (READ)
+get customer contact
**Parameters:**
-- `args`: GenericQueryFilters & {
- search: string | null;
- supplierId: string | null;
- }
+- `customerContactId`: string
-### invoicing_getPurchaseInvoiceDelivery (READ)
-get purchase invoice delivery
+### sales_getCustomerContacts (READ)
+get customer contacts
**Parameters:**
-- `purchaseInvoiceId`: string
+- `customerId`: string
-### invoicing_getPurchaseInvoiceLines (READ)
-get purchase invoice lines
+### sales_getCustomerLocation (READ)
+get customer location
**Parameters:**
-- `purchaseInvoiceId`: string
+- `customerLocationId`: string
-### invoicing_getPurchaseInvoiceLine (READ)
-get purchase invoice line
+### sales_getCustomerLocations (READ)
+get customer locations
**Parameters:**
-- `purchaseInvoiceLineId`: string
+- `customerId`: string
-### invoicing_getSalesInvoice (READ)
-get sales invoice
+### sales_getCustomerPayment (READ)
+get customer payment
**Parameters:**
-- `salesInvoiceId`: string
+- `customerId`: string
-### invoicing_getSalesInvoiceCustomerDetails (READ)
-get sales invoice customer details
+### sales_getCustomerShipping (READ)
+get customer shipping
**Parameters:**
-- `salesInvoiceId`: string
+- `customerId`: string
-### invoicing_getSalesInvoices (READ)
-get sales invoices
+### sales_getCustomers (READ)
+get customers
**Parameters:**
- `args`: GenericQueryFilters & {
search: string | null;
- customerId: string | null;
}
-### invoicing_getSalesInvoiceShipment (READ)
-get sales invoice shipment
+### sales_getCustomersList (READ)
+get customers list
+**Parameters:** none (context auto-filled)
+
+### sales_getCustomerStatus (READ)
+get customer status
**Parameters:**
-- `salesInvoiceId`: string
+- `customerStatusId`: string
-### invoicing_getSalesInvoiceLines (READ)
-get sales invoice lines
+### sales_getCustomerStatuses (READ)
+get customer statuses
**Parameters:**
-- `salesInvoiceId`: string
+- `args`: GenericQueryFilters & { search: string | null } (optional)
-### invoicing_getSalesInvoiceLine (READ)
-get sales invoice line
+### sales_getCustomerStatusesList (READ)
+get customer statuses list
+**Parameters:** none (context auto-filled)
+
+### sales_getCustomerType (READ)
+get customer type
**Parameters:**
-- `salesInvoiceLineId`: string
+- `customerTypeId`: string
-### invoicing_updatePurchaseInvoiceExchangeRate (WRITE)
-update purchase invoice exchange rate
+### sales_getCustomerTypes (READ)
+get customer types
**Parameters:**
-- `data`: {
- id: string;
- exchangeRate: number;
- }
+- `args`: GenericQueryFilters & { search: string | null } (optional)
-### invoicing_updatePurchaseInvoiceStatus (WRITE)
-update purchase invoice status
+### sales_getCustomerTypesList (READ)
+get customer types list
+**Parameters:** none (context auto-filled)
+
+### sales_getExternalSalesOrderLines (READ)
+get external sales order lines
**Parameters:**
-- `update`: {
- id: string;
- status: (typeof purchaseInvoiceStatusType)[number];
- assignee: null | undefined;
- updatedBy: string;
- }
+- `customerId`: string
+- `args`: GenericQueryFilters & { search: string | null }
-### invoicing_updateSalesInvoiceExchangeRate (WRITE)
-update sales invoice exchange rate
+### sales_getModelByQuoteLineId (READ)
+get model by quote line id
**Parameters:**
-- `data`: {
- id: string;
- exchangeRate: number;
- }
+- `quoteLineId`: string
-### invoicing_updateSalesInvoiceStatus (WRITE)
-update sales invoice status
+### sales_getNoQuoteReasonsList (READ)
+get no quote reasons list
+**Parameters:** none (context auto-filled)
+
+### sales_getNoQuoteReason (READ)
+get no quote reason
**Parameters:**
-- `update`: {
- id: string;
- status: (typeof salesInvoiceStatusType)[number];
- assignee: null | undefined;
- updatedBy: string;
- }
+- `noQuoteReasonId`: string
-### invoicing_upsertPurchaseInvoice (WRITE)
-upsert purchase invoice
+### sales_getNoQuoteReasons (READ)
+get no quote reasons
**Parameters:**
-- `purchaseInvoice`: | (Omit<z.infer<typeof purchaseInvoiceValidator>, "id" | "invoiceId"> & {
- invoiceId: string;
- companyId: string;
- createdBy: string;
- customFields?: Json;
- })
- | (Omit<z.infer<typeof purchaseInvoiceValidator>, "id" | "invoiceId"> & {
- id: string;
- invoiceId: string;
- updatedBy: string;
- customFields?: Json;
- })
+- `args`: GenericQueryFilters & { search: string | null } (optional)
-### invoicing_upsertPurchaseInvoiceDelivery (WRITE)
-upsert purchase invoice delivery
+### sales_getOpportunity (READ)
+get opportunity
**Parameters:**
-- `purchaseInvoiceDelivery`: | (z.infer<typeof purchaseInvoiceDeliveryValidator> & {
- companyId: string;
- createdBy: string;
- customFields?: Json;
- })
- | (z.infer<typeof purchaseInvoiceDeliveryValidator> & {
- id: string;
- updatedBy: string;
- customFields?: Json;
- })
+- `opportunityId`: string | null
-### invoicing_upsertPurchaseInvoiceLine (WRITE)
-upsert purchase invoice line
+### sales_getOpportunityDocuments (READ)
+get opportunity documents
**Parameters:**
-- `purchaseInvoiceLine`: | (Omit<z.infer<typeof purchaseInvoiceLineValidator>, "id"> & {
- companyId: string;
- createdBy: string;
- customFields?: Json;
- })
- | (Omit<z.infer<typeof purchaseInvoiceLineValidator>, "id"> & {
- id: string;
- updatedBy: string;
- customFields?: Json;
- })
-
-### invoicing_upsertSalesInvoice (WRITE)
-upsert sales invoice
-**Parameters:**
-- `salesInvoice`: | (Omit<z.infer<typeof salesInvoiceValidator>, "id" | "invoiceId"> & {
- invoiceId: string;
- companyId: string;
- createdBy: string;
- customFields?: Json;
- })
- | (Omit<z.infer<typeof salesInvoiceValidator>, "id" | "invoiceId"> & {
- id: string;
- invoiceId: string;
- updatedBy: string;
- customFields?: Json;
- })
+- `opportunityId`: string
-### invoicing_upsertSalesInvoiceShipment (WRITE)
-upsert sales invoice shipment
+### sales_getOpportunityLineDocuments (READ)
+get opportunity line documents
**Parameters:**
-- `salesInvoiceShipment`: | (z.infer<typeof salesInvoiceShipmentValidator> & {
- companyId: string;
- createdBy: string;
- customFields?: Json;
- })
- | (z.infer<typeof salesInvoiceShipmentValidator> & {
- id: string;
- updatedBy: string;
- customFields?: Json;
- })
+- `lineId`: string
+- `itemId`: string | null (optional)
-### invoicing_upsertSalesInvoiceLine (WRITE)
-upsert sales invoice line
+### sales_getQuote (READ)
+get quote
**Parameters:**
-- `salesInvoiceLine`: | (Omit<z.infer<typeof salesInvoiceLineValidator>, "id"> & {
- companyId: string;
- createdBy: string;
- customFields?: Json;
- })
- | (Omit<z.infer<typeof salesInvoiceLineValidator>, "id"> & {
- id: string;
- updatedBy: string;
- customFields?: Json;
- })
-
----
+- `quoteId`: string
-## items (136 tools)
+### sales_getQuoteFavorites (READ)
+get quote favorites
+**Parameters:** none (context auto-filled)
-### items_activateMethodVersion (WRITE)
-activate method version
+### sales_getQuotes (READ)
+get quotes
**Parameters:**
-- `payload`: {
- id: string;
- companyId: string;
- userId: string;
+- `args`: GenericQueryFilters & {
+ search: string | null;
}
-### items_copyItem (WRITE)
-copy item
-**Parameters:**
-- `args`: z.infer<typeof getMethodValidator> & {
- companyId: string;
- userId: string;
- }
+### sales_getQuotesList (READ)
+get quotes list
+**Parameters:** none (context auto-filled)
-### items_copyMakeMethod (WRITE)
-copy make method
+### sales_getQuoteAssembliesByLine (READ)
+get quote assemblies by line
**Parameters:**
-- `args`: z.infer<typeof getMethodValidator> & {
- companyId: string;
- userId: string;
- }
+- `quoteLineId`: string
-### items_createRevision (WRITE)
-create revision
+### sales_getQuoteAssemblies (READ)
+get quote assemblies
**Parameters:**
-- `args`: {
- item: NonNullable<Awaited<ReturnType<typeof getItem>>["data"]>;
- revision: string;
- createdBy: string;
- }
+- `quoteId`: string
-### items_deleteConfigurationParameter (DESTRUCTIVE)
-delete configuration parameter
+### sales_getQuoteCustomerDetails (READ)
+get quote customer details
**Parameters:**
-- `id`: string
+- `quoteId`: string
-### items_deleteConfigurationRule (DESTRUCTIVE)
-delete configuration rule
+### sales_getQuoteLine (READ)
+get quote line
**Parameters:**
-- `field`: string
-- `itemId`: string
+- `quoteLineId`: string
-### items_deleteItemCustomerPart (DESTRUCTIVE)
-delete item customer part
+### sales_getQuoteLinesList (READ)
+get quote lines list
**Parameters:**
-- `id`: string
+- `quoteId`: string
-### items_deleteConfigurationParameterGroup (DESTRUCTIVE)
-delete configuration parameter group
+### sales_getQuoteMakeMethod (READ)
+get quote make method
**Parameters:**
-- `id`: string
+- `quoteMakeMethodId`: string
-### items_deleteItem (DESTRUCTIVE)
-delete item
+### sales_getRootQuoteMakeMethod (READ)
+get root quote make method
**Parameters:**
-- `id`: string
+- `quoteLineId`: string
-### items_deleteItemPostingGroup (DESTRUCTIVE)
-delete item posting group
+### sales_getQuoteMethodTrees (READ)
+get quote method trees
**Parameters:**
-- `id`: string
+- `quoteId`: string
-### items_deleteMaterialDimension (DESTRUCTIVE)
-delete material dimension
+### sales_getQuoteMethodTreeArray (READ)
+get quote method tree array
**Parameters:**
-- `id`: string
+- `quoteId`: string
-### items_deleteMaterialFinish (DESTRUCTIVE)
-delete material finish
+### sales_getQuoteLines (READ)
+get quote lines
**Parameters:**
-- `id`: string
+- `quoteId`: string
-### items_deleteMaterialForm (DESTRUCTIVE)
-delete material form
+### sales_getQuoteByExternalId (READ)
+get quote by external id
**Parameters:**
-- `id`: string
+- `externalId`: string
-### items_deleteMaterialGrade (DESTRUCTIVE)
-delete material grade
+### sales_getQuoteLinePrices (READ)
+get quote line prices
**Parameters:**
-- `id`: string
+- `quoteLineId`: string
-### items_deleteMaterialSubstance (DESTRUCTIVE)
-delete material substance
+### sales_getQuoteLinePricesByQuoteId (READ)
+get quote line prices by quote id
**Parameters:**
-- `id`: string
+- `quoteId`: string
-### items_deleteMethodMaterial (DESTRUCTIVE)
-delete method material
+### sales_getQuoteLinePricesByItemId (READ)
+get quote line prices by item id
**Parameters:**
-- `id`: string
+- `itemId`: string
+- `currentQuoteId`: string
-### items_assertMethodOperationIsDraft (WRITE)
-assert method operation is draft
+### sales_getQuoteLinePricesByItemIds (READ)
+get quote line prices by item ids
**Parameters:**
-- `operationId`: string
+- `itemIds`: string[]
+- `currentQuoteId`: string
-### items_deleteMethodOperationStep (DESTRUCTIVE)
-delete method operation step
+### sales_getQuoteMaterials (READ)
+get quote materials
**Parameters:**
-- `id`: string
+- `quoteId`: string
-### items_deleteMethodOperationParameter (DESTRUCTIVE)
-delete method operation parameter
+### sales_getQuoteMaterial (READ)
+get quote material
**Parameters:**
-- `id`: string
+- `materialId`: string
-### items_deleteMethodOperationTool (DESTRUCTIVE)
-delete method operation tool
+### sales_getQuoteMaterialsByLine (READ)
+get quote materials by line
**Parameters:**
-- `id`: string
+- `quoteLineId`: string
-### items_deleteUnitOfMeasure (DESTRUCTIVE)
-delete unit of measure
+### sales_getQuoteMaterialsByMethodId (READ)
+get quote materials by method id
**Parameters:**
-- `id`: string
+- `quoteMakeMethodId`: string
-### items_getConfigurationParameters (READ)
-get configuration parameters
+### sales_getQuoteMaterialsByOperation (READ)
+get quote materials by operation
**Parameters:**
-- `itemId`: string
+- `quoteOperationId`: string
-### items_getConfigurationRules (READ)
-get configuration rules
+### sales_getQuoteOperation (READ)
+get quote operation
**Parameters:**
-- `itemId`: string
+- `quoteOperationId`: string
-### items_getConsumable (READ)
-get consumable
+### sales_getQuoteOperationsByLine (READ)
+get quote operations by line
**Parameters:**
-- `itemId`: string
+- `quoteLineId`: string
-### items_getConsumables (READ)
-get consumables
+### sales_getQuoteOperationsByMethodId (READ)
+get quote operations by method id
**Parameters:**
-- `args`: GenericQueryFilters & {
- search: string | null;
- supplierId: string | null;
- }
+- `quoteMakeMethodId`: string
-### items_getConsumablesList (READ)
-get consumables list
-**Parameters:** none (context auto-filled)
+### sales_getQuoteOperations (READ)
+get quote operations
+**Parameters:**
+- `quoteId`: string
-### items_getItem (READ)
-get item
+### sales_getQuotePayment (READ)
+get quote payment
**Parameters:**
-- `id`: string
+- `quoteId`: string
-### items_getItemCost (READ)
-get item cost
+### sales_getQuoteShipment (READ)
+get quote shipment
**Parameters:**
-- `itemId`: string
+- `quoteId`: string
-### items_getItemCostHistory (READ)
-get item cost history
+### sales_getRelatedPricesForQuoteLine (READ)
+get related prices for quote line
**Parameters:**
- `itemId`: string
+- `quoteId`: string
-### items_getItemCustomerPart (READ)
-get item customer part
-**Parameters:**
-- `id`: string
+### sales_getSalesDocumentsAssignedToMe (READ)
+get sales documents assigned to me
+**Parameters:** none (context auto-filled)
-### items_getItemCustomerParts (READ)
-get item customer parts
+### sales_getSalesOrder (READ)
+get sales order
**Parameters:**
-- `itemId`: string
+- `salesOrderId`: string
-### items_getItemDemand (READ)
-get item demand
+### sales_getSalesOrderCustomerDetails (READ)
+get sales order customer details
**Parameters:**
-- `arg1`: {
- itemId: string;
- locationId: string;
- periods: string[];
- companyId: string;
- }
+- `salesOrderId`: string
-### items_getItemFiles (READ)
-get item files
-**Parameters:**
-- `itemId`: string
+### sales_getSalesOrderFavorites (READ)
+get sales order favorites
+**Parameters:** none (context auto-filled)
-### items_getItemPostingGroup (READ)
-get item posting group
+### sales_getSalesOrderRelatedItems (READ)
+get sales order related items
**Parameters:**
-- `id`: string
+- `salesOrderId`: string
+- `opportunityId`: string
-### items_getItemPostingGroups (READ)
-get item posting groups
+### sales_getSalesOrders (READ)
+get sales orders
**Parameters:**
-- `args`: GenericQueryFilters & { search: string | null } (optional)
+- `args`: GenericQueryFilters & {
+ search: string | null;
+ status: string | null;
+ customerId: string | null;
+ }
-### items_getItemPostingGroupsList (READ)
-get item posting groups list
+### sales_getSalesOrdersList (READ)
+get sales orders list
**Parameters:** none (context auto-filled)
-### items_getItemManufacturing (READ)
-get item manufacturing
+### sales_getSalesOrderPayment (READ)
+get sales order payment
**Parameters:**
-- `id`: string
+- `salesOrderId`: string
-### items_getItemPlanning (READ)
-get item planning
-**Parameters:**
-- `itemId`: string
-- `locationId`: string
+### sales_getSalesTerms (READ)
+get sales terms
+**Parameters:** none (context auto-filled)
-### items_getItemQuantities (READ)
-get item quantities
+### sales_getSalesOrderShipment (READ)
+get sales order shipment
**Parameters:**
-- `itemId`: string
-- `locationId`: string
+- `salesOrderId`: string
-### items_getItemReplenishment (READ)
-get item replenishment
-**Parameters:**
-- `itemId`: string
+### sales_getSalesOrderCustomers (READ)
+get sales order customers
+**Parameters:** none (context auto-filled)
-### items_getItemShelfQuantities (READ)
-get item shelf quantities
+### sales_getSalesOrderLines (READ)
+get sales order lines
**Parameters:**
-- `itemId`: string
-- `locationId`: string
+- `salesOrderId`: string
-### items_getItemSupply (READ)
-get item supply
+### sales_getSalesOrderInvoiceLines (READ)
+get sales order invoice lines
**Parameters:**
-- `arg1`: {
- itemId: string;
- locationId: string;
- periods: string[];
- companyId: string;
- }
+- `salesOrderId`: string
-### items_getItemUnitSalePrice (READ)
-get item unit sale price
+### sales_getSalesOrderInvoicesByIds (READ)
+get sales order invoices by ids
**Parameters:**
-- `id`: string
+- `invoiceIds`: string[]
-### items_getMaterialUsedIn (READ)
-get material used in
+### sales_getSalesOrderLinesByItemId (READ)
+get sales order lines by item id
**Parameters:**
- `itemId`: string
-### items_getMakeMethods (READ)
-get make methods
+### sales_getSalesOrderLinesByItemIds (READ)
+get sales order lines by item ids
**Parameters:**
-- `itemId`: string
+- `itemIds`: string[]
-### items_getMakeMethodById (READ)
-get make method by id
+### sales_getSalesOrderLine (READ)
+get sales order line
**Parameters:**
-- `makeMethodId`: string
+- `salesOrderLineId`: string
-### items_getMaterial (READ)
-get material
+### sales_getSalesOrderLineShipments (READ)
+get sales order line shipments
**Parameters:**
-- `itemId`: string
+- `salesOrderLineId`: string
-### items_getMaterials (READ)
-get materials
+### sales_getSalesRFQ (READ)
+get sales r f q
**Parameters:**
-- `args`: GenericQueryFilters & {
- search: string | null;
- supplierId: string | null;
- }
+- `id`: string
-### items_getMaterialsList (READ)
-get materials list
+### sales_getSalesRFQFavorites (READ)
+get sales r f q favorites
**Parameters:** none (context auto-filled)
-### items_getMaterialDimension (READ)
-get material dimension
+### sales_getSalesRFQs (READ)
+get sales r f qs
**Parameters:**
-- `id`: string
+- `args`: GenericQueryFilters & {
+ search: string | null;
+ }
-### items_getMaterialDimensions (READ)
-get material dimensions
+### sales_getSalesRFQLine (READ)
+get sales r f q line
**Parameters:**
-- `args`: GenericQueryFilters & { search: string | null; isMetric: boolean } (optional)
+- `lineId`: string
-### items_getMaterialDimensionList (READ)
-get material dimension list
+### sales_getSalesRFQLines (READ)
+get sales r f q lines
**Parameters:**
-- `materialFormId`: string
-- `isMetric`: boolean
+- `salesRfqId`: string
-### items_getMaterialFinish (READ)
-get material finish
+### sales_insertCustomerContact (WRITE)
+insert customer contact
**Parameters:**
-- `id`: string
+- `customerContact`: {
+ customerId: string;
+ companyId: string;
+ contact: PickPartial<z.infer<typeof customerContactValidator>, "email">;
+ customerLocationId?: string;
+ customFields?: Json;
+ }
-### items_getMaterialFinishes (READ)
-get material finishes
+### sales_insertCustomerLocation (WRITE)
+insert customer location
**Parameters:**
-- `args`: GenericQueryFilters & { search: string | null } (optional)
+- `customerLocation`: {
+ customerId: string;
+ companyId: string;
+ name: string;
+ address: {
+ addressLine1?: string;
+ addressLine2?: string;
+ city?: string;
+ stateProvince?: string;
+ countryCode?: string;
+ postalCode?: string;
+ };
+ customFields?: Json;
+ }
-### items_getMaterialFinishList (READ)
-get material finish list
+### sales_insertSalesOrderLines (WRITE)
+insert sales order lines
**Parameters:**
-- `materialSubstanceId`: string
+- `salesOrderLines`: (Omit<z.infer<typeof salesOrderLineValidator>, "id"> & {
+ companyId: string;
+ createdBy: string;
+ customFields?: Json;
+ })[]
-### items_getMaterialForm (READ)
-get material form
+### sales_finalizeQuote (WRITE)
+finalize quote
**Parameters:**
-- `id`: string
+- `quoteId`: string
-### items_getMaterialForms (READ)
-get material forms
+### sales_releaseSalesOrder (WRITE)
+release sales order
**Parameters:**
-- `args`: GenericQueryFilters & { search: string | null } (optional)
-
-### items_getMaterialFormsList (READ)
-get material forms list
-**Parameters:** none (context auto-filled)
+- `salesOrderId`: string
-### items_getMaterialGrades (READ)
-get material grades
+### sales_upsertCustomer (WRITE)
+upsert customer
**Parameters:**
-- `args`: GenericQueryFilters & { search: string | null } (optional)
+- `customer`: | (Omit<z.infer<typeof customerValidator>, "id"> & {
+ companyId: string;
+ createdBy: string;
+ customFields?: Json;
+ })
+ | (Omit<z.infer<typeof customerValidator>, "id"> & {
+ id: string;
+ updatedBy: string;
+ customFields?: Json;
+ })
-### items_getMaterialGrade (READ)
-get material grade
+### sales_updateCustomerAccounting (WRITE)
+update customer accounting
**Parameters:**
-- `id`: string
+- `customerAccounting`: z.infer<typeof customerAccountingValidator> & {
+ updatedBy: string;
+ }
-### items_getMaterialGradeList (READ)
-get material grade list
+### sales_updateCustomerContact (WRITE)
+update customer contact
**Parameters:**
-- `materialSubstanceId`: string
+- `customerContact`: {
+ contactId: string;
+ contact: z.infer<typeof customerContactValidator>;
+ customerLocationId?: string;
+ customFields?: Json;
+ }
-### items_getMaterialSubstance (READ)
-get material substance
+### sales_updateCustomerLocation (WRITE)
+update customer location
**Parameters:**
-- `id`: string
-
-### items_getMaterialSubstances (READ)
-get material substances
-**Parameters:**
-- `args`: GenericQueryFilters & { search: string | null } (optional)
-
-### items_getMaterialSubstancesList (READ)
-get material substances list
-**Parameters:** none (context auto-filled)
-
-### items_getMethodMaterial (READ)
-get method material
-**Parameters:**
-- `materialId`: string
-
-### items_getMethodMaterials (READ)
-get method materials
-**Parameters:**
-- `args`: GenericQueryFilters & { search: string | null } (optional)
-
-### items_getMethodMaterialsByMakeMethod (READ)
-get method materials by make method
-**Parameters:**
-- `makeMethodId`: string
-
-### items_getMethodOperations (READ)
-get method operations
-**Parameters:**
-- `args`: GenericQueryFilters & { search: string | null } (optional)
-
-### items_getMethodOperationsByMakeMethodId (READ)
-get method operations by make method id
-**Parameters:**
-- `makeMethodId`: string
-
-### items_getMethodTree (READ)
-get method tree
-**Parameters:**
-- `makeMethodId`: string
-
-### items_getMethodTreeArray (READ)
-get method tree array
-**Parameters:**
-- `makeMethodId`: string
-
-### items_getOpenJobMaterials (READ)
-get open job materials
-**Parameters:**
-- `arg1`: { itemId: string; companyId: string; locationId: string }
-
-### items_getOpenProductionOrders (READ)
-get open production orders
-**Parameters:**
-- `arg1`: { itemId: string; companyId: string; locationId: string }
-
-### items_getOpenPurchaseOrderLines (READ)
-get open purchase order lines
-**Parameters:**
-- `arg1`: { itemId: string; companyId: string; locationId: string }
-
-### items_getOpenSalesOrderLines (READ)
-get open sales order lines
-**Parameters:**
-- `arg1`: { itemId: string; companyId: string; locationId: string }
-
-### items_getPart (READ)
-get part
-**Parameters:**
-- `itemId`: string
-
-### items_getParts (READ)
-get parts
-**Parameters:**
-- `args`: GenericQueryFilters & {
- search: string | null;
- supplierId: string | null;
+- `customerLocation`: {
+ addressId: string;
+ name: string;
+ address: {
+ addressLine1?: string;
+ addressLine2?: string;
+ city?: string;
+ stateProvince?: string;
+ countryCode?: string;
+ postalCode?: string;
+ };
+ customFields?: Json;
}
-### items_getPartsList (READ)
-get parts list
-**Parameters:** none (context auto-filled)
-
-### items_getPartUsedIn (READ)
-get part used in
-**Parameters:**
-- `itemId`: string
-
-### items_getPickMethod (READ)
-get pick method
-**Parameters:**
-- `itemId`: string
-- `locationId`: string
-
-### items_getPickMethods (READ)
-get pick methods
+### sales_updateCustomerPayment (WRITE)
+update customer payment
**Parameters:**
-- `itemId`: string
+- `customerPayment`: z.infer<typeof customerPaymentValidator> & {
+ updatedBy: string;
+ }
-### items_getServices (READ)
-get services
+### sales_updateCustomerShipping (WRITE)
+update customer shipping
**Parameters:**
-- `args`: GenericQueryFilters & {
- search: string | null;
- type: string | null;
- group: string | null;
- supplierId: string | null;
+- `customerShipping`: z.infer<typeof customerShippingValidator> & {
+ updatedBy: string;
}
-### items_getService (READ)
-get service
+### sales_upsertCustomerStatus (WRITE)
+upsert customer status
**Parameters:**
-- `itemId`: string
-
-### items_getServicesList (READ)
-get services list
-**Parameters:** none (context auto-filled)
+- `customerStatus`: | (Omit<z.infer<typeof customerStatusValidator>, "id"> & {
+ companyId: string;
+ createdBy: string;
+ customFields?: Json;
+ })
+ | (Omit<z.infer<typeof customerStatusValidator>, "id"> & {
+ id: string;
+ updatedBy: string;
+ customFields?: Json;
+ })
-### items_getSupplierParts (READ)
-get supplier parts
+### sales_upsertCustomerType (WRITE)
+upsert customer type
**Parameters:**
-- `id`: string
+- `customerType`: | (Omit<z.infer<typeof customerTypeValidator>, "id"> & {
+ companyId: string;
+ createdBy: string;
+ customFields?: Json;
+ })
+ | (Omit<z.infer<typeof customerTypeValidator>, "id"> & {
+ id: string;
+ updatedBy: string;
+ customFields?: Json;
+ })
-### items_getTool (READ)
-get tool
+### sales_upsertNoQuoteReason (WRITE)
+upsert no quote reason
**Parameters:**
-- `itemId`: string
+- `noQuoteReason`: | (Omit<z.infer<typeof noQuoteReasonValidator>, "id"> & {
+ companyId: string;
+ createdBy: string;
+ customFields?: Json;
+ })
+ | (Omit<z.infer<typeof noQuoteReasonValidator>, "id"> & {
+ id: string;
+ updatedBy: string;
+ customFields?: Json;
+ })
-### items_getTools (READ)
-get tools
+### sales_updateSalesRFQFavorite (WRITE)
+update sales r f q favorite
**Parameters:**
-- `args`: GenericQueryFilters & {
- search: string | null;
- supplierId: string | null;
+- `args`: {
+ id: string;
+ favorite: boolean;
+ userId: string;
}
-### items_getToolsList (READ)
-get tools list
-**Parameters:** none (context auto-filled)
-
-### items_getUnitOfMeasure (READ)
-get unit of measure
+### sales_updateSalesRFQLineOrder (WRITE)
+update sales r f q line order
**Parameters:**
-- `id`: string
+- `updates`: {
+ id: string;
+ order: number;
+ updatedBy: string;
+ }[]
-### items_getUnitOfMeasures (READ)
-get unit of measures
+### sales_updateQuoteExchangeRate (WRITE)
+update quote exchange rate
**Parameters:**
-- `args`: GenericQueryFilters & { search: string | null }
-
-### items_getUnitOfMeasuresList (READ)
-get unit of measures list
-**Parameters:** none (context auto-filled)
+- `data`: {
+ id: string;
+ exchangeRate: number;
+ }
-### items_updateConfigurationParameterGroupOrder (WRITE)
-update configuration parameter group order
+### sales_updateQuoteLinePrecision (WRITE)
+update quote line precision
**Parameters:**
-- `data`: z.infer<typeof configurationParameterGroupOrderValidator>
+- `quoteLineId`: string
+- `precision`: number
-### items_updateDefaultRevision (WRITE)
-update default revision
+### sales_updateSalesOrderExchangeRate (WRITE)
+update sales order exchange rate
**Parameters:**
- `data`: {
id: string;
- updatedBy: string;
+ exchangeRate: number;
}
-### items_updateConfigurationParameterOrder (WRITE)
-update configuration parameter order
+### sales_updateQuoteFavorite (WRITE)
+update quote favorite
**Parameters:**
-- `data`: Omit<
- z.infer<typeof configurationParameterOrderValidator>,
- "configurationParameterGroupId"
- > & {
- configurationParameterGroupId?: string | null;
- updatedBy: string;
+- `args`: {
+ id: string;
+ favorite: boolean;
+ userId: string;
}
-### items_updateItemCost (WRITE)
-update item cost
+### sales_updateSalesRFQStatus (WRITE)
+update sales r f q status
**Parameters:**
-- `itemId`: string
-- `cost`: {
- unitCost: number;
+- `update`: {
+ id: string;
+ status: (typeof salesRFQStatusType)[number];
+ noQuoteReasonId: string | null;
+ assignee: null | undefined;
updatedBy: string;
}
-### items_updateMaterialOrder (WRITE)
-update material order
+### sales_updateQuoteMaterialOrder (WRITE)
+update quote material order
**Parameters:**
- `updates`: {
id: string;
@@ -1709,8 +1402,8 @@ update material order
updatedBy: string;
}[]
-### items_updateOperationOrder (WRITE)
-update operation order
+### sales_updateQuoteOperationOrder (WRITE)
+update quote operation order
**Parameters:**
- `updates`: {
id: string;
@@ -1718,4364 +1411,4257 @@ update operation order
updatedBy: string;
}[]
-### items_updateRevision (WRITE)
-update revision
+### sales_updateQuoteStatus (WRITE)
+update quote status
**Parameters:**
-- `revision`: {
+- `update`: {
id: string;
- revision: string;
+ status: (typeof quoteStatusType)[number];
+ assignee: null | undefined;
updatedBy: string;
}
-### items_upsertConfigurationParameter (WRITE)
-upsert configuration parameter
+### sales_upsertMakeMethodFromQuoteLine (WRITE)
+upsert make method from quote line
**Parameters:**
-- `configurationParameter`: z.infer<typeof configurationParameterValidator> & {
+- `lineMethod`: {
+ itemId: string;
+ quoteId: string;
+ quoteLineId: string;
companyId: string;
userId: string;
+ parts?: {
+ billOfMaterial: boolean;
+ billOfProcess: boolean;
+ parameters: boolean;
+ tools: boolean;
+ steps: boolean;
+ workInstructions: boolean;
+ };
}
-### items_upsertConfigurationParameterGroup (WRITE)
-upsert configuration parameter group
-**Parameters:**
-- `configurationParameterGroup`: z.infer<
- typeof configurationParameterGroupValidator
- > & {
- companyId: string;
- itemId: string;
- }
-
-### items_upsertConfigurationRule (WRITE)
-upsert configuration rule
+### sales_upsertMakeMethodFromQuoteMethod (WRITE)
+upsert make method from quote method
**Parameters:**
-- `configurationRule`: z.infer<typeof configurationRuleValidator> & {
- itemId: string;
+- `quoteMethod`: {
+ sourceId: string;
+ targetId: string;
companyId: string;
- updatedBy: string;
+ userId: string;
+ parts?: {
+ billOfMaterial: boolean;
+ billOfProcess: boolean;
+ parameters: boolean;
+ tools: boolean;
+ steps: boolean;
+ workInstructions: boolean;
+ };
}
-### items_upsertConsumable (WRITE)
-upsert consumable
+### sales_upsertQuote (WRITE)
+upsert quote
**Parameters:**
-- `consumable`: | (z.infer<typeof consumableValidator> & {
+- `quote`: | (Omit<z.infer<typeof quoteValidator>, "id" | "quoteId"> & {
+ quoteId: string;
companyId: string;
createdBy: string;
customFields?: Json;
})
- | (z.infer<typeof consumableValidator> & {
+ | (Omit<z.infer<typeof quoteValidator>, "id" | "quoteId"> & {
+ id: string;
+ quoteId: string;
updatedBy: string;
customFields?: Json;
})
-### items_upsertPart (WRITE)
-upsert part
+### sales_upsertQuoteLine (WRITE)
+upsert quote line
**Parameters:**
-- `part`: | (z.infer<typeof partValidator> & {
+- `quotationLine`: | (Omit<z.infer<typeof quoteLineValidator>, "id"> & {
companyId: string;
createdBy: string;
customFields?: Json;
})
- | (z.infer<typeof partValidator> & {
+ | (Omit<z.infer<typeof quoteLineValidator>, "id"> & {
+ id: string;
updatedBy: string;
customFields?: Json;
})
-### items_updateItem (WRITE)
-update item
+### sales_upsertQuoteLineAdditionalCharges (WRITE)
+upsert quote line additional charges
**Parameters:**
-- `item`: z.infer<typeof itemValidator> & {
- companyId: string;
- type: Database["public"]["Enums"]["itemType"];
+- `lineId`: string
+- `update`: {
+ additionalCharges: z.infer<typeof quoteLineAdditionalChargesValidator>;
+ updatedBy: string;
}
-### items_upsertItemCost (WRITE)
-upsert item cost
+### sales_upsertQuoteLinePrices (WRITE)
+upsert quote line prices
**Parameters:**
-- `itemCost`: z.infer<typeof itemCostValidator> & {
- updatedBy: string;
- customFields?: Json;
+- `quoteId`: string
+- `lineId`: string
+- `quoteLinePrices`: {
+ quoteLineId: string;
+ unitPrice: number;
+ leadTime: number;
+ discountPercent: number;
+ quantity: number;
+ createdBy: string;
+ categoryMarkups?: Record<string, number>;
+ }[]
+
+### sales_calculatePricesForQuantities (WRITE)
+calculate prices for quantities
+**Parameters:**
+- `quoteId`: string
+- `quoteLineId`: string
+- `quantities`: number[]
+
+### sales_recalculateQuoteLinePrices (WRITE)
+recalculate quote line prices
+**Parameters:**
+- `quoteId`: string
+- `quoteLineId`: string
+
+### sales_upsertQuoteLineMethod (WRITE)
+upsert quote line method
+**Parameters:**
+- `lineMethod`: {
+ itemId: string;
+ quoteId: string;
+ quoteLineId: string;
+ companyId: string;
+ userId: string;
+ configuration?: Record<string, unknown>;
+ parts?: {
+ billOfMaterial: boolean;
+ billOfProcess: boolean;
+ parameters: boolean;
+ tools: boolean;
+ steps: boolean;
+ workInstructions: boolean;
+ };
}
-### items_upsertPickMethod (WRITE)
-upsert pick method
+### sales_upsertQuoteMaterial (WRITE)
+upsert quote material
**Parameters:**
-- `pickMethod`: | (z.infer<typeof pickMethodValidator> & {
+- `quoteMaterial`: | (z.infer<typeof quoteMaterialValidator> & {
+ quoteId: string;
+ quoteLineId: string;
+ quoteOperationId?: string;
companyId: string;
createdBy: string;
customFields?: Json;
})
- | (z.infer<typeof pickMethodValidator> & {
+ | (z.infer<typeof quoteMaterialValidator> & {
+ quoteId: string;
+ quoteLineId: string;
+ quoteOperationId?: string;
updatedBy: string;
customFields?: Json;
})
-### items_upsertItemManufacturing (WRITE)
-upsert item manufacturing
+### sales_upsertQuoteMaterialMakeMethod (WRITE)
+upsert quote material make method
**Parameters:**
-- `partManufacturing`: z.infer<typeof itemManufacturingValidator> & {
- updatedBy: string;
- customFields?: Json;
+- `quoteMethod`: {
+ sourceId: string;
+ targetId: string;
+ companyId: string;
+ userId: string;
+ configuration?: Record<string, unknown>;
+ parts?: {
+ billOfMaterial: boolean;
+ billOfProcess: boolean;
+ parameters: boolean;
+ tools: boolean;
+ steps: boolean;
+ workInstructions: boolean;
+ };
}
-### items_upsertItemPlanning (WRITE)
-upsert item planning
+### sales_upsertQuoteOperation (WRITE)
+upsert quote operation
**Parameters:**
-- `partPlanning`: | {
+- `operation`: | (Omit<z.infer<typeof quoteOperationValidator>, "id"> & {
+ quoteId: string;
+ quoteLineId: string;
companyId: string;
- itemId: string;
- locationId: string;
createdBy: string;
- }
- | (z.infer<typeof itemPlanningValidator> & {
- updatedBy: string;
customFields?: Json;
})
-
-### items_upsertItemPurchasing (WRITE)
-upsert item purchasing
-**Parameters:**
-- `itemPurchasing`: z.infer<typeof itemPurchasingValidator> & {
- updatedBy: string;
- }
-
-### items_upsertItemPostingGroup (WRITE)
-upsert item posting group
-**Parameters:**
-- `itemPostingGroup`: | (Omit<z.infer<typeof itemPostingGroupValidator>, "id"> & {
+ | (z.infer<typeof quoteOperationValidator> & {
+ quoteId: string;
+ quoteLineId: string;
companyId: string;
createdBy: string;
customFields?: Json;
})
- | (Omit<z.infer<typeof itemPostingGroupValidator>, "id"> & {
+ | (Omit<z.infer<typeof quoteOperationValidator>, "id"> & {
id: string;
+ quoteId: string;
+ quoteLineId: string;
updatedBy: string;
customFields?: Json;
})
-### items_upsertSupplierPart (WRITE)
-upsert supplier part
+### sales_upsertQuoteOperationStep (WRITE)
+upsert quote operation step
**Parameters:**
-- `supplierPart`: | (Omit<z.infer<typeof supplierPartValidator>, "id"> & {
+- `quoteOperationStep`: | (Omit<z.infer<typeof operationStepValidator>, "id"> & {
companyId: string;
createdBy: string;
- customFields?: Json;
})
- | (Omit<z.infer<typeof supplierPartValidator>, "id"> & {
+ | (Omit<
+ z.infer<typeof operationStepValidator>,
+ "id" | "minValue" | "maxValue"
+ > & {
id: string;
+ minValue: number | null;
+ maxValue: number | null;
updatedBy: string;
- customFields?: Json;
+ updatedAt: string;
})
-### items_upsertItemCustomerPart (WRITE)
-upsert item customer part
+### sales_upsertQuoteOperationParameter (WRITE)
+upsert quote operation parameter
**Parameters:**
-- `customerPart`: | (Omit<z.infer<typeof customerPartValidator>, "id"> & {
+- `quoteOperationParameter`: | (Omit<z.infer<typeof operationParameterValidator>, "id"> & {
companyId: string;
+ createdBy: string;
})
- | (Omit<z.infer<typeof customerPartValidator>, "id"> & {
+ | (Omit<z.infer<typeof operationParameterValidator>, "id"> & {
id: string;
+ updatedBy: string;
+ updatedAt: string;
})
-### items_upsertItemUnitSalePrice (WRITE)
-upsert item unit sale price
-**Parameters:**
-- `itemUnitSalePrice`: z.infer<typeof itemUnitSalePriceValidator> & {
- updatedBy: string;
- customFields?: Json;
- }
-
-### items_upsertMakeMethodVersion (WRITE)
-upsert make method version
-**Parameters:**
-- `makeMethodVersion`: z.infer<typeof makeMethodVersionValidator> & {
- companyId: string;
- createdBy: string;
- }
-
-### items_upsertMethodMaterial (WRITE)
-upsert method material
+### sales_upsertQuoteOperationTool (WRITE)
+upsert quote operation tool
**Parameters:**
-- `methodMaterial`: | (z.infer<typeof methodMaterialValidator> & {
+- `quoteOperationTool`: | (Omit<z.infer<typeof operationToolValidator>, "id"> & {
companyId: string;
createdBy: string;
- customFields?: Json;
})
- | (z.infer<typeof methodMaterialValidator> & {
+ | (Omit<z.infer<typeof operationToolValidator>, "id"> & {
id: string;
updatedBy: string;
- customFields?: Json;
+ updatedAt: string;
})
-### items_upsertMethodOperation (WRITE)
-upsert method operation
+### sales_upsertQuotePayment (WRITE)
+upsert quote payment
**Parameters:**
-- `methodOperation`: | (Omit<z.infer<typeof methodOperationValidator>, "id"> & {
- companyId: string;
- createdBy: string;
- customFields?: Json;
- })
- | (z.infer<typeof methodOperationValidator> & {
- companyId: string;
+- `quotePayment`: | (z.infer<typeof quotePaymentValidator> & {
createdBy: string;
customFields?: Json;
})
- | (Omit<z.infer<typeof methodOperationValidator>, "id"> & {
+ | (z.infer<typeof quotePaymentValidator> & {
id: string;
updatedBy: string;
customFields?: Json;
})
-### items_upsertMethodOperationStep (WRITE)
-upsert method operation step
+### sales_upsertQuoteShipment (WRITE)
+upsert quote shipment
**Parameters:**
-- `methodOperationStep`: | (Omit<z.infer<typeof operationStepValidator>, "id"> & {
- companyId: string;
+- `quoteShipment`: | (z.infer<typeof quoteShipmentValidator> & {
createdBy: string;
})
- | (Omit<
- z.infer<typeof operationStepValidator>,
- "id" | "minValue" | "maxValue"
- > & {
+ | (z.infer<typeof quoteShipmentValidator> & {
id: string;
- minValue: number | null;
- maxValue: number | null;
updatedBy: string;
- updatedAt: string;
})
-### items_upsertMethodOperationParameter (WRITE)
-upsert method operation parameter
+### sales_updateSalesOrderFavorite (WRITE)
+update sales order favorite
**Parameters:**
-- `methodOperationParameter`: | (Omit<z.infer<typeof operationParameterValidator>, "id"> & {
- companyId: string;
- createdBy: string;
- })
- | (Omit<z.infer<typeof operationParameterValidator>, "id"> & {
- id: string;
- updatedBy: string;
- updatedAt: string;
- })
+- `args`: {
+ id: string;
+ favorite: boolean;
+ userId: string;
+ }
-### items_upsertMethodOperationTool (WRITE)
-upsert method operation tool
+### sales_updateSalesOrderStatus (WRITE)
+update sales order status
**Parameters:**
-- `methodOperationTool`: | (Omit<z.infer<typeof operationToolValidator>, "id"> & {
- companyId: string;
- createdBy: string;
- })
- | (Omit<z.infer<typeof operationToolValidator>, "id"> & {
- id: string;
- updatedBy: string;
- updatedAt: string;
- })
+- `update`: {
+ id: string;
+ status: (typeof salesOrderStatusType)[number];
+ assignee: null | undefined;
+ updatedBy: string;
+ }
-### items_upsertMaterial (WRITE)
-upsert material
+### sales_upsertSalesOrder (WRITE)
+upsert sales order
**Parameters:**
-- `material`: | (z.infer<typeof materialValidator> & {
+- `salesOrder`: | (Omit<z.infer<typeof salesOrderValidator>, "id" | "salesOrderId"> & {
+ salesOrderId: string;
companyId: string;
createdBy: string;
customFields?: Json;
- sizes?: string[];
})
- | (z.infer<typeof materialValidator> & {
+ | (Omit<z.infer<typeof salesOrderValidator>, "id" | "salesOrderId"> & {
+ id: string;
+ salesOrderId: string;
updatedBy: string;
customFields?: Json;
})
-### items_upsertMaterialDimension (WRITE)
-upsert material dimension
-**Parameters:**
-- `materialDimension`: | (Omit<z.infer<typeof materialDimensionValidator>, "id"> & {
- companyId: string;
- isMetric: boolean;
- })
- | (Omit<z.infer<typeof materialDimensionValidator>, "id"> & {
- id: string;
- })
-
-### items_upsertMaterialFinish (WRITE)
-upsert material finish
-**Parameters:**
-- `materialFinish`: | (Omit<z.infer<typeof materialFinishValidator>, "id"> & {
- companyId: string;
- })
- | (Omit<z.infer<typeof materialFinishValidator>, "id"> & {
- id: string;
- })
-
-### items_upsertMaterialForm (WRITE)
-upsert material form
+### sales_upsertSalesOrderShipment (WRITE)
+upsert sales order shipment
**Parameters:**
-- `materialForm`: | (Omit<z.infer<typeof materialFormValidator>, "id"> & {
- companyId: string;
+- `salesOrderShipment`: | (z.infer<typeof salesOrderShipmentValidator> & {
createdBy: string;
customFields?: Json;
})
- | (Omit<z.infer<typeof materialFormValidator>, "id"> & {
+ | (z.infer<typeof salesOrderShipmentValidator> & {
id: string;
updatedBy: string;
customFields?: Json;
})
-### items_upsertMaterialGrade (WRITE)
-upsert material grade
-**Parameters:**
-- `materialGrade`: | (Omit<z.infer<typeof materialGradeValidator>, "id"> & {
- companyId: string;
- })
- | (Omit<z.infer<typeof materialGradeValidator>, "id"> & {
- id: string;
- })
-
-### items_deleteMaterialType (DESTRUCTIVE)
-delete material type
-**Parameters:**
-- `id`: string
-
-### items_getMaterialTypes (READ)
-get material types
-**Parameters:**
-- `args`: GenericQueryFilters & { search: string | null } (optional)
-
-### items_getMaterialType (READ)
-get material type
-**Parameters:**
-- `id`: string
-
-### items_getMaterialTypeList (READ)
-get material type list
-**Parameters:**
-- `materialSubstanceId`: string
-- `materialFormId`: string
-
-### items_upsertMaterialType (WRITE)
-upsert material type
-**Parameters:**
-- `materialType`: | (Omit<z.infer<typeof materialTypeValidator>, "id"> & {
- companyId: string;
- })
- | (Omit<z.infer<typeof materialTypeValidator>, "id"> & {
- id: string;
- })
-
-### items_upsertMaterialSubstance (WRITE)
-upsert material substance
+### sales_upsertSalesOrderLine (WRITE)
+upsert sales order line
**Parameters:**
-- `materialSubstance`: | (Omit<z.infer<typeof materialSubstanceValidator>, "id"> & {
+- `salesOrderLine`: | (Omit<z.infer<typeof salesOrderLineValidator>, "id"> & {
companyId: string;
createdBy: string;
customFields?: Json;
})
- | (Omit<z.infer<typeof materialSubstanceValidator>, "id"> & {
+ | (Omit<z.infer<typeof salesOrderLineValidator>, "id"> & {
id: string;
updatedBy: string;
customFields?: Json;
})
-### items_upsertService (WRITE)
-upsert service
+### sales_upsertSalesOrderPayment (WRITE)
+upsert sales order payment
**Parameters:**
-- `service`: | (z.infer<typeof serviceValidator> & {
- companyId: string;
+- `salesOrderPayment`: | (z.infer<typeof salesOrderPaymentValidator> & {
createdBy: string;
customFields?: Json;
})
- | (Omit<z.infer<typeof serviceValidator>, "id"> & {
+ | (z.infer<typeof salesOrderPaymentValidator> & {
id: string;
updatedBy: string;
customFields?: Json;
})
-### items_upsertUnitOfMeasure (WRITE)
-upsert unit of measure
+### sales_upsertSalesRFQ (WRITE)
+upsert sales r f q
**Parameters:**
-- `unitOfMeasure`: | (Omit<z.infer<typeof unitOfMeasureValidator>, "id"> & {
+- `rfq`: | (Omit<z.infer<typeof salesRfqValidator>, "id" | "rfqId"> & {
+ rfqId: string;
companyId: string;
createdBy: string;
customFields?: Json;
})
- | (Omit<z.infer<typeof unitOfMeasureValidator>, "id"> & {
+ | (Omit<z.infer<typeof salesRfqValidator>, "id" | "rfqId"> & {
id: string;
+ rfqId: string;
updatedBy: string;
customFields?: Json;
})
-### items_upsertTool (WRITE)
-upsert tool
+### sales_upsertSalesRFQLine (WRITE)
+upsert sales r f q line
**Parameters:**
-- `tool`: | (z.infer<typeof toolValidator> & {
+- `salesRfqLine`: | (Omit<z.infer<typeof salesRfqLineValidator>, "id"> & {
companyId: string;
createdBy: string;
customFields?: Json;
})
- | (z.infer<typeof toolValidator> & {
+ | (Omit<z.infer<typeof salesRfqLineValidator>, "id"> & {
+ id: string;
updatedBy: string;
customFields?: Json;
})
-### items_getSupplierPriceBreaksForItems (READ)
-get supplier price breaks for items
-**Parameters:**
-- `itemIds`: string[]
+---
-### items_lookupBuyPrice (WRITE)
-lookup buy price
-**Parameters:**
-- `itemId`: string
-- `qty`: number
-- `fallbackCost`: number
+## quality (68 tools)
-### items_getSupplierPartPriceBreaks (READ)
-get supplier part price breaks
+### quality_activateGauge (WRITE)
+activate gauge
**Parameters:**
-- `supplierPartId`: string
-
----
-
-## people (44 tools)
+- `gaugeId`: string
-### people_deleteAttribute (DESTRUCTIVE)
-delete attribute
+### quality_deactivateGauge (WRITE)
+deactivate gauge
**Parameters:**
-- `attributeId`: string
+- `gaugeId`: string
-### people_deleteAttributeCategory (DESTRUCTIVE)
-delete attribute category
+### quality_deleteGauge (DESTRUCTIVE)
+delete gauge
**Parameters:**
-- `attributeCategoryId`: string
+- `gaugeId`: string
-### people_deleteDepartment (DESTRUCTIVE)
-delete department
+### quality_deleteGaugeCalibrationRecord (DESTRUCTIVE)
+delete gauge calibration record
**Parameters:**
-- `departmentId`: string
+- `gaugeCalibrationRecordId`: string
-### people_deleteHoliday (DESTRUCTIVE)
-delete holiday
+### quality_deleteGaugeType (DESTRUCTIVE)
+delete gauge type
**Parameters:**
-- `holidayId`: string
+- `gaugeTypeId`: string
-### people_deleteShift (DESTRUCTIVE)
-delete shift
+### quality_deleteIssue (DESTRUCTIVE)
+delete issue
**Parameters:**
-- `shiftId`: string
+- `nonConformanceId`: string
-### people_getAttribute (READ)
-get attribute
+### quality_deleteIssueAssociation (DESTRUCTIVE)
+delete issue association
**Parameters:**
-- `attributeId`: string
+- `type`: string
+- `associationId`: string
-### people_getAttributeCategories (READ)
-get attribute categories
+### quality_deleteIssueType (DESTRUCTIVE)
+delete issue type
**Parameters:**
-- `args`: { search: string | null } & GenericQueryFilters (optional)
+- `nonConformanceTypeId`: string
-### people_getAttributeCategory (READ)
-get attribute category
+### quality_deleteIssueWorkflow (DESTRUCTIVE)
+delete issue workflow
**Parameters:**
-- `id`: string
+- `nonConformanceWorkflowId`: string
-### people_getAttributeDataTypes (READ)
-get attribute data types
-**Parameters:** none (context auto-filled)
-
-### people_getDepartment (READ)
-get department
+### quality_deleteRequiredAction (DESTRUCTIVE)
+delete required action
**Parameters:**
-- `departmentId`: string
+- `requiredActionId`: string
-### people_getDepartments (READ)
-get departments
+### quality_deleteQualityDocument (DESTRUCTIVE)
+delete quality document
**Parameters:**
-- `args`: GenericQueryFilters & { search: string | null } (optional)
+- `qualityDocumentId`: string
-### people_getDepartmentsList (READ)
-get departments list
-**Parameters:** none (context auto-filled)
+### quality_deleteQualityDocumentStep (DESTRUCTIVE)
+delete quality document step
+**Parameters:**
+- `qualityDocumentStepId`: string
-### people_getEmployeeJob (READ)
-get employee job
+### quality_deleteRisk (DESTRUCTIVE)
+delete risk
**Parameters:**
-- `employeeId`: string
+- `riskId`: string
-### people_getEmployeeSummary (READ)
-get employee summary
+### quality_getIssueFromExternalLink (READ)
+get issue from external link
**Parameters:**
-- `employeeId`: string
+- `id`: string
-### people_getHoliday (READ)
-get holiday
+### quality_getGauge (READ)
+get gauge
**Parameters:**
-- `holidayId`: string
+- `gaugeId`: string
-### people_getHolidays (READ)
-get holidays
+### quality_getGauges (READ)
+get gauges
**Parameters:**
- `args`: GenericQueryFilters & { search: string | null } (optional)
-### people_getPeople (READ)
-get people
+### quality_getGaugesList (READ)
+get gauges list
+**Parameters:** none (context auto-filled)
+
+### quality_getGaugeCalibrationRecord (READ)
+get gauge calibration record
**Parameters:**
-- `args`: GenericQueryFilters & {
- search: string | null;
- }
+- `id`: string
-### people_getContacts (READ)
-get contacts
+### quality_getGaugeCalibrationRecords (READ)
+get gauge calibration records
**Parameters:**
-- `args`: GenericQueryFilters & {
- search: string | null;
- }
+- `args`: GenericQueryFilters & { search: string | null } (optional)
-### people_getShift (READ)
-get shift
+### quality_getGaugeCalibrationRecordsByGaugeId (READ)
+get gauge calibration records by gauge id
**Parameters:**
-- `shiftId`: string
+- `gaugeId`: string
-### people_getShifts (READ)
-get shifts
+### quality_getGaugeTypesList (READ)
+get gauge types list
+**Parameters:** none (context auto-filled)
+
+### quality_getGaugeType (READ)
+get gauge type
**Parameters:**
-- `args`: GenericQueryFilters & { search: string | null }
+- `gaugeTypeId`: string
-### people_getShiftsList (READ)
-get shifts list
+### quality_getGaugeTypes (READ)
+get gauge types
**Parameters:**
-- `locationId`: string | null
+- `args`: GenericQueryFilters & { search: string | null } (optional)
-### people_insertAttribute (WRITE)
-insert attribute
+### quality_getIssue (READ)
+get issue
**Parameters:**
-- `attribute`: {
- name: string;
- attributeDataTypeId: number;
- userAttributeCategoryId: string;
- listOptions?: string[];
- canSelfManage: boolean;
- createdBy: string;
- }
+- `nonConformanceId`: string
-### people_insertAttributeCategory (WRITE)
-insert attribute category
+### quality_getIssues (READ)
+get issues
**Parameters:**
-- `attributeCategory`: {
- name: string;
- emoji?: string;
- public: boolean;
- companyId: string;
- createdBy: string;
- }
+- `args`: GenericQueryFilters & { search: string | null } (optional)
-### people_insertEmployeeJob (WRITE)
-insert employee job
+### quality_getIssueWorkflow (READ)
+get issue workflow
**Parameters:**
-- `job`: {
- id: string;
- companyId: string;
- locationId?: string;
- }
+- `nonConformanceWorkflowId`: string
-### people_updateAttribute (WRITE)
-update attribute
+### quality_getIssueAction (READ)
+get issue action
**Parameters:**
-- `attribute`: {
- id?: string;
- name: string;
- listOptions?: string[];
- canSelfManage: boolean;
- updatedBy: string;
- }
+- `id`: string
-### people_updateAttributeCategory (WRITE)
-update attribute category
+### quality_getIssueActionTasks (READ)
+get issue action tasks
**Parameters:**
-- `attributeCategory`: {
- id: string;
- name: string;
- emoji?: string;
- public: boolean;
- updatedBy: string;
- }
+- `id`: string
+- `supplierId`: string (optional)
-### people_updateAttributeSortOrder (WRITE)
-update attribute sort order
+### quality_getIssueApprovalTasks (READ)
+get issue approval tasks
**Parameters:**
-- `updates`: {
- id: string;
- sortOrder: number;
- updatedBy: string;
- }[]
+- `id`: string
-### people_updateEmployeeJob (WRITE)
-update employee job
+### quality_getIssueItems (READ)
+get issue items
**Parameters:**
-- `employeeId`: string
-- `employeeJob`: z.infer<typeof employeeJobValidator> & {
- companyId: string;
- updatedBy: string;
- customFields?: Json;
- }
+- `id`: string
-### people_upsertDepartment (WRITE)
-upsert department
+### quality_getIssueAssociations (READ)
+get issue associations
**Parameters:**
-- `department`: | (Omit<z.infer<typeof departmentValidator>, "id"> & {
- companyId: string;
- createdBy: string;
- customFields?: Json;
- })
- | (Omit<z.infer<typeof departmentValidator>, "id"> & {
- id: string;
- updatedBy: string;
- customFields?: Json;
- })
+- `nonConformanceId`: string
-### people_upsertHoliday (WRITE)
-upsert holiday
+### quality_getIssueReviewers (READ)
+get issue reviewers
**Parameters:**
-- `holiday`: | (Omit<z.infer<typeof holidayValidator>, "id"> & {
- companyId: string;
- createdBy: string;
- customFields?: Json;
- })
- | (Omit<z.infer<typeof holidayValidator>, "id"> & {
- id: string;
- updatedBy: string;
- customFields?: Json;
- })
+- `id`: string
-### people_upsertShift (WRITE)
-upsert shift
+### quality_getIssueSuppliers (READ)
+get issue suppliers
**Parameters:**
-- `shift`: | (Omit<z.infer<typeof shiftValidator>, "id"> & {
- createdBy: string;
- companyId: string;
- customFields?: Json;
- })
- | (Omit<z.infer<typeof shiftValidator>, "id"> & {
- id: string;
- updatedBy: string;
- customFields?: Json;
- })
+- `id`: string
-### people_clockIn (WRITE)
-clock in
+### quality_getIssueTasks (READ)
+get issue tasks
**Parameters:**
-- `args`: {
- employeeId: string;
- companyId: string;
- createdBy: string;
- }
+- `id`: string
-### people_clockOut (WRITE)
-clock out
+### quality_getIssueType (READ)
+get issue type
**Parameters:**
-- `args`: {
- employeeId: string;
- companyId: string;
- updatedBy: string;
- clockOut?: string;
- note?: string;
- }
+- `nonConformanceTypeId`: string
-### people_createTimeCardEntry (WRITE)
-create time card entry
+### quality_getIssueTypes (READ)
+get issue types
**Parameters:**
-- `entry`: {
- employeeId: string;
- companyId: string;
- clockIn: string;
- clockOut?: string | null;
- note?: string | null;
- createdBy: string;
- }
+- `args`: GenericQueryFilters & { search: string | null } (optional)
-### people_deleteTimeCardEntry (DESTRUCTIVE)
-delete time card entry
+### quality_getIssueWorkflows (READ)
+get issue workflows
**Parameters:**
-- `entryId`: string
+- `args`: GenericQueryFilters & { search: string | null } (optional)
-### people_getClockedInEmployees (READ)
-get clocked in employees
+### quality_getIssueWorkflowsList (READ)
+get issue workflows list
**Parameters:** none (context auto-filled)
-### people_getOpenClockEntry (READ)
-get open clock entry
+### quality_getIssueTypesList (READ)
+get issue types list
+**Parameters:** none (context auto-filled)
+
+### quality_getQualityActions (READ)
+get quality actions
**Parameters:**
-- `employeeId`: string
+- `args`: GenericQueryFilters & { search: string | null } (optional)
-### people_getRecentTimecards (READ)
-get recent timecards
-**Parameters:** none (context auto-filled)
+### quality_getQualityDocument (READ)
+get quality document
+**Parameters:**
+- `id`: string
-### people_getScheduledEmployeesToday (READ)
-get scheduled employees today
-**Parameters:** none (context auto-filled)
+### quality_getQualityDocumentSteps (READ)
+get quality document steps
+**Parameters:**
+- `qualityDocumentId`: string
-### people_getTimeCardEntry (READ)
-get time card entry
+### quality_getQualityDocumentVersions (READ)
+get quality document versions
**Parameters:**
-- `entryId`: string
+- `qualityDocument`: { name: string; version: number }
-### people_getTimeCardEntries (READ)
-get time card entries
+### quality_getQualityDocuments (READ)
+get quality documents
**Parameters:**
-- `args`: {
- employeeId: string;
- companyId: string;
- from?: string;
- to?: string;
- }
+- `args`: { search: string | null } & GenericQueryFilters (optional)
-### people_getTimecardEntries (READ)
-get timecard entries
+### quality_getQualityDocumentsList (READ)
+get quality documents list
+**Parameters:** none (context auto-filled)
+
+### quality_getQualityFiles (READ)
+get quality files
**Parameters:**
-- `args`: GenericQueryFilters & { search: string | null }
+- `id`: string
-### people_getWeeklyHoursForEmployees (READ)
-get weekly hours for employees
+### quality_getRequiredActionsList (READ)
+get required actions list
+**Parameters:** none (context auto-filled)
+
+### quality_getRequiredActions (READ)
+get required actions
**Parameters:**
-- `employeeIds`: string[]
+- `args`: GenericQueryFilters & { search: string | null } (optional)
-### people_updateTimeCardEntry (WRITE)
-update time card entry
+### quality_getRequiredAction (READ)
+get required action
**Parameters:**
-- `args`: {
- entryId: string;
- clockIn?: string;
- clockOut?: string | null;
- note?: string | null;
- updatedBy: string;
- }
+- `requiredActionId`: string
----
+### quality_getRisk (READ)
+get risk
+**Parameters:**
+- `riskId`: string
-## production (128 tools)
+### quality_getRisks (READ)
+get risks
+**Parameters:**
+- `args`: GenericQueryFilters & {
+ search: string | null;
+ status?: typeof riskStatus;
+ source?: typeof riskSource;
+ // might be needed later for filtering by assignee
+ assignee?: string[];
+ } (optional)
-### production_convertSalesOrderLinesToJobs (WRITE)
-convert sales order lines to jobs
+### quality_insertIssueReviewer (WRITE)
+insert issue reviewer
**Parameters:**
-- `arg1`: {
- orderId: string;
+- `reviewer`: z.infer<typeof nonConformanceReviewerValidator> & {
+ nonConformanceId: string;
companyId: string;
- userId: string;
+ createdBy: string;
}
-### production_calculateJobPriority (WRITE)
-calculate job priority
+### quality_updateIssueActionProcesses (WRITE)
+update issue action processes
**Parameters:**
-- `params`: {
- jobId?: string; // Optional - if updating an existing job
- dueDate: string | null;
- deadlineType: (typeof deadlineTypes)[number];
+- `args`: {
+ actionTaskId: string;
+ processIds: string[];
companyId: string;
- locationId: string;
+ createdBy: string;
}
-### production_deleteDemandForecasts (DESTRUCTIVE)
-delete demand forecasts
+### quality_updateIssueStatus (WRITE)
+update issue status
**Parameters:**
-- `params`: {
- itemId: string;
- locationId: string;
- companyId: string;
- futurePeriodIds: string[];
+- `update`: {
+ id: string;
+ status: (typeof nonConformanceStatus)[number];
+ assignee: string | null | undefined;
+ closeDate: string | null | undefined;
+ updatedBy: string;
}
-### production_deleteDemandProjections (DESTRUCTIVE)
-delete demand projections
+### quality_updateIssueTaskStatus (WRITE)
+update issue task status
**Parameters:**
-- `params`: {
- itemId: string;
- locationId: string;
- companyId: string;
- futurePeriodIds: string[];
+- `args`: {
+ id: string;
+ status: "Pending" | "Completed" | "Skipped" | "In Progress";
+ type: "investigation" | "action" | "approval" | "review";
+ userId?: string;
+ assignee?: string | null;
}
-### production_deleteJob (DESTRUCTIVE)
-delete job
+### quality_updateIssueTaskContent (WRITE)
+update issue task content
**Parameters:**
-- `jobId`: string
+- `args`: {
+ id: string;
+ type: "action" | "approval" | "review";
+ content: JSONContent;
+ }
-### production_deleteJobMaterial (DESTRUCTIVE)
-delete job material
+### quality_updateQualityDocumentStepOrder (WRITE)
+update quality document step order
**Parameters:**
-- `jobMaterialId`: string
+- `updates`: {
+ id: string;
+ sortOrder: number;
+ updatedBy: string;
+ }[]
-### production_deleteJobOperation (DESTRUCTIVE)
-delete job operation
+### quality_updateRiskStatus (WRITE)
+update risk status
**Parameters:**
-- `jobOperationId`: string
+- `riskId`: string
+- `status`: (typeof riskStatus)[number]
-### production_deleteJobOperationStep (DESTRUCTIVE)
-delete job operation step
+### quality_upsertGauge (WRITE)
+upsert gauge
**Parameters:**
-- `id`: string
+- `gauge`: | (Omit<z.infer<typeof gaugeValidator>, "id" | "gaugeId"> & {
+ gaugeId: string;
+ companyId: string;
+ gaugeCalibrationStatus: (typeof gaugeCalibrationStatus)[number];
+ createdBy: string;
+ customFields?: Json;
+ })
+ | (Omit<z.infer<typeof gaugeValidator>, "id" | "gaugeId"> & {
+ id: string;
+ gaugeId: string;
+ gaugeCalibrationStatus: (typeof gaugeCalibrationStatus)[number];
+ updatedBy: string;
+ customFields?: Json;
+ })
-### production_deleteJobOperationParameter (DESTRUCTIVE)
-delete job operation parameter
+### quality_upsertGaugeCalibrationRecord (WRITE)
+upsert gauge calibration record
**Parameters:**
-- `id`: string
+- `gaugeCalibrationRecord`: | (Omit<z.infer<typeof gaugeCalibrationRecordValidator>, "id"> & {
+ companyId: string;
+ inspectionStatus: (typeof inspectionStatus)[number];
+ createdBy: string;
+ customFields?: Json;
+ })
+ | (Omit<z.infer<typeof gaugeCalibrationRecordValidator>, "id"> & {
+ id: string;
+ inspectionStatus: (typeof inspectionStatus)[number];
+ updatedBy: string;
+ customFields?: Json;
+ })
-### production_deleteJobOperationTool (DESTRUCTIVE)
-delete job operation tool
+### quality_upsertGaugeType (WRITE)
+upsert gauge type
**Parameters:**
-- `id`: string
+- `gaugeType`: | (Omit<z.infer<typeof gaugeTypeValidator>, "id"> & {
+ companyId: string;
+ createdBy: string;
+ customFields?: Json;
+ })
+ | (Omit<z.infer<typeof issueTypeValidator>, "id"> & {
+ id: string;
+ updatedBy: string;
+ customFields?: Json;
+ })
-### production_deleteProcedure (DESTRUCTIVE)
-delete procedure
+### quality_upsertIssue (WRITE)
+upsert issue
**Parameters:**
-- `procedureId`: string
+- `nonConformance`: | (Omit<z.infer<typeof issueValidator>, "id" | "nonConformanceId"> & {
+ nonConformanceId: string;
+ companyId: string;
+ createdBy: string;
+ customFields?: Json;
+ })
+ | (Omit<z.infer<typeof issueValidator>, "id" | "nonConformanceId"> & {
+ id: string;
+ nonConformanceId: string;
+ updatedBy: string;
+ customFields?: Json;
+ })
-### production_deleteProcedureStep (DESTRUCTIVE)
-delete procedure step
+### quality_upsertIssueWorkflow (WRITE)
+upsert issue workflow
**Parameters:**
-- `procedureStepId`: string
+- `nonConformanceWorkflow`: | (Omit<z.infer<typeof issueWorkflowValidator>, "id"> & {
+ companyId: string;
+ createdBy: string;
+ })
+ | (Omit<z.infer<typeof issueWorkflowValidator>, "id"> & {
+ id: string;
+ updatedBy: string;
+ })
-### production_deleteProcedureParameter (DESTRUCTIVE)
-delete procedure parameter
+### quality_upsertIssueType (WRITE)
+upsert issue type
**Parameters:**
-- `procedureParameterId`: string
+- `nonConformanceType`: | (Omit<z.infer<typeof issueTypeValidator>, "id"> & {
+ companyId: string;
+ createdBy: string;
+ customFields?: Json;
+ })
+ | (Omit<z.infer<typeof issueTypeValidator>, "id"> & {
+ id: string;
+ updatedBy: string;
+ customFields?: Json;
+ })
-### production_deleteProductionEvent (DESTRUCTIVE)
-delete production event
+### quality_upsertRequiredAction (WRITE)
+upsert required action
**Parameters:**
-- `productionEventId`: string
+- `requiredAction`: | (Omit<z.infer<typeof issueTypeValidator>, "id"> & {
+ companyId: string;
+ active?: boolean;
+ createdBy: string;
+ })
+ | (Omit<z.infer<typeof issueTypeValidator>, "id"> & {
+ id: string;
+ active?: boolean;
+ updatedBy: string;
+ })
-### production_deleteProductionQuantity (DESTRUCTIVE)
-delete production quantity
+### quality_upsertQualityDocument (WRITE)
+upsert quality document
**Parameters:**
-- `productionQuantityId`: string
+- `qualityDocument`: | (Omit<z.infer<typeof qualityDocumentValidator>, "id"> & {
+ companyId: string;
+ createdBy: string;
+ })
+ | (Omit<z.infer<typeof qualityDocumentValidator>, "id"> & {
+ id: string;
+ updatedBy: string;
+ })
-### production_getActiveJobOperationByJobId (READ)
-get active job operation by job id
+### quality_upsertQualityDocumentStep (WRITE)
+upsert quality document step
**Parameters:**
-- `jobId`: string
+- `qualityDocumentStep`: | (Omit<z.infer<typeof qualityDocumentStepValidator>, "id"> & {
+ companyId: string;
+ createdBy: string;
+ })
+ | (Omit<z.infer<typeof qualityDocumentStepValidator>, "id"> & {
+ id: string;
+ updatedBy: string;
+ })
-### production_getActiveJobOperationsByLocation (READ)
-get active job operations by location
+### quality_upsertRisk (WRITE)
+upsert risk
**Parameters:**
-- `locationId`: string
-- `workCenterIds`: string[] (optional)
+- `risk`: | (Omit<
+ z.infer<typeof riskRegisterValidator>,
+ "id" | "severity" | "likelihood"
+ > & {
+ severity: number;
+ likelihood: number;
+ companyId: string;
+ createdBy: string;
+ })
+ | (Omit<
+ z.infer<typeof riskRegisterValidator>,
+ "id" | "severity" | "likelihood"
+ > & {
+ severity: number;
+ likelihood: number;
+ id: string;
+ updatedBy: string; // This might be used for history/tracking if added
+ })
-### production_getJobsByDateRange (READ)
-get jobs by date range
-**Parameters:**
-- `locationId`: string
-- `startDate`: string
-- `endDate`: string
+---
-### production_getUnscheduledJobs (READ)
-get unscheduled jobs
+## purchasing (96 tools)
+
+### purchasing_closePurchaseOrder (WRITE)
+close purchase order
**Parameters:**
-- `locationId`: string
+- `purchaseOrderId`: string
-### production_getActiveProductionEvents (READ)
-get active production events
-**Parameters:** none (context auto-filled)
+### purchasing_convertSupplierQuoteToOrder (WRITE)
+convert supplier quote to order
+**Parameters:**
+- `payload`: {
+ id: string;
+ selectedLines: z.infer<typeof selectedLinesValidator>;
+ companyId: string;
+ userId: string;
+ }
-### production_deleteScrapReason (DESTRUCTIVE)
-delete scrap reason
+### purchasing_deletePurchaseOrder (DESTRUCTIVE)
+delete purchase order
**Parameters:**
-- `scrapReasonId`: string
+- `purchaseOrderId`: string
-### production_deleteFailureMode (DESTRUCTIVE)
-delete failure mode
+### purchasing_deletePurchaseOrderLine (DESTRUCTIVE)
+delete purchase order line
**Parameters:**
-- `failureModeId`: string
+- `purchaseOrderLineId`: string
-### production_deleteMaintenanceDispatch (DESTRUCTIVE)
-delete maintenance dispatch
+### purchasing_deleteSupplier (DESTRUCTIVE)
+delete supplier
**Parameters:**
-- `dispatchId`: string
+- `supplierId`: string
-### production_deleteMaintenanceDispatchComment (DESTRUCTIVE)
-delete maintenance dispatch comment
+### purchasing_deleteSupplierContact (DESTRUCTIVE)
+delete supplier contact
**Parameters:**
-- `commentId`: string
+- `supplierId`: string
+- `supplierContactId`: string
-### production_deleteMaintenanceDispatchEvent (DESTRUCTIVE)
-delete maintenance dispatch event
+### purchasing_deleteSupplierLocation (DESTRUCTIVE)
+delete supplier location
**Parameters:**
-- `eventId`: string
+- `supplierId`: string
+- `supplierLocationId`: string
-### production_deleteMaintenanceDispatchItem (DESTRUCTIVE)
-delete maintenance dispatch item
+### purchasing_deleteSupplierProcess (DESTRUCTIVE)
+delete supplier process
**Parameters:**
-- `itemId`: string
+- `supplierProcessId`: string
-### production_deleteMaintenanceDispatchWorkCenter (DESTRUCTIVE)
-delete maintenance dispatch work center
+### purchasing_deleteSupplierQuote (DESTRUCTIVE)
+delete supplier quote
**Parameters:**
-- `workCenterId`: string
+- `supplierQuoteId`: string
-### production_deleteMaintenanceSchedule (DESTRUCTIVE)
-delete maintenance schedule
+### purchasing_deleteSupplierQuoteLine (DESTRUCTIVE)
+delete supplier quote line
**Parameters:**
-- `scheduleId`: string
+- `id`: string
-### production_deleteMaintenanceScheduleItem (DESTRUCTIVE)
-delete maintenance schedule item
+### purchasing_deleteSupplierType (DESTRUCTIVE)
+delete supplier type
**Parameters:**
-- `itemId`: string
+- `supplierTypeId`: string
-### production_getDemandForecasts (READ)
-get demand forecasts
+### purchasing_getPurchaseOrder (READ)
+get purchase order
**Parameters:**
-- `params`: {
- itemId: string;
- locationId: string;
- companyId: string;
- periodIds: string[];
- }
+- `purchaseOrderId`: string
-### production_getDemandProjections (READ)
-get demand projections
+### purchasing_finalizeSupplierQuote (WRITE)
+finalize supplier quote
**Parameters:**
-- `params`: {
- itemId: string;
- locationId: string;
- companyId: string;
- periodIds: string[];
- }
+- `supplierQuoteId`: string
-### production_getJobDocuments (READ)
-get job documents
+### purchasing_getPurchaseOrders (READ)
+get purchase orders
**Parameters:**
-- `job`: {
- id: string | null;
- salesOrderLineId?: string | null;
- quoteLineId?: string | null;
- itemId?: string | null;
+- `args`: GenericQueryFilters & {
+ search: string | null;
+ status: string | null;
+ supplierId: string | null;
}
-### production_getJobDocumentsWithItemId (READ)
-get job documents with item id
+### purchasing_getPurchaseOrderDelivery (READ)
+get purchase order delivery
**Parameters:**
-- `job`: Job
-- `itemId`: string
+- `purchaseOrderId`: string
-### production_getJob (READ)
-get job
+### purchasing_getPurchaseOrderLocations (READ)
+get purchase order locations
**Parameters:**
-- `id`: string
+- `purchaseOrderId`: string
-### production_getJobByOperationId (READ)
-get job by operation id
+### purchasing_getPurchaseOrderPayment (READ)
+get purchase order payment
**Parameters:**
-- `operationId`: string
+- `purchaseOrderId`: string
-### production_getJobPurchaseOrderLines (READ)
-get job purchase order lines
+### purchasing_getPurchaseOrderLines (READ)
+get purchase order lines
**Parameters:**
-- `jobId`: string
+- `purchaseOrderId`: string
-### production_getJobs (READ)
-get jobs
+### purchasing_getPurchaseOrderLine (READ)
+get purchase order line
**Parameters:**
-- `args`: { search: string | null } & GenericQueryFilters (optional)
+- `purchaseOrderLineId`: string
-### production_getJobsBySalesOrderLine (READ)
-get jobs by sales order line
-**Parameters:**
-- `salesOrderLineId`: string
+### purchasing_getPurchaseOrderSuppliers (READ)
+get purchase order suppliers
+**Parameters:** none (context auto-filled)
-### production_getJobsList (READ)
-get jobs list
+### purchasing_getPurchasingDocumentsAssignedToMe (READ)
+get purchasing documents assigned to me
**Parameters:** none (context auto-filled)
-### production_getJobMakeMethodById (READ)
-get job make method by id
+### purchasing_getPurchasingPlanning (READ)
+get purchasing planning
**Parameters:**
-- `jobMakeMethodId`: string
+- `locationId`: string
+- `periods`: string[]
+- `args`: GenericQueryFilters & {
+ search: string | null;
+ }
-### production_getRootMakeMethod (READ)
-get root make method
-**Parameters:**
-- `jobId`: string
+### purchasing_getPurchasingTerms (READ)
+get purchasing terms
+**Parameters:** none (context auto-filled)
-### production_getJobMaterialsWithQuantityOnHand (READ)
-get job materials with quantity on hand
+### purchasing_getSupplier (READ)
+get supplier
**Parameters:**
-- `jobId`: string
-- `locationId`: string
-- `args`: { search: string | null } & GenericQueryFilters (optional)
+- `supplierId`: string
-### production_getJobMethodTree (READ)
-get job method tree
+### purchasing_getSupplierApprovalContext (READ)
+get supplier approval context
**Parameters:**
-- `jobId`: string
+- `supplierId`: string
+- `status`: string | null
-### production_getJobMethodTreeArray (READ)
-get job method tree array
+### purchasing_getSupplierContact (READ)
+get supplier contact
**Parameters:**
-- `jobId`: string
+- `supplierContactId`: string
-### production_getJobMaterial (READ)
-get job material
+### purchasing_getSupplierContacts (READ)
+get supplier contacts
**Parameters:**
-- `materialId`: string
+- `supplierId`: string
-### production_getJobMaterialsByMethodId (READ)
-get job materials by method id
+### purchasing_getSupplierInteraction (READ)
+get supplier interaction
**Parameters:**
-- `jobMakeMethodId`: string
+- `opportunityId`: string | null
-### production_getJobOperation (READ)
-get job operation
+### purchasing_getSupplierInteractionDocuments (READ)
+get supplier interaction documents
**Parameters:**
-- `jobOperationId`: string
+- `interactionId`: string
-### production_getJobOperations (READ)
-get job operations
+### purchasing_getSupplierInteractionLineDocuments (READ)
+get supplier interaction line documents
**Parameters:**
-- `jobId`: string
-- `args`: { search: string | null } & GenericQueryFilters (optional)
+- `lineId`: string
-### production_getJobOperationsAssignedToEmployee (READ)
-get job operations assigned to employee
+### purchasing_getSupplierLocations (READ)
+get supplier locations
**Parameters:**
-- `employeeId`: string
+- `supplierId`: string
-### production_getJobOperationAttachments (READ)
-get job operation attachments
+### purchasing_getSupplierLocation (READ)
+get supplier location
**Parameters:**
-- `jobOperationIds`: string[]
+- `supplierContactId`: string
-### production_getJobOperationsList (READ)
-get job operations list
+### purchasing_getSupplierPayment (READ)
+get supplier payment
**Parameters:**
-- `jobId`: string
+- `supplierId`: string
-### production_getJobOperationsByMethodId (READ)
-get job operations by method id
+### purchasing_getSupplierProcessById (READ)
+get supplier process by id
**Parameters:**
-- `jobMakeMethodId`: string
+- `supplierProcessId`: string
-### production_getJobOperationStepRecords (READ)
-get job operation step records
+### purchasing_getSupplierProcessesByProcess (READ)
+get supplier processes by process
**Parameters:**
-- `jobId`: string
-- `args`: GenericQueryFilters & {
- search: string | null;
- }
+- `processId`: string
-### production_getOutsideOperationsByJobId (READ)
-get outside operations by job id
+### purchasing_getSupplierProcessesBySupplier (READ)
+get supplier processes by supplier
**Parameters:**
-- `jobId`: string
+- `supplierId`: string
-### production_getProcedure (READ)
-get procedure
+### purchasing_getSupplierQuote (READ)
+get supplier quote
**Parameters:**
-- `id`: string
+- `supplierQuoteId`: string
-### production_getProcedureSteps (READ)
-get procedure steps
+### purchasing_getSupplierQuoteByInteractionId (READ)
+get supplier quote by interaction id
**Parameters:**
-- `procedureId`: string
+- `interactionId`: string
-### production_getProcedureParameters (READ)
-get procedure parameters
+### purchasing_getSupplierQuoteByExternalLinkId (READ)
+get supplier quote by external link id
**Parameters:**
-- `procedureId`: string
+- `externalLinkId`: string
-### production_getProcedureVersions (READ)
-get procedure versions
+### purchasing_getSupplierQuotes (READ)
+get supplier quotes
**Parameters:**
-- `procedure`: { name: string; version: number }
+- `args`: GenericQueryFilters & {
+ search: string | null;
+ }
-### production_getProcedures (READ)
-get procedures
+### purchasing_getSupplierQuoteLine (READ)
+get supplier quote line
**Parameters:**
-- `args`: { search: string | null } & GenericQueryFilters (optional)
-
-### production_getProceduresList (READ)
-get procedures list
-**Parameters:** none (context auto-filled)
+- `supplierQuoteLineId`: string
-### production_getProductionEvent (READ)
-get production event
+### purchasing_getSupplierQuoteLines (READ)
+get supplier quote lines
**Parameters:**
-- `id`: string
+- `supplierQuoteId`: string
-### production_getProductionEvents (READ)
-get production events
+### purchasing_getSupplierQuoteLinePrices (READ)
+get supplier quote line prices
**Parameters:**
-- `jobOperationIds`: string[]
-- `args`: { search: string | null } & GenericQueryFilters (optional)
+- `supplierQuoteLineId`: string
-### production_getProductionEventsPage (READ)
-get production events page
+### purchasing_getSupplierQuoteLinePricesByQuoteId (READ)
+get supplier quote line prices by quote id
**Parameters:**
-- `jobOperationId`: string
-- `sortDescending`: boolean (optional)
-- `page`: number (optional)
+- `supplierQuoteId`: string
-### production_getProductionEventsByOperations (READ)
-get production events by operations
-**Parameters:**
-- `jobOperationIds`: string[]
+### purchasing_getSupplierQuotesList (READ)
+get supplier quotes list
+**Parameters:** none (context auto-filled)
-### production_getProductionPlanning (READ)
-get production planning
+### purchasing_getSupplierShipping (READ)
+get supplier shipping
**Parameters:**
-- `locationId`: string
-- `periods`: string[]
-- `args`: GenericQueryFilters & {
- search: string | null;
- }
+- `supplierId`: string
-### production_getProductionProjections (READ)
-get production projections
+### purchasing_getSuppliers (READ)
+get suppliers
**Parameters:**
-- `locationId`: string
-- `periods`: string[]
- `args`: GenericQueryFilters & {
search: string | null;
+ type: string | null;
+ status: string | null;
}
-### production_getProductionQuantity (READ)
-get production quantity
-**Parameters:**
-- `id`: string
+### purchasing_getSuppliersList (READ)
+get suppliers list
+**Parameters:** none (context auto-filled)
-### production_getProductionQuantities (READ)
-get production quantities
+### purchasing_getSupplierType (READ)
+get supplier type
**Parameters:**
-- `jobOperationIds`: string[]
-- `args`: { search: string | null } & GenericQueryFilters (optional)
+- `supplierTypeId`: string
-### production_getProductionDataByOperations (READ)
-get production data by operations
+### purchasing_getSupplierTypes (READ)
+get supplier types
**Parameters:**
-- `jobOperationIds`: string[]
+- `args`: GenericQueryFilters & { search: string | null } (optional)
-### production_getScrapReasonsList (READ)
-get scrap reasons list
+### purchasing_getSupplierTypesList (READ)
+get supplier types list
**Parameters:** none (context auto-filled)
-### production_getScrapReason (READ)
-get scrap reason
+### purchasing_insertSupplier (WRITE)
+insert supplier
**Parameters:**
-- `scrapReasonId`: string
+- `supplier`: Omit<z.infer<typeof supplierValidator>, "id"> & {
+ companyId: string;
+ createdBy: string;
+ customFields?: Json;
+ }
-### production_getScrapReasons (READ)
-get scrap reasons
+### purchasing_insertSupplierContact (WRITE)
+insert supplier contact
**Parameters:**
-- `args`: GenericQueryFilters & { search: string | null } (optional)
+- `supplierContact`: {
+ supplierId: string;
+ companyId: string;
+ contact: z.infer<typeof supplierContactValidator>;
+ supplierLocationId?: string;
+ customFields?: Json;
+ }
-### production_getFailureMode (READ)
-get failure mode
+### purchasing_insertSupplierInteraction (WRITE)
+insert supplier interaction
**Parameters:**
-- `failureModeId`: string
+- `supplierId`: string
-### production_getFailureModes (READ)
-get failure modes
+### purchasing_insertSupplierLocation (WRITE)
+insert supplier location
**Parameters:**
-- `args`: GenericQueryFilters & { search: string | null } (optional)
-
-### production_getFailureModesList (READ)
-get failure modes list
-**Parameters:** none (context auto-filled)
+- `supplierLocation`: {
+ supplierId: string;
+ companyId: string;
+ name: string;
+ address: {
+ addressLine1?: string;
+ addressLine2?: string;
+ city?: string;
+ stateProvince?: string;
+ postalCode?: string;
+ countryCode?: string;
+ };
+ customFields?: Json;
+ }
-### production_getMaintenanceDispatch (READ)
-get maintenance dispatch
+### purchasing_finalizePurchaseOrder (WRITE)
+finalize purchase order
**Parameters:**
-- `dispatchId`: string
+- `purchaseOrderId`: string
-### production_getMaintenanceDispatches (READ)
-get maintenance dispatches
+### purchasing_sendSupplierQuote (WRITE)
+send supplier quote
**Parameters:**
-- `args`: GenericQueryFilters & { search: string | null; status?: string } (optional)
+- `supplierQuoteId`: string
-### production_getMaintenanceDispatchComments (READ)
-get maintenance dispatch comments
+### purchasing_updatePurchaseOrder (WRITE)
+update purchase order
**Parameters:**
-- `dispatchId`: string
-
-### production_getMaintenanceDispatchEvents (READ)
-get maintenance dispatch events
-**Parameters:**
-- `dispatchId`: string
-
-### production_getMaintenanceDispatchItems (READ)
-get maintenance dispatch items
-**Parameters:**
-- `dispatchId`: string
-
-### production_getMaintenanceDispatchWorkCenters (READ)
-get maintenance dispatch work centers
-**Parameters:**
-- `dispatchId`: string
-
-### production_getMaintenanceSchedule (READ)
-get maintenance schedule
-**Parameters:**
-- `scheduleId`: string
-
-### production_getMaintenanceSchedules (READ)
-get maintenance schedules
-**Parameters:**
-- `args`: GenericQueryFilters & { search: string | null; active?: boolean } (optional)
-
-### production_getMaintenanceScheduleItems (READ)
-get maintenance schedule items
-**Parameters:**
-- `scheduleId`: string
-
-### production_getTrackedEntityByJobId (READ)
-get tracked entity by job id
-**Parameters:**
-- `jobId`: string
-
-### production_getTrackedEntitiesByJobId (READ)
-get tracked entities by job id
-**Parameters:**
-- `jobId`: string
-
-### production_recalculateJobOperationDependencies (WRITE)
-recalculate job operation dependencies
-**Parameters:**
-- `params`: {
- jobId: string;
- companyId: string;
- userId: string;
+- `purchaseOrder`: {
+ id: string;
+ status: (typeof purchaseOrderStatusType)[number];
+ updatedBy: string;
}
-### production_recalculateJobRequirements (WRITE)
-recalculate job requirements
+### purchasing_updatePurchaseOrderExchangeRate (WRITE)
+update purchase order exchange rate
**Parameters:**
-- `params`: {
- id: string; // job id
- companyId: string;
- userId: string;
+- `data`: {
+ id: string;
+ exchangeRate: number;
}
-### production_recalculateJobMakeMethodRequirements (WRITE)
-recalculate job make method requirements
+### purchasing_updatePurchaseOrderFavorite (WRITE)
+update purchase order favorite
**Parameters:**
-- `params`: {
- id: string; // job make method id
- companyId: string;
+- `args`: {
+ id: string;
+ favorite: boolean;
userId: string;
}
-### production_runMRP (WRITE)
-run m r p
+### purchasing_updatePurchaseOrderStatus (WRITE)
+update purchase order status
**Parameters:**
-- `params`: {
- type:
- | "company"
- | "location"
- | "job"
- | "salesOrder"
- | "item"
- | "purchaseOrder";
+- `update`: {
id: string;
- companyId: string;
- userId: string;
+ status: (typeof purchaseOrderStatusType)[number];
+ assignee: null | undefined;
+ updatedBy: string;
}
-### production_updateJobBatchNumber (WRITE)
-update job batch number
-**Parameters:**
-- `trackedEntityId`: string
-- `value`: string
-
-### production_updateJobStatus (WRITE)
-update job status
+### purchasing_updateSupplierAccounting (WRITE)
+update supplier accounting
**Parameters:**
-- `params`: {
- id: string;
- status: (typeof jobStatus)[number];
- assignee?: string | null;
+- `supplierAccounting`: z.infer<typeof supplierAccountingValidator> & {
updatedBy: string;
}
-### production_updateJobMaterialOrder (WRITE)
-update job material order
+### purchasing_updateSupplierContact (WRITE)
+update supplier contact
**Parameters:**
-- `updates`: {
- id: string;
- order: number;
- updatedBy: string;
- }[]
+- `supplierContact`: {
+ contactId: string;
+ contact: z.infer<typeof supplierContactValidator>;
+ supplierLocationId?: string;
+ customFields?: Json;
+ }
-### production_updateJobOperationOrder (WRITE)
-update job operation order
+### purchasing_updateSupplierLocation (WRITE)
+update supplier location
**Parameters:**
-- `updates`: {
- id: string;
- order: number;
- updatedBy: string;
- }[]
+- `supplierLocation`: {
+ addressId: string;
+ name: string;
+ address: {
+ addressLine1?: string;
+ addressLine2?: string;
+ city?: string;
+ stateProvince?: string;
+ countryCode?: string;
+ postalCode?: string;
+ };
+ customFields?: Json;
+ }
-### production_updateJobOperationStepOrder (WRITE)
-update job operation step order
+### purchasing_updateSupplierPayment (WRITE)
+update supplier payment
**Parameters:**
-- `updates`: {
- id: string;
- sortOrder: number;
+- `supplierPayment`: z.infer<typeof supplierPaymentValidator> & {
updatedBy: string;
- }[]
+ customFields?: Json;
+ }
-### production_updateKanbanJob (WRITE)
-update kanban job
+### purchasing_updateSupplierQuoteExchangeRate (WRITE)
+update supplier quote exchange rate
**Parameters:**
-- `params`: {
+- `data`: {
id: string;
- jobId: string | null;
- companyId: string;
- userId: string;
+ exchangeRate: number;
}
-### production_updateQuoteOperationStepOrder (WRITE)
-update quote operation step order
+### purchasing_updateSupplierQuoteFavorite (WRITE)
+update supplier quote favorite
**Parameters:**
-- `updates`: {
+- `args`: {
id: string;
- sortOrder: number;
- updatedBy: string;
- }[]
+ favorite: boolean;
+ userId: string;
+ }
-### production_updateMethodOperationStepOrder (WRITE)
-update method operation step order
+### purchasing_updateSupplierQuoteStatus (WRITE)
+update supplier quote status
**Parameters:**
-- `updates`: {
+- `update`: {
id: string;
- sortOrder: number;
+ status: (typeof supplierQuoteStatusType)[number];
+ assignee: null | undefined;
updatedBy: string;
- }[]
-
-### production_updateJobOperationStatus (WRITE)
-update job operation status
-**Parameters:**
-- `id`: string
-- `status`: (typeof jobOperationStatus)[number]
-
-### production_updateJobOperationDueDate (WRITE)
-update job operation due date
-**Parameters:**
-- `id`: string
-- `dueDate`: string | null
+ }
-### production_updateProcedureStepOrder (WRITE)
-update procedure step order
+### purchasing_updateSupplierShipping (WRITE)
+update supplier shipping
**Parameters:**
-- `updates`: {
- id: string;
- sortOrder: number;
+- `supplierShipping`: z.infer<typeof supplierShippingValidator> & {
updatedBy: string;
- }[]
+ customFields?: Json;
+ }
-### production_upsertProductionEvent (WRITE)
-upsert production event
+### purchasing_upsertPurchaseOrder (WRITE)
+upsert purchase order
**Parameters:**
-- `productionEvent`: | (Omit<z.infer<typeof productionEventValidator>, "id"> & {
- createdBy: string;
+- `purchaseOrder`: | (Omit<
+ z.infer<typeof purchaseOrderValidator>,
+ "id" | "purchaseOrderId"
+ > & {
+ purchaseOrderId: string;
+ status?: (typeof purchaseOrderStatusType)[number];
companyId: string;
+ createdBy: string;
+ customFields?: Json;
})
- | (Omit<z.infer<typeof productionEventValidator>, "id"> & {
+ | (Omit<
+ z.infer<typeof purchaseOrderValidator>,
+ "id" | "purchaseOrderId"
+ > & {
id: string;
+ purchaseOrderId: string;
updatedBy: string;
- companyId: string;
+ customFields?: Json;
})
+- `receiptRequestedDate`: string (optional)
-### production_updateProductionQuantity (WRITE)
-update production quantity
-**Parameters:**
-- `productionQuantity`: z.infer<typeof productionQuantityValidator> & {
- id: string;
- updatedBy: string;
- companyId: string;
- }
-
-### production_upsertProductionQuantity (WRITE)
-upsert production quantity
+### purchasing_upsertPurchaseOrderDelivery (WRITE)
+upsert purchase order delivery
**Parameters:**
-- `productionQuantity`: | (Omit<z.infer<typeof productionQuantityValidator>, "id"> & {
+- `purchaseOrderDelivery`: | (z.infer<typeof purchaseOrderDeliveryValidator> & {
companyId: string;
+ createdBy: string;
+ customFields?: Json;
})
- | (Omit<z.infer<typeof productionQuantityValidator>, "id"> & {
+ | (z.infer<typeof purchaseOrderDeliveryValidator> & {
id: string;
updatedBy: string;
- companyId: string;
+ customFields?: Json;
})
-### production_upsertJob (WRITE)
-upsert job
-**Parameters:**
-- `job`: | (Omit<z.infer<typeof jobValidator>, "id" | "jobId"> & {
- jobId: string;
- shelfId?: string;
- startDate?: string;
+### purchasing_upsertPurchaseOrderLine (WRITE)
+upsert purchase order line
+**Parameters:**
+- `purchaseOrderLine`: | (Omit<z.infer<typeof purchaseOrderLineValidator>, "id"> & {
companyId: string;
createdBy: string;
customFields?: Json;
})
- | (Omit<z.infer<typeof jobValidator>, "id" | "jobId"> & {
+ | (Omit<z.infer<typeof purchaseOrderLineValidator>, "id"> & {
id: string;
- jobId: string;
updatedBy: string;
customFields?: Json;
})
-- `status`: (typeof jobStatus)[number] (optional)
-### production_upsertJobMaterial (WRITE)
-upsert job material
+### purchasing_upsertPurchaseOrderPayment (WRITE)
+upsert purchase order payment
**Parameters:**
-- `jobMaterial`: | (z.infer<typeof jobMaterialValidator> & {
- jobId: string;
- jobOperationId?: string;
- companyId: string;
+- `purchaseOrderPayment`: | (z.infer<typeof purchaseOrderPaymentValidator> & {
createdBy: string;
customFields?: Json;
})
- | (z.infer<typeof jobMaterialValidator> & {
- jobId: string;
- jobOperationId?: string;
+ | (z.infer<typeof purchaseOrderPaymentValidator> & {
+ id: string;
updatedBy: string;
customFields?: Json;
})
-### production_upsertJobOperation (WRITE)
-upsert job operation
+### purchasing_upsertSupplier (WRITE)
+upsert supplier
**Parameters:**
-- `jobOperation`: | (z.infer<typeof jobOperationValidator> & {
- jobId: string;
+- `supplier`: | (Omit<z.infer<typeof supplierValidator>, "id"> & {
companyId: string;
createdBy: string;
customFields?: Json;
})
- | (z.infer<typeof jobOperationValidator> & {
- jobId: string;
+ | (Omit<z.infer<typeof supplierValidator>, "id"> & {
+ id: string;
+ updatedBy: string;
+ customFields?: Json;
+ })
+
+### purchasing_upsertSupplierProcess (WRITE)
+upsert supplier process
+**Parameters:**
+- `supplierProcess`: | (Omit<z.infer<typeof supplierProcessValidator>, "id"> & {
companyId: string;
+ createdBy: string;
+ customFields?: Json;
+ })
+ | (Omit<z.infer<typeof supplierProcessValidator>, "id"> & {
+ id: string;
updatedBy: string;
customFields?: Json;
})
-### production_upsertJobOperationStep (WRITE)
-upsert job operation step
+### purchasing_upsertSupplierQuote (WRITE)
+upsert supplier quote
**Parameters:**
-- `jobOperationStep`: | (Omit<z.infer<typeof operationStepValidator>, "id"> & {
+- `supplierQuote`: | (Omit<
+ z.infer<typeof supplierQuoteValidator>,
+ "id" | "supplierQuoteId"
+ > & {
+ supplierQuoteId: string;
companyId: string;
createdBy: string;
+ customFields?: Json;
})
| (Omit<
- z.infer<typeof operationStepValidator>,
- "id" | "minValue" | "maxValue"
+ z.infer<typeof supplierQuoteValidator>,
+ "id" | "supplierQuoteId"
> & {
id: string;
- minValue: number | null;
- maxValue: number | null;
+ supplierQuoteId: string;
updatedBy: string;
- updatedAt: string;
+ customFields?: Json;
})
-### production_upsertJobOperationParameter (WRITE)
-upsert job operation parameter
+### purchasing_upsertSupplierQuoteLine (WRITE)
+upsert supplier quote line
**Parameters:**
-- `jobOperationParameter`: | (Omit<z.infer<typeof operationParameterValidator>, "id"> & {
+- `supplierQuoteLine`: | (Omit<z.infer<typeof supplierQuoteLineValidator>, "id"> & {
companyId: string;
createdBy: string;
+ customFields?: Json;
})
- | (Omit<z.infer<typeof operationParameterValidator>, "id"> & {
+ | (Omit<z.infer<typeof supplierQuoteLineValidator>, "id"> & {
id: string;
updatedBy: string;
- updatedAt: string;
+ customFields?: Json;
})
-### production_upsertJobOperationTool (WRITE)
-upsert job operation tool
+### purchasing_upsertSupplierType (WRITE)
+upsert supplier type
**Parameters:**
-- `jobOperationTool`: | (Omit<z.infer<typeof operationToolValidator>, "id"> & {
+- `supplierType`: | (Omit<z.infer<typeof supplierTypeValidator>, "id"> & {
companyId: string;
createdBy: string;
+ customFields?: Json;
})
- | (Omit<z.infer<typeof operationToolValidator>, "id"> & {
+ | (Omit<z.infer<typeof supplierTypeValidator>, "id"> & {
id: string;
updatedBy: string;
- updatedAt: string;
+ customFields?: Json;
})
-### production_upsertJobMethod (WRITE)
-upsert job method
+### purchasing_deletePurchasingRFQ (DESTRUCTIVE)
+delete purchasing r f q
**Parameters:**
-- `type`: "itemToJob" | "quoteLineToJob"
-- `jobMethod`: {
- sourceId: string;
- targetId: string;
- companyId: string;
- userId: string;
- configuration?: Record<string, unknown>;
- parts?: {
- billOfMaterial: boolean;
- billOfProcess: boolean;
- parameters: boolean;
- tools: boolean;
- steps: boolean;
- workInstructions: boolean;
- };
- }
+- `purchasingRfqId`: string
-### production_upsertJobMaterialMakeMethod (WRITE)
-upsert job material make method
+### purchasing_deletePurchasingRFQLine (DESTRUCTIVE)
+delete purchasing r f q line
**Parameters:**
-- `jobMaterial`: {
- sourceId: string;
- targetId: string;
- companyId: string;
- userId: string;
- configuration?: Record<string, unknown>;
- parts?: {
- billOfMaterial: boolean;
- billOfProcess: boolean;
- parameters: boolean;
- tools: boolean;
- steps: boolean;
- workInstructions: boolean;
- };
- }
+- `purchasingRfqLineId`: string
-### production_upsertMakeMethodFromJob (WRITE)
-upsert make method from job
+### purchasing_getPurchasingRFQ (READ)
+get purchasing r f q
**Parameters:**
-- `jobMethod`: {
- sourceId: string;
- targetId: string;
- companyId: string;
- userId: string;
- parts?: {
- billOfMaterial: boolean;
- billOfProcess: boolean;
- parameters: boolean;
- tools: boolean;
- steps: boolean;
- workInstructions: boolean;
- };
- }
+- `id`: string
-### production_upsertMakeMethodFromJobMethod (WRITE)
-upsert make method from job method
+### purchasing_getPurchasingRFQs (READ)
+get purchasing r f qs
**Parameters:**
-- `jobMethod`: {
- sourceId: string;
- targetId: string;
- companyId: string;
- userId: string;
- parts?: {
- billOfMaterial: boolean;
- billOfProcess: boolean;
- parameters: boolean;
- tools: boolean;
- steps: boolean;
- workInstructions: boolean;
- };
+- `args`: GenericQueryFilters & {
+ search: string | null;
}
-### production_upsertProcedure (WRITE)
-upsert procedure
+### purchasing_getPurchasingRFQLine (READ)
+get purchasing r f q line
**Parameters:**
-- `procedure`: | (Omit<z.infer<typeof procedureValidator>, "id"> & {
- companyId: string;
- createdBy: string;
- })
- | (Omit<z.infer<typeof procedureValidator>, "id"> & {
- id: string;
- updatedBy: string;
- })
+- `lineId`: string
-### production_upsertProcedureStep (WRITE)
-upsert procedure step
+### purchasing_getPurchasingRFQLines (READ)
+get purchasing r f q lines
**Parameters:**
-- `procedureStep`: | (Omit<z.infer<typeof procedureStepValidator>, "id"> & {
- companyId: string;
- createdBy: string;
- })
- | (Omit<z.infer<typeof procedureStepValidator>, "id"> & {
- id: string;
- updatedBy: string;
- })
+- `purchasingRfqId`: string
-### production_upsertProcedureParameter (WRITE)
-upsert procedure parameter
+### purchasing_getPurchasingRFQSuppliers (READ)
+get purchasing r f q suppliers
**Parameters:**
-- `procedureParameter`: | (Omit<z.infer<typeof procedureParameterValidator>, "id"> & {
- companyId: string;
- createdBy: string;
- })
- | (Omit<z.infer<typeof procedureParameterValidator>, "id"> & {
- id: string;
- updatedBy: string;
- })
+- `purchasingRfqId`: string
-### production_upsertScrapReason (WRITE)
-upsert scrap reason
+### purchasing_upsertPurchasingRFQ (WRITE)
+upsert purchasing r f q
**Parameters:**
-- `scrapReason`: | (Omit<z.infer<typeof scrapReasonValidator>, "id"> & {
+- `purchasingRfq`: {
+ id?: string;
+ rfqId: string;
+ rfqDate: string;
+ expirationDate?: string;
+ locationId?: string;
+ employeeId?: string;
+ status?: (typeof purchasingRfqStatusType)[number];
+ companyId: string;
+ createdBy?: string;
+ updatedBy?: string;
+ customFields?: Json;
+ }
+
+### purchasing_upsertPurchasingRFQLine (WRITE)
+upsert purchasing r f q line
+**Parameters:**
+- `purchasingRfqLine`: | {
+ purchasingRfqId: string;
+ itemId: string;
+ description?: string;
+ quantity: number[];
+ purchaseUnitOfMeasureCode: string;
+ inventoryUnitOfMeasureCode: string;
+ conversionFactor?: number;
+ order: number;
companyId: string;
createdBy: string;
customFields?: Json;
- })
- | (Omit<z.infer<typeof scrapReasonValidator>, "id"> & {
+ }
+ | {
id: string;
+ purchasingRfqId: string;
+ itemId: string;
+ description?: string;
+ quantity: number[];
+ purchaseUnitOfMeasureCode: string;
+ inventoryUnitOfMeasureCode: string;
+ conversionFactor?: number;
+ order: number;
+ companyId: string;
updatedBy: string;
customFields?: Json;
- })
+ }
-### production_upsertFailureMode (WRITE)
-upsert failure mode
-**Parameters:**
-- `failureMode`: | (Omit<z.infer<typeof failureModeValidator>, "id"> & {
- companyId: string;
- createdBy: string;
- customFields?: Json;
- })
- | (Omit<z.infer<typeof failureModeValidator>, "id"> & {
- id: string;
- updatedBy: string;
- customFields?: Json;
- })
-
-### production_upsertMaintenanceDispatch (WRITE)
-upsert maintenance dispatch
+### purchasing_upsertPurchasingRFQSuppliers (WRITE)
+upsert purchasing r f q suppliers
**Parameters:**
-- `dispatch`: | (Omit<z.infer<typeof maintenanceDispatchValidator>, "id"> & {
- maintenanceDispatchId: string;
- companyId: string;
- createdBy: string;
- content?: Json;
- })
- | (Omit<z.infer<typeof maintenanceDispatchValidator>, "id"> & {
- id: string;
- updatedBy: string;
- content?: Json;
- })
+- `purchasingRfqId`: string
+- `supplierIds`: string[]
-### production_upsertMaintenanceDispatchComment (WRITE)
-upsert maintenance dispatch comment
+### purchasing_updatePurchasingRFQStatus (WRITE)
+update purchasing r f q status
**Parameters:**
-- `comment`: | (Omit<z.infer<typeof maintenanceDispatchCommentValidator>, "id"> & {
- companyId: string;
- createdBy: string;
- })
- | (Omit<z.infer<typeof maintenanceDispatchCommentValidator>, "id"> & {
- id: string;
- updatedBy: string;
- })
+- `args`: {
+ id: string;
+ status: (typeof purchasingRfqStatusType)[number];
+ assignee?: string | null;
+ updatedBy: string;
+ }
-### production_upsertMaintenanceDispatchEvent (WRITE)
-upsert maintenance dispatch event
+### purchasing_getLinkedSupplierQuotes (READ)
+get linked supplier quotes
**Parameters:**
-- `event`: | (Omit<z.infer<typeof maintenanceDispatchEventValidator>, "id"> & {
- companyId: string;
- createdBy: string;
- })
- | (Omit<z.infer<typeof maintenanceDispatchEventValidator>, "id"> & {
- id: string;
- updatedBy: string;
- })
+- `purchasingRfqId`: string
-### production_upsertMaintenanceDispatchItem (WRITE)
-upsert maintenance dispatch item
+### purchasing_getLinkedPurchasingRfqs (READ)
+get linked purchasing rfqs
**Parameters:**
-- `item`: | (Omit<z.infer<typeof maintenanceDispatchItemValidator>, "id"> & {
- companyId: string;
- createdBy: string;
- })
- | (Omit<z.infer<typeof maintenanceDispatchItemValidator>, "id"> & {
- id: string;
- updatedBy: string;
- })
+- `supplierQuoteId`: string
-### production_upsertMaintenanceDispatchWorkCenter (WRITE)
-upsert maintenance dispatch work center
+### purchasing_getLinkedPurchasingRfqsForInteraction (READ)
+get linked purchasing rfqs for interaction
**Parameters:**
-- `workCenter`: | (Omit<z.infer<typeof maintenanceDispatchWorkCenterValidator>, "id"> & {
- companyId: string;
- createdBy: string;
- })
- | (Omit<z.infer<typeof maintenanceDispatchWorkCenterValidator>, "id"> & {
- id: string;
- updatedBy: string;
- })
+- `supplierInteractionId`: string
-### production_upsertMaintenanceSchedule (WRITE)
-upsert maintenance schedule
+### purchasing_getSiblingQuotesForQuote (READ)
+get sibling quotes for quote
**Parameters:**
-- `schedule`: | (Omit<z.infer<typeof maintenanceScheduleValidator>, "id"> & {
- companyId: string;
- createdBy: string;
- })
- | (Omit<z.infer<typeof maintenanceScheduleValidator>, "id"> & {
- id: string;
- updatedBy: string;
- })
+- `supplierQuoteId`: string
-### production_upsertMaintenanceScheduleItem (WRITE)
-upsert maintenance schedule item
+### purchasing_getLinkedPurchasingRfqsForOrder (READ)
+get linked purchasing rfqs for order
**Parameters:**
-- `item`: | (Omit<z.infer<typeof maintenanceScheduleItemValidator>, "id"> & {
- companyId: string;
- createdBy: string;
- })
- | (Omit<z.infer<typeof maintenanceScheduleItemValidator>, "id"> & {
- id: string;
- updatedBy: string;
- })
+- `purchaseOrderId`: string
-### production_upsertDemandForecasts (WRITE)
-upsert demand forecasts
+### purchasing_getSupplierQuotesForComparison (READ)
+get supplier quotes for comparison
**Parameters:**
-- `forecasts`: Array<{
- itemId: string;
- locationId: string;
- periodId: string;
- forecastQuantity: number;
- companyId: string;
- createdBy: string;
- updatedBy?: string;
- }>
+- `purchasingRfqId`: string
-### production_upsertDemandProjections (WRITE)
-upsert demand projections
+### purchasing_getPurchasingRFQSuppliersWithLinks (READ)
+get purchasing r f q suppliers with links
**Parameters:**
-- `forecasts`: Array<{
- itemId: string;
- locationId: string;
- periodId: string;
- forecastQuantity: number;
- companyId: string;
- createdBy: string;
- updatedBy?: string;
- }>
+- `purchasingRfqId`: string
---
-## purchasing (96 tools)
+## resources (94 tools)
-### purchasing_closePurchaseOrder (WRITE)
-close purchase order
+### resources_activateWorkCenter (WRITE)
+activate work center
**Parameters:**
-- `purchaseOrderId`: string
+- `id`: string
-### purchasing_convertSupplierQuoteToOrder (WRITE)
-convert supplier quote to order
+### resources_deleteAbility (DESTRUCTIVE)
+delete ability
**Parameters:**
-- `payload`: {
- id: string;
- selectedLines: z.infer<typeof selectedLinesValidator>;
- companyId: string;
- userId: string;
- }
+- `abilityId`: string
+- `hardDelete`: boolean (optional)
-### purchasing_deletePurchaseOrder (DESTRUCTIVE)
-delete purchase order
+### resources_deleteContractor (DESTRUCTIVE)
+delete contractor
**Parameters:**
-- `purchaseOrderId`: string
+- `contractorId`: string
-### purchasing_deletePurchaseOrderLine (DESTRUCTIVE)
-delete purchase order line
+### resources_deleteEmployeeAbility (DESTRUCTIVE)
+delete employee ability
**Parameters:**
-- `purchaseOrderLineId`: string
+- `employeeAbilityId`: string
-### purchasing_deleteSupplier (DESTRUCTIVE)
-delete supplier
+### resources_deleteFailureMode (DESTRUCTIVE)
+delete failure mode
**Parameters:**
-- `supplierId`: string
+- `failureModeId`: string
-### purchasing_deleteSupplierContact (DESTRUCTIVE)
-delete supplier contact
+### resources_deleteLocation (DESTRUCTIVE)
+delete location
**Parameters:**
-- `supplierId`: string
-- `supplierContactId`: string
+- `locationId`: string
-### purchasing_deleteSupplierLocation (DESTRUCTIVE)
-delete supplier location
+### resources_deleteMaintenanceDispatch (DESTRUCTIVE)
+delete maintenance dispatch
**Parameters:**
-- `supplierId`: string
-- `supplierLocationId`: string
+- `dispatchId`: string
-### purchasing_deleteSupplierProcess (DESTRUCTIVE)
-delete supplier process
+### resources_deleteMaintenanceDispatchComment (DESTRUCTIVE)
+delete maintenance dispatch comment
**Parameters:**
-- `supplierProcessId`: string
+- `commentId`: string
-### purchasing_deleteSupplierQuote (DESTRUCTIVE)
-delete supplier quote
+### resources_deleteMaintenanceDispatchEvent (DESTRUCTIVE)
+delete maintenance dispatch event
**Parameters:**
-- `supplierQuoteId`: string
+- `eventId`: string
-### purchasing_deleteSupplierQuoteLine (DESTRUCTIVE)
-delete supplier quote line
+### resources_deleteMaintenanceDispatchItem (DESTRUCTIVE)
+delete maintenance dispatch item
**Parameters:**
-- `id`: string
+- `itemId`: string
-### purchasing_deleteSupplierType (DESTRUCTIVE)
-delete supplier type
+### resources_deleteMaintenanceDispatchWorkCenter (DESTRUCTIVE)
+delete maintenance dispatch work center
**Parameters:**
-- `supplierTypeId`: string
+- `workCenterId`: string
-### purchasing_getPurchaseOrder (READ)
-get purchase order
+### resources_deleteMaintenanceSchedule (DESTRUCTIVE)
+delete maintenance schedule
**Parameters:**
-- `purchaseOrderId`: string
+- `scheduleId`: string
-### purchasing_finalizeSupplierQuote (WRITE)
-finalize supplier quote
+### resources_deleteMaintenanceScheduleItem (DESTRUCTIVE)
+delete maintenance schedule item
**Parameters:**
-- `supplierQuoteId`: string
+- `itemId`: string
-### purchasing_getPurchaseOrders (READ)
-get purchase orders
+### resources_deletePartner (DESTRUCTIVE)
+delete partner
**Parameters:**
-- `args`: GenericQueryFilters & {
- search: string | null;
- status: string | null;
- supplierId: string | null;
- }
+- `partnerId`: string
-### purchasing_getPurchaseOrderDelivery (READ)
-get purchase order delivery
+### resources_activateProcess (WRITE)
+activate process
**Parameters:**
-- `purchaseOrderId`: string
+- `processId`: string
-### purchasing_getPurchaseOrderLocations (READ)
-get purchase order locations
+### resources_processDeactivate (WRITE)
+process deactivate
**Parameters:**
-- `purchaseOrderId`: string
+- `processId`: string
-### purchasing_getPurchaseOrderPayment (READ)
-get purchase order payment
+### resources_deleteProcess (DESTRUCTIVE)
+delete process
**Parameters:**
-- `purchaseOrderId`: string
+- `processId`: string
-### purchasing_getPurchaseOrderLines (READ)
-get purchase order lines
+### resources_deleteShift (DESTRUCTIVE)
+delete shift
**Parameters:**
-- `purchaseOrderId`: string
+- `shiftId`: string
-### purchasing_getPurchaseOrderLine (READ)
-get purchase order line
+### resources_deleteSuggestion (DESTRUCTIVE)
+delete suggestion
**Parameters:**
-- `purchaseOrderLineId`: string
+- `suggestionId`: string
-### purchasing_getPurchaseOrderSuppliers (READ)
-get purchase order suppliers
-**Parameters:** none (context auto-filled)
+### resources_deleteTraining (DESTRUCTIVE)
+delete training
+**Parameters:**
+- `trainingId`: string
-### purchasing_getPurchasingDocumentsAssignedToMe (READ)
-get purchasing documents assigned to me
-**Parameters:** none (context auto-filled)
+### resources_deleteTrainingAssignment (DESTRUCTIVE)
+delete training assignment
+**Parameters:**
+- `assignmentId`: string
-### purchasing_getPurchasingPlanning (READ)
-get purchasing planning
+### resources_deleteTrainingQuestion (DESTRUCTIVE)
+delete training question
**Parameters:**
-- `locationId`: string
-- `periods`: string[]
-- `args`: GenericQueryFilters & {
- search: string | null;
- }
+- `trainingQuestionId`: string
-### purchasing_getPurchasingTerms (READ)
-get purchasing terms
-**Parameters:** none (context auto-filled)
+### resources_deleteWorkCenter (DESTRUCTIVE)
+delete work center
+**Parameters:**
+- `id`: string
-### purchasing_getSupplier (READ)
-get supplier
+### resources_getAbilities (READ)
+get abilities
**Parameters:**
-- `supplierId`: string
+- `args`: GenericQueryFilters & { search: string | null }
-### purchasing_getSupplierApprovalContext (READ)
-get supplier approval context
+### resources_getAbilitiesList (READ)
+get abilities list
+**Parameters:** none (context auto-filled)
+
+### resources_getAbility (READ)
+get ability
**Parameters:**
-- `supplierId`: string
-- `status`: string | null
+- `abilityId`: string
-### purchasing_getSupplierContact (READ)
-get supplier contact
+### resources_getContractor (READ)
+get contractor
**Parameters:**
-- `supplierContactId`: string
+- `contractorId`: string
-### purchasing_getSupplierContacts (READ)
-get supplier contacts
+### resources_getContractors (READ)
+get contractors
**Parameters:**
-- `supplierId`: string
+- `args`: GenericQueryFilters & { search: string | null } (optional)
-### purchasing_getSupplierInteraction (READ)
-get supplier interaction
+### resources_getEmployeeAbilities (READ)
+get employee abilities
**Parameters:**
-- `opportunityId`: string | null
+- `employeeId`: string
-### purchasing_getSupplierInteractionDocuments (READ)
-get supplier interaction documents
+### resources_getFailureMode (READ)
+get failure mode
**Parameters:**
-- `interactionId`: string
+- `failureModeId`: string
-### purchasing_getSupplierInteractionLineDocuments (READ)
-get supplier interaction line documents
+### resources_getFailureModes (READ)
+get failure modes
**Parameters:**
-- `lineId`: string
+- `args`: GenericQueryFilters & { search: string | null } (optional)
-### purchasing_getSupplierLocations (READ)
-get supplier locations
+### resources_getFailureModesList (READ)
+get failure modes list
+**Parameters:** none (context auto-filled)
+
+### resources_getLocation (READ)
+get location
**Parameters:**
-- `supplierId`: string
+- `locationId`: string
-### purchasing_getSupplierLocation (READ)
-get supplier location
+### resources_getLocations (READ)
+get locations
**Parameters:**
-- `supplierContactId`: string
+- `args`: GenericQueryFilters & { search: string | null } (optional)
-### purchasing_getSupplierPayment (READ)
-get supplier payment
+### resources_getLocationsList (READ)
+get locations list
+**Parameters:** none (context auto-filled)
+
+### resources_getMaintenanceDispatch (READ)
+get maintenance dispatch
**Parameters:**
-- `supplierId`: string
+- `dispatchId`: string
-### purchasing_getSupplierProcessById (READ)
-get supplier process by id
+### resources_getMaintenanceDispatchComments (READ)
+get maintenance dispatch comments
**Parameters:**
-- `supplierProcessId`: string
+- `dispatchId`: string
-### purchasing_getSupplierProcessesByProcess (READ)
-get supplier processes by process
+### resources_getMaintenanceDispatchEvents (READ)
+get maintenance dispatch events
**Parameters:**
-- `processId`: string
+- `dispatchId`: string
-### purchasing_getSupplierProcessesBySupplier (READ)
-get supplier processes by supplier
+### resources_getMaintenanceDispatchItems (READ)
+get maintenance dispatch items
**Parameters:**
-- `supplierId`: string
+- `dispatchId`: string
-### purchasing_getSupplierQuote (READ)
-get supplier quote
+### resources_getMaintenanceDispatchItemTrackedEntities (READ)
+get maintenance dispatch item tracked entities
**Parameters:**
-- `supplierQuoteId`: string
+- `maintenanceDispatchItemId`: string
-### purchasing_getSupplierQuoteByInteractionId (READ)
-get supplier quote by interaction id
+### resources_getMaintenanceDispatches (READ)
+get maintenance dispatches
**Parameters:**
-- `interactionId`: string
+- `args`: GenericQueryFilters & { search: string | null; status?: string } (optional)
-### purchasing_getSupplierQuoteByExternalLinkId (READ)
-get supplier quote by external link id
+### resources_getMaintenanceDispatchesByLocation (READ)
+get maintenance dispatches by location
**Parameters:**
-- `externalLinkId`: string
+- `locationId`: string
+- `args`: GenericQueryFilters & { search: string | null; status?: string } (optional)
-### purchasing_getSupplierQuotes (READ)
-get supplier quotes
+### resources_getMaintenanceDispatchWorkCenters (READ)
+get maintenance dispatch work centers
**Parameters:**
-- `args`: GenericQueryFilters & {
- search: string | null;
- }
+- `dispatchId`: string
-### purchasing_getSupplierQuoteLine (READ)
-get supplier quote line
+### resources_getMaintenanceSchedule (READ)
+get maintenance schedule
**Parameters:**
-- `supplierQuoteLineId`: string
+- `scheduleId`: string
-### purchasing_getSupplierQuoteLines (READ)
-get supplier quote lines
+### resources_getMaintenanceScheduleItems (READ)
+get maintenance schedule items
**Parameters:**
-- `supplierQuoteId`: string
+- `scheduleId`: string
-### purchasing_getSupplierQuoteLinePrices (READ)
-get supplier quote line prices
+### resources_getMaintenanceSchedules (READ)
+get maintenance schedules
**Parameters:**
-- `supplierQuoteLineId`: string
+- `args`: GenericQueryFilters & { search: string | null; active?: boolean } (optional)
-### purchasing_getSupplierQuoteLinePricesByQuoteId (READ)
-get supplier quote line prices by quote id
+### resources_getMaintenanceSchedulesByLocation (READ)
+get maintenance schedules by location
**Parameters:**
-- `supplierQuoteId`: string
+- `locationId`: string
+- `args`: GenericQueryFilters & { search: string | null; active?: boolean } (optional)
-### purchasing_getSupplierQuotesList (READ)
-get supplier quotes list
-**Parameters:** none (context auto-filled)
+### resources_getOutstandingTrainingsForUser (READ)
+get outstanding trainings for user
+**Parameters:**
+- `employeeId`: string
-### purchasing_getSupplierShipping (READ)
-get supplier shipping
+### resources_getPartner (READ)
+get partner
**Parameters:**
-- `supplierId`: string
+- `partnerId`: string
+- `abilityId`: string
-### purchasing_getSuppliers (READ)
-get suppliers
+### resources_getPartnerBySupplierId (READ)
+get partner by supplier id
**Parameters:**
-- `args`: GenericQueryFilters & {
- search: string | null;
- type: string | null;
- status: string | null;
- }
+- `partnerId`: string
-### purchasing_getSuppliersList (READ)
-get suppliers list
-**Parameters:** none (context auto-filled)
+### resources_getPartners (READ)
+get partners
+**Parameters:**
+- `args`: GenericQueryFilters & { search: string | null } (optional)
-### purchasing_getSupplierType (READ)
-get supplier type
+### resources_getProcess (READ)
+get process
**Parameters:**
-- `supplierTypeId`: string
+- `processId`: string
-### purchasing_getSupplierTypes (READ)
-get supplier types
+### resources_getProcesses (READ)
+get processes
**Parameters:**
- `args`: GenericQueryFilters & { search: string | null } (optional)
-### purchasing_getSupplierTypesList (READ)
-get supplier types list
+### resources_getProcessesList (READ)
+get processes list
**Parameters:** none (context auto-filled)
-### purchasing_insertSupplier (WRITE)
-insert supplier
+### resources_getSuggestion (READ)
+get suggestion
**Parameters:**
-- `supplier`: Omit<z.infer<typeof supplierValidator>, "id"> & {
- companyId: string;
- createdBy: string;
- customFields?: Json;
- }
+- `suggestionId`: string
-### purchasing_insertSupplierContact (WRITE)
-insert supplier contact
+### resources_getSuggestions (READ)
+get suggestions
**Parameters:**
-- `supplierContact`: {
- supplierId: string;
- companyId: string;
- contact: z.infer<typeof supplierContactValidator>;
- supplierLocationId?: string;
- customFields?: Json;
- }
+- `args`: GenericQueryFilters & { search: string | null } (optional)
-### purchasing_insertSupplierInteraction (WRITE)
-insert supplier interaction
+### resources_getTraining (READ)
+get training
**Parameters:**
-- `supplierId`: string
+- `id`: string
-### purchasing_insertSupplierLocation (WRITE)
-insert supplier location
+### resources_getTrainingAssignment (READ)
+get training assignment
**Parameters:**
-- `supplierLocation`: {
- supplierId: string;
- companyId: string;
- name: string;
- address: {
- addressLine1?: string;
- addressLine2?: string;
- city?: string;
- stateProvince?: string;
- postalCode?: string;
- countryCode?: string;
- };
- customFields?: Json;
- }
+- `assignmentId`: string
-### purchasing_finalizePurchaseOrder (WRITE)
-finalize purchase order
+### resources_getTrainingAssignmentForCompletion (READ)
+get training assignment for completion
**Parameters:**
-- `purchaseOrderId`: string
+- `assignmentId`: string
-### purchasing_sendSupplierQuote (WRITE)
-send supplier quote
+### resources_getTrainingAssignments (READ)
+get training assignments
**Parameters:**
-- `supplierQuoteId`: string
+- `trainingId`: string (optional)
-### purchasing_updatePurchaseOrder (WRITE)
-update purchase order
+### resources_getTrainingAssignmentStatus (READ)
+get training assignment status
**Parameters:**
-- `purchaseOrder`: {
- id: string;
- status: (typeof purchaseOrderStatusType)[number];
- updatedBy: string;
- }
+- `args`: {
+ trainingId?: string;
+ status?: "Completed" | "Pending" | "Overdue" | "Not Required";
+ search?: string;
+ } & GenericQueryFilters (optional)
-### purchasing_updatePurchaseOrderExchangeRate (WRITE)
-update purchase order exchange rate
+### resources_getTrainingAssignmentSummary (READ)
+get training assignment summary
+**Parameters:** none (context auto-filled)
+
+### resources_getTrainingQuestions (READ)
+get training questions
**Parameters:**
-- `data`: {
- id: string;
- exchangeRate: number;
- }
+- `trainingId`: string
-### purchasing_updatePurchaseOrderFavorite (WRITE)
-update purchase order favorite
+### resources_getTrainings (READ)
+get trainings
**Parameters:**
-- `args`: {
- id: string;
- favorite: boolean;
- userId: string;
- }
+- `args`: { search: string | null } & GenericQueryFilters (optional)
-### purchasing_updatePurchaseOrderStatus (WRITE)
-update purchase order status
+### resources_getTrainingsList (READ)
+get trainings list
+**Parameters:** none (context auto-filled)
+
+### resources_getWorkCenter (READ)
+get work center
**Parameters:**
-- `update`: {
- id: string;
- status: (typeof purchaseOrderStatusType)[number];
- assignee: null | undefined;
- updatedBy: string;
- }
+- `id`: string
-### purchasing_updateSupplierAccounting (WRITE)
-update supplier accounting
+### resources_getWorkCenters (READ)
+get work centers
**Parameters:**
-- `supplierAccounting`: z.infer<typeof supplierAccountingValidator> & {
- updatedBy: string;
- }
+- `args`: { search: string | null } & GenericQueryFilters (optional)
-### purchasing_updateSupplierContact (WRITE)
-update supplier contact
+### resources_getWorkCentersByLocation (READ)
+get work centers by location
**Parameters:**
-- `supplierContact`: {
- contactId: string;
- contact: z.infer<typeof supplierContactValidator>;
- supplierLocationId?: string;
- customFields?: Json;
- }
+- `locationId`: string
-### purchasing_updateSupplierLocation (WRITE)
-update supplier location
+### resources_getWorkCentersList (READ)
+get work centers list
+**Parameters:** none (context auto-filled)
+
+### resources_getWorkCentersListWithBlockingStatus (READ)
+get work centers list with blocking status
+**Parameters:** none (context auto-filled)
+
+### resources_insertAbility (WRITE)
+insert ability
**Parameters:**
-- `supplierLocation`: {
- addressId: string;
+- `ability`: {
name: string;
- address: {
- addressLine1?: string;
- addressLine2?: string;
- city?: string;
- stateProvince?: string;
- countryCode?: string;
- postalCode?: string;
+ curve: {
+ data: {
+ week: number;
+ value: number;
+ }[];
};
- customFields?: Json;
+ shadowWeeks: number;
+ companyId: string;
+ createdBy: string;
}
-### purchasing_updateSupplierPayment (WRITE)
-update supplier payment
+### resources_insertEmployeeAbilities (WRITE)
+insert employee abilities
**Parameters:**
-- `supplierPayment`: z.infer<typeof supplierPaymentValidator> & {
- updatedBy: string;
- customFields?: Json;
- }
+- `abilityId`: string
+- `employeeIds`: string[]
-### purchasing_updateSupplierQuoteExchangeRate (WRITE)
-update supplier quote exchange rate
+### resources_insertTrainingCompletion (WRITE)
+insert training completion
**Parameters:**
-- `data`: {
- id: string;
- exchangeRate: number;
+- `completion`: {
+ trainingAssignmentId: string;
+ employeeId: string;
+ period: string | null;
+ companyId: string;
+ completedBy: string;
+ createdBy: string;
}
-### purchasing_updateSupplierQuoteFavorite (WRITE)
-update supplier quote favorite
+### resources_updateAbility (WRITE)
+update ability
**Parameters:**
-- `args`: {
- id: string;
- favorite: boolean;
- userId: string;
- }
+- `id`: string
+- `ability`: Partial<{
+ name: string;
+ curve: {
+ data: {
+ week: number;
+ value: number;
+ }[];
+ };
+ shadowWeeks: number;
+ }>
-### purchasing_updateSupplierQuoteStatus (WRITE)
-update supplier quote status
+### resources_updateSuggestionEmoji (WRITE)
+update suggestion emoji
**Parameters:**
-- `update`: {
- id: string;
- status: (typeof supplierQuoteStatusType)[number];
- assignee: null | undefined;
- updatedBy: string;
- }
+- `suggestionId`: string
+- `emoji`: string
-### purchasing_updateSupplierShipping (WRITE)
-update supplier shipping
+### resources_updateSuggestionTags (WRITE)
+update suggestion tags
**Parameters:**
-- `supplierShipping`: z.infer<typeof supplierShippingValidator> & {
+- `suggestionId`: string
+- `tags`: string[]
+
+### resources_updateTrainingQuestionOrder (WRITE)
+update training question order
+**Parameters:**
+- `updates`: {
+ id: string;
+ sortOrder: number;
updatedBy: string;
- customFields?: Json;
- }
+ }[]
-### purchasing_upsertPurchaseOrder (WRITE)
-upsert purchase order
+### resources_upsertContractor (WRITE)
+upsert contractor
**Parameters:**
-- `purchaseOrder`: | (Omit<
- z.infer<typeof purchaseOrderValidator>,
- "id" | "purchaseOrderId"
- > & {
- purchaseOrderId: string;
- status?: (typeof purchaseOrderStatusType)[number];
+- `contractorWithAbilities`: | {
+ id: string;
+ hoursPerWeek?: number;
+ abilities: string[];
companyId: string;
createdBy: string;
customFields?: Json;
- })
- | (Omit<
- z.infer<typeof purchaseOrderValidator>,
- "id" | "purchaseOrderId"
- > & {
+ }
+ | {
id: string;
- purchaseOrderId: string;
+ hoursPerWeek?: number;
+ abilities: string[];
updatedBy: string;
customFields?: Json;
- })
-- `receiptRequestedDate`: string (optional)
+ }
-### purchasing_upsertPurchaseOrderDelivery (WRITE)
-upsert purchase order delivery
+### resources_upsertEmployeeAbility (WRITE)
+upsert employee ability
**Parameters:**
-- `purchaseOrderDelivery`: | (z.infer<typeof purchaseOrderDeliveryValidator> & {
+- `employeeAbility`: {
+ id?: string;
+ abilityId: string;
+ employeeId: string;
+ trainingCompleted: boolean;
+ trainingDays?: number;
+ companyId: string;
+ }
+
+### resources_upsertFailureMode (WRITE)
+upsert failure mode
+**Parameters:**
+- `failureMode`: | (Omit<z.infer<typeof failureModeValidator>, "id"> & {
companyId: string;
createdBy: string;
customFields?: Json;
})
- | (z.infer<typeof purchaseOrderDeliveryValidator> & {
+ | (Omit<z.infer<typeof failureModeValidator>, "id"> & {
id: string;
updatedBy: string;
customFields?: Json;
})
-### purchasing_upsertPurchaseOrderLine (WRITE)
-upsert purchase order line
+### resources_upsertLocation (WRITE)
+upsert location
**Parameters:**
-- `purchaseOrderLine`: | (Omit<z.infer<typeof purchaseOrderLineValidator>, "id"> & {
+- `location`: | (Omit<z.infer<typeof locationValidator>, "id"> & {
companyId: string;
createdBy: string;
customFields?: Json;
})
- | (Omit<z.infer<typeof purchaseOrderLineValidator>, "id"> & {
+ | (Omit<z.infer<typeof locationValidator>, "id"> & {
id: string;
updatedBy: string;
customFields?: Json;
})
-### purchasing_upsertPurchaseOrderPayment (WRITE)
-upsert purchase order payment
+### resources_upsertMaintenanceDispatch (WRITE)
+upsert maintenance dispatch
**Parameters:**
-- `purchaseOrderPayment`: | (z.infer<typeof purchaseOrderPaymentValidator> & {
+- `dispatch`: | (Omit<z.infer<typeof maintenanceDispatchValidator>, "id"> & {
+ maintenanceDispatchId: string;
+ companyId: string;
createdBy: string;
- customFields?: Json;
+ content?: Json;
})
- | (z.infer<typeof purchaseOrderPaymentValidator> & {
+ | (Omit<z.infer<typeof maintenanceDispatchValidator>, "id" | "assignee"> & {
id: string;
+ assignee: string | null;
updatedBy: string;
- customFields?: Json;
+ content?: Json;
})
-### purchasing_upsertSupplier (WRITE)
-upsert supplier
+### resources_upsertMaintenanceDispatchComment (WRITE)
+upsert maintenance dispatch comment
**Parameters:**
-- `supplier`: | (Omit<z.infer<typeof supplierValidator>, "id"> & {
+- `comment`: | (Omit<z.infer<typeof maintenanceDispatchCommentValidator>, "id"> & {
companyId: string;
createdBy: string;
- customFields?: Json;
})
- | (Omit<z.infer<typeof supplierValidator>, "id"> & {
+ | (Omit<z.infer<typeof maintenanceDispatchCommentValidator>, "id"> & {
id: string;
updatedBy: string;
- customFields?: Json;
})
-### purchasing_upsertSupplierProcess (WRITE)
-upsert supplier process
+### resources_upsertMaintenanceDispatchEvent (WRITE)
+upsert maintenance dispatch event
**Parameters:**
-- `supplierProcess`: | (Omit<z.infer<typeof supplierProcessValidator>, "id"> & {
+- `event`: | (Omit<z.infer<typeof maintenanceDispatchEventValidator>, "id"> & {
companyId: string;
createdBy: string;
- customFields?: Json;
})
- | (Omit<z.infer<typeof supplierProcessValidator>, "id"> & {
+ | (Omit<z.infer<typeof maintenanceDispatchEventValidator>, "id"> & {
id: string;
updatedBy: string;
- customFields?: Json;
})
-### purchasing_upsertSupplierQuote (WRITE)
-upsert supplier quote
+### resources_upsertMaintenanceDispatchItem (WRITE)
+upsert maintenance dispatch item
**Parameters:**
-- `supplierQuote`: | (Omit<
- z.infer<typeof supplierQuoteValidator>,
- "id" | "supplierQuoteId"
- > & {
- supplierQuoteId: string;
+- `item`: | (Omit<z.infer<typeof maintenanceDispatchItemValidator>, "id"> & {
companyId: string;
createdBy: string;
- customFields?: Json;
})
- | (Omit<
- z.infer<typeof supplierQuoteValidator>,
- "id" | "supplierQuoteId"
- > & {
+ | (Omit<z.infer<typeof maintenanceDispatchItemValidator>, "id"> & {
id: string;
- supplierQuoteId: string;
updatedBy: string;
- customFields?: Json;
})
-### purchasing_upsertSupplierQuoteLine (WRITE)
-upsert supplier quote line
+### resources_upsertMaintenanceDispatchWorkCenter (WRITE)
+upsert maintenance dispatch work center
**Parameters:**
-- `supplierQuoteLine`: | (Omit<z.infer<typeof supplierQuoteLineValidator>, "id"> & {
+- `workCenter`: | (Omit<z.infer<typeof maintenanceDispatchWorkCenterValidator>, "id"> & {
companyId: string;
createdBy: string;
- customFields?: Json;
})
- | (Omit<z.infer<typeof supplierQuoteLineValidator>, "id"> & {
+ | (Omit<z.infer<typeof maintenanceDispatchWorkCenterValidator>, "id"> & {
id: string;
updatedBy: string;
- customFields?: Json;
})
-### purchasing_upsertSupplierType (WRITE)
-upsert supplier type
+### resources_upsertMaintenanceSchedule (WRITE)
+upsert maintenance schedule
**Parameters:**
-- `supplierType`: | (Omit<z.infer<typeof supplierTypeValidator>, "id"> & {
+- `schedule`: | (Omit<z.infer<typeof maintenanceScheduleValidator>, "id"> & {
companyId: string;
createdBy: string;
- customFields?: Json;
})
- | (Omit<z.infer<typeof supplierTypeValidator>, "id"> & {
+ | (Omit<z.infer<typeof maintenanceScheduleValidator>, "id"> & {
id: string;
updatedBy: string;
- customFields?: Json;
})
-### purchasing_deletePurchasingRFQ (DESTRUCTIVE)
-delete purchasing r f q
-**Parameters:**
-- `purchasingRfqId`: string
-
-### purchasing_deletePurchasingRFQLine (DESTRUCTIVE)
-delete purchasing r f q line
-**Parameters:**
-- `purchasingRfqLineId`: string
-
-### purchasing_getPurchasingRFQ (READ)
-get purchasing r f q
-**Parameters:**
-- `id`: string
-
-### purchasing_getPurchasingRFQs (READ)
-get purchasing r f qs
+### resources_upsertMaintenanceScheduleItem (WRITE)
+upsert maintenance schedule item
**Parameters:**
-- `args`: GenericQueryFilters & {
- search: string | null;
- }
+- `item`: | (Omit<z.infer<typeof maintenanceScheduleItemValidator>, "id"> & {
+ companyId: string;
+ createdBy: string;
+ })
+ | (Omit<z.infer<typeof maintenanceScheduleItemValidator>, "id"> & {
+ id: string;
+ updatedBy: string;
+ })
-### purchasing_getPurchasingRFQLine (READ)
-get purchasing r f q line
+### resources_upsertPartner (WRITE)
+upsert partner
**Parameters:**
-- `lineId`: string
+- `partner`: | (Omit<z.infer<typeof partnerValidator>, "supplierId"> & {
+ companyId: string;
+ createdBy: string;
+ customFields?: Json;
+ })
+ | (Omit<z.infer<typeof partnerValidator>, "supplierId"> & {
+ updatedBy: string;
+ customFields?: Json;
+ })
-### purchasing_getPurchasingRFQLines (READ)
-get purchasing r f q lines
+### resources_upsertProcess (WRITE)
+upsert process
**Parameters:**
-- `purchasingRfqId`: string
+- `process`: | (Omit<z.infer<typeof processValidator>, "id"> & {
+ companyId: string;
+ createdBy: string;
+ customFields?: Json;
+ })
+ | (Omit<z.infer<typeof processValidator>, "id"> & {
+ id: string;
+ companyId: string;
+ updatedBy: string;
+ customFields?: Json;
+ })
-### purchasing_getPurchasingRFQSuppliers (READ)
-get purchasing r f q suppliers
+### resources_upsertTraining (WRITE)
+upsert training
**Parameters:**
-- `purchasingRfqId`: string
+- `training`: | (Omit<z.infer<typeof trainingValidator>, "id"> & {
+ companyId: string;
+ createdBy: string;
+ })
+ | (Omit<z.infer<typeof trainingValidator>, "id"> & {
+ id: string;
+ updatedBy: string;
+ })
-### purchasing_upsertPurchasingRFQ (WRITE)
-upsert purchasing r f q
+### resources_upsertTrainingAssignment (WRITE)
+upsert training assignment
**Parameters:**
-- `purchasingRfq`: {
+- `assignment`: {
id?: string;
- rfqId: string;
- rfqDate: string;
- expirationDate?: string;
- locationId?: string;
- employeeId?: string;
- status?: (typeof purchasingRfqStatusType)[number];
+ trainingId: string;
+ groupIds: string[];
companyId: string;
createdBy?: string;
updatedBy?: string;
- customFields?: Json;
}
-### purchasing_upsertPurchasingRFQLine (WRITE)
-upsert purchasing r f q line
+### resources_upsertTrainingQuestion (WRITE)
+upsert training question
**Parameters:**
-- `purchasingRfqLine`: | {
- purchasingRfqId: string;
- itemId: string;
- description?: string;
- quantity: number[];
- purchaseUnitOfMeasureCode: string;
- inventoryUnitOfMeasureCode: string;
- conversionFactor?: number;
- order: number;
+- `trainingQuestion`: | (Omit<z.infer<typeof trainingQuestionValidator>, "id"> & {
+ companyId: string;
+ createdBy: string;
+ })
+ | (Omit<z.infer<typeof trainingQuestionValidator>, "id"> & {
+ id: string;
+ updatedBy: string;
+ })
+
+### resources_upsertWorkCenter (WRITE)
+upsert work center
+**Parameters:**
+- `workCenter`: | (Omit<z.infer<typeof workCenterValidator>, "id"> & {
companyId: string;
createdBy: string;
customFields?: Json;
- }
- | {
+ })
+ | (Omit<z.infer<typeof workCenterValidator>, "id"> & {
id: string;
- purchasingRfqId: string;
- itemId: string;
- description?: string;
- quantity: number[];
- purchaseUnitOfMeasureCode: string;
- inventoryUnitOfMeasureCode: string;
- conversionFactor?: number;
- order: number;
companyId: string;
updatedBy: string;
customFields?: Json;
- }
+ })
-### purchasing_upsertPurchasingRFQSuppliers (WRITE)
-upsert purchasing r f q suppliers
-**Parameters:**
-- `purchasingRfqId`: string
-- `supplierIds`: string[]
+---
-### purchasing_updatePurchasingRFQStatus (WRITE)
-update purchasing r f q status
+## shared (44 tools)
+
+### shared_approveRequest (WRITE)
+approve request
**Parameters:**
-- `args`: {
- id: string;
- status: (typeof purchasingRfqStatusType)[number];
- assignee?: string | null;
- updatedBy: string;
- }
+- `db`: Kysely<KyselyDatabase>
+- `id`: string
+- `notes`: string (optional)
-### purchasing_getLinkedSupplierQuotes (READ)
-get linked supplier quotes
+### shared_canApproveRequest (WRITE)
+can approve request
**Parameters:**
-- `purchasingRfqId`: string
+- `approvalRequest`: ApprovalRequestForApproveCheck
-### purchasing_getLinkedPurchasingRfqs (READ)
-get linked purchasing rfqs
+### shared_canApproveRequestInWindow (WRITE)
+can approve request in window
**Parameters:**
-- `supplierQuoteId`: string
+- `approvalRequest`: ApprovalRequestForApproveCheck
-### purchasing_getLinkedPurchasingRfqsForInteraction (READ)
-get linked purchasing rfqs for interaction
+### shared_cancelApprovalRequest (WRITE)
+cancel approval request
**Parameters:**
-- `supplierInteractionId`: string
+- `id`: string
-### purchasing_getSiblingQuotesForQuote (READ)
-get sibling quotes for quote
+### shared_canViewApprovalRequest (WRITE)
+can view approval request
**Parameters:**
-- `supplierQuoteId`: string
+- `approvalRequest`: ApprovalRequestForViewCheck
-### purchasing_getLinkedPurchasingRfqsForOrder (READ)
-get linked purchasing rfqs for order
+### shared_createApprovalRequest (WRITE)
+create approval request
**Parameters:**
-- `purchaseOrderId`: string
+- `request`: CreateApprovalRequestInput & { amount?: number }
-### purchasing_getSupplierQuotesForComparison (READ)
-get supplier quotes for comparison
+### shared_deleteApprovalRule (DESTRUCTIVE)
+delete approval rule
**Parameters:**
-- `purchasingRfqId`: string
+- `id`: string
-### purchasing_getPurchasingRFQSuppliersWithLinks (READ)
-get purchasing r f q suppliers with links
+### shared_deleteNote (DESTRUCTIVE)
+delete note
**Parameters:**
-- `purchasingRfqId`: string
-
----
-
-## quality (68 tools)
+- `noteId`: string
-### quality_activateGauge (WRITE)
-activate gauge
+### shared_deleteSavedView (DESTRUCTIVE)
+delete saved view
**Parameters:**
-- `gaugeId`: string
+- `viewId`: string
-### quality_deactivateGauge (WRITE)
-deactivate gauge
+### shared_generateEmbedding (WRITE)
+generate embedding
**Parameters:**
-- `gaugeId`: string
+- `text`: string
-### quality_deleteGauge (DESTRUCTIVE)
-delete gauge
+### shared_getApprovalById (READ)
+get approval by id
**Parameters:**
-- `gaugeId`: string
+- `id`: string
-### quality_deleteGaugeCalibrationRecord (DESTRUCTIVE)
-delete gauge calibration record
+### shared_getApprovalRequestsByDocument (READ)
+get approval requests by document
**Parameters:**
-- `gaugeCalibrationRecordId`: string
+- `documentType`: (typeof approvalDocumentType)[number]
+- `documentId`: string
-### quality_deleteGaugeType (DESTRUCTIVE)
-delete gauge type
+### shared_getApprovalRuleByAmount (READ)
+get approval rule by amount
**Parameters:**
-- `gaugeTypeId`: string
+- `documentType`: (typeof approvalDocumentType)[number]
+- `amount`: number (optional)
-### quality_deleteIssue (DESTRUCTIVE)
-delete issue
+### shared_getApproverUserIdsForRule (READ)
+get approver user ids for rule
**Parameters:**
-- `nonConformanceId`: string
+- `rule`: Pick<ApprovalRule, "approverGroupIds" | "defaultApproverId">
-### quality_deleteIssueAssociation (DESTRUCTIVE)
-delete issue association
+### shared_getApprovalRuleById (READ)
+get approval rule by id
**Parameters:**
-- `type`: string
-- `associationId`: string
+- `id`: string
-### quality_deleteIssueType (DESTRUCTIVE)
-delete issue type
-**Parameters:**
-- `nonConformanceTypeId`: string
+### shared_getApprovalRules (READ)
+get approval rules
+**Parameters:** none (context auto-filled)
-### quality_deleteIssueWorkflow (DESTRUCTIVE)
-delete issue workflow
+### shared_getApprovalRulesForApprover (READ)
+get approval rules for approver
**Parameters:**
-- `nonConformanceWorkflowId`: string
+- `documentType`: (typeof approvalDocumentType)[number]
-### quality_deleteRequiredAction (DESTRUCTIVE)
-delete required action
+### shared_getApprovalsForUser (READ)
+get approvals for user
**Parameters:**
-- `requiredActionId`: string
+- `args`: GenericQueryFilters & ApprovalFilters (optional)
-### quality_deleteQualityDocument (DESTRUCTIVE)
-delete quality document
+### shared_getBase64ImageFromSupabase (READ)
+get base64 image from supabase
**Parameters:**
-- `qualityDocumentId`: string
+- `path`: string
-### quality_deleteQualityDocumentStep (DESTRUCTIVE)
-delete quality document step
-**Parameters:**
-- `qualityDocumentStepId`: string
+### shared_getCountries (READ)
+get countries
+**Parameters:** none (context auto-filled)
-### quality_deleteRisk (DESTRUCTIVE)
-delete risk
+### shared_getLatestApprovalRequestForDocument (READ)
+get latest approval request for document
**Parameters:**
-- `riskId`: string
+- `documentType`: (typeof approvalDocumentType)[number]
+- `documentId`: string
-### quality_getIssueFromExternalLink (READ)
-get issue from external link
+### shared_getModelByItemId (READ)
+get model by item id
**Parameters:**
-- `id`: string
+- `itemId`: string
-### quality_getGauge (READ)
-get gauge
+### shared_getNotes (READ)
+get notes
**Parameters:**
-- `gaugeId`: string
+- `documentId`: string
-### quality_getGauges (READ)
-get gauges
+### shared_getPendingApprovalsForApprover (READ)
+get pending approvals for approver
+**Parameters:** none (context auto-filled)
+
+### shared_getPeriods (READ)
+get periods
**Parameters:**
-- `args`: GenericQueryFilters & { search: string | null } (optional)
+- `arg1`: { startDate: string; endDate: string }
-### quality_getGaugesList (READ)
-get gauges list
+### shared_getSavedViews (READ)
+get saved views
**Parameters:** none (context auto-filled)
-### quality_getGaugeCalibrationRecord (READ)
-get gauge calibration record
+### shared_getTagsList (READ)
+get tags list
**Parameters:**
-- `id`: string
+- `table`: string | null (optional)
-### quality_getGaugeCalibrationRecords (READ)
-get gauge calibration records
+### shared_hasPendingApproval (WRITE)
+has pending approval
**Parameters:**
-- `args`: GenericQueryFilters & { search: string | null } (optional)
+- `documentType`: (typeof approvalDocumentType)[number]
+- `documentId`: string
-### quality_getGaugeCalibrationRecordsByGaugeId (READ)
-get gauge calibration records by gauge id
+### shared_importCsv (WRITE)
+import csv
**Parameters:**
-- `gaugeId`: string
-
-### quality_getGaugeTypesList (READ)
-get gauge types list
-**Parameters:** none (context auto-filled)
+- `args`: {
+ table: string;
+ filePath: string;
+ columnMappings: Record<string, string>;
+ enumMappings?: Record<string, string[]>;
+ companyId: string;
+ userId: string;
+ }
-### quality_getGaugeType (READ)
-get gauge type
+### shared_insertNote (WRITE)
+insert note
**Parameters:**
-- `gaugeTypeId`: string
+- `note`: {
+ note: string;
+ documentId: string;
+ companyId: string;
+ createdBy: string;
+ }
-### quality_getGaugeTypes (READ)
-get gauge types
+### shared_insertTag (WRITE)
+insert tag
**Parameters:**
-- `args`: GenericQueryFilters & { search: string | null } (optional)
+- `tag`: Database["public"]["Tables"]["tag"]["Insert"]
-### quality_getIssue (READ)
-get issue
+### shared_isApprovalRequired (WRITE)
+is approval required
**Parameters:**
-- `nonConformanceId`: string
+- `documentType`: (typeof approvalDocumentType)[number]
+- `amount`: number (optional)
-### quality_getIssues (READ)
-get issues
+### shared_getExternalLink (READ)
+get external link
**Parameters:**
-- `args`: GenericQueryFilters & { search: string | null } (optional)
+- `id`: string
-### quality_getIssueWorkflow (READ)
-get issue workflow
+### shared_upsertExternalLink (WRITE)
+upsert external link
**Parameters:**
-- `nonConformanceWorkflowId`: string
+- `externalLink`: | Database["public"]["Tables"]["externalLink"]["Insert"]
+ | Database["public"]["Tables"]["externalLink"]["Update"]
-### quality_getIssueAction (READ)
-get issue action
+### shared_getCustomerPortals (READ)
+get customer portals
**Parameters:**
-- `id`: string
+- `args`: GenericQueryFilters & { search: string | null } (optional)
-### quality_getIssueActionTasks (READ)
-get issue action tasks
+### shared_getCustomerPortal (READ)
+get customer portal
**Parameters:**
- `id`: string
-- `supplierId`: string (optional)
-### quality_getIssueApprovalTasks (READ)
-get issue approval tasks
+### shared_deleteCustomerPortal (DESTRUCTIVE)
+delete customer portal
**Parameters:**
- `id`: string
-### quality_getIssueItems (READ)
-get issue items
+### shared_updateModelThumbnail (WRITE)
+update model thumbnail
**Parameters:**
-- `id`: string
+- `modelId`: string
+- `thumbnailPath`: string
-### quality_getIssueAssociations (READ)
-get issue associations
+### shared_upsertModelUpload (WRITE)
+upsert model upload
**Parameters:**
-- `nonConformanceId`: string
+- `upload`: | {
+ id: string;
+ modelPath: string;
+ companyId: string;
+ createdBy: string;
+ }
+ | {
+ id: string;
+ name: string;
+ size: number;
+ thumbnailPath: string;
+ }
-### quality_getIssueReviewers (READ)
-get issue reviewers
+### shared_updateNote (WRITE)
+update note
**Parameters:**
- `id`: string
+- `note`: string
-### quality_getIssueSuppliers (READ)
-get issue suppliers
+### shared_rejectRequest (WRITE)
+reject request
**Parameters:**
+- `db`: Kysely<KyselyDatabase>
- `id`: string
+- `notes`: string (optional)
-### quality_getIssueTasks (READ)
-get issue tasks
+### shared_upsertApprovalRule (WRITE)
+upsert approval rule
**Parameters:**
-- `id`: string
+- `rule`: UpsertApprovalRuleInput
-### quality_getIssueType (READ)
-get issue type
+### shared_upsertSavedView (WRITE)
+upsert saved view
**Parameters:**
-- `nonConformanceTypeId`: string
+- `view`: {
+ id?: string;
+ name: string;
+ description?: string;
+ table: string;
+ type: "Public" | "Private";
+ filters?: string[];
+ sorts?: string[];
+ columnPinning?: Record<string, boolean>;
+ columnVisibility?: Record<string, boolean>;
+ columnOrder?: string[];
+ userId: string;
+ companyId: string;
+ }
-### quality_getIssueTypes (READ)
-get issue types
+### shared_updateSavedViewOrder (WRITE)
+update saved view order
**Parameters:**
-- `args`: GenericQueryFilters & { search: string | null } (optional)
+- `updates`: {
+ id: string;
+ sortOrder: number;
+ updatedBy: string;
+ }[]
-### quality_getIssueWorkflows (READ)
-get issue workflows
+---
+
+## inventory (72 tools)
+
+### inventory_deleteBatchProperty (DESTRUCTIVE)
+delete batch property
**Parameters:**
-- `args`: GenericQueryFilters & { search: string | null } (optional)
+- `id`: string
-### quality_getIssueWorkflowsList (READ)
-get issue workflows list
-**Parameters:** none (context auto-filled)
+### inventory_deleteKanban (DESTRUCTIVE)
+delete kanban
+**Parameters:**
+- `kanbanId`: string
-### quality_getIssueTypesList (READ)
-get issue types list
-**Parameters:** none (context auto-filled)
+### inventory_deleteReceipt (DESTRUCTIVE)
+delete receipt
+**Parameters:**
+- `receiptId`: string
-### quality_getQualityActions (READ)
-get quality actions
+### inventory_deleteReceiptLine (DESTRUCTIVE)
+delete receipt line
**Parameters:**
-- `args`: GenericQueryFilters & { search: string | null } (optional)
+- `receiptLineId`: string
-### quality_getQualityDocument (READ)
-get quality document
+### inventory_deleteShelf (DESTRUCTIVE)
+delete shelf
**Parameters:**
-- `id`: string
+- `shelfId`: string
-### quality_getQualityDocumentSteps (READ)
-get quality document steps
+### inventory_deleteShipment (DESTRUCTIVE)
+delete shipment
**Parameters:**
-- `qualityDocumentId`: string
+- `shipmentId`: string
-### quality_getQualityDocumentVersions (READ)
-get quality document versions
+### inventory_deleteShipmentLine (DESTRUCTIVE)
+delete shipment line
**Parameters:**
-- `qualityDocument`: { name: string; version: number }
+- `shipmentLineId`: string
-### quality_getQualityDocuments (READ)
-get quality documents
+### inventory_deleteShippingMethod (DESTRUCTIVE)
+delete shipping method
**Parameters:**
-- `args`: { search: string | null } & GenericQueryFilters (optional)
+- `shippingMethodId`: string
-### quality_getQualityDocumentsList (READ)
-get quality documents list
-**Parameters:** none (context auto-filled)
+### inventory_deleteStockTransfer (DESTRUCTIVE)
+delete stock transfer
+**Parameters:**
+- `stockTransferId`: string
-### quality_getQualityFiles (READ)
-get quality files
+### inventory_deleteStockTransferLine (DESTRUCTIVE)
+delete stock transfer line
**Parameters:**
-- `id`: string
+- `stockTransferLineId`: string
-### quality_getRequiredActionsList (READ)
-get required actions list
-**Parameters:** none (context auto-filled)
+### inventory_deleteWarehouseTransfer (DESTRUCTIVE)
+delete warehouse transfer
+**Parameters:**
+- `transferId`: string
-### quality_getRequiredActions (READ)
-get required actions
+### inventory_deleteWarehouseTransferLine (DESTRUCTIVE)
+delete warehouse transfer line
**Parameters:**
-- `args`: GenericQueryFilters & { search: string | null } (optional)
+- `transferLineId`: string
-### quality_getRequiredAction (READ)
-get required action
+### inventory_getItemLedgerPage (READ)
+get item ledger page
**Parameters:**
-- `requiredActionId`: string
+- `itemId`: string
+- `locationId`: string
+- `sortDescending`: boolean (optional)
+- `page`: number (optional)
-### quality_getRisk (READ)
-get risk
+### inventory_getBatchProperties (READ)
+get batch properties
**Parameters:**
-- `riskId`: string
+- `itemIds`: string[]
-### quality_getRisks (READ)
-get risks
+### inventory_getInventoryItems (READ)
+get inventory items
**Parameters:**
+- `locationId`: string
- `args`: GenericQueryFilters & {
search: string | null;
- status?: typeof riskStatus;
- source?: typeof riskSource;
- // might be needed later for filtering by assignee
- assignee?: string[];
- } (optional)
+ }
-### quality_insertIssueReviewer (WRITE)
-insert issue reviewer
+### inventory_getInventoryItemsCount (READ)
+get inventory items count
**Parameters:**
-- `reviewer`: z.infer<typeof nonConformanceReviewerValidator> & {
- nonConformanceId: string;
- companyId: string;
- createdBy: string;
+- `locationId`: string
+- `args`: GenericQueryFilters & {
+ search: string | null;
}
-### quality_updateIssueActionProcesses (WRITE)
-update issue action processes
+### inventory_getKanbans (READ)
+get kanbans
**Parameters:**
-- `args`: {
- actionTaskId: string;
- processIds: string[];
- companyId: string;
- createdBy: string;
+- `locationId`: string
+- `args`: GenericQueryFilters & {
+ search: string | null;
}
-### quality_updateIssueStatus (WRITE)
-update issue status
+### inventory_getKanban (READ)
+get kanban
**Parameters:**
-- `update`: {
- id: string;
- status: (typeof nonConformanceStatus)[number];
- assignee: string | null | undefined;
- closeDate: string | null | undefined;
- updatedBy: string;
- }
+- `kanbanId`: string
-### quality_updateIssueTaskStatus (WRITE)
-update issue task status
+### inventory_getStockTransfer (READ)
+get stock transfer
**Parameters:**
-- `args`: {
- id: string;
- status: "Pending" | "Completed" | "Skipped" | "In Progress";
- type: "investigation" | "action" | "approval" | "review";
- userId?: string;
- assignee?: string | null;
- }
+- `stockTransferId`: string
-### quality_updateIssueTaskContent (WRITE)
-update issue task content
+### inventory_getStockTransferLine (READ)
+get stock transfer line
**Parameters:**
-- `args`: {
- id: string;
- type: "action" | "approval" | "review";
- content: JSONContent;
- }
+- `stockTransferLineId`: string
-### quality_updateQualityDocumentStepOrder (WRITE)
-update quality document step order
+### inventory_getStockTransferLines (READ)
+get stock transfer lines
**Parameters:**
-- `updates`: {
- id: string;
- sortOrder: number;
- updatedBy: string;
- }[]
+- `stockTransferId`: string
-### quality_updateRiskStatus (WRITE)
-update risk status
+### inventory_getStockTransferTracking (READ)
+get stock transfer tracking
**Parameters:**
-- `riskId`: string
-- `status`: (typeof riskStatus)[number]
+- `stockTransferId`: string
-### quality_upsertGauge (WRITE)
-upsert gauge
+### inventory_getStockTransfers (READ)
+get stock transfers
**Parameters:**
-- `gauge`: | (Omit<z.infer<typeof gaugeValidator>, "id" | "gaugeId"> & {
- gaugeId: string;
- companyId: string;
- gaugeCalibrationStatus: (typeof gaugeCalibrationStatus)[number];
- createdBy: string;
- customFields?: Json;
- })
- | (Omit<z.infer<typeof gaugeValidator>, "id" | "gaugeId"> & {
- id: string;
- gaugeId: string;
- gaugeCalibrationStatus: (typeof gaugeCalibrationStatus)[number];
- updatedBy: string;
- customFields?: Json;
- })
+- `args`: GenericQueryFilters & {
+ search: string | null;
+ locationId: string | null;
+ }
-### quality_upsertGaugeCalibrationRecord (WRITE)
-upsert gauge calibration record
+### inventory_getDefaultShelfOrShelfWithHighestQuantity (READ)
+get default shelf or shelf with highest quantity
**Parameters:**
-- `gaugeCalibrationRecord`: | (Omit<z.infer<typeof gaugeCalibrationRecordValidator>, "id"> & {
- companyId: string;
- inspectionStatus: (typeof inspectionStatus)[number];
- createdBy: string;
- customFields?: Json;
- })
- | (Omit<z.infer<typeof gaugeCalibrationRecordValidator>, "id"> & {
- id: string;
- inspectionStatus: (typeof inspectionStatus)[number];
- updatedBy: string;
- customFields?: Json;
- })
+- `itemId`: string
+- `locationId`: string
-### quality_upsertGaugeType (WRITE)
-upsert gauge type
+### inventory_getReceipts (READ)
+get receipts
**Parameters:**
-- `gaugeType`: | (Omit<z.infer<typeof gaugeTypeValidator>, "id"> & {
- companyId: string;
- createdBy: string;
- customFields?: Json;
- })
- | (Omit<z.infer<typeof issueTypeValidator>, "id"> & {
- id: string;
- updatedBy: string;
- customFields?: Json;
- })
+- `args`: GenericQueryFilters & {
+ search: string | null;
+ }
-### quality_upsertIssue (WRITE)
-upsert issue
+### inventory_getReceipt (READ)
+get receipt
**Parameters:**
-- `nonConformance`: | (Omit<z.infer<typeof issueValidator>, "id" | "nonConformanceId"> & {
- nonConformanceId: string;
- companyId: string;
- createdBy: string;
- customFields?: Json;
- })
- | (Omit<z.infer<typeof issueValidator>, "id" | "nonConformanceId"> & {
- id: string;
- nonConformanceId: string;
- updatedBy: string;
- customFields?: Json;
- })
+- `receiptId`: string
-### quality_upsertIssueWorkflow (WRITE)
-upsert issue workflow
+### inventory_getReceiptLines (READ)
+get receipt lines
**Parameters:**
-- `nonConformanceWorkflow`: | (Omit<z.infer<typeof issueWorkflowValidator>, "id"> & {
- companyId: string;
- createdBy: string;
- })
- | (Omit<z.infer<typeof issueWorkflowValidator>, "id"> & {
- id: string;
- updatedBy: string;
- })
+- `receiptId`: string
-### quality_upsertIssueType (WRITE)
-upsert issue type
+### inventory_getReceiptTracking (READ)
+get receipt tracking
**Parameters:**
-- `nonConformanceType`: | (Omit<z.infer<typeof issueTypeValidator>, "id"> & {
- companyId: string;
- createdBy: string;
- customFields?: Json;
- })
- | (Omit<z.infer<typeof issueTypeValidator>, "id"> & {
- id: string;
- updatedBy: string;
- customFields?: Json;
- })
+- `receiptId`: string
-### quality_upsertRequiredAction (WRITE)
-upsert required action
+### inventory_getReceiptLineTracking (READ)
+get receipt line tracking
**Parameters:**
-- `requiredAction`: | (Omit<z.infer<typeof issueTypeValidator>, "id"> & {
- companyId: string;
- active?: boolean;
- createdBy: string;
- })
- | (Omit<z.infer<typeof issueTypeValidator>, "id"> & {
- id: string;
- active?: boolean;
- updatedBy: string;
- })
+- `receiptLineId`: string
-### quality_upsertQualityDocument (WRITE)
-upsert quality document
+### inventory_getReceiptFiles (READ)
+get receipt files
**Parameters:**
-- `qualityDocument`: | (Omit<z.infer<typeof qualityDocumentValidator>, "id"> & {
- companyId: string;
- createdBy: string;
- })
- | (Omit<z.infer<typeof qualityDocumentValidator>, "id"> & {
- id: string;
- updatedBy: string;
- })
+- `lineIds`: string[]
-### quality_upsertQualityDocumentStep (WRITE)
-upsert quality document step
+### inventory_getSerialNumbersForItem (READ)
+get serial numbers for item
**Parameters:**
-- `qualityDocumentStep`: | (Omit<z.infer<typeof qualityDocumentStepValidator>, "id"> & {
- companyId: string;
- createdBy: string;
- })
- | (Omit<z.infer<typeof qualityDocumentStepValidator>, "id"> & {
- id: string;
- updatedBy: string;
- })
+- `args`: {
+ itemId: string;
+ companyId: string;
+ }
-### quality_upsertRisk (WRITE)
-upsert risk
+### inventory_getBatchNumbersForItem (READ)
+get batch numbers for item
**Parameters:**
-- `risk`: | (Omit<
- z.infer<typeof riskRegisterValidator>,
- "id" | "severity" | "likelihood"
- > & {
- severity: number;
- likelihood: number;
- companyId: string;
- createdBy: string;
- })
- | (Omit<
- z.infer<typeof riskRegisterValidator>,
- "id" | "severity" | "likelihood"
- > & {
- severity: number;
- likelihood: number;
- id: string;
- updatedBy: string; // This might be used for history/tracking if added
- })
-
----
+- `args`: {
+ itemId: string;
+ companyId: string;
+ isReadOnly?: boolean;
+ }
-## resources (94 tools)
+### inventory_getShelvesList (READ)
+get shelves list
+**Parameters:** none (context auto-filled)
-### resources_activateWorkCenter (WRITE)
-activate work center
+### inventory_getShelvesListForLocation (READ)
+get shelves list for location
**Parameters:**
-- `id`: string
+- `locationId`: string
-### resources_deleteAbility (DESTRUCTIVE)
-delete ability
+### inventory_getShelves (READ)
+get shelves
**Parameters:**
-- `abilityId`: string
-- `hardDelete`: boolean (optional)
+- `locationId`: string
+- `args`: GenericQueryFilters & {
+ search: string | null;
+ }
-### resources_deleteContractor (DESTRUCTIVE)
-delete contractor
+### inventory_getShelf (READ)
+get shelf
**Parameters:**
-- `contractorId`: string
+- `shelfId`: string
-### resources_deleteEmployeeAbility (DESTRUCTIVE)
-delete employee ability
+### inventory_getShipments (READ)
+get shipments
**Parameters:**
-- `employeeAbilityId`: string
+- `args`: GenericQueryFilters & {
+ search: string | null;
+ }
-### resources_deleteFailureMode (DESTRUCTIVE)
-delete failure mode
+### inventory_getShipment (READ)
+get shipment
**Parameters:**
-- `failureModeId`: string
+- `shipmentId`: string
-### resources_deleteLocation (DESTRUCTIVE)
-delete location
+### inventory_getShipmentLines (READ)
+get shipment lines
**Parameters:**
-- `locationId`: string
+- `shipmentId`: string
-### resources_deleteMaintenanceDispatch (DESTRUCTIVE)
-delete maintenance dispatch
+### inventory_getShipmentLinesWithDetails (READ)
+get shipment lines with details
**Parameters:**
-- `dispatchId`: string
+- `shipmentId`: string
-### resources_deleteMaintenanceDispatchComment (DESTRUCTIVE)
-delete maintenance dispatch comment
+### inventory_getShipmentFiles (READ)
+get shipment files
**Parameters:**
-- `commentId`: string
+- `lineIds`: string[]
-### resources_deleteMaintenanceDispatchEvent (DESTRUCTIVE)
-delete maintenance dispatch event
+### inventory_getShipmentRelatedItems (READ)
+get shipment related items
**Parameters:**
-- `eventId`: string
+- `shipmentId`: string
+- `sourceDocumentId`: string
-### resources_deleteMaintenanceDispatchItem (DESTRUCTIVE)
-delete maintenance dispatch item
+### inventory_getShipmentTracking (READ)
+get shipment tracking
**Parameters:**
-- `itemId`: string
+- `shipmentId`: string
-### resources_deleteMaintenanceDispatchWorkCenter (DESTRUCTIVE)
-delete maintenance dispatch work center
+### inventory_getShipmentLineTracking (READ)
+get shipment line tracking
**Parameters:**
-- `workCenterId`: string
+- `shipmentLineId`: string
-### resources_deleteMaintenanceSchedule (DESTRUCTIVE)
-delete maintenance schedule
+### inventory_getShippingMethod (READ)
+get shipping method
**Parameters:**
-- `scheduleId`: string
+- `shippingMethodId`: string
-### resources_deleteMaintenanceScheduleItem (DESTRUCTIVE)
-delete maintenance schedule item
+### inventory_getShippingMethods (READ)
+get shipping methods
**Parameters:**
-- `itemId`: string
+- `args`: GenericQueryFilters & {
+ search: string | null;
+ }
-### resources_deletePartner (DESTRUCTIVE)
-delete partner
-**Parameters:**
-- `partnerId`: string
+### inventory_getShippingMethodsList (READ)
+get shipping methods list
+**Parameters:** none (context auto-filled)
-### resources_activateProcess (WRITE)
-activate process
-**Parameters:**
-- `processId`: string
+### inventory_getShippingTermsList (READ)
+get shipping terms list
+**Parameters:** none (context auto-filled)
-### resources_processDeactivate (WRITE)
-process deactivate
+### inventory_getTrackedEntities (READ)
+get tracked entities
**Parameters:**
-- `processId`: string
+- `args`: GenericQueryFilters & {
+ search: string | null;
+ }
-### resources_deleteProcess (DESTRUCTIVE)
-delete process
+### inventory_getTrackedEntitiesByMakeMethodId (READ)
+get tracked entities by make method id
**Parameters:**
-- `processId`: string
+- `jobMakeMethodId`: string
-### resources_deleteShift (DESTRUCTIVE)
-delete shift
+### inventory_getTrackedEntity (READ)
+get tracked entity
**Parameters:**
-- `shiftId`: string
+- `trackedEntityId`: string
-### resources_deleteSuggestion (DESTRUCTIVE)
-delete suggestion
+### inventory_getTrackedEntitiesByOperationId (READ)
+get tracked entities by operation id
**Parameters:**
-- `suggestionId`: string
+- `operationId`: string
-### resources_deleteTraining (DESTRUCTIVE)
-delete training
+### inventory_getWarehouseTransfers (READ)
+get warehouse transfers
**Parameters:**
-- `trainingId`: string
+- `args`: GenericQueryFilters & {
+ search: string | null;
+ }
-### resources_deleteTrainingAssignment (DESTRUCTIVE)
-delete training assignment
+### inventory_getWarehouseTransfer (READ)
+get warehouse transfer
**Parameters:**
-- `assignmentId`: string
+- `transferId`: string
-### resources_deleteTrainingQuestion (DESTRUCTIVE)
-delete training question
+### inventory_getWarehouseTransferLine (READ)
+get warehouse transfer line
**Parameters:**
-- `trainingQuestionId`: string
+- `transferId`: string
+- `lineId`: string
-### resources_deleteWorkCenter (DESTRUCTIVE)
-delete work center
+### inventory_getWarehouseTransferLines (READ)
+get warehouse transfer lines
**Parameters:**
-- `id`: string
+- `transferId`: string
-### resources_getAbilities (READ)
-get abilities
+### inventory_insertManualInventoryAdjustment (WRITE)
+insert manual inventory adjustment
**Parameters:**
-- `args`: GenericQueryFilters & { search: string | null }
-
-### resources_getAbilitiesList (READ)
-get abilities list
-**Parameters:** none (context auto-filled)
+- `inventoryAdjustment`: z.infer<typeof inventoryAdjustmentValidator> & {
+ companyId: string;
+ createdBy: string;
+ }
-### resources_getAbility (READ)
-get ability
+### inventory_updateBatchPropertyOrder (WRITE)
+update batch property order
**Parameters:**
-- `abilityId`: string
+- `data`: Omit<
+ z.infer<typeof batchPropertyOrderValidator>,
+ "batchPropertyGroupId"
+ > & {
+ batchPropertyGroupId?: string | null;
+ updatedBy: string;
+ }
-### resources_getContractor (READ)
-get contractor
+### inventory_updateStockTransferStatus (WRITE)
+update stock transfer status
**Parameters:**
-- `contractorId`: string
+- `args`: {
+ id: string;
+ status: Database["public"]["Enums"]["stockTransferStatus"];
+ assignee?: string | null;
+ completedAt: string | null;
+ updatedBy: string;
+ }
-### resources_getContractors (READ)
-get contractors
+### inventory_upsertBatchProperty (WRITE)
+upsert batch property
**Parameters:**
-- `args`: GenericQueryFilters & { search: string | null } (optional)
+- `batchProperty`: z.infer<typeof batchPropertyValidator> & {
+ companyId: string;
+ userId: string;
+ }
-### resources_getEmployeeAbilities (READ)
-get employee abilities
+### inventory_upsertKanban (WRITE)
+upsert kanban
**Parameters:**
-- `employeeId`: string
+- `kanban`: | (Omit<z.infer<typeof kanbanValidator>, "id"> & {
+ companyId: string;
+ createdBy: string;
+ customFields?: Json;
+ })
+ | (Omit<z.infer<typeof kanbanValidator>, "id"> & {
+ id: string;
+ updatedBy: string;
+ customFields?: Json;
+ })
-### resources_getFailureMode (READ)
-get failure mode
+### inventory_upsertReceipt (WRITE)
+upsert receipt
**Parameters:**
-- `failureModeId`: string
+- `receipt`: | (Omit<z.infer<typeof receiptValidator>, "id" | "receiptId"> & {
+ receiptId: string;
+ companyId: string;
+ createdBy: string;
+ customFields?: Json;
+ })
+ | (Omit<z.infer<typeof receiptValidator>, "id" | "receiptId"> & {
+ id: string;
+ receiptId: string;
+ updatedBy: string;
+ customFields?: Json;
+ })
-### resources_getFailureModes (READ)
-get failure modes
+### inventory_upsertShelf (WRITE)
+upsert shelf
**Parameters:**
-- `args`: GenericQueryFilters & { search: string | null } (optional)
-
-### resources_getFailureModesList (READ)
-get failure modes list
-**Parameters:** none (context auto-filled)
+- `shelf`: | (Omit<z.infer<typeof shelfValidator>, "id"> & {
+ companyId: string;
+ createdBy: string;
+ customFields?: Json;
+ })
+ | (Omit<z.infer<typeof shelfValidator>, "id"> & {
+ id: string;
+ updatedBy: string;
+ customFields?: Json;
+ })
-### resources_getLocation (READ)
-get location
+### inventory_upsertShippingMethod (WRITE)
+upsert shipping method
**Parameters:**
-- `locationId`: string
+- `shippingMethod`: | (Omit<z.infer<typeof shippingMethodValidator>, "id"> & {
+ companyId: string;
+ createdBy: string;
+ customFields?: Json;
+ })
+ | (Omit<z.infer<typeof shippingMethodValidator>, "id"> & {
+ id: string;
+ updatedBy: string;
+ customFields?: Json;
+ })
-### resources_getLocations (READ)
-get locations
+### inventory_upsertShipment (WRITE)
+upsert shipment
**Parameters:**
-- `args`: GenericQueryFilters & { search: string | null } (optional)
-
-### resources_getLocationsList (READ)
-get locations list
-**Parameters:** none (context auto-filled)
+- `shipment`: | (Omit<z.infer<typeof shipmentValidator>, "id" | "shipmentId"> & {
+ shipmentId: string;
+ companyId: string;
+ createdBy: string;
+ customFields?: Json;
+ })
+ | (Omit<z.infer<typeof shipmentValidator>, "id" | "shipmentId"> & {
+ id: string;
+ shipmentId: string;
+ updatedBy: string;
+ customFields?: Json;
+ })
-### resources_getMaintenanceDispatch (READ)
-get maintenance dispatch
+### inventory_upsertStockTransfer (WRITE)
+upsert stock transfer
**Parameters:**
-- `dispatchId`: string
+- `stockTransfer`: | {
+ locationId: string;
+ stockTransferId: string;
+ companyId: string;
+ createdBy: string;
+ customFields?: Json;
+ }
+ | {
+ id: string;
+ locationId: string;
+ stockTransferId: string;
+ companyId: string;
+ updatedBy: string;
+ customFields?: Json;
+ }
-### resources_getMaintenanceDispatchComments (READ)
-get maintenance dispatch comments
+### inventory_upsertStockTransferLine (WRITE)
+upsert stock transfer line
**Parameters:**
-- `dispatchId`: string
+- `stockTransferLine`: | (Omit<z.infer<typeof stockTransferLineValidator>, "id"> & {
+ companyId: string;
+ createdBy: string;
+ })
+ | (Omit<z.infer<typeof stockTransferLineValidator>, "id"> & {
+ id: string;
+ updatedBy: string;
+ })
-### resources_getMaintenanceDispatchEvents (READ)
-get maintenance dispatch events
+### inventory_upsertStockTransferLines (WRITE)
+upsert stock transfer lines
**Parameters:**
-- `dispatchId`: string
+- `args`: {
+ lines: z.infer<typeof stockTransferValidator>["lines"];
+ stockTransferId: string;
+ companyId: string;
+ createdBy: string;
+ }
-### resources_getMaintenanceDispatchItems (READ)
-get maintenance dispatch items
+### inventory_upsertWarehouseTransfer (WRITE)
+upsert warehouse transfer
**Parameters:**
-- `dispatchId`: string
+- `transfer`: | (Omit<z.infer<typeof warehouseTransferValidator>, "id" | "transferId"> & {
+ transferId: string;
+ companyId: string;
+ createdBy: string;
+ customFields?: Json;
+ })
+ | (Omit<z.infer<typeof warehouseTransferValidator>, "id" | "transferId"> & {
+ id: string;
+ transferId: string;
+ updatedBy: string;
+ customFields?: Json;
+ })
-### resources_getMaintenanceDispatchItemTrackedEntities (READ)
-get maintenance dispatch item tracked entities
+### inventory_updateWarehouseTransferStatus (WRITE)
+update warehouse transfer status
**Parameters:**
-- `maintenanceDispatchItemId`: string
+- `transferId`: string
+- `status`: Database["public"]["Tables"]["warehouseTransfer"]["Row"]["status"]
-### resources_getMaintenanceDispatches (READ)
-get maintenance dispatches
+### inventory_upsertWarehouseTransferLine (WRITE)
+upsert warehouse transfer line
**Parameters:**
-- `args`: GenericQueryFilters & { search: string | null; status?: string } (optional)
+- `line`: | Database["public"]["Tables"]["warehouseTransferLine"]["Insert"]
+ | (Database["public"]["Tables"]["warehouseTransferLine"]["Update"] & {
+ id: string;
+ })
-### resources_getMaintenanceDispatchesByLocation (READ)
-get maintenance dispatches by location
+### inventory_getDefaultShelfForJob (READ)
+get default shelf for job
**Parameters:**
+- `itemId`: string
- `locationId`: string
-- `args`: GenericQueryFilters & { search: string | null; status?: string } (optional)
-### resources_getMaintenanceDispatchWorkCenters (READ)
-get maintenance dispatch work centers
-**Parameters:**
-- `dispatchId`: string
+---
-### resources_getMaintenanceSchedule (READ)
-get maintenance schedule
-**Parameters:**
-- `scheduleId`: string
+## users (25 tools)
-### resources_getMaintenanceScheduleItems (READ)
-get maintenance schedule items
+### users_deleteEmployeeType (DESTRUCTIVE)
+delete employee type
**Parameters:**
-- `scheduleId`: string
+- `employeeTypeId`: string
-### resources_getMaintenanceSchedules (READ)
-get maintenance schedules
+### users_deleteGroup (DESTRUCTIVE)
+delete group
**Parameters:**
-- `args`: GenericQueryFilters & { search: string | null; active?: boolean } (optional)
+- `groupId`: string
-### resources_getMaintenanceSchedulesByLocation (READ)
-get maintenance schedules by location
-**Parameters:**
-- `locationId`: string
-- `args`: GenericQueryFilters & { search: string | null; active?: boolean } (optional)
+### users_getCompaniesForUser (READ)
+get companies for user
+**Parameters:** none (context auto-filled)
-### resources_getOutstandingTrainingsForUser (READ)
-get outstanding trainings for user
+### users_getCustomers (READ)
+get customers
**Parameters:**
-- `employeeId`: string
+- `args`: GenericQueryFilters & {
+ search: string | null;
+ }
-### resources_getPartner (READ)
-get partner
+### users_getEmployee (READ)
+get employee
**Parameters:**
-- `partnerId`: string
-- `abilityId`: string
+- `id`: string
-### resources_getPartnerBySupplierId (READ)
-get partner by supplier id
+### users_getEmployees (READ)
+get employees
**Parameters:**
-- `partnerId`: string
+- `args`: GenericQueryFilters & {
+ search: string | null;
+ }
-### resources_getPartners (READ)
-get partners
+### users_getConsoleOperators (READ)
+get console operators
**Parameters:**
-- `args`: GenericQueryFilters & { search: string | null } (optional)
+- `args`: GenericQueryFilters & {
+ search: string | null;
+ }
-### resources_getProcess (READ)
-get process
+### users_getEmployeeType (READ)
+get employee type
**Parameters:**
-- `processId`: string
+- `employeeTypeId`: string
-### resources_getProcesses (READ)
-get processes
+### users_getEmployeeTypes (READ)
+get employee types
**Parameters:**
- `args`: GenericQueryFilters & { search: string | null } (optional)
-### resources_getProcessesList (READ)
-get processes list
+### users_getInvitable (READ)
+get invitable
**Parameters:** none (context auto-filled)
-### resources_getSuggestion (READ)
-get suggestion
-**Parameters:**
-- `suggestionId`: string
+### users_getModules (READ)
+get modules
+**Parameters:** none (context auto-filled)
-### resources_getSuggestions (READ)
-get suggestions
+### users_getGroup (READ)
+get group
**Parameters:**
-- `args`: GenericQueryFilters & { search: string | null } (optional)
+- `groupId`: string
-### resources_getTraining (READ)
-get training
+### users_getGroupMembers (READ)
+get group members
**Parameters:**
-- `id`: string
+- `groupId`: string
-### resources_getTrainingAssignment (READ)
-get training assignment
+### users_getGroups (READ)
+get groups
**Parameters:**
-- `assignmentId`: string
+- `args`: GenericQueryFilters & {
+ search: string | null;
+ uid: string | null;
+ } (optional)
-### resources_getTrainingAssignmentForCompletion (READ)
-get training assignment for completion
+### users_getGroupEmails (READ)
+get group emails
**Parameters:**
-- `assignmentId`: string
+- `groupIds`: string[]
-### resources_getTrainingAssignments (READ)
-get training assignments
+### users_getPermissionsByEmployeeType (READ)
+get permissions by employee type
**Parameters:**
-- `trainingId`: string (optional)
+- `employeeTypeId`: string
-### resources_getTrainingAssignmentStatus (READ)
-get training assignment status
+### users_getSuppliers (READ)
+get suppliers
**Parameters:**
-- `args`: {
- trainingId?: string;
- status?: "Completed" | "Pending" | "Overdue" | "Not Required";
- search?: string;
- } & GenericQueryFilters (optional)
+- `args`: GenericQueryFilters & {
+ search: string | null;
+ }
-### resources_getTrainingAssignmentSummary (READ)
-get training assignment summary
+### users_getUsers (READ)
+get users
**Parameters:** none (context auto-filled)
-### resources_getTrainingQuestions (READ)
-get training questions
+### users_getUserEmails (READ)
+get user emails
**Parameters:**
-- `trainingId`: string
+- `userIds`: string[]
-### resources_getTrainings (READ)
-get trainings
+### users_insertEmployeeType (WRITE)
+insert employee type
**Parameters:**
-- `args`: { search: string | null } & GenericQueryFilters (optional)
-
-### resources_getTrainingsList (READ)
-get trainings list
-**Parameters:** none (context auto-filled)
+- `employeeType`: { name: string; companyId: string }
-### resources_getWorkCenter (READ)
-get work center
+### users_insertGroup (WRITE)
+insert group
**Parameters:**
-- `id`: string
+- `group`: { name: string; companyId: string }
-### resources_getWorkCenters (READ)
-get work centers
+### users_upsertEmployeeType (WRITE)
+upsert employee type
**Parameters:**
-- `args`: { search: string | null } & GenericQueryFilters (optional)
+- `employeeType`: | { name: string; companyId: string }
+ | { id: string; name: string }
-### resources_getWorkCentersByLocation (READ)
-get work centers by location
+### users_upsertEmployeeTypePermissions (WRITE)
+upsert employee type permissions
**Parameters:**
-- `locationId`: string
-
-### resources_getWorkCentersList (READ)
-get work centers list
-**Parameters:** none (context auto-filled)
-
-### resources_getWorkCentersListWithBlockingStatus (READ)
-get work centers list with blocking status
-**Parameters:** none (context auto-filled)
+- `employeeTypeId`: string
+- `permissions`: { name: string; permission: CompanyPermission }[]
-### resources_insertAbility (WRITE)
-insert ability
+### users_upsertGroup (WRITE)
+upsert group
**Parameters:**
-- `ability`: {
+- `arg1`: {
+ id: string;
name: string;
- curve: {
- data: {
- week: number;
- value: number;
- }[];
- };
- shadowWeeks: number;
companyId: string;
- createdBy: string;
}
-### resources_insertEmployeeAbilities (WRITE)
-insert employee abilities
+### users_upsertGroupMembers (WRITE)
+upsert group members
**Parameters:**
-- `abilityId`: string
-- `employeeIds`: string[]
+- `groupId`: string
+- `selections`: string[]
-### resources_insertTrainingCompletion (WRITE)
-insert training completion
+---
+
+## people (44 tools)
+
+### people_deleteAttribute (DESTRUCTIVE)
+delete attribute
**Parameters:**
-- `completion`: {
- trainingAssignmentId: string;
- employeeId: string;
- period: string | null;
- companyId: string;
- completedBy: string;
- createdBy: string;
- }
+- `attributeId`: string
-### resources_updateAbility (WRITE)
-update ability
+### people_deleteAttributeCategory (DESTRUCTIVE)
+delete attribute category
**Parameters:**
-- `id`: string
-- `ability`: Partial<{
- name: string;
- curve: {
- data: {
- week: number;
- value: number;
- }[];
- };
- shadowWeeks: number;
- }>
+- `attributeCategoryId`: string
-### resources_updateSuggestionEmoji (WRITE)
-update suggestion emoji
+### people_deleteDepartment (DESTRUCTIVE)
+delete department
**Parameters:**
-- `suggestionId`: string
-- `emoji`: string
+- `departmentId`: string
-### resources_updateSuggestionTags (WRITE)
-update suggestion tags
+### people_deleteHoliday (DESTRUCTIVE)
+delete holiday
**Parameters:**
-- `suggestionId`: string
-- `tags`: string[]
+- `holidayId`: string
-### resources_updateTrainingQuestionOrder (WRITE)
-update training question order
+### people_deleteShift (DESTRUCTIVE)
+delete shift
**Parameters:**
-- `updates`: {
- id: string;
- sortOrder: number;
- updatedBy: string;
- }[]
+- `shiftId`: string
-### resources_upsertContractor (WRITE)
-upsert contractor
+### people_getAttribute (READ)
+get attribute
**Parameters:**
-- `contractorWithAbilities`: | {
- id: string;
- hoursPerWeek?: number;
- abilities: string[];
- companyId: string;
- createdBy: string;
- customFields?: Json;
- }
- | {
- id: string;
- hoursPerWeek?: number;
- abilities: string[];
- updatedBy: string;
- customFields?: Json;
- }
+- `attributeId`: string
-### resources_upsertEmployeeAbility (WRITE)
-upsert employee ability
+### people_getAttributeCategories (READ)
+get attribute categories
**Parameters:**
-- `employeeAbility`: {
- id?: string;
- abilityId: string;
- employeeId: string;
- trainingCompleted: boolean;
- trainingDays?: number;
- companyId: string;
+- `args`: { search: string | null } & GenericQueryFilters (optional)
+
+### people_getAttributeCategory (READ)
+get attribute category
+**Parameters:**
+- `id`: string
+
+### people_getAttributeDataTypes (READ)
+get attribute data types
+**Parameters:** none (context auto-filled)
+
+### people_getDepartment (READ)
+get department
+**Parameters:**
+- `departmentId`: string
+
+### people_getDepartments (READ)
+get departments
+**Parameters:**
+- `args`: GenericQueryFilters & { search: string | null } (optional)
+
+### people_getDepartmentsList (READ)
+get departments list
+**Parameters:** none (context auto-filled)
+
+### people_getEmployeeJob (READ)
+get employee job
+**Parameters:**
+- `employeeId`: string
+
+### people_getEmployeeSummary (READ)
+get employee summary
+**Parameters:**
+- `employeeId`: string
+
+### people_getHoliday (READ)
+get holiday
+**Parameters:**
+- `holidayId`: string
+
+### people_getHolidays (READ)
+get holidays
+**Parameters:**
+- `args`: GenericQueryFilters & { search: string | null } (optional)
+
+### people_getPeople (READ)
+get people
+**Parameters:**
+- `args`: GenericQueryFilters & {
+ search: string | null;
}
-### resources_upsertFailureMode (WRITE)
-upsert failure mode
+### people_getContacts (READ)
+get contacts
**Parameters:**
-- `failureMode`: | (Omit<z.infer<typeof failureModeValidator>, "id"> & {
- companyId: string;
- createdBy: string;
- customFields?: Json;
- })
- | (Omit<z.infer<typeof failureModeValidator>, "id"> & {
- id: string;
- updatedBy: string;
- customFields?: Json;
- })
+- `args`: GenericQueryFilters & {
+ search: string | null;
+ }
-### resources_upsertLocation (WRITE)
-upsert location
+### people_getShift (READ)
+get shift
**Parameters:**
-- `location`: | (Omit<z.infer<typeof locationValidator>, "id"> & {
- companyId: string;
- createdBy: string;
- customFields?: Json;
- })
- | (Omit<z.infer<typeof locationValidator>, "id"> & {
- id: string;
- updatedBy: string;
- customFields?: Json;
- })
+- `shiftId`: string
-### resources_upsertMaintenanceDispatch (WRITE)
-upsert maintenance dispatch
+### people_getShifts (READ)
+get shifts
**Parameters:**
-- `dispatch`: | (Omit<z.infer<typeof maintenanceDispatchValidator>, "id"> & {
- maintenanceDispatchId: string;
- companyId: string;
- createdBy: string;
- content?: Json;
- })
- | (Omit<z.infer<typeof maintenanceDispatchValidator>, "id" | "assignee"> & {
- id: string;
- assignee: string | null;
- updatedBy: string;
- content?: Json;
- })
+- `args`: GenericQueryFilters & { search: string | null }
-### resources_upsertMaintenanceDispatchComment (WRITE)
-upsert maintenance dispatch comment
+### people_getShiftsList (READ)
+get shifts list
**Parameters:**
-- `comment`: | (Omit<z.infer<typeof maintenanceDispatchCommentValidator>, "id"> & {
- companyId: string;
- createdBy: string;
- })
- | (Omit<z.infer<typeof maintenanceDispatchCommentValidator>, "id"> & {
- id: string;
- updatedBy: string;
- })
+- `locationId`: string | null
-### resources_upsertMaintenanceDispatchEvent (WRITE)
-upsert maintenance dispatch event
+### people_insertAttribute (WRITE)
+insert attribute
**Parameters:**
-- `event`: | (Omit<z.infer<typeof maintenanceDispatchEventValidator>, "id"> & {
- companyId: string;
- createdBy: string;
- })
- | (Omit<z.infer<typeof maintenanceDispatchEventValidator>, "id"> & {
- id: string;
- updatedBy: string;
- })
+- `attribute`: {
+ name: string;
+ attributeDataTypeId: number;
+ userAttributeCategoryId: string;
+ listOptions?: string[];
+ canSelfManage: boolean;
+ createdBy: string;
+ }
-### resources_upsertMaintenanceDispatchItem (WRITE)
-upsert maintenance dispatch item
+### people_insertAttributeCategory (WRITE)
+insert attribute category
**Parameters:**
-- `item`: | (Omit<z.infer<typeof maintenanceDispatchItemValidator>, "id"> & {
- companyId: string;
- createdBy: string;
- })
- | (Omit<z.infer<typeof maintenanceDispatchItemValidator>, "id"> & {
- id: string;
- updatedBy: string;
- })
+- `attributeCategory`: {
+ name: string;
+ emoji?: string;
+ public: boolean;
+ companyId: string;
+ createdBy: string;
+ }
-### resources_upsertMaintenanceDispatchWorkCenter (WRITE)
-upsert maintenance dispatch work center
+### people_insertEmployeeJob (WRITE)
+insert employee job
**Parameters:**
-- `workCenter`: | (Omit<z.infer<typeof maintenanceDispatchWorkCenterValidator>, "id"> & {
+- `job`: {
+ id: string;
+ companyId: string;
+ locationId?: string;
+ }
+
+### people_updateAttribute (WRITE)
+update attribute
+**Parameters:**
+- `attribute`: {
+ id?: string;
+ name: string;
+ listOptions?: string[];
+ canSelfManage: boolean;
+ updatedBy: string;
+ }
+
+### people_updateAttributeCategory (WRITE)
+update attribute category
+**Parameters:**
+- `attributeCategory`: {
+ id: string;
+ name: string;
+ emoji?: string;
+ public: boolean;
+ updatedBy: string;
+ }
+
+### people_updateAttributeSortOrder (WRITE)
+update attribute sort order
+**Parameters:**
+- `updates`: {
+ id: string;
+ sortOrder: number;
+ updatedBy: string;
+ }[]
+
+### people_updateEmployeeJob (WRITE)
+update employee job
+**Parameters:**
+- `employeeId`: string
+- `employeeJob`: z.infer<typeof employeeJobValidator> & {
+ companyId: string;
+ updatedBy: string;
+ customFields?: Json;
+ }
+
+### people_upsertDepartment (WRITE)
+upsert department
+**Parameters:**
+- `department`: | (Omit<z.infer<typeof departmentValidator>, "id"> & {
companyId: string;
createdBy: string;
+ customFields?: Json;
})
- | (Omit<z.infer<typeof maintenanceDispatchWorkCenterValidator>, "id"> & {
+ | (Omit<z.infer<typeof departmentValidator>, "id"> & {
id: string;
updatedBy: string;
+ customFields?: Json;
})
-### resources_upsertMaintenanceSchedule (WRITE)
-upsert maintenance schedule
+### people_upsertHoliday (WRITE)
+upsert holiday
**Parameters:**
-- `schedule`: | (Omit<z.infer<typeof maintenanceScheduleValidator>, "id"> & {
+- `holiday`: | (Omit<z.infer<typeof holidayValidator>, "id"> & {
companyId: string;
createdBy: string;
+ customFields?: Json;
})
- | (Omit<z.infer<typeof maintenanceScheduleValidator>, "id"> & {
+ | (Omit<z.infer<typeof holidayValidator>, "id"> & {
id: string;
updatedBy: string;
+ customFields?: Json;
})
-### resources_upsertMaintenanceScheduleItem (WRITE)
-upsert maintenance schedule item
+### people_upsertShift (WRITE)
+upsert shift
**Parameters:**
-- `item`: | (Omit<z.infer<typeof maintenanceScheduleItemValidator>, "id"> & {
- companyId: string;
+- `shift`: | (Omit<z.infer<typeof shiftValidator>, "id"> & {
createdBy: string;
+ companyId: string;
+ customFields?: Json;
})
- | (Omit<z.infer<typeof maintenanceScheduleItemValidator>, "id"> & {
+ | (Omit<z.infer<typeof shiftValidator>, "id"> & {
id: string;
updatedBy: string;
+ customFields?: Json;
})
-### resources_upsertPartner (WRITE)
-upsert partner
+### people_clockIn (WRITE)
+clock in
**Parameters:**
-- `partner`: | (Omit<z.infer<typeof partnerValidator>, "supplierId"> & {
- companyId: string;
- createdBy: string;
- customFields?: Json;
- })
- | (Omit<z.infer<typeof partnerValidator>, "supplierId"> & {
- updatedBy: string;
- customFields?: Json;
- })
-
-### resources_upsertProcess (WRITE)
-upsert process
-**Parameters:**
-- `process`: | (Omit<z.infer<typeof processValidator>, "id"> & {
- companyId: string;
- createdBy: string;
- customFields?: Json;
- })
- | (Omit<z.infer<typeof processValidator>, "id"> & {
- id: string;
- companyId: string;
- updatedBy: string;
- customFields?: Json;
- })
+- `args`: {
+ employeeId: string;
+ companyId: string;
+ createdBy: string;
+ }
-### resources_upsertTraining (WRITE)
-upsert training
+### people_clockOut (WRITE)
+clock out
**Parameters:**
-- `training`: | (Omit<z.infer<typeof trainingValidator>, "id"> & {
- companyId: string;
- createdBy: string;
- })
- | (Omit<z.infer<typeof trainingValidator>, "id"> & {
- id: string;
- updatedBy: string;
- })
+- `args`: {
+ employeeId: string;
+ companyId: string;
+ updatedBy: string;
+ clockOut?: string;
+ note?: string;
+ }
-### resources_upsertTrainingAssignment (WRITE)
-upsert training assignment
+### people_createTimeCardEntry (WRITE)
+create time card entry
**Parameters:**
-- `assignment`: {
- id?: string;
- trainingId: string;
- groupIds: string[];
+- `entry`: {
+ employeeId: string;
companyId: string;
- createdBy?: string;
- updatedBy?: string;
+ clockIn: string;
+ clockOut?: string | null;
+ note?: string | null;
+ createdBy: string;
}
-### resources_upsertTrainingQuestion (WRITE)
-upsert training question
+### people_deleteTimeCardEntry (DESTRUCTIVE)
+delete time card entry
**Parameters:**
-- `trainingQuestion`: | (Omit<z.infer<typeof trainingQuestionValidator>, "id"> & {
- companyId: string;
- createdBy: string;
- })
- | (Omit<z.infer<typeof trainingQuestionValidator>, "id"> & {
- id: string;
- updatedBy: string;
- })
+- `entryId`: string
-### resources_upsertWorkCenter (WRITE)
-upsert work center
+### people_getClockedInEmployees (READ)
+get clocked in employees
+**Parameters:** none (context auto-filled)
+
+### people_getOpenClockEntry (READ)
+get open clock entry
**Parameters:**
-- `workCenter`: | (Omit<z.infer<typeof workCenterValidator>, "id"> & {
- companyId: string;
- createdBy: string;
- customFields?: Json;
- })
- | (Omit<z.infer<typeof workCenterValidator>, "id"> & {
- id: string;
- companyId: string;
- updatedBy: string;
- customFields?: Json;
- })
+- `employeeId`: string
----
+### people_getRecentTimecards (READ)
+get recent timecards
+**Parameters:** none (context auto-filled)
-## sales (150 tools)
+### people_getScheduledEmployeesToday (READ)
+get scheduled employees today
+**Parameters:** none (context auto-filled)
-### sales_closeSalesOrder (WRITE)
-close sales order
+### people_getTimeCardEntry (READ)
+get time card entry
**Parameters:**
-- `salesOrderId`: string
+- `entryId`: string
-### sales_convertSalesRfqToQuote (WRITE)
-convert sales rfq to quote
+### people_getTimeCardEntries (READ)
+get time card entries
**Parameters:**
-- `payload`: {
- id: string;
+- `args`: {
+ employeeId: string;
companyId: string;
- userId: string;
+ from?: string;
+ to?: string;
}
-### sales_convertQuoteToOrder (WRITE)
-convert quote to order
+### people_getTimecardEntries (READ)
+get timecard entries
**Parameters:**
-- `payload`: {
- id: string;
- selectedLines: z.infer<typeof selectedLinesValidator>;
- companyId: string;
- purchaseOrderNumber?: string;
- userId: string;
- digitalQuoteAcceptedBy?: string;
- digitalQuoteAcceptedByEmail?: string;
+- `args`: GenericQueryFilters & { search: string | null }
+
+### people_getWeeklyHoursForEmployees (READ)
+get weekly hours for employees
+**Parameters:**
+- `employeeIds`: string[]
+
+### people_updateTimeCardEntry (WRITE)
+update time card entry
+**Parameters:**
+- `args`: {
+ entryId: string;
+ clockIn?: string;
+ clockOut?: string | null;
+ note?: string | null;
+ updatedBy: string;
}
-### sales_copyQuoteLine (WRITE)
-copy quote line
+---
+
+## production (129 tools)
+
+### production_convertSalesOrderLinesToJobs (WRITE)
+convert sales order lines to jobs
**Parameters:**
-- `payload`: z.infer<typeof getMethodValidator> & {
+- `arg1`: {
+ orderId: string;
companyId: string;
userId: string;
}
-### sales_copyQuote (WRITE)
-copy quote
+### production_calculateJobPriority (WRITE)
+calculate job priority
**Parameters:**
-- `payload`: Omit<z.infer<typeof getMethodValidator>, "type"> & {
+- `params`: {
+ jobId?: string; // Optional - if updating an existing job
+ dueDate: string | null;
+ deadlineType: (typeof deadlineTypes)[number];
companyId: string;
- userId: string;
+ locationId: string;
}
-### sales_deleteCustomer (DESTRUCTIVE)
-delete customer
+### production_deleteDemandForecasts (DESTRUCTIVE)
+delete demand forecasts
**Parameters:**
-- `customerId`: string
+- `params`: {
+ itemId: string;
+ locationId: string;
+ companyId: string;
+ futurePeriodIds: string[];
+ }
-### sales_deleteCustomerContact (DESTRUCTIVE)
-delete customer contact
+### production_deleteDemandProjections (DESTRUCTIVE)
+delete demand projections
**Parameters:**
-- `customerId`: string
-- `customerContactId`: string
+- `params`: {
+ itemId: string;
+ locationId: string;
+ companyId: string;
+ futurePeriodIds: string[];
+ }
-### sales_deleteCustomerLocation (DESTRUCTIVE)
-delete customer location
+### production_deleteJob (DESTRUCTIVE)
+delete job
**Parameters:**
-- `customerId`: string
-- `customerLocationId`: string
+- `jobId`: string
-### sales_deleteCustomerStatus (DESTRUCTIVE)
-delete customer status
+### production_deleteJobMaterial (DESTRUCTIVE)
+delete job material
**Parameters:**
-- `customerStatusId`: string
+- `jobMaterialId`: string
-### sales_deleteCustomerType (DESTRUCTIVE)
-delete customer type
+### production_deleteJobOperation (DESTRUCTIVE)
+delete job operation
**Parameters:**
-- `customerTypeId`: string
+- `jobOperationId`: string
-### sales_deleteNoQuoteReason (DESTRUCTIVE)
-delete no quote reason
+### production_deleteJobOperationStep (DESTRUCTIVE)
+delete job operation step
**Parameters:**
-- `noQuoteReasonId`: string
+- `id`: string
-### sales_deleteQuote (DESTRUCTIVE)
-delete quote
+### production_deleteJobOperationParameter (DESTRUCTIVE)
+delete job operation parameter
**Parameters:**
-- `quoteId`: string
+- `id`: string
-### sales_deleteQuoteMakeMethod (DESTRUCTIVE)
-delete quote make method
+### production_deleteJobOperationTool (DESTRUCTIVE)
+delete job operation tool
**Parameters:**
-- `quoteMakeMethodId`: string
+- `id`: string
-### sales_deleteQuoteLine (DESTRUCTIVE)
-delete quote line
+### production_deleteProcedure (DESTRUCTIVE)
+delete procedure
**Parameters:**
-- `quoteLineId`: string
+- `procedureId`: string
-### sales_deleteQuoteMaterial (DESTRUCTIVE)
-delete quote material
+### production_deleteProcedureStep (DESTRUCTIVE)
+delete procedure step
**Parameters:**
-- `quoteMaterialId`: string
+- `procedureStepId`: string
-### sales_deleteQuoteOperation (DESTRUCTIVE)
-delete quote operation
+### production_deleteProcedureParameter (DESTRUCTIVE)
+delete procedure parameter
**Parameters:**
-- `quoteOperationId`: string
+- `procedureParameterId`: string
-### sales_deleteQuoteOperationStep (DESTRUCTIVE)
-delete quote operation step
+### production_deleteProductionEvent (DESTRUCTIVE)
+delete production event
**Parameters:**
-- `id`: string
+- `productionEventId`: string
-### sales_deleteQuoteOperationParameter (DESTRUCTIVE)
-delete quote operation parameter
+### production_deleteProductionQuantity (DESTRUCTIVE)
+delete production quantity
**Parameters:**
-- `id`: string
+- `productionQuantityId`: string
-### sales_deleteQuoteOperationTool (DESTRUCTIVE)
-delete quote operation tool
+### production_getActiveJobOperationByJobId (READ)
+get active job operation by job id
**Parameters:**
-- `id`: string
+- `jobId`: string
-### sales_deleteSalesOrder (DESTRUCTIVE)
-delete sales order
+### production_getActiveJobOperationsByLocation (READ)
+get active job operations by location
**Parameters:**
-- `salesOrderId`: string
+- `locationId`: string
+- `workCenterIds`: string[] (optional)
-### sales_deleteSalesOrderLine (DESTRUCTIVE)
-delete sales order line
+### production_getJobsByDateRange (READ)
+get jobs by date range
**Parameters:**
-- `salesOrderLineId`: string
+- `locationId`: string
+- `startDate`: string
+- `endDate`: string
-### sales_deleteSalesRFQ (DESTRUCTIVE)
-delete sales r f q
+### production_getUnscheduledJobs (READ)
+get unscheduled jobs
**Parameters:**
-- `salesRfqId`: string
+- `locationId`: string
-### sales_deleteSalesRFQLine (DESTRUCTIVE)
-delete sales r f q line
+### production_getActiveProductionEvents (READ)
+get active production events
+**Parameters:** none (context auto-filled)
+
+### production_deleteScrapReason (DESTRUCTIVE)
+delete scrap reason
**Parameters:**
-- `salesRFQLineId`: string
+- `scrapReasonId`: string
-### sales_getConfigurationParametersByQuoteLineId (READ)
-get configuration parameters by quote line id
+### production_deleteFailureMode (DESTRUCTIVE)
+delete failure mode
**Parameters:**
-- `quoteLineId`: string
+- `failureModeId`: string
-### sales_getCustomer (READ)
-get customer
+### production_deleteMaintenanceDispatch (DESTRUCTIVE)
+delete maintenance dispatch
**Parameters:**
-- `customerId`: string
+- `dispatchId`: string
-### sales_getCustomerContact (READ)
-get customer contact
+### production_deleteMaintenanceDispatchComment (DESTRUCTIVE)
+delete maintenance dispatch comment
**Parameters:**
-- `customerContactId`: string
+- `commentId`: string
-### sales_getCustomerContacts (READ)
-get customer contacts
+### production_deleteMaintenanceDispatchEvent (DESTRUCTIVE)
+delete maintenance dispatch event
**Parameters:**
-- `customerId`: string
+- `eventId`: string
-### sales_getCustomerLocation (READ)
-get customer location
+### production_deleteMaintenanceDispatchItem (DESTRUCTIVE)
+delete maintenance dispatch item
**Parameters:**
-- `customerLocationId`: string
+- `itemId`: string
-### sales_getCustomerLocations (READ)
-get customer locations
+### production_deleteMaintenanceDispatchWorkCenter (DESTRUCTIVE)
+delete maintenance dispatch work center
**Parameters:**
-- `customerId`: string
+- `workCenterId`: string
-### sales_getCustomerPayment (READ)
-get customer payment
+### production_deleteMaintenanceSchedule (DESTRUCTIVE)
+delete maintenance schedule
**Parameters:**
-- `customerId`: string
+- `scheduleId`: string
-### sales_getCustomerShipping (READ)
-get customer shipping
+### production_deleteMaintenanceScheduleItem (DESTRUCTIVE)
+delete maintenance schedule item
**Parameters:**
-- `customerId`: string
+- `itemId`: string
-### sales_getCustomers (READ)
-get customers
+### production_getDemandForecasts (READ)
+get demand forecasts
**Parameters:**
-- `args`: GenericQueryFilters & {
- search: string | null;
+- `params`: {
+ itemId: string;
+ locationId: string;
+ companyId: string;
+ periodIds: string[];
}
-### sales_getCustomersList (READ)
-get customers list
-**Parameters:** none (context auto-filled)
-
-### sales_getCustomerStatus (READ)
-get customer status
+### production_getDemandProjections (READ)
+get demand projections
**Parameters:**
-- `customerStatusId`: string
+- `params`: {
+ itemId: string;
+ locationId: string;
+ companyId: string;
+ periodIds: string[];
+ }
-### sales_getCustomerStatuses (READ)
-get customer statuses
+### production_getJobDocuments (READ)
+get job documents
**Parameters:**
-- `args`: GenericQueryFilters & { search: string | null } (optional)
+- `job`: {
+ id: string | null;
+ salesOrderLineId?: string | null;
+ quoteLineId?: string | null;
+ itemId?: string | null;
+ }
-### sales_getCustomerStatusesList (READ)
-get customer statuses list
-**Parameters:** none (context auto-filled)
+### production_getJobDocumentsWithItemId (READ)
+get job documents with item id
+**Parameters:**
+- `job`: Job
+- `itemId`: string
-### sales_getCustomerType (READ)
-get customer type
+### production_getJob (READ)
+get job
**Parameters:**
-- `customerTypeId`: string
+- `id`: string
-### sales_getCustomerTypes (READ)
-get customer types
+### production_getJobByOperationId (READ)
+get job by operation id
**Parameters:**
-- `args`: GenericQueryFilters & { search: string | null } (optional)
+- `operationId`: string
-### sales_getCustomerTypesList (READ)
-get customer types list
-**Parameters:** none (context auto-filled)
+### production_getJobPurchaseOrderLines (READ)
+get job purchase order lines
+**Parameters:**
+- `jobId`: string
-### sales_getExternalSalesOrderLines (READ)
-get external sales order lines
+### production_getJobs (READ)
+get jobs
**Parameters:**
-- `customerId`: string
-- `args`: GenericQueryFilters & { search: string | null }
+- `args`: { search: string | null } & GenericQueryFilters (optional)
-### sales_getModelByQuoteLineId (READ)
-get model by quote line id
+### production_getJobsBySalesOrderLine (READ)
+get jobs by sales order line
**Parameters:**
-- `quoteLineId`: string
+- `salesOrderLineId`: string
-### sales_getNoQuoteReasonsList (READ)
-get no quote reasons list
+### production_getJobsList (READ)
+get jobs list
**Parameters:** none (context auto-filled)
-### sales_getNoQuoteReason (READ)
-get no quote reason
+### production_getJobMakeMethodById (READ)
+get job make method by id
**Parameters:**
-- `noQuoteReasonId`: string
+- `jobMakeMethodId`: string
-### sales_getNoQuoteReasons (READ)
-get no quote reasons
+### production_getRootMakeMethod (READ)
+get root make method
**Parameters:**
-- `args`: GenericQueryFilters & { search: string | null } (optional)
+- `jobId`: string
-### sales_getOpportunity (READ)
-get opportunity
+### production_getJobMaterialsWithQuantityOnHand (READ)
+get job materials with quantity on hand
**Parameters:**
-- `opportunityId`: string | null
+- `jobId`: string
+- `locationId`: string
+- `args`: { search: string | null } & GenericQueryFilters (optional)
-### sales_getOpportunityDocuments (READ)
-get opportunity documents
+### production_getJobMethodTree (READ)
+get job method tree
**Parameters:**
-- `opportunityId`: string
+- `jobId`: string
-### sales_getOpportunityLineDocuments (READ)
-get opportunity line documents
+### production_getJobMethodTreeArray (READ)
+get job method tree array
**Parameters:**
-- `lineId`: string
-- `itemId`: string | null (optional)
+- `jobId`: string
-### sales_getQuote (READ)
-get quote
+### production_getJobMaterial (READ)
+get job material
**Parameters:**
-- `quoteId`: string
-
-### sales_getQuoteFavorites (READ)
-get quote favorites
-**Parameters:** none (context auto-filled)
+- `materialId`: string
-### sales_getQuotes (READ)
-get quotes
+### production_getJobMaterialsByMethodId (READ)
+get job materials by method id
**Parameters:**
-- `args`: GenericQueryFilters & {
- search: string | null;
- }
-
-### sales_getQuotesList (READ)
-get quotes list
-**Parameters:** none (context auto-filled)
+- `jobMakeMethodId`: string
-### sales_getQuoteAssembliesByLine (READ)
-get quote assemblies by line
+### production_getJobOperation (READ)
+get job operation
**Parameters:**
-- `quoteLineId`: string
+- `jobOperationId`: string
-### sales_getQuoteAssemblies (READ)
-get quote assemblies
+### production_getJobOperations (READ)
+get job operations
**Parameters:**
-- `quoteId`: string
+- `jobId`: string
+- `args`: { search: string | null } & GenericQueryFilters (optional)
-### sales_getQuoteCustomerDetails (READ)
-get quote customer details
+### production_getJobOperationsAssignedToEmployee (READ)
+get job operations assigned to employee
**Parameters:**
-- `quoteId`: string
+- `employeeId`: string
-### sales_getQuoteLine (READ)
-get quote line
+### production_getJobOperationAttachments (READ)
+get job operation attachments
**Parameters:**
-- `quoteLineId`: string
+- `jobOperationIds`: string[]
-### sales_getQuoteLinesList (READ)
-get quote lines list
+### production_getJobOperationsList (READ)
+get job operations list
**Parameters:**
-- `quoteId`: string
-
-### sales_getQuoteMakeMethod (READ)
-get quote make method
-**Parameters:**
-- `quoteMakeMethodId`: string
+- `jobId`: string
-### sales_getRootQuoteMakeMethod (READ)
-get root quote make method
+### production_getJobOperationsByMethodId (READ)
+get job operations by method id
**Parameters:**
-- `quoteLineId`: string
+- `jobMakeMethodId`: string
-### sales_getQuoteMethodTrees (READ)
-get quote method trees
+### production_getJobOperationStepRecords (READ)
+get job operation step records
**Parameters:**
-- `quoteId`: string
+- `jobId`: string
+- `args`: GenericQueryFilters & {
+ search: string | null;
+ }
-### sales_getQuoteMethodTreeArray (READ)
-get quote method tree array
+### production_getOutsideOperationsByJobId (READ)
+get outside operations by job id
**Parameters:**
-- `quoteId`: string
+- `jobId`: string
-### sales_getQuoteLines (READ)
-get quote lines
+### production_getProcedure (READ)
+get procedure
**Parameters:**
-- `quoteId`: string
+- `id`: string
-### sales_getQuoteByExternalId (READ)
-get quote by external id
+### production_getProcedureSteps (READ)
+get procedure steps
**Parameters:**
-- `externalId`: string
+- `procedureId`: string
-### sales_getQuoteLinePrices (READ)
-get quote line prices
+### production_getProcedureParameters (READ)
+get procedure parameters
**Parameters:**
-- `quoteLineId`: string
+- `procedureId`: string
-### sales_getQuoteLinePricesByQuoteId (READ)
-get quote line prices by quote id
+### production_getProcedureVersions (READ)
+get procedure versions
**Parameters:**
-- `quoteId`: string
+- `procedure`: { name: string; version: number }
-### sales_getQuoteLinePricesByItemId (READ)
-get quote line prices by item id
+### production_getProcedures (READ)
+get procedures
**Parameters:**
-- `itemId`: string
-- `currentQuoteId`: string
+- `args`: { search: string | null } & GenericQueryFilters (optional)
-### sales_getQuoteLinePricesByItemIds (READ)
-get quote line prices by item ids
-**Parameters:**
-- `itemIds`: string[]
-- `currentQuoteId`: string
+### production_getProceduresList (READ)
+get procedures list
+**Parameters:** none (context auto-filled)
-### sales_getQuoteMaterials (READ)
-get quote materials
+### production_getProductionEvent (READ)
+get production event
**Parameters:**
-- `quoteId`: string
+- `id`: string
-### sales_getQuoteMaterial (READ)
-get quote material
+### production_getProductionEvents (READ)
+get production events
**Parameters:**
-- `materialId`: string
+- `jobOperationIds`: string[]
+- `args`: { search: string | null } & GenericQueryFilters (optional)
-### sales_getQuoteMaterialsByLine (READ)
-get quote materials by line
+### production_getProductionEventsPage (READ)
+get production events page
**Parameters:**
-- `quoteLineId`: string
+- `jobOperationId`: string
+- `sortDescending`: boolean (optional)
+- `page`: number (optional)
-### sales_getQuoteMaterialsByMethodId (READ)
-get quote materials by method id
+### production_getProductionEventsByOperations (READ)
+get production events by operations
**Parameters:**
-- `quoteMakeMethodId`: string
+- `jobOperationIds`: string[]
-### sales_getQuoteMaterialsByOperation (READ)
-get quote materials by operation
+### production_getProductionPlanning (READ)
+get production planning
**Parameters:**
-- `quoteOperationId`: string
+- `locationId`: string
+- `periods`: string[]
+- `args`: GenericQueryFilters & {
+ search: string | null;
+ }
-### sales_getQuoteOperation (READ)
-get quote operation
+### production_getProductionProjections (READ)
+get production projections
**Parameters:**
-- `quoteOperationId`: string
+- `locationId`: string
+- `periods`: string[]
+- `args`: GenericQueryFilters & {
+ search: string | null;
+ }
-### sales_getQuoteOperationsByLine (READ)
-get quote operations by line
+### production_getProductionQuantity (READ)
+get production quantity
**Parameters:**
-- `quoteLineId`: string
+- `id`: string
-### sales_getQuoteOperationsByMethodId (READ)
-get quote operations by method id
+### production_getProductionQuantities (READ)
+get production quantities
**Parameters:**
-- `quoteMakeMethodId`: string
+- `jobOperationIds`: string[]
+- `args`: { search: string | null } & GenericQueryFilters (optional)
-### sales_getQuoteOperations (READ)
-get quote operations
+### production_getProductionDataByOperations (READ)
+get production data by operations
**Parameters:**
-- `quoteId`: string
+- `jobOperationIds`: string[]
-### sales_getQuotePayment (READ)
-get quote payment
-**Parameters:**
-- `quoteId`: string
+### production_getScrapReasonsList (READ)
+get scrap reasons list
+**Parameters:** none (context auto-filled)
-### sales_getQuoteShipment (READ)
-get quote shipment
+### production_getScrapReason (READ)
+get scrap reason
**Parameters:**
-- `quoteId`: string
+- `scrapReasonId`: string
-### sales_getRelatedPricesForQuoteLine (READ)
-get related prices for quote line
+### production_getScrapReasons (READ)
+get scrap reasons
**Parameters:**
-- `itemId`: string
-- `quoteId`: string
-
-### sales_getSalesDocumentsAssignedToMe (READ)
-get sales documents assigned to me
-**Parameters:** none (context auto-filled)
+- `args`: GenericQueryFilters & { search: string | null } (optional)
-### sales_getSalesOrder (READ)
-get sales order
+### production_getFailureMode (READ)
+get failure mode
**Parameters:**
-- `salesOrderId`: string
+- `failureModeId`: string
-### sales_getSalesOrderCustomerDetails (READ)
-get sales order customer details
+### production_getFailureModes (READ)
+get failure modes
**Parameters:**
-- `salesOrderId`: string
+- `args`: GenericQueryFilters & { search: string | null } (optional)
-### sales_getSalesOrderFavorites (READ)
-get sales order favorites
+### production_getFailureModesList (READ)
+get failure modes list
**Parameters:** none (context auto-filled)
-### sales_getSalesOrderRelatedItems (READ)
-get sales order related items
+### production_getMaintenanceDispatch (READ)
+get maintenance dispatch
**Parameters:**
-- `salesOrderId`: string
-- `opportunityId`: string
+- `dispatchId`: string
-### sales_getSalesOrders (READ)
-get sales orders
+### production_getMaintenanceDispatches (READ)
+get maintenance dispatches
**Parameters:**
-- `args`: GenericQueryFilters & {
- search: string | null;
- status: string | null;
- customerId: string | null;
- }
-
-### sales_getSalesOrdersList (READ)
-get sales orders list
-**Parameters:** none (context auto-filled)
+- `args`: GenericQueryFilters & { search: string | null; status?: string } (optional)
-### sales_getSalesOrderPayment (READ)
-get sales order payment
+### production_getMaintenanceDispatchComments (READ)
+get maintenance dispatch comments
**Parameters:**
-- `salesOrderId`: string
-
-### sales_getSalesTerms (READ)
-get sales terms
-**Parameters:** none (context auto-filled)
+- `dispatchId`: string
-### sales_getSalesOrderShipment (READ)
-get sales order shipment
+### production_getMaintenanceDispatchEvents (READ)
+get maintenance dispatch events
**Parameters:**
-- `salesOrderId`: string
-
-### sales_getSalesOrderCustomers (READ)
-get sales order customers
-**Parameters:** none (context auto-filled)
+- `dispatchId`: string
-### sales_getSalesOrderLines (READ)
-get sales order lines
+### production_getMaintenanceDispatchItems (READ)
+get maintenance dispatch items
**Parameters:**
-- `salesOrderId`: string
+- `dispatchId`: string
-### sales_getSalesOrderInvoiceLines (READ)
-get sales order invoice lines
+### production_getMaintenanceDispatchWorkCenters (READ)
+get maintenance dispatch work centers
**Parameters:**
-- `salesOrderId`: string
+- `dispatchId`: string
-### sales_getSalesOrderInvoicesByIds (READ)
-get sales order invoices by ids
+### production_getMaintenanceSchedule (READ)
+get maintenance schedule
**Parameters:**
-- `invoiceIds`: string[]
+- `scheduleId`: string
-### sales_getSalesOrderLinesByItemId (READ)
-get sales order lines by item id
+### production_getMaintenanceSchedules (READ)
+get maintenance schedules
**Parameters:**
-- `itemId`: string
+- `args`: GenericQueryFilters & { search: string | null; active?: boolean } (optional)
-### sales_getSalesOrderLinesByItemIds (READ)
-get sales order lines by item ids
+### production_getMaintenanceScheduleItems (READ)
+get maintenance schedule items
**Parameters:**
-- `itemIds`: string[]
+- `scheduleId`: string
-### sales_getSalesOrderLine (READ)
-get sales order line
+### production_getTrackedEntityByJobId (READ)
+get tracked entity by job id
**Parameters:**
-- `salesOrderLineId`: string
+- `jobId`: string
-### sales_getSalesOrderLineShipments (READ)
-get sales order line shipments
+### production_getTrackedEntitiesByJobId (READ)
+get tracked entities by job id
**Parameters:**
-- `salesOrderLineId`: string
+- `jobId`: string
-### sales_getSalesRFQ (READ)
-get sales r f q
+### production_recalculateJobOperationDependencies (WRITE)
+recalculate job operation dependencies
**Parameters:**
-- `id`: string
+- `params`: {
+ jobId: string;
+ companyId: string;
+ userId: string;
+ }
-### sales_getSalesRFQFavorites (READ)
-get sales r f q favorites
-**Parameters:** none (context auto-filled)
+### production_recalculateJobRequirements (WRITE)
+recalculate job requirements
+**Parameters:**
+- `params`: {
+ id: string; // job id
+ companyId: string;
+ userId: string;
+ }
-### sales_getSalesRFQs (READ)
-get sales r f qs
+### production_recalculateJobMakeMethodRequirements (WRITE)
+recalculate job make method requirements
**Parameters:**
-- `args`: GenericQueryFilters & {
- search: string | null;
+- `params`: {
+ id: string; // job make method id
+ companyId: string;
+ userId: string;
}
-### sales_getSalesRFQLine (READ)
-get sales r f q line
+### production_runMRP (WRITE)
+run m r p
**Parameters:**
-- `lineId`: string
+- `params`: {
+ type:
+ | "company"
+ | "location"
+ | "job"
+ | "salesOrder"
+ | "item"
+ | "purchaseOrder";
+ id: string;
+ companyId: string;
+ userId: string;
+ }
-### sales_getSalesRFQLines (READ)
-get sales r f q lines
+### production_updateJobBatchNumber (WRITE)
+update job batch number
**Parameters:**
-- `salesRfqId`: string
+- `trackedEntityId`: string
+- `value`: string
-### sales_insertCustomerContact (WRITE)
-insert customer contact
+### production_updateJobStatus (WRITE)
+update job status
**Parameters:**
-- `customerContact`: {
- customerId: string;
- companyId: string;
- contact: PickPartial<z.infer<typeof customerContactValidator>, "email">;
- customerLocationId?: string;
- customFields?: Json;
+- `params`: {
+ id: string;
+ status: (typeof jobStatus)[number];
+ assignee?: string | null;
+ updatedBy: string;
}
-### sales_insertCustomerLocation (WRITE)
-insert customer location
+### production_updateJobMaterialOrder (WRITE)
+update job material order
**Parameters:**
-- `customerLocation`: {
- customerId: string;
- companyId: string;
- name: string;
- address: {
- addressLine1?: string;
- addressLine2?: string;
- city?: string;
- stateProvince?: string;
- countryCode?: string;
- postalCode?: string;
- };
- customFields?: Json;
- }
+- `updates`: {
+ id: string;
+ order: number;
+ updatedBy: string;
+ }[]
-### sales_insertSalesOrderLines (WRITE)
-insert sales order lines
+### production_updateJobOperationOrder (WRITE)
+update job operation order
**Parameters:**
-- `salesOrderLines`: (Omit<z.infer<typeof salesOrderLineValidator>, "id"> & {
- companyId: string;
- createdBy: string;
- customFields?: Json;
- })[]
+- `updates`: {
+ id: string;
+ order: number;
+ updatedBy: string;
+ }[]
-### sales_finalizeQuote (WRITE)
-finalize quote
+### production_updateJobOperationStepOrder (WRITE)
+update job operation step order
**Parameters:**
-- `quoteId`: string
+- `updates`: {
+ id: string;
+ sortOrder: number;
+ updatedBy: string;
+ }[]
-### sales_releaseSalesOrder (WRITE)
-release sales order
+### production_updateKanbanJob (WRITE)
+update kanban job
**Parameters:**
-- `salesOrderId`: string
+- `params`: {
+ id: string;
+ jobId: string | null;
+ companyId: string;
+ userId: string;
+ }
-### sales_upsertCustomer (WRITE)
-upsert customer
+### production_updateQuoteOperationStepOrder (WRITE)
+update quote operation step order
**Parameters:**
-- `customer`: | (Omit<z.infer<typeof customerValidator>, "id"> & {
- companyId: string;
- createdBy: string;
- customFields?: Json;
- })
- | (Omit<z.infer<typeof customerValidator>, "id"> & {
- id: string;
- updatedBy: string;
- customFields?: Json;
- })
+- `updates`: {
+ id: string;
+ sortOrder: number;
+ updatedBy: string;
+ }[]
-### sales_updateCustomerAccounting (WRITE)
-update customer accounting
+### production_updateMethodOperationStepOrder (WRITE)
+update method operation step order
**Parameters:**
-- `customerAccounting`: z.infer<typeof customerAccountingValidator> & {
+- `updates`: {
+ id: string;
+ sortOrder: number;
updatedBy: string;
- }
+ }[]
-### sales_updateCustomerContact (WRITE)
-update customer contact
+### production_updateJobOperationStatus (WRITE)
+update job operation status
**Parameters:**
-- `customerContact`: {
- contactId: string;
- contact: z.infer<typeof customerContactValidator>;
- customerLocationId?: string;
- customFields?: Json;
- }
+- `id`: string
+- `status`: (typeof jobOperationStatus)[number]
-### sales_updateCustomerLocation (WRITE)
-update customer location
+### production_updateJobOperationDueDate (WRITE)
+update job operation due date
**Parameters:**
-- `customerLocation`: {
- addressId: string;
- name: string;
- address: {
- addressLine1?: string;
- addressLine2?: string;
- city?: string;
- stateProvince?: string;
- countryCode?: string;
- postalCode?: string;
- };
- customFields?: Json;
- }
+- `id`: string
+- `dueDate`: string | null
-### sales_updateCustomerPayment (WRITE)
-update customer payment
+### production_updateProcedureStepOrder (WRITE)
+update procedure step order
**Parameters:**
-- `customerPayment`: z.infer<typeof customerPaymentValidator> & {
+- `updates`: {
+ id: string;
+ sortOrder: number;
updatedBy: string;
- }
+ }[]
-### sales_updateCustomerShipping (WRITE)
-update customer shipping
+### production_upsertProductionEvent (WRITE)
+upsert production event
**Parameters:**
-- `customerShipping`: z.infer<typeof customerShippingValidator> & {
+- `productionEvent`: | (Omit<z.infer<typeof productionEventValidator>, "id"> & {
+ createdBy: string;
+ companyId: string;
+ })
+ | (Omit<z.infer<typeof productionEventValidator>, "id"> & {
+ id: string;
+ updatedBy: string;
+ companyId: string;
+ })
+
+### production_updateProductionQuantity (WRITE)
+update production quantity
+**Parameters:**
+- `productionQuantity`: z.infer<typeof productionQuantityValidator> & {
+ id: string;
updatedBy: string;
+ companyId: string;
}
-### sales_upsertCustomerStatus (WRITE)
-upsert customer status
+### production_upsertProductionQuantity (WRITE)
+upsert production quantity
**Parameters:**
-- `customerStatus`: | (Omit<z.infer<typeof customerStatusValidator>, "id"> & {
+- `productionQuantity`: | (Omit<z.infer<typeof productionQuantityValidator>, "id"> & {
companyId: string;
- createdBy: string;
- customFields?: Json;
})
- | (Omit<z.infer<typeof customerStatusValidator>, "id"> & {
+ | (Omit<z.infer<typeof productionQuantityValidator>, "id"> & {
id: string;
updatedBy: string;
- customFields?: Json;
+ companyId: string;
})
-### sales_upsertCustomerType (WRITE)
-upsert customer type
+### production_upsertJob (WRITE)
+upsert job
**Parameters:**
-- `customerType`: | (Omit<z.infer<typeof customerTypeValidator>, "id"> & {
+- `job`: | (Omit<z.infer<typeof jobValidator>, "id" | "jobId"> & {
+ jobId: string;
+ shelfId?: string;
+ startDate?: string;
companyId: string;
createdBy: string;
customFields?: Json;
})
- | (Omit<z.infer<typeof customerTypeValidator>, "id"> & {
+ | (Omit<z.infer<typeof jobValidator>, "id" | "jobId"> & {
id: string;
+ jobId: string;
updatedBy: string;
customFields?: Json;
})
+- `status`: (typeof jobStatus)[number] (optional)
-### sales_upsertNoQuoteReason (WRITE)
-upsert no quote reason
+### production_upsertJobMaterial (WRITE)
+upsert job material
**Parameters:**
-- `noQuoteReason`: | (Omit<z.infer<typeof noQuoteReasonValidator>, "id"> & {
+- `jobMaterial`: | (z.infer<typeof jobMaterialValidator> & {
+ jobId: string;
+ jobOperationId?: string;
companyId: string;
createdBy: string;
customFields?: Json;
})
- | (Omit<z.infer<typeof noQuoteReasonValidator>, "id"> & {
- id: string;
+ | (z.infer<typeof jobMaterialValidator> & {
+ jobId: string;
+ jobOperationId?: string;
updatedBy: string;
customFields?: Json;
})
-### sales_updateSalesRFQFavorite (WRITE)
-update sales r f q favorite
-**Parameters:**
-- `args`: {
- id: string;
- favorite: boolean;
- userId: string;
- }
-
-### sales_updateSalesRFQLineOrder (WRITE)
-update sales r f q line order
+### production_upsertJobOperation (WRITE)
+upsert job operation
**Parameters:**
-- `updates`: {
- id: string;
- order: number;
- updatedBy: string;
- }[]
+- `jobOperation`: | (z.infer<typeof jobOperationValidator> & {
+ jobId: string;
+ companyId: string;
+ createdBy: string;
+ customFields?: Json;
+ })
+ | (z.infer<typeof jobOperationValidator> & {
+ jobId: string;
+ companyId: string;
+ updatedBy: string;
+ customFields?: Json;
+ })
-### sales_updateQuoteExchangeRate (WRITE)
-update quote exchange rate
+### production_upsertJobOperationStep (WRITE)
+upsert job operation step
**Parameters:**
-- `data`: {
- id: string;
- exchangeRate: number;
- }
+- `jobOperationStep`: | (Omit<z.infer<typeof operationStepValidator>, "id"> & {
+ companyId: string;
+ createdBy: string;
+ })
+ | (Omit<
+ z.infer<typeof operationStepValidator>,
+ "id" | "minValue" | "maxValue"
+ > & {
+ id: string;
+ minValue: number | null;
+ maxValue: number | null;
+ updatedBy: string;
+ updatedAt: string;
+ })
-### sales_updateQuoteLinePrecision (WRITE)
-update quote line precision
+### production_upsertJobOperationParameter (WRITE)
+upsert job operation parameter
**Parameters:**
-- `quoteLineId`: string
-- `precision`: number
+- `jobOperationParameter`: | (Omit<z.infer<typeof operationParameterValidator>, "id"> & {
+ companyId: string;
+ createdBy: string;
+ })
+ | (Omit<z.infer<typeof operationParameterValidator>, "id"> & {
+ id: string;
+ updatedBy: string;
+ updatedAt: string;
+ })
-### sales_updateSalesOrderExchangeRate (WRITE)
-update sales order exchange rate
+### production_upsertJobOperationTool (WRITE)
+upsert job operation tool
**Parameters:**
-- `data`: {
- id: string;
- exchangeRate: number;
- }
+- `jobOperationTool`: | (Omit<z.infer<typeof operationToolValidator>, "id"> & {
+ companyId: string;
+ createdBy: string;
+ })
+ | (Omit<z.infer<typeof operationToolValidator>, "id"> & {
+ id: string;
+ updatedBy: string;
+ updatedAt: string;
+ })
-### sales_updateQuoteFavorite (WRITE)
-update quote favorite
+### production_upsertJobMethod (WRITE)
+upsert job method
**Parameters:**
-- `args`: {
- id: string;
- favorite: boolean;
+- `type`: "itemToJob" | "quoteLineToJob"
+- `jobMethod`: {
+ sourceId: string;
+ targetId: string;
+ companyId: string;
userId: string;
+ configuration?: Record<string, unknown>;
+ parts?: {
+ billOfMaterial: boolean;
+ billOfProcess: boolean;
+ parameters: boolean;
+ tools: boolean;
+ steps: boolean;
+ workInstructions: boolean;
+ };
}
-### sales_updateSalesRFQStatus (WRITE)
-update sales r f q status
-**Parameters:**
-- `update`: {
- id: string;
- status: (typeof salesRFQStatusType)[number];
- noQuoteReasonId: string | null;
- assignee: null | undefined;
- updatedBy: string;
- }
-
-### sales_updateQuoteMaterialOrder (WRITE)
-update quote material order
-**Parameters:**
-- `updates`: {
- id: string;
- order: number;
- updatedBy: string;
- }[]
-
-### sales_updateQuoteOperationOrder (WRITE)
-update quote operation order
-**Parameters:**
-- `updates`: {
- id: string;
- order: number;
- updatedBy: string;
- }[]
-
-### sales_updateQuoteStatus (WRITE)
-update quote status
+### production_upsertJobMaterialMakeMethod (WRITE)
+upsert job material make method
**Parameters:**
-- `update`: {
- id: string;
- status: (typeof quoteStatusType)[number];
- assignee: null | undefined;
- updatedBy: string;
+- `jobMaterial`: {
+ sourceId: string;
+ targetId: string;
+ companyId: string;
+ userId: string;
+ configuration?: Record<string, unknown>;
+ parts?: {
+ billOfMaterial: boolean;
+ billOfProcess: boolean;
+ parameters: boolean;
+ tools: boolean;
+ steps: boolean;
+ workInstructions: boolean;
+ };
}
-### sales_upsertMakeMethodFromQuoteLine (WRITE)
-upsert make method from quote line
+### production_upsertMakeMethodFromJob (WRITE)
+upsert make method from job
**Parameters:**
-- `lineMethod`: {
- itemId: string;
- quoteId: string;
- quoteLineId: string;
+- `jobMethod`: {
+ sourceId: string;
+ targetId: string;
companyId: string;
userId: string;
parts?: {
@@ -6088,10 +5674,10 @@ upsert make method from quote line
};
}
-### sales_upsertMakeMethodFromQuoteMethod (WRITE)
-upsert make method from quote method
+### production_upsertMakeMethodFromJobMethod (WRITE)
+upsert make method from job method
**Parameters:**
-- `quoteMethod`: {
+- `jobMethod`: {
sourceId: string;
targetId: string;
companyId: string;
@@ -6106,1112 +5692,1533 @@ upsert make method from quote method
};
}
-### sales_upsertQuote (WRITE)
-upsert quote
+### production_upsertProcedure (WRITE)
+upsert procedure
**Parameters:**
-- `quote`: | (Omit<z.infer<typeof quoteValidator>, "id" | "quoteId"> & {
- quoteId: string;
+- `procedure`: | (Omit<z.infer<typeof procedureValidator>, "id"> & {
+ companyId: string;
+ createdBy: string;
+ })
+ | (Omit<z.infer<typeof procedureValidator>, "id"> & {
+ id: string;
+ updatedBy: string;
+ })
+
+### production_upsertProcedureStep (WRITE)
+upsert procedure step
+**Parameters:**
+- `procedureStep`: | (Omit<z.infer<typeof procedureStepValidator>, "id"> & {
+ companyId: string;
+ createdBy: string;
+ })
+ | (Omit<z.infer<typeof procedureStepValidator>, "id"> & {
+ id: string;
+ updatedBy: string;
+ })
+
+### production_upsertProcedureParameter (WRITE)
+upsert procedure parameter
+**Parameters:**
+- `procedureParameter`: | (Omit<z.infer<typeof procedureParameterValidator>, "id"> & {
+ companyId: string;
+ createdBy: string;
+ })
+ | (Omit<z.infer<typeof procedureParameterValidator>, "id"> & {
+ id: string;
+ updatedBy: string;
+ })
+
+### production_upsertScrapReason (WRITE)
+upsert scrap reason
+**Parameters:**
+- `scrapReason`: | (Omit<z.infer<typeof scrapReasonValidator>, "id"> & {
companyId: string;
createdBy: string;
customFields?: Json;
})
- | (Omit<z.infer<typeof quoteValidator>, "id" | "quoteId"> & {
+ | (Omit<z.infer<typeof scrapReasonValidator>, "id"> & {
id: string;
- quoteId: string;
updatedBy: string;
customFields?: Json;
})
-### sales_upsertQuoteLine (WRITE)
-upsert quote line
+### production_upsertFailureMode (WRITE)
+upsert failure mode
**Parameters:**
-- `quotationLine`: | (Omit<z.infer<typeof quoteLineValidator>, "id"> & {
+- `failureMode`: | (Omit<z.infer<typeof failureModeValidator>, "id"> & {
companyId: string;
createdBy: string;
customFields?: Json;
})
- | (Omit<z.infer<typeof quoteLineValidator>, "id"> & {
+ | (Omit<z.infer<typeof failureModeValidator>, "id"> & {
id: string;
updatedBy: string;
customFields?: Json;
})
-### sales_upsertQuoteLineAdditionalCharges (WRITE)
-upsert quote line additional charges
+### production_upsertMaintenanceDispatch (WRITE)
+upsert maintenance dispatch
**Parameters:**
-- `lineId`: string
-- `update`: {
- additionalCharges: z.infer<typeof quoteLineAdditionalChargesValidator>;
- updatedBy: string;
- }
+- `dispatch`: | (Omit<z.infer<typeof maintenanceDispatchValidator>, "id"> & {
+ maintenanceDispatchId: string;
+ companyId: string;
+ createdBy: string;
+ content?: Json;
+ })
+ | (Omit<z.infer<typeof maintenanceDispatchValidator>, "id"> & {
+ id: string;
+ updatedBy: string;
+ content?: Json;
+ })
-### sales_upsertQuoteLinePrices (WRITE)
-upsert quote line prices
+### production_upsertMaintenanceDispatchComment (WRITE)
+upsert maintenance dispatch comment
**Parameters:**
-- `quoteId`: string
-- `lineId`: string
-- `quoteLinePrices`: {
- quoteLineId: string;
- unitPrice: number;
- leadTime: number;
- discountPercent: number;
- quantity: number;
- createdBy: string;
- categoryMarkups?: Record<string, number>;
- }[]
-
-### sales_calculatePricesForQuantities (WRITE)
-calculate prices for quantities
-**Parameters:**
-- `quoteId`: string
-- `quoteLineId`: string
-- `quantities`: number[]
-
-### sales_recalculateQuoteLinePrices (WRITE)
-recalculate quote line prices
-**Parameters:**
-- `quoteId`: string
-- `quoteLineId`: string
-
-### sales_upsertQuoteLineMethod (WRITE)
-upsert quote line method
-**Parameters:**
-- `lineMethod`: {
- itemId: string;
- quoteId: string;
- quoteLineId: string;
- companyId: string;
- userId: string;
- configuration?: Record<string, unknown>;
- parts?: {
- billOfMaterial: boolean;
- billOfProcess: boolean;
- parameters: boolean;
- tools: boolean;
- steps: boolean;
- workInstructions: boolean;
- };
- }
-
-### sales_upsertQuoteMaterial (WRITE)
-upsert quote material
-**Parameters:**
-- `quoteMaterial`: | (z.infer<typeof quoteMaterialValidator> & {
- quoteId: string;
- quoteLineId: string;
- quoteOperationId?: string;
+- `comment`: | (Omit<z.infer<typeof maintenanceDispatchCommentValidator>, "id"> & {
companyId: string;
createdBy: string;
- customFields?: Json;
})
- | (z.infer<typeof quoteMaterialValidator> & {
- quoteId: string;
- quoteLineId: string;
- quoteOperationId?: string;
+ | (Omit<z.infer<typeof maintenanceDispatchCommentValidator>, "id"> & {
+ id: string;
updatedBy: string;
- customFields?: Json;
})
-### sales_upsertQuoteMaterialMakeMethod (WRITE)
-upsert quote material make method
-**Parameters:**
-- `quoteMethod`: {
- sourceId: string;
- targetId: string;
- companyId: string;
- userId: string;
- configuration?: Record<string, unknown>;
- parts?: {
- billOfMaterial: boolean;
- billOfProcess: boolean;
- parameters: boolean;
- tools: boolean;
- steps: boolean;
- workInstructions: boolean;
- };
- }
-
-### sales_upsertQuoteOperation (WRITE)
-upsert quote operation
+### production_upsertMaintenanceDispatchEvent (WRITE)
+upsert maintenance dispatch event
**Parameters:**
-- `operation`: | (Omit<z.infer<typeof quoteOperationValidator>, "id"> & {
- quoteId: string;
- quoteLineId: string;
- companyId: string;
- createdBy: string;
- customFields?: Json;
- })
- | (z.infer<typeof quoteOperationValidator> & {
- quoteId: string;
- quoteLineId: string;
+- `event`: | (Omit<z.infer<typeof maintenanceDispatchEventValidator>, "id"> & {
companyId: string;
createdBy: string;
- customFields?: Json;
})
- | (Omit<z.infer<typeof quoteOperationValidator>, "id"> & {
+ | (Omit<z.infer<typeof maintenanceDispatchEventValidator>, "id"> & {
id: string;
- quoteId: string;
- quoteLineId: string;
updatedBy: string;
- customFields?: Json;
})
-### sales_upsertQuoteOperationStep (WRITE)
-upsert quote operation step
+### production_upsertMaintenanceDispatchItem (WRITE)
+upsert maintenance dispatch item
**Parameters:**
-- `quoteOperationStep`: | (Omit<z.infer<typeof operationStepValidator>, "id"> & {
+- `item`: | (Omit<z.infer<typeof maintenanceDispatchItemValidator>, "id"> & {
companyId: string;
createdBy: string;
})
- | (Omit<
- z.infer<typeof operationStepValidator>,
- "id" | "minValue" | "maxValue"
- > & {
+ | (Omit<z.infer<typeof maintenanceDispatchItemValidator>, "id"> & {
id: string;
- minValue: number | null;
- maxValue: number | null;
updatedBy: string;
- updatedAt: string;
})
-### sales_upsertQuoteOperationParameter (WRITE)
-upsert quote operation parameter
+### production_upsertMaintenanceDispatchWorkCenter (WRITE)
+upsert maintenance dispatch work center
**Parameters:**
-- `quoteOperationParameter`: | (Omit<z.infer<typeof operationParameterValidator>, "id"> & {
+- `workCenter`: | (Omit<z.infer<typeof maintenanceDispatchWorkCenterValidator>, "id"> & {
companyId: string;
createdBy: string;
})
- | (Omit<z.infer<typeof operationParameterValidator>, "id"> & {
+ | (Omit<z.infer<typeof maintenanceDispatchWorkCenterValidator>, "id"> & {
id: string;
updatedBy: string;
- updatedAt: string;
})
-### sales_upsertQuoteOperationTool (WRITE)
-upsert quote operation tool
+### production_upsertMaintenanceSchedule (WRITE)
+upsert maintenance schedule
**Parameters:**
-- `quoteOperationTool`: | (Omit<z.infer<typeof operationToolValidator>, "id"> & {
+- `schedule`: | (Omit<z.infer<typeof maintenanceScheduleValidator>, "id"> & {
companyId: string;
createdBy: string;
})
- | (Omit<z.infer<typeof operationToolValidator>, "id"> & {
+ | (Omit<z.infer<typeof maintenanceScheduleValidator>, "id"> & {
id: string;
updatedBy: string;
- updatedAt: string;
})
-### sales_upsertQuotePayment (WRITE)
-upsert quote payment
+### production_upsertMaintenanceScheduleItem (WRITE)
+upsert maintenance schedule item
**Parameters:**
-- `quotePayment`: | (z.infer<typeof quotePaymentValidator> & {
+- `item`: | (Omit<z.infer<typeof maintenanceScheduleItemValidator>, "id"> & {
+ companyId: string;
createdBy: string;
- customFields?: Json;
})
- | (z.infer<typeof quotePaymentValidator> & {
+ | (Omit<z.infer<typeof maintenanceScheduleItemValidator>, "id"> & {
id: string;
updatedBy: string;
- customFields?: Json;
})
-### sales_upsertQuoteShipment (WRITE)
-upsert quote shipment
+### production_upsertDemandForecasts (WRITE)
+upsert demand forecasts
**Parameters:**
-- `quoteShipment`: | (z.infer<typeof quoteShipmentValidator> & {
- createdBy: string;
- })
- | (z.infer<typeof quoteShipmentValidator> & {
- id: string;
- updatedBy: string;
- })
+- `forecasts`: Array<{
+ itemId: string;
+ locationId: string;
+ periodId: string;
+ forecastQuantity: number;
+ companyId: string;
+ createdBy: string;
+ updatedBy?: string;
+ }>
-### sales_updateSalesOrderFavorite (WRITE)
-update sales order favorite
+### production_upsertDemandProjections (WRITE)
+upsert demand projections
**Parameters:**
-- `args`: {
- id: string;
- favorite: boolean;
- userId: string;
- }
+- `forecasts`: Array<{
+ itemId: string;
+ locationId: string;
+ periodId: string;
+ forecastQuantity: number;
+ companyId: string;
+ createdBy: string;
+ updatedBy?: string;
+ }>
-### sales_updateSalesOrderStatus (WRITE)
-update sales order status
+### production_triggerJobSchedule (WRITE)
+trigger job schedule
**Parameters:**
-- `update`: {
- id: string;
- status: (typeof salesOrderStatusType)[number];
- assignee: null | undefined;
- updatedBy: string;
- }
+- `jobId`: string
+- `mode`: "initial" | "reschedule" (optional)
+- `direction`: "backward" | "forward" (optional)
-### sales_upsertSalesOrder (WRITE)
-upsert sales order
+---
+
+## documents (14 tools)
+
+### documents_deleteDocument (DESTRUCTIVE)
+delete document
**Parameters:**
-- `salesOrder`: | (Omit<z.infer<typeof salesOrderValidator>, "id" | "salesOrderId"> & {
- salesOrderId: string;
- companyId: string;
- createdBy: string;
- customFields?: Json;
- })
- | (Omit<z.infer<typeof salesOrderValidator>, "id" | "salesOrderId"> & {
- id: string;
- salesOrderId: string;
- updatedBy: string;
- customFields?: Json;
- })
+- `id`: string
-### sales_upsertSalesOrderShipment (WRITE)
-upsert sales order shipment
+### documents_deleteDocumentFavorite (DESTRUCTIVE)
+delete document favorite
**Parameters:**
-- `salesOrderShipment`: | (z.infer<typeof salesOrderShipmentValidator> & {
- createdBy: string;
- customFields?: Json;
- })
- | (z.infer<typeof salesOrderShipmentValidator> & {
- id: string;
- updatedBy: string;
- customFields?: Json;
- })
+- `id`: string
-### sales_upsertSalesOrderLine (WRITE)
-upsert sales order line
+### documents_deleteDocumentLabel (DESTRUCTIVE)
+delete document label
**Parameters:**
-- `salesOrderLine`: | (Omit<z.infer<typeof salesOrderLineValidator>, "id"> & {
- companyId: string;
- createdBy: string;
- customFields?: Json;
- })
- | (Omit<z.infer<typeof salesOrderLineValidator>, "id"> & {
- id: string;
- updatedBy: string;
- customFields?: Json;
- })
+- `id`: string
+- `label`: string
-### sales_upsertSalesOrderPayment (WRITE)
-upsert sales order payment
+### documents_getDocument (READ)
+get document
**Parameters:**
-- `salesOrderPayment`: | (z.infer<typeof salesOrderPaymentValidator> & {
- createdBy: string;
- customFields?: Json;
- })
- | (z.infer<typeof salesOrderPaymentValidator> & {
- id: string;
- updatedBy: string;
- customFields?: Json;
- })
+- `documentId`: string
-### sales_upsertSalesRFQ (WRITE)
-upsert sales r f q
+### documents_getDocuments (READ)
+get documents
**Parameters:**
-- `rfq`: | (Omit<z.infer<typeof salesRfqValidator>, "id" | "rfqId"> & {
- rfqId: string;
- companyId: string;
- createdBy: string;
- customFields?: Json;
- })
- | (Omit<z.infer<typeof salesRfqValidator>, "id" | "rfqId"> & {
- id: string;
- rfqId: string;
- updatedBy: string;
- customFields?: Json;
- })
+- `args`: GenericQueryFilters & {
+ search: string | null;
+ favorite?: boolean;
+ recent?: boolean;
+ createdBy?: string;
+ active: boolean;
+ }
-### sales_upsertSalesRFQLine (WRITE)
-upsert sales r f q line
+### documents_getDocumentExtensions (READ)
+get document extensions
+**Parameters:** none (context auto-filled)
+
+### documents_getDocumentLabels (READ)
+get document labels
+**Parameters:** none (context auto-filled)
+
+### documents_insertDocumentFavorite (WRITE)
+insert document favorite
**Parameters:**
-- `salesRfqLine`: | (Omit<z.infer<typeof salesRfqLineValidator>, "id"> & {
+- `id`: string
+
+### documents_insertDocumentLabel (WRITE)
+insert document label
+**Parameters:**
+- `id`: string
+- `label`: string
+
+### documents_moveDocumentToTrash (WRITE)
+move document to trash
+**Parameters:**
+- `id`: string
+
+### documents_restoreDocument (WRITE)
+restore document
+**Parameters:**
+- `id`: string
+
+### documents_upsertDocument (WRITE)
+upsert document
+**Parameters:**
+- `document`: | (Omit<z.infer<typeof documentValidator>, "id"> & {
+ path: string;
+ size: number;
companyId: string;
createdBy: string;
- customFields?: Json;
- })
- | (Omit<z.infer<typeof salesRfqLineValidator>, "id"> & {
+ } & SourceDocumentData)
+ | (Omit<z.infer<typeof documentValidator>, "id"> & {
id: string;
updatedBy: string;
- customFields?: Json;
})
+### documents_updateDocumentFavorite (WRITE)
+update document favorite
+**Parameters:**
+- `args`: {
+ id: string;
+ favorite: boolean;
+ userId: string;
+ }
+
+### documents_updateDocumentLabels (WRITE)
+update document labels
+**Parameters:**
+- `document`: z.infer<typeof documentLabelsValidator> & {
+ userId: string;
+ }
+
---
-## settings (68 tools)
+## account (10 tools)
-### settings_getAccountsPayableBillingAddress (READ)
-get accounts payable billing address
+### account_deleteUserAttributeValue (DESTRUCTIVE)
+delete user attribute value
+**Parameters:**
+- `args`: {
+ userId: string;
+ userAttributeId: string;
+ userAttributeValueId: string;
+ }
+
+### account_getAccount (READ)
+get account
+**Parameters:**
+- `id`: string
+
+### account_getAttributes (READ)
+get attributes
+**Parameters:**
+- `isPublic`: boolean
+
+### account_getPrivateAttributes (READ)
+get private attributes
+**Parameters:** none (context auto-filled)
+
+### account_getPublicAttributes (READ)
+get public attributes
+**Parameters:** none (context auto-filled)
+
+### account_getAllAttributeCategories (READ)
+get all attribute categories
**Parameters:** none (context auto-filled)
-### settings_getAccountsReceivableBillingAddress (READ)
-get accounts receivable billing address
+### account_getAttributeCategoryWithValues (READ)
+get attribute category with values
+**Parameters:**
+- `categoryId`: string
+
+### account_updateAvatar (WRITE)
+update avatar
+**Parameters:**
+- `avatarUrl`: string | null
+
+### account_updatePublicAccount (WRITE)
+update public account
+**Parameters:**
+- `account`: {
+ id: string;
+ firstName: string;
+ lastName: string;
+ about?: string;
+ }
+
+### account_upsertUserAttributeValue (WRITE)
+upsert user attribute value
+**Parameters:**
+- `update`: {
+ userAttributeValueId?: string | undefined;
+ userAttributeId: string;
+ value: boolean | string | number;
+ type: string;
+ userId: string;
+ updatedBy: string;
+ }
+
+---
+
+## items (136 tools)
+
+### items_activateMethodVersion (WRITE)
+activate method version
+**Parameters:**
+- `payload`: {
+ id: string;
+ companyId: string;
+ userId: string;
+ }
+
+### items_copyItem (WRITE)
+copy item
+**Parameters:**
+- `args`: z.infer<typeof getMethodValidator> & {
+ companyId: string;
+ userId: string;
+ }
+
+### items_copyMakeMethod (WRITE)
+copy make method
+**Parameters:**
+- `args`: z.infer<typeof getMethodValidator> & {
+ companyId: string;
+ userId: string;
+ }
+
+### items_createRevision (WRITE)
+create revision
+**Parameters:**
+- `args`: {
+ item: NonNullable<Awaited<ReturnType<typeof getItem>>["data"]>;
+ revision: string;
+ createdBy: string;
+ }
+
+### items_deleteConfigurationParameter (DESTRUCTIVE)
+delete configuration parameter
+**Parameters:**
+- `id`: string
+
+### items_deleteConfigurationRule (DESTRUCTIVE)
+delete configuration rule
+**Parameters:**
+- `field`: string
+- `itemId`: string
+
+### items_deleteItemCustomerPart (DESTRUCTIVE)
+delete item customer part
+**Parameters:**
+- `id`: string
+
+### items_deleteConfigurationParameterGroup (DESTRUCTIVE)
+delete configuration parameter group
+**Parameters:**
+- `id`: string
+
+### items_deleteItem (DESTRUCTIVE)
+delete item
+**Parameters:**
+- `id`: string
+
+### items_deleteItemPostingGroup (DESTRUCTIVE)
+delete item posting group
+**Parameters:**
+- `id`: string
+
+### items_deleteMaterialDimension (DESTRUCTIVE)
+delete material dimension
+**Parameters:**
+- `id`: string
+
+### items_deleteMaterialFinish (DESTRUCTIVE)
+delete material finish
+**Parameters:**
+- `id`: string
+
+### items_deleteMaterialForm (DESTRUCTIVE)
+delete material form
+**Parameters:**
+- `id`: string
+
+### items_deleteMaterialGrade (DESTRUCTIVE)
+delete material grade
+**Parameters:**
+- `id`: string
+
+### items_deleteMaterialSubstance (DESTRUCTIVE)
+delete material substance
+**Parameters:**
+- `id`: string
+
+### items_deleteMethodMaterial (DESTRUCTIVE)
+delete method material
+**Parameters:**
+- `id`: string
+
+### items_assertMethodOperationIsDraft (WRITE)
+assert method operation is draft
+**Parameters:**
+- `operationId`: string
+
+### items_deleteMethodOperationStep (DESTRUCTIVE)
+delete method operation step
+**Parameters:**
+- `id`: string
+
+### items_deleteMethodOperationParameter (DESTRUCTIVE)
+delete method operation parameter
+**Parameters:**
+- `id`: string
+
+### items_deleteMethodOperationTool (DESTRUCTIVE)
+delete method operation tool
+**Parameters:**
+- `id`: string
+
+### items_deleteUnitOfMeasure (DESTRUCTIVE)
+delete unit of measure
+**Parameters:**
+- `id`: string
+
+### items_getConfigurationParameters (READ)
+get configuration parameters
+**Parameters:**
+- `itemId`: string
+
+### items_getConfigurationRules (READ)
+get configuration rules
+**Parameters:**
+- `itemId`: string
+
+### items_getConsumable (READ)
+get consumable
+**Parameters:**
+- `itemId`: string
+
+### items_getConsumables (READ)
+get consumables
+**Parameters:**
+- `args`: GenericQueryFilters & {
+ search: string | null;
+ supplierId: string | null;
+ }
+
+### items_getConsumablesList (READ)
+get consumables list
**Parameters:** none (context auto-filled)
-### settings_updateAccountsPayableBillingAddress (WRITE)
-update accounts payable billing address
+### items_getItem (READ)
+get item
**Parameters:**
-- `data`: z.infer<typeof accountsPayableBillingAddressValidator>
+- `id`: string
-### settings_updateAccountsReceivableBillingAddress (WRITE)
-update accounts receivable billing address
+### items_getItemCost (READ)
+get item cost
**Parameters:**
-- `data`: z.infer<typeof accountsReceivableBillingAddressValidator>
+- `itemId`: string
-### settings_deleteApiKey (DESTRUCTIVE)
-delete api key
+### items_getItemCostHistory (READ)
+get item cost history
**Parameters:**
-- `id`: string
+- `itemId`: string
-### settings_deleteWebhook (DESTRUCTIVE)
-delete webhook
+### items_getItemCustomerPart (READ)
+get item customer part
**Parameters:**
- `id`: string
-### settings_deactivateWebhooks (WRITE)
-deactivate webhooks
-**Parameters:** none (context auto-filled)
+### items_getItemCustomerParts (READ)
+get item customer parts
+**Parameters:**
+- `itemId`: string
-### settings_getApiKeys (READ)
-get api keys
+### items_getItemDemand (READ)
+get item demand
**Parameters:**
-- `args`: GenericQueryFilters & { search: string | null } (optional)
+- `arg1`: {
+ itemId: string;
+ locationId: string;
+ periods: string[];
+ companyId: string;
+ }
-### settings_getCompanies (READ)
-get companies
-**Parameters:** none (context auto-filled)
+### items_getItemFiles (READ)
+get item files
+**Parameters:**
+- `itemId`: string
-### settings_getCompany (READ)
-get company
-**Parameters:** none (context auto-filled)
+### items_getItemPostingGroup (READ)
+get item posting group
+**Parameters:**
+- `id`: string
-### settings_getCompanyPlan (READ)
-get company plan
-**Parameters:** none (context auto-filled)
+### items_getItemPostingGroups (READ)
+get item posting groups
+**Parameters:**
+- `args`: GenericQueryFilters & { search: string | null } (optional)
-### settings_getCompanySettings (READ)
-get company settings
+### items_getItemPostingGroupsList (READ)
+get item posting groups list
**Parameters:** none (context auto-filled)
-### settings_getCompanyIntegrations (READ)
-get company integrations
-**Parameters:** none (context auto-filled)
+### items_getItemManufacturing (READ)
+get item manufacturing
+**Parameters:**
+- `id`: string
-### settings_getConfig (READ)
-get config
-**Parameters:** none (context auto-filled)
+### items_getItemPlanning (READ)
+get item planning
+**Parameters:**
+- `itemId`: string
+- `locationId`: string
-### settings_getCurrentSequence (READ)
-get current sequence
+### items_getItemQuantities (READ)
+get item quantities
**Parameters:**
-- `table`: string
+- `itemId`: string
+- `locationId`: string
-### settings_getCustomField (READ)
-get custom field
+### items_getItemReplenishment (READ)
+get item replenishment
**Parameters:**
-- `id`: string
+- `itemId`: string
-### settings_getCustomFields (READ)
-get custom fields
+### items_getItemShelfQuantities (READ)
+get item shelf quantities
**Parameters:**
-- `table`: string
+- `itemId`: string
+- `locationId`: string
-### settings_getCustomFieldsTables (READ)
-get custom fields tables
+### items_getItemSupply (READ)
+get item supply
**Parameters:**
-- `args`: GenericQueryFilters & {
- search: string | null;
+- `arg1`: {
+ itemId: string;
+ locationId: string;
+ periods: string[];
+ companyId: string;
}
-### settings_getIntegration (READ)
-get integration
+### items_getItemUnitSalePrice (READ)
+get item unit sale price
**Parameters:**
- `id`: string
-### settings_getIntegrations (READ)
-get integrations
-**Parameters:** none (context auto-filled)
-
-### settings_getKanbanOutputSetting (READ)
-get kanban output setting
-**Parameters:** none (context auto-filled)
-
-### settings_getPlanById (READ)
-get plan by id
+### items_getMaterialUsedIn (READ)
+get material used in
**Parameters:**
-- `planId`: string
+- `itemId`: string
-### settings_getPlans (READ)
-get plans
-**Parameters:** none (context auto-filled)
+### items_getMakeMethods (READ)
+get make methods
+**Parameters:**
+- `itemId`: string
-### settings_getNextSequence (READ)
-get next sequence
+### items_getMakeMethodById (READ)
+get make method by id
**Parameters:**
-- `table`: string
+- `makeMethodId`: string
-### settings_getSequence (READ)
-get sequence
+### items_getMaterial (READ)
+get material
**Parameters:**
-- `table`: string
+- `itemId`: string
-### settings_getSequences (READ)
-get sequences
+### items_getMaterials (READ)
+get materials
**Parameters:**
- `args`: GenericQueryFilters & {
search: string | null;
+ supplierId: string | null;
}
-### settings_getSequencesList (READ)
-get sequences list
-**Parameters:**
-- `table`: string
-
-### settings_getTerms (READ)
-get terms
+### items_getMaterialsList (READ)
+get materials list
**Parameters:** none (context auto-filled)
-### settings_getWebhook (READ)
-get webhook
+### items_getMaterialDimension (READ)
+get material dimension
**Parameters:**
- `id`: string
-### settings_getWebhookTables (READ)
-get webhook tables
-**Parameters:** none (context auto-filled)
+### items_getMaterialDimensions (READ)
+get material dimensions
+**Parameters:**
+- `args`: GenericQueryFilters & { search: string | null; isMetric: boolean } (optional)
-### settings_getWebhooks (READ)
-get webhooks
+### items_getMaterialDimensionList (READ)
+get material dimension list
**Parameters:**
-- `args`: GenericQueryFilters & { search: string | null } (optional)
+- `materialFormId`: string
+- `isMetric`: boolean
-### settings_insertCompany (WRITE)
-insert company
+### items_getMaterialFinish (READ)
+get material finish
**Parameters:**
-- `company`: z.infer<typeof companyValidator>
-- `ownerId`: string (optional)
+- `id`: string
-### settings_updateCompanyPlan (WRITE)
-update company plan
+### items_getMaterialFinishes (READ)
+get material finishes
**Parameters:**
-- `data`: {
- companyId: string;
- stripeCustomerId: string;
- stripeSubscriptionId: string;
- stripeSubscriptionStatus: string;
- subscriptionStartDate: string;
- }
+- `args`: GenericQueryFilters & { search: string | null } (optional)
-### settings_seedCompany (WRITE)
-seed company
-**Parameters:** none (context auto-filled)
+### items_getMaterialFinishList (READ)
+get material finish list
+**Parameters:**
+- `materialSubstanceId`: string
-### settings_updateCompany (WRITE)
-update company
+### items_getMaterialForm (READ)
+get material form
**Parameters:**
-- `company`: Partial<z.infer<typeof companyValidator>> & {
- updatedBy: string;
- }
+- `id`: string
-### settings_updateKanbanOutputSetting (WRITE)
-update kanban output setting
+### items_getMaterialForms (READ)
+get material forms
**Parameters:**
-- `kanbanOutput`: (typeof kanbanOutputTypes)[number]
+- `args`: GenericQueryFilters & { search: string | null } (optional)
-### settings_updateMetricSettings (WRITE)
-update metric settings
+### items_getMaterialFormsList (READ)
+get material forms list
+**Parameters:** none (context auto-filled)
+
+### items_getMaterialGrades (READ)
+get material grades
**Parameters:**
-- `useMetric`: boolean
+- `args`: GenericQueryFilters & { search: string | null } (optional)
-### settings_upsertApiKey (WRITE)
-upsert api key
+### items_getMaterialGrade (READ)
+get material grade
**Parameters:**
-- `apiKey`: | (Omit<z.infer<typeof apiKeyValidator>, "id" | "scopes" | "expiresAt"> & {
- createdBy: string;
- companyId: string;
- scopes: Record<string, string[]>;
- expiresAt?: string;
- rawKey: string;
- keyHash: string;
- keyPreview: string;
- })
- | (Omit<z.infer<typeof apiKeyValidator>, "id" | "scopes" | "expiresAt"> & {
- id: string;
- scopes: Record<string, string[]>;
- expiresAt?: string;
- })
+- `id`: string
-### settings_updateDigitalQuoteSetting (WRITE)
-update digital quote setting
+### items_getMaterialGradeList (READ)
+get material grade list
**Parameters:**
-- `digitalQuoteEnabled`: boolean
-- `digitalQuoteNotificationGroup`: string[]
-- `digitalQuoteIncludesPurchaseOrders`: boolean
+- `materialSubstanceId`: string
-### settings_updateLogoDark (WRITE)
-update logo dark
+### items_getMaterialSubstance (READ)
+get material substance
**Parameters:**
-- `logoDark`: string | null
+- `id`: string
-### settings_updateLogoLight (WRITE)
-update logo light
+### items_getMaterialSubstances (READ)
+get material substances
**Parameters:**
-- `logoLight`: string | null
+- `args`: GenericQueryFilters & { search: string | null } (optional)
-### settings_updateLogoDarkIcon (WRITE)
-update logo dark icon
+### items_getMaterialSubstancesList (READ)
+get material substances list
+**Parameters:** none (context auto-filled)
+
+### items_getMethodMaterial (READ)
+get method material
**Parameters:**
-- `logoDarkIcon`: string | null
+- `materialId`: string
-### settings_updateLogoLightIcon (WRITE)
-update logo light icon
+### items_getMethodMaterials (READ)
+get method materials
**Parameters:**
-- `logoLightIcon`: string | null
+- `args`: GenericQueryFilters & { search: string | null } (optional)
-### settings_updateMaterialGeneratedIdsSetting (WRITE)
-update material generated ids setting
+### items_getMethodMaterialsByMakeMethod (READ)
+get method materials by make method
**Parameters:**
-- `materialGeneratedIds`: boolean
+- `makeMethodId`: string
-### settings_updateMaterialUnitsSetting (WRITE)
-update material units setting
+### items_getMethodOperations (READ)
+get method operations
**Parameters:**
-- `useMetric`: boolean
+- `args`: GenericQueryFilters & { search: string | null } (optional)
-### settings_updateProductLabelSize (WRITE)
-update product label size
+### items_getMethodOperationsByMakeMethodId (READ)
+get method operations by make method id
**Parameters:**
-- `productLabelSize`: string
+- `makeMethodId`: string
-### settings_updatePurchasingPdfThumbnails (WRITE)
-update purchasing pdf thumbnails
+### items_getMethodTree (READ)
+get method tree
**Parameters:**
-- `includeThumbnailsOnPurchasingPdfs`: boolean
+- `makeMethodId`: string
-### settings_updateSalesPdfThumbnails (WRITE)
-update sales pdf thumbnails
+### items_getMethodTreeArray (READ)
+get method tree array
**Parameters:**
-- `includeThumbnailsOnSalesPdfs`: boolean
+- `makeMethodId`: string
-### settings_updateJobTravelerWorkInstructions (WRITE)
-update job traveler work instructions
+### items_getOpenJobMaterials (READ)
+get open job materials
**Parameters:**
-- `jobTravelerIncludeWorkInstructions`: boolean
+- `arg1`: { itemId: string; companyId: string; locationId: string }
-### settings_updateTimeCardSetting (WRITE)
-update time card setting
+### items_getOpenProductionOrders (READ)
+get open production orders
**Parameters:**
-- `timeCardEnabled`: boolean
+- `arg1`: { itemId: string; companyId: string; locationId: string }
-### settings_updateConsoleSetting (WRITE)
-update console setting
+### items_getOpenPurchaseOrderLines (READ)
+get open purchase order lines
**Parameters:**
-- `consoleEnabled`: boolean
+- `arg1`: { itemId: string; companyId: string; locationId: string }
-### settings_updateRfqReadySetting (WRITE)
-update rfq ready setting
+### items_getOpenSalesOrderLines (READ)
+get open sales order lines
**Parameters:**
-- `rfqReadyNotificationGroup`: string[]
+- `arg1`: { itemId: string; companyId: string; locationId: string }
-### settings_updateSuggestionNotificationSetting (WRITE)
-update suggestion notification setting
+### items_getPart (READ)
+get part
**Parameters:**
-- `suggestionNotificationGroup`: string[]
+- `itemId`: string
-### settings_updateMaintenanceDispatchNotificationSettings (WRITE)
-update maintenance dispatch notification settings
+### items_getParts (READ)
+get parts
**Parameters:**
-- `settings`: {
- maintenanceDispatchNotificationGroup?: string[];
- qualityDispatchNotificationGroup?: string[];
- operationsDispatchNotificationGroup?: string[];
- otherDispatchNotificationGroup?: string[];
+- `args`: GenericQueryFilters & {
+ search: string | null;
+ supplierId: string | null;
}
-### settings_updateSupplierQuoteNotificationSetting (WRITE)
-update supplier quote notification setting
+### items_getPartsList (READ)
+get parts list
+**Parameters:** none (context auto-filled)
+
+### items_getPartUsedIn (READ)
+get part used in
**Parameters:**
-- `supplierQuoteNotificationGroup`: string[]
+- `itemId`: string
-### settings_updatePurchasePriceUpdateTimingSetting (WRITE)
-update purchase price update timing setting
+### items_getPickMethod (READ)
+get pick method
**Parameters:**
-- `purchasePriceUpdateTiming`: (typeof purchasePriceUpdateTimingTypes)[number]
+- `itemId`: string
+- `locationId`: string
-### settings_updateLeadTimesOnReceiptSetting (WRITE)
-update lead times on receipt setting
+### items_getPickMethods (READ)
+get pick methods
**Parameters:**
-- `updateLeadTimesOnReceipt`: boolean
+- `itemId`: string
-### settings_updateSupplierApprovalSetting (WRITE)
-update supplier approval setting
+### items_getServices (READ)
+get services
**Parameters:**
-- `supplierApproval`: boolean
+- `args`: GenericQueryFilters & {
+ search: string | null;
+ type: string | null;
+ group: string | null;
+ supplierId: string | null;
+ }
-### settings_updateAccountsPayableAddressSetting (WRITE)
-update accounts payable address setting
+### items_getService (READ)
+get service
**Parameters:**
-- `accountsPayableAddress`: boolean
+- `itemId`: string
-### settings_updateAccountsReceivableAddressSetting (WRITE)
-update accounts receivable address setting
+### items_getServicesList (READ)
+get services list
+**Parameters:** none (context auto-filled)
+
+### items_getSupplierParts (READ)
+get supplier parts
**Parameters:**
-- `accountsReceivableAddress`: boolean
+- `id`: string
-### settings_updateAccountsPayableEmail (WRITE)
-update accounts payable email
+### items_getTool (READ)
+get tool
**Parameters:**
-- `accountsPayableEmail`: string | undefined
+- `itemId`: string
-### settings_updateAccountsReceivableEmail (WRITE)
-update accounts receivable email
+### items_getTools (READ)
+get tools
**Parameters:**
-- `accountsReceivableEmail`: string | undefined
+- `args`: GenericQueryFilters & {
+ search: string | null;
+ supplierId: string | null;
+ }
-### settings_updateDefaultSupplierCc (WRITE)
-update default supplier cc
+### items_getToolsList (READ)
+get tools list
+**Parameters:** none (context auto-filled)
+
+### items_getUnitOfMeasure (READ)
+get unit of measure
**Parameters:**
-- `defaultSupplierCc`: string[]
+- `id`: string
-### settings_updateDefaultCustomerCc (WRITE)
-update default customer cc
+### items_getUnitOfMeasures (READ)
+get unit of measures
**Parameters:**
-- `defaultCustomerCc`: string[]
+- `args`: GenericQueryFilters & { search: string | null }
-### settings_updateQuoteLineCategoryMarkups (WRITE)
-update quote line category markups
+### items_getUnitOfMeasuresList (READ)
+get unit of measures list
+**Parameters:** none (context auto-filled)
+
+### items_updateConfigurationParameterGroupOrder (WRITE)
+update configuration parameter group order
**Parameters:**
-- `quoteLineCategoryMarkups`: Record<string, number>
+- `data`: z.infer<typeof configurationParameterGroupOrderValidator>
-### settings_updateSequence (WRITE)
-update sequence
+### items_updateDefaultRevision (WRITE)
+update default revision
**Parameters:**
-- `table`: string
-- `sequence`: Partial<z.infer<typeof sequenceValidator>> & {
+- `data`: {
+ id: string;
updatedBy: string;
}
-### settings_updateIntegrationMetadata (WRITE)
-update integration metadata
+### items_updateConfigurationParameterOrder (WRITE)
+update configuration parameter order
**Parameters:**
-- `integrationId`: string
-- `metadata`: any
+- `data`: Omit<
+ z.infer<typeof configurationParameterOrderValidator>,
+ "configurationParameterGroupId"
+ > & {
+ configurationParameterGroupId?: string | null;
+ updatedBy: string;
+ }
-### settings_upsertWebhook (WRITE)
-upsert webhook
+### items_updateItemCost (WRITE)
+update item cost
**Parameters:**
-- `webhook`: | (Omit<z.infer<typeof webhookValidator>, "id"> & {
- createdBy: string;
- companyId: string;
- })
- | (Omit<z.infer<typeof apiKeyValidator>, "id"> & {
- id: string;
- })
-
----
+- `itemId`: string
+- `cost`: {
+ unitCost: number;
+ updatedBy: string;
+ }
-## shared (44 tools)
+### items_updateMaterialOrder (WRITE)
+update material order
+**Parameters:**
+- `updates`: {
+ id: string;
+ order: number;
+ updatedBy: string;
+ }[]
-### shared_approveRequest (WRITE)
-approve request
+### items_updateOperationOrder (WRITE)
+update operation order
**Parameters:**
-- `db`: Kysely<KyselyDatabase>
-- `id`: string
-- `notes`: string (optional)
+- `updates`: {
+ id: string;
+ order: number;
+ updatedBy: string;
+ }[]
-### shared_canApproveRequest (WRITE)
-can approve request
+### items_updateRevision (WRITE)
+update revision
**Parameters:**
-- `approvalRequest`: ApprovalRequestForApproveCheck
+- `revision`: {
+ id: string;
+ revision: string;
+ updatedBy: string;
+ }
-### shared_canApproveRequestInWindow (WRITE)
-can approve request in window
+### items_upsertConfigurationParameter (WRITE)
+upsert configuration parameter
**Parameters:**
-- `approvalRequest`: ApprovalRequestForApproveCheck
+- `configurationParameter`: z.infer<typeof configurationParameterValidator> & {
+ companyId: string;
+ userId: string;
+ }
-### shared_cancelApprovalRequest (WRITE)
-cancel approval request
+### items_upsertConfigurationParameterGroup (WRITE)
+upsert configuration parameter group
**Parameters:**
-- `id`: string
+- `configurationParameterGroup`: z.infer<
+ typeof configurationParameterGroupValidator
+ > & {
+ companyId: string;
+ itemId: string;
+ }
-### shared_canViewApprovalRequest (WRITE)
-can view approval request
+### items_upsertConfigurationRule (WRITE)
+upsert configuration rule
**Parameters:**
-- `approvalRequest`: ApprovalRequestForViewCheck
+- `configurationRule`: z.infer<typeof configurationRuleValidator> & {
+ itemId: string;
+ companyId: string;
+ updatedBy: string;
+ }
-### shared_createApprovalRequest (WRITE)
-create approval request
+### items_upsertConsumable (WRITE)
+upsert consumable
**Parameters:**
-- `request`: CreateApprovalRequestInput & { amount?: number }
+- `consumable`: | (z.infer<typeof consumableValidator> & {
+ companyId: string;
+ createdBy: string;
+ customFields?: Json;
+ })
+ | (z.infer<typeof consumableValidator> & {
+ updatedBy: string;
+ customFields?: Json;
+ })
-### shared_deleteApprovalRule (DESTRUCTIVE)
-delete approval rule
+### items_upsertPart (WRITE)
+upsert part
**Parameters:**
-- `id`: string
+- `part`: | (z.infer<typeof partValidator> & {
+ companyId: string;
+ createdBy: string;
+ customFields?: Json;
+ })
+ | (z.infer<typeof partValidator> & {
+ updatedBy: string;
+ customFields?: Json;
+ })
-### shared_deleteNote (DESTRUCTIVE)
-delete note
+### items_updateItem (WRITE)
+update item
**Parameters:**
-- `noteId`: string
+- `item`: z.infer<typeof itemValidator> & {
+ companyId: string;
+ type: Database["public"]["Enums"]["itemType"];
+ }
-### shared_deleteSavedView (DESTRUCTIVE)
-delete saved view
+### items_upsertItemCost (WRITE)
+upsert item cost
**Parameters:**
-- `viewId`: string
+- `itemCost`: z.infer<typeof itemCostValidator> & {
+ updatedBy: string;
+ customFields?: Json;
+ }
-### shared_generateEmbedding (WRITE)
-generate embedding
+### items_upsertPickMethod (WRITE)
+upsert pick method
**Parameters:**
-- `text`: string
+- `pickMethod`: | (z.infer<typeof pickMethodValidator> & {
+ companyId: string;
+ createdBy: string;
+ customFields?: Json;
+ })
+ | (z.infer<typeof pickMethodValidator> & {
+ updatedBy: string;
+ customFields?: Json;
+ })
-### shared_getApprovalById (READ)
-get approval by id
+### items_upsertItemManufacturing (WRITE)
+upsert item manufacturing
**Parameters:**
-- `id`: string
+- `partManufacturing`: z.infer<typeof itemManufacturingValidator> & {
+ updatedBy: string;
+ customFields?: Json;
+ }
-### shared_getApprovalRequestsByDocument (READ)
-get approval requests by document
+### items_upsertItemPlanning (WRITE)
+upsert item planning
**Parameters:**
-- `documentType`: (typeof approvalDocumentType)[number]
-- `documentId`: string
+- `partPlanning`: | {
+ companyId: string;
+ itemId: string;
+ locationId: string;
+ createdBy: string;
+ }
+ | (z.infer<typeof itemPlanningValidator> & {
+ updatedBy: string;
+ customFields?: Json;
+ })
-### shared_getApprovalRuleByAmount (READ)
-get approval rule by amount
+### items_upsertItemPurchasing (WRITE)
+upsert item purchasing
**Parameters:**
-- `documentType`: (typeof approvalDocumentType)[number]
-- `amount`: number (optional)
+- `itemPurchasing`: z.infer<typeof itemPurchasingValidator> & {
+ updatedBy: string;
+ }
-### shared_getApproverUserIdsForRule (READ)
-get approver user ids for rule
+### items_upsertItemPostingGroup (WRITE)
+upsert item posting group
**Parameters:**
-- `rule`: Pick<ApprovalRule, "approverGroupIds" | "defaultApproverId">
+- `itemPostingGroup`: | (Omit<z.infer<typeof itemPostingGroupValidator>, "id"> & {
+ companyId: string;
+ createdBy: string;
+ customFields?: Json;
+ })
+ | (Omit<z.infer<typeof itemPostingGroupValidator>, "id"> & {
+ id: string;
+ updatedBy: string;
+ customFields?: Json;
+ })
-### shared_getApprovalRuleById (READ)
-get approval rule by id
+### items_upsertSupplierPart (WRITE)
+upsert supplier part
**Parameters:**
-- `id`: string
-
-### shared_getApprovalRules (READ)
-get approval rules
-**Parameters:** none (context auto-filled)
+- `supplierPart`: | (Omit<z.infer<typeof supplierPartValidator>, "id"> & {
+ companyId: string;
+ createdBy: string;
+ customFields?: Json;
+ })
+ | (Omit<z.infer<typeof supplierPartValidator>, "id"> & {
+ id: string;
+ updatedBy: string;
+ customFields?: Json;
+ })
-### shared_getApprovalRulesForApprover (READ)
-get approval rules for approver
+### items_upsertItemCustomerPart (WRITE)
+upsert item customer part
**Parameters:**
-- `documentType`: (typeof approvalDocumentType)[number]
+- `customerPart`: | (Omit<z.infer<typeof customerPartValidator>, "id"> & {
+ companyId: string;
+ })
+ | (Omit<z.infer<typeof customerPartValidator>, "id"> & {
+ id: string;
+ })
-### shared_getApprovalsForUser (READ)
-get approvals for user
+### items_upsertItemUnitSalePrice (WRITE)
+upsert item unit sale price
**Parameters:**
-- `args`: GenericQueryFilters & ApprovalFilters (optional)
+- `itemUnitSalePrice`: z.infer<typeof itemUnitSalePriceValidator> & {
+ updatedBy: string;
+ customFields?: Json;
+ }
-### shared_getBase64ImageFromSupabase (READ)
-get base64 image from supabase
+### items_upsertMakeMethodVersion (WRITE)
+upsert make method version
**Parameters:**
-- `path`: string
-
-### shared_getCountries (READ)
-get countries
-**Parameters:** none (context auto-filled)
+- `makeMethodVersion`: z.infer<typeof makeMethodVersionValidator> & {
+ companyId: string;
+ createdBy: string;
+ }
-### shared_getLatestApprovalRequestForDocument (READ)
-get latest approval request for document
+### items_upsertMethodMaterial (WRITE)
+upsert method material
**Parameters:**
-- `documentType`: (typeof approvalDocumentType)[number]
-- `documentId`: string
+- `methodMaterial`: | (z.infer<typeof methodMaterialValidator> & {
+ companyId: string;
+ createdBy: string;
+ customFields?: Json;
+ })
+ | (z.infer<typeof methodMaterialValidator> & {
+ id: string;
+ updatedBy: string;
+ customFields?: Json;
+ })
-### shared_getModelByItemId (READ)
-get model by item id
+### items_upsertMethodOperation (WRITE)
+upsert method operation
**Parameters:**
-- `itemId`: string
+- `methodOperation`: | (Omit<z.infer<typeof methodOperationValidator>, "id"> & {
+ companyId: string;
+ createdBy: string;
+ customFields?: Json;
+ })
+ | (z.infer<typeof methodOperationValidator> & {
+ companyId: string;
+ createdBy: string;
+ customFields?: Json;
+ })
+ | (Omit<z.infer<typeof methodOperationValidator>, "id"> & {
+ id: string;
+ updatedBy: string;
+ customFields?: Json;
+ })
-### shared_getNotes (READ)
-get notes
+### items_upsertMethodOperationStep (WRITE)
+upsert method operation step
**Parameters:**
-- `documentId`: string
-
-### shared_getPendingApprovalsForApprover (READ)
-get pending approvals for approver
-**Parameters:** none (context auto-filled)
+- `methodOperationStep`: | (Omit<z.infer<typeof operationStepValidator>, "id"> & {
+ companyId: string;
+ createdBy: string;
+ })
+ | (Omit<
+ z.infer<typeof operationStepValidator>,
+ "id" | "minValue" | "maxValue"
+ > & {
+ id: string;
+ minValue: number | null;
+ maxValue: number | null;
+ updatedBy: string;
+ updatedAt: string;
+ })
-### shared_getPeriods (READ)
-get periods
+### items_upsertMethodOperationParameter (WRITE)
+upsert method operation parameter
**Parameters:**
-- `arg1`: { startDate: string; endDate: string }
-
-### shared_getSavedViews (READ)
-get saved views
-**Parameters:** none (context auto-filled)
+- `methodOperationParameter`: | (Omit<z.infer<typeof operationParameterValidator>, "id"> & {
+ companyId: string;
+ createdBy: string;
+ })
+ | (Omit<z.infer<typeof operationParameterValidator>, "id"> & {
+ id: string;
+ updatedBy: string;
+ updatedAt: string;
+ })
-### shared_getTagsList (READ)
-get tags list
+### items_upsertMethodOperationTool (WRITE)
+upsert method operation tool
**Parameters:**
-- `table`: string | null (optional)
+- `methodOperationTool`: | (Omit<z.infer<typeof operationToolValidator>, "id"> & {
+ companyId: string;
+ createdBy: string;
+ })
+ | (Omit<z.infer<typeof operationToolValidator>, "id"> & {
+ id: string;
+ updatedBy: string;
+ updatedAt: string;
+ })
-### shared_hasPendingApproval (WRITE)
-has pending approval
+### items_upsertMaterial (WRITE)
+upsert material
**Parameters:**
-- `documentType`: (typeof approvalDocumentType)[number]
-- `documentId`: string
+- `material`: | (z.infer<typeof materialValidator> & {
+ companyId: string;
+ createdBy: string;
+ customFields?: Json;
+ sizes?: string[];
+ })
+ | (z.infer<typeof materialValidator> & {
+ updatedBy: string;
+ customFields?: Json;
+ })
-### shared_importCsv (WRITE)
-import csv
+### items_upsertMaterialDimension (WRITE)
+upsert material dimension
**Parameters:**
-- `args`: {
- table: string;
- filePath: string;
- columnMappings: Record<string, string>;
- enumMappings?: Record<string, string[]>;
- companyId: string;
- userId: string;
- }
+- `materialDimension`: | (Omit<z.infer<typeof materialDimensionValidator>, "id"> & {
+ companyId: string;
+ isMetric: boolean;
+ })
+ | (Omit<z.infer<typeof materialDimensionValidator>, "id"> & {
+ id: string;
+ })
-### shared_insertNote (WRITE)
-insert note
+### items_upsertMaterialFinish (WRITE)
+upsert material finish
**Parameters:**
-- `note`: {
- note: string;
- documentId: string;
- companyId: string;
- createdBy: string;
- }
+- `materialFinish`: | (Omit<z.infer<typeof materialFinishValidator>, "id"> & {
+ companyId: string;
+ })
+ | (Omit<z.infer<typeof materialFinishValidator>, "id"> & {
+ id: string;
+ })
-### shared_insertTag (WRITE)
-insert tag
+### items_upsertMaterialForm (WRITE)
+upsert material form
**Parameters:**
-- `tag`: Database["public"]["Tables"]["tag"]["Insert"]
+- `materialForm`: | (Omit<z.infer<typeof materialFormValidator>, "id"> & {
+ companyId: string;
+ createdBy: string;
+ customFields?: Json;
+ })
+ | (Omit<z.infer<typeof materialFormValidator>, "id"> & {
+ id: string;
+ updatedBy: string;
+ customFields?: Json;
+ })
-### shared_isApprovalRequired (WRITE)
-is approval required
+### items_upsertMaterialGrade (WRITE)
+upsert material grade
**Parameters:**
-- `documentType`: (typeof approvalDocumentType)[number]
-- `amount`: number (optional)
+- `materialGrade`: | (Omit<z.infer<typeof materialGradeValidator>, "id"> & {
+ companyId: string;
+ })
+ | (Omit<z.infer<typeof materialGradeValidator>, "id"> & {
+ id: string;
+ })
-### shared_getExternalLink (READ)
-get external link
+### items_deleteMaterialType (DESTRUCTIVE)
+delete material type
**Parameters:**
- `id`: string
-### shared_upsertExternalLink (WRITE)
-upsert external link
-**Parameters:**
-- `externalLink`: | Database["public"]["Tables"]["externalLink"]["Insert"]
- | Database["public"]["Tables"]["externalLink"]["Update"]
-
-### shared_getCustomerPortals (READ)
-get customer portals
+### items_getMaterialTypes (READ)
+get material types
**Parameters:**
- `args`: GenericQueryFilters & { search: string | null } (optional)
-### shared_getCustomerPortal (READ)
-get customer portal
+### items_getMaterialType (READ)
+get material type
**Parameters:**
- `id`: string
-### shared_deleteCustomerPortal (DESTRUCTIVE)
-delete customer portal
+### items_getMaterialTypeList (READ)
+get material type list
**Parameters:**
-- `id`: string
+- `materialSubstanceId`: string
+- `materialFormId`: string
-### shared_updateModelThumbnail (WRITE)
-update model thumbnail
+### items_upsertMaterialType (WRITE)
+upsert material type
**Parameters:**
-- `modelId`: string
-- `thumbnailPath`: string
+- `materialType`: | (Omit<z.infer<typeof materialTypeValidator>, "id"> & {
+ companyId: string;
+ })
+ | (Omit<z.infer<typeof materialTypeValidator>, "id"> & {
+ id: string;
+ })
-### shared_upsertModelUpload (WRITE)
-upsert model upload
+### items_upsertMaterialSubstance (WRITE)
+upsert material substance
**Parameters:**
-- `upload`: | {
+- `materialSubstance`: | (Omit<z.infer<typeof materialSubstanceValidator>, "id"> & {
+ companyId: string;
+ createdBy: string;
+ customFields?: Json;
+ })
+ | (Omit<z.infer<typeof materialSubstanceValidator>, "id"> & {
id: string;
- modelPath: string;
+ updatedBy: string;
+ customFields?: Json;
+ })
+
+### items_upsertService (WRITE)
+upsert service
+**Parameters:**
+- `service`: | (z.infer<typeof serviceValidator> & {
companyId: string;
createdBy: string;
- }
- | {
+ customFields?: Json;
+ })
+ | (Omit<z.infer<typeof serviceValidator>, "id"> & {
id: string;
- name: string;
- size: number;
- thumbnailPath: string;
- }
+ updatedBy: string;
+ customFields?: Json;
+ })
-### shared_updateNote (WRITE)
-update note
+### items_upsertUnitOfMeasure (WRITE)
+upsert unit of measure
**Parameters:**
-- `id`: string
-- `note`: string
+- `unitOfMeasure`: | (Omit<z.infer<typeof unitOfMeasureValidator>, "id"> & {
+ companyId: string;
+ createdBy: string;
+ customFields?: Json;
+ })
+ | (Omit<z.infer<typeof unitOfMeasureValidator>, "id"> & {
+ id: string;
+ updatedBy: string;
+ customFields?: Json;
+ })
-### shared_rejectRequest (WRITE)
-reject request
+### items_upsertTool (WRITE)
+upsert tool
**Parameters:**
-- `db`: Kysely<KyselyDatabase>
-- `id`: string
-- `notes`: string (optional)
+- `tool`: | (z.infer<typeof toolValidator> & {
+ companyId: string;
+ createdBy: string;
+ customFields?: Json;
+ })
+ | (z.infer<typeof toolValidator> & {
+ updatedBy: string;
+ customFields?: Json;
+ })
-### shared_upsertApprovalRule (WRITE)
-upsert approval rule
+### items_getSupplierPriceBreaksForItems (READ)
+get supplier price breaks for items
**Parameters:**
-- `rule`: UpsertApprovalRuleInput
+- `itemIds`: string[]
-### shared_upsertSavedView (WRITE)
-upsert saved view
+### items_lookupBuyPrice (WRITE)
+lookup buy price
**Parameters:**
-- `view`: {
- id?: string;
- name: string;
- description?: string;
- table: string;
- type: "Public" | "Private";
- filters?: string[];
- sorts?: string[];
- columnPinning?: Record<string, boolean>;
- columnVisibility?: Record<string, boolean>;
- columnOrder?: string[];
- userId: string;
- companyId: string;
- }
+- `itemId`: string
+- `qty`: number
+- `fallbackCost`: number
-### shared_updateSavedViewOrder (WRITE)
-update saved view order
+### items_getSupplierPartPriceBreaks (READ)
+get supplier part price breaks
**Parameters:**
-- `updates`: {
- id: string;
- sortOrder: number;
- updatedBy: string;
- }[]
+- `supplierPartId`: string
---
-## users (25 tools)
+## invoicing (28 tools)
+
+### invoicing_createPurchaseInvoiceFromPurchaseOrder (WRITE)
+create purchase invoice from purchase order
+**Parameters:**
+- `purchaseOrderId`: string
+
+### invoicing_createSalesInvoiceFromSalesOrder (WRITE)
+create sales invoice from sales order
+**Parameters:**
+- `salesOrderId`: string
-### users_deleteEmployeeType (DESTRUCTIVE)
-delete employee type
+### invoicing_createSalesInvoiceFromShipment (WRITE)
+create sales invoice from shipment
**Parameters:**
-- `employeeTypeId`: string
+- `shipmentId`: string
-### users_deleteGroup (DESTRUCTIVE)
-delete group
+### invoicing_deletePurchaseInvoice (DESTRUCTIVE)
+delete purchase invoice
**Parameters:**
-- `groupId`: string
+- `purchaseInvoiceId`: string
-### users_getCompaniesForUser (READ)
-get companies for user
-**Parameters:** none (context auto-filled)
+### invoicing_deletePurchaseInvoiceLine (DESTRUCTIVE)
+delete purchase invoice line
+**Parameters:**
+- `purchaseInvoiceLineId`: string
-### users_getCustomers (READ)
-get customers
+### invoicing_deleteSalesInvoice (DESTRUCTIVE)
+delete sales invoice
**Parameters:**
-- `args`: GenericQueryFilters & {
- search: string | null;
- }
+- `salesInvoiceId`: string
-### users_getEmployee (READ)
-get employee
+### invoicing_deleteSalesInvoiceLine (DESTRUCTIVE)
+delete sales invoice line
**Parameters:**
-- `id`: string
+- `salesInvoiceLineId`: string
-### users_getEmployees (READ)
-get employees
+### invoicing_getPurchaseInvoice (READ)
+get purchase invoice
**Parameters:**
-- `args`: GenericQueryFilters & {
- search: string | null;
- }
+- `purchaseInvoiceId`: string
-### users_getConsoleOperators (READ)
-get console operators
+### invoicing_getPurchaseInvoices (READ)
+get purchase invoices
**Parameters:**
- `args`: GenericQueryFilters & {
search: string | null;
+ supplierId: string | null;
}
-### users_getEmployeeType (READ)
-get employee type
+### invoicing_getPurchaseInvoiceDelivery (READ)
+get purchase invoice delivery
**Parameters:**
-- `employeeTypeId`: string
+- `purchaseInvoiceId`: string
-### users_getEmployeeTypes (READ)
-get employee types
+### invoicing_getPurchaseInvoiceLines (READ)
+get purchase invoice lines
**Parameters:**
-- `args`: GenericQueryFilters & { search: string | null } (optional)
-
-### users_getInvitable (READ)
-get invitable
-**Parameters:** none (context auto-filled)
+- `purchaseInvoiceId`: string
-### users_getModules (READ)
-get modules
-**Parameters:** none (context auto-filled)
+### invoicing_getPurchaseInvoiceLine (READ)
+get purchase invoice line
+**Parameters:**
+- `purchaseInvoiceLineId`: string
-### users_getGroup (READ)
-get group
+### invoicing_getSalesInvoice (READ)
+get sales invoice
**Parameters:**
-- `groupId`: string
+- `salesInvoiceId`: string
-### users_getGroupMembers (READ)
-get group members
+### invoicing_getSalesInvoiceCustomerDetails (READ)
+get sales invoice customer details
**Parameters:**
-- `groupId`: string
+- `salesInvoiceId`: string
-### users_getGroups (READ)
-get groups
+### invoicing_getSalesInvoices (READ)
+get sales invoices
**Parameters:**
- `args`: GenericQueryFilters & {
search: string | null;
- uid: string | null;
- } (optional)
+ customerId: string | null;
+ }
-### users_getGroupEmails (READ)
-get group emails
+### invoicing_getSalesInvoiceShipment (READ)
+get sales invoice shipment
**Parameters:**
-- `groupIds`: string[]
+- `salesInvoiceId`: string
-### users_getPermissionsByEmployeeType (READ)
-get permissions by employee type
+### invoicing_getSalesInvoiceLines (READ)
+get sales invoice lines
**Parameters:**
-- `employeeTypeId`: string
+- `salesInvoiceId`: string
-### users_getSuppliers (READ)
-get suppliers
+### invoicing_getSalesInvoiceLine (READ)
+get sales invoice line
**Parameters:**
-- `args`: GenericQueryFilters & {
- search: string | null;
+- `salesInvoiceLineId`: string
+
+### invoicing_updatePurchaseInvoiceExchangeRate (WRITE)
+update purchase invoice exchange rate
+**Parameters:**
+- `data`: {
+ id: string;
+ exchangeRate: number;
}
-### users_getUsers (READ)
-get users
-**Parameters:** none (context auto-filled)
+### invoicing_updatePurchaseInvoiceStatus (WRITE)
+update purchase invoice status
+**Parameters:**
+- `update`: {
+ id: string;
+ status: (typeof purchaseInvoiceStatusType)[number];
+ assignee: null | undefined;
+ updatedBy: string;
+ }
-### users_getUserEmails (READ)
-get user emails
+### invoicing_updateSalesInvoiceExchangeRate (WRITE)
+update sales invoice exchange rate
**Parameters:**
-- `userIds`: string[]
+- `data`: {
+ id: string;
+ exchangeRate: number;
+ }
-### users_insertEmployeeType (WRITE)
-insert employee type
+### invoicing_updateSalesInvoiceStatus (WRITE)
+update sales invoice status
**Parameters:**
-- `employeeType`: { name: string; companyId: string }
+- `update`: {
+ id: string;
+ status: (typeof salesInvoiceStatusType)[number];
+ assignee: null | undefined;
+ updatedBy: string;
+ }
-### users_insertGroup (WRITE)
-insert group
+### invoicing_upsertPurchaseInvoice (WRITE)
+upsert purchase invoice
**Parameters:**
-- `group`: { name: string; companyId: string }
+- `purchaseInvoice`: | (Omit<z.infer<typeof purchaseInvoiceValidator>, "id" | "invoiceId"> & {
+ invoiceId: string;
+ companyId: string;
+ createdBy: string;
+ customFields?: Json;
+ })
+ | (Omit<z.infer<typeof purchaseInvoiceValidator>, "id" | "invoiceId"> & {
+ id: string;
+ invoiceId: string;
+ updatedBy: string;
+ customFields?: Json;
+ })
-### users_upsertEmployeeType (WRITE)
-upsert employee type
+### invoicing_upsertPurchaseInvoiceDelivery (WRITE)
+upsert purchase invoice delivery
**Parameters:**
-- `employeeType`: | { name: string; companyId: string }
- | { id: string; name: string }
+- `purchaseInvoiceDelivery`: | (z.infer<typeof purchaseInvoiceDeliveryValidator> & {
+ companyId: string;
+ createdBy: string;
+ customFields?: Json;
+ })
+ | (z.infer<typeof purchaseInvoiceDeliveryValidator> & {
+ id: string;
+ updatedBy: string;
+ customFields?: Json;
+ })
-### users_upsertEmployeeTypePermissions (WRITE)
-upsert employee type permissions
+### invoicing_upsertPurchaseInvoiceLine (WRITE)
+upsert purchase invoice line
**Parameters:**
-- `employeeTypeId`: string
-- `permissions`: { name: string; permission: CompanyPermission }[]
+- `purchaseInvoiceLine`: | (Omit<z.infer<typeof purchaseInvoiceLineValidator>, "id"> & {
+ companyId: string;
+ createdBy: string;
+ customFields?: Json;
+ })
+ | (Omit<z.infer<typeof purchaseInvoiceLineValidator>, "id"> & {
+ id: string;
+ updatedBy: string;
+ customFields?: Json;
+ })
-### users_upsertGroup (WRITE)
-upsert group
+### invoicing_upsertSalesInvoice (WRITE)
+upsert sales invoice
**Parameters:**
-- `arg1`: {
- id: string;
- name: string;
- companyId: string;
- }
+- `salesInvoice`: | (Omit<z.infer<typeof salesInvoiceValidator>, "id" | "invoiceId"> & {
+ invoiceId: string;
+ companyId: string;
+ createdBy: string;
+ customFields?: Json;
+ })
+ | (Omit<z.infer<typeof salesInvoiceValidator>, "id" | "invoiceId"> & {
+ id: string;
+ invoiceId: string;
+ updatedBy: string;
+ customFields?: Json;
+ })
-### users_upsertGroupMembers (WRITE)
-upsert group members
+### invoicing_upsertSalesInvoiceShipment (WRITE)
+upsert sales invoice shipment
**Parameters:**
-- `groupId`: string
-- `selections`: string[]
+- `salesInvoiceShipment`: | (z.infer<typeof salesInvoiceShipmentValidator> & {
+ companyId: string;
+ createdBy: string;
+ customFields?: Json;
+ })
+ | (z.infer<typeof salesInvoiceShipmentValidator> & {
+ id: string;
+ updatedBy: string;
+ customFields?: Json;
+ })
+
+### invoicing_upsertSalesInvoiceLine (WRITE)
+upsert sales invoice line
+**Parameters:**
+- `salesInvoiceLine`: | (Omit<z.infer<typeof salesInvoiceLineValidator>, "id"> & {
+ companyId: string;
+ createdBy: string;
+ customFields?: Json;
+ })
+ | (Omit<z.infer<typeof salesInvoiceLineValidator>, "id"> & {
+ id: string;
+ updatedBy: string;
+ customFields?: Json;
+ })
diff --git a/package-lock.json b/package-lock.json
index ef21eab625..d16b188559 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -259,8 +259,7 @@
"@tanstack/react-query": "^5.62.0",
"@tanstack/react-table": "^8.9.3",
"@tanstack/react-virtual": "^3.5.0",
- "@trigger.dev/react-hooks": "4.0.6",
- "@trigger.dev/sdk": "4.0.6",
+ "@upstash/ratelimit": "^2.0.5",
"@vercel/analytics": "^1.2.2",
"@vercel/react-router": "^1.2.4",
"@visx/responsive": "^2.1.0",
@@ -273,6 +272,7 @@
"dompurify": "3.3.3",
"emoji-mart": "^5.6.0",
"framer-motion": "^11.1.7",
+ "inngest": "^3.52.7",
"isbot": "5",
"json-2-csv": "^5.5.10",
"localforage": "^1.10.0",
@@ -316,7 +316,6 @@
},
"devDependencies": {
"@carbon/config": "*",
- "@trigger.dev/build": "4.0.6",
"@types/d3": "^7.4.0",
"@types/nprogress": "^0.2.0",
"@types/papaparse": "^5.3.14",
@@ -2037,6 +2036,12 @@
"specificity": "bin/cli.js"
}
},
+ "node_modules/@bufbuild/protobuf": {
+ "version": "2.11.0",
+ "resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-2.11.0.tgz",
+ "integrity": "sha512-sBXGT13cpmPR5BMgHE6UEEfEaShh5Ror6rfN3yEK5si7QVrtZg8LEPQb0VVhiLRUslD2yLnXtnRzG035J/mZXQ==",
+ "license": "(Apache-2.0 AND BSD-3-Clause)"
+ },
"node_modules/@bugsnag/cuid": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/@bugsnag/cuid/-/cuid-3.2.1.tgz",
@@ -3035,6 +3040,37 @@
"node": ">=14.0.0"
}
},
+ "node_modules/@grpc/grpc-js": {
+ "version": "1.14.3",
+ "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.14.3.tgz",
+ "integrity": "sha512-Iq8QQQ/7X3Sac15oB6p0FmUg/klxQvXLeileoqrTRGJYLV+/9tubbr9ipz0GKHjmXVsgFPo/+W+2cA8eNcR+XA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@grpc/proto-loader": "^0.8.0",
+ "@js-sdsl/ordered-map": "^4.4.2"
+ },
+ "engines": {
+ "node": ">=12.10.0"
+ }
+ },
+ "node_modules/@grpc/proto-loader": {
+ "version": "0.8.0",
+ "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.8.0.tgz",
+ "integrity": "sha512-rc1hOQtjIWGxcxpb9aHAfLpIctjEnsDehj0DAiVfBlmT84uvR0uUtN2hEi/ecvWVjXUGf5qPF4qEgiLOx1YIMQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "lodash.camelcase": "^4.3.0",
+ "long": "^5.0.0",
+ "protobufjs": "^7.5.3",
+ "yargs": "^17.7.2"
+ },
+ "bin": {
+ "proto-loader-gen-types": "build/bin/proto-loader-gen-types.js"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
"node_modules/@hapi/hoek": {
"version": "9.3.0",
"dev": true,
@@ -3074,6 +3110,25 @@
"node": ">=10.10.0"
}
},
+ "node_modules/@inngest/ai": {
+ "version": "0.1.7",
+ "resolved": "https://registry.npmjs.org/@inngest/ai/-/ai-0.1.7.tgz",
+ "integrity": "sha512-5xWatW441jacGf9czKEZdgAmkvoy7GS2tp7X8GSbdGeRXzjisHR6vM+q8DQbv6rqRsmQoCQ5iShh34MguELvUQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@types/node": "^22.10.5",
+ "typescript": "^5.7.3"
+ }
+ },
+ "node_modules/@inngest/ai/node_modules/@types/node": {
+ "version": "22.19.17",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-22.19.17.tgz",
+ "integrity": "sha512-wGdMcf+vPYM6jikpS/qhg6WiqSV/OhG+jeeHT/KlVqxYfD40iYJf9/AE1uQxVWFvU7MipKRkRv8NSHiCGgPr8Q==",
+ "license": "MIT",
+ "dependencies": {
+ "undici-types": "~6.21.0"
+ }
+ },
"node_modules/@internationalized/date": {
"version": "3.10.1",
"license": "Apache-2.0",
@@ -3143,6 +3198,12 @@
"node": ">=18.0.0"
}
},
+ "node_modules/@jpwilliams/waitgroup": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/@jpwilliams/waitgroup/-/waitgroup-2.1.1.tgz",
+ "integrity": "sha512-0CxRhNfkvFCTLZBKGvKxY2FYtYW1yWhO2McLqBL0X5UWvYjIf9suH8anKW/DNutl369A75Ewyoh2iJMwBZ2tRg==",
+ "license": "MIT"
+ },
"node_modules/@jridgewell/gen-mapping": {
"version": "0.3.13",
"license": "MIT",
@@ -3178,6 +3239,16 @@
"@jridgewell/sourcemap-codec": "^1.4.14"
}
},
+ "node_modules/@js-sdsl/ordered-map": {
+ "version": "4.4.2",
+ "resolved": "https://registry.npmjs.org/@js-sdsl/ordered-map/-/ordered-map-4.4.2.tgz",
+ "integrity": "sha512-iUKgm52T8HOE/makSxjqoWhe95ZJA1/G1sYsGev2JDKUSS14KAgg1LHb+Ba+IPow0xflbnSkOsZcO08C7w1gYw==",
+ "license": "MIT",
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/js-sdsl"
+ }
+ },
"node_modules/@jsonhero/path": {
"version": "1.0.21",
"resolved": "https://registry.npmjs.org/@jsonhero/path/-/path-1.0.21.tgz",
@@ -3974,6 +4045,186 @@
"node": ">=8.0.0"
}
},
+ "node_modules/@opentelemetry/auto-instrumentations-node": {
+ "version": "0.72.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/auto-instrumentations-node/-/auto-instrumentations-node-0.72.0.tgz",
+ "integrity": "sha512-OmzmCENHbvnbt6U+dIj4v75FL6lV+b10Id70AL++iuGTrOeqpDyh04t51KeHN70NEHvzl+kEglcDlZqgmL0LLA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/instrumentation": "^0.214.0",
+ "@opentelemetry/instrumentation-amqplib": "^0.61.0",
+ "@opentelemetry/instrumentation-aws-lambda": "^0.66.0",
+ "@opentelemetry/instrumentation-aws-sdk": "^0.69.0",
+ "@opentelemetry/instrumentation-bunyan": "^0.59.0",
+ "@opentelemetry/instrumentation-cassandra-driver": "^0.59.0",
+ "@opentelemetry/instrumentation-connect": "^0.57.0",
+ "@opentelemetry/instrumentation-cucumber": "^0.30.0",
+ "@opentelemetry/instrumentation-dataloader": "^0.31.0",
+ "@opentelemetry/instrumentation-dns": "^0.57.0",
+ "@opentelemetry/instrumentation-express": "^0.62.0",
+ "@opentelemetry/instrumentation-fs": "^0.33.0",
+ "@opentelemetry/instrumentation-generic-pool": "^0.57.0",
+ "@opentelemetry/instrumentation-graphql": "^0.62.0",
+ "@opentelemetry/instrumentation-grpc": "^0.214.0",
+ "@opentelemetry/instrumentation-hapi": "^0.60.0",
+ "@opentelemetry/instrumentation-http": "^0.214.0",
+ "@opentelemetry/instrumentation-ioredis": "^0.62.0",
+ "@opentelemetry/instrumentation-kafkajs": "^0.23.0",
+ "@opentelemetry/instrumentation-knex": "^0.58.0",
+ "@opentelemetry/instrumentation-koa": "^0.62.0",
+ "@opentelemetry/instrumentation-lru-memoizer": "^0.58.0",
+ "@opentelemetry/instrumentation-memcached": "^0.57.0",
+ "@opentelemetry/instrumentation-mongodb": "^0.67.0",
+ "@opentelemetry/instrumentation-mongoose": "^0.60.0",
+ "@opentelemetry/instrumentation-mysql": "^0.60.0",
+ "@opentelemetry/instrumentation-mysql2": "^0.60.0",
+ "@opentelemetry/instrumentation-nestjs-core": "^0.60.0",
+ "@opentelemetry/instrumentation-net": "^0.58.0",
+ "@opentelemetry/instrumentation-openai": "^0.12.0",
+ "@opentelemetry/instrumentation-oracledb": "^0.39.0",
+ "@opentelemetry/instrumentation-pg": "^0.66.0",
+ "@opentelemetry/instrumentation-pino": "^0.60.0",
+ "@opentelemetry/instrumentation-redis": "^0.62.0",
+ "@opentelemetry/instrumentation-restify": "^0.59.0",
+ "@opentelemetry/instrumentation-router": "^0.58.0",
+ "@opentelemetry/instrumentation-runtime-node": "^0.27.0",
+ "@opentelemetry/instrumentation-socket.io": "^0.61.0",
+ "@opentelemetry/instrumentation-tedious": "^0.33.0",
+ "@opentelemetry/instrumentation-undici": "^0.24.0",
+ "@opentelemetry/instrumentation-winston": "^0.58.0",
+ "@opentelemetry/resource-detector-alibaba-cloud": "^0.33.4",
+ "@opentelemetry/resource-detector-aws": "^2.14.0",
+ "@opentelemetry/resource-detector-azure": "^0.22.0",
+ "@opentelemetry/resource-detector-container": "^0.8.5",
+ "@opentelemetry/resource-detector-gcp": "^0.49.0",
+ "@opentelemetry/resources": "^2.0.0",
+ "@opentelemetry/sdk-node": "^0.214.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.4.1",
+ "@opentelemetry/core": "^2.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/auto-instrumentations-node/node_modules/@opentelemetry/api-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.214.0.tgz",
+ "integrity": "sha512-40lSJeqYO8Uz2Yj7u94/SJWE/wONa7rmMKjI1ZcIjgf3MHNHv1OZUCrCETGuaRF62d5pQD1wKIW+L4lmSMTzZA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/auto-instrumentations-node/node_modules/@opentelemetry/instrumentation": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.214.0.tgz",
+ "integrity": "sha512-MHqEX5Dk59cqVah5LiARMACku7jXSVk9iVDWOea4x3cr7VfdByeDCURK6o1lntT1JS/Tsovw01UJrBhN3/uC5w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "import-in-the-middle": "^3.0.0",
+ "require-in-the-middle": "^8.0.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/auto-instrumentations-node/node_modules/cjs-module-lexer": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.0.tgz",
+ "integrity": "sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/auto-instrumentations-node/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@opentelemetry/auto-instrumentations-node/node_modules/import-in-the-middle": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-3.0.0.tgz",
+ "integrity": "sha512-OnGy+eYT7wVejH2XWgLRgbmzujhhVIATQH0ztIeRilwHBjTeG3pD+XnH3PKX0r9gJ0BuJmJ68q/oh9qgXnNDQg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "acorn": "^8.15.0",
+ "acorn-import-attributes": "^1.9.5",
+ "cjs-module-lexer": "^2.2.0",
+ "module-details-from-path": "^1.0.4"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@opentelemetry/auto-instrumentations-node/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/auto-instrumentations-node/node_modules/require-in-the-middle": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-8.0.1.tgz",
+ "integrity": "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.3.5",
+ "module-details-from-path": "^1.0.3"
+ },
+ "engines": {
+ "node": ">=9.3.0 || >=8.10.0 <9.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/configuration": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/configuration/-/configuration-0.214.0.tgz",
+ "integrity": "sha512-Q+awuEwxhETwIAXuxHvIY5ZMEP0ZqvxLTi9kclrkyVJppEUXYL3Bhiw3jYrxdHYMh0Y0tVInQH9FEZ1aMinvLA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.6.1",
+ "yaml": "^2.0.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.9.0"
+ }
+ },
+ "node_modules/@opentelemetry/configuration/node_modules/@opentelemetry/core": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.6.1.tgz",
+ "integrity": "sha512-8xHSGWpJP9wBxgBpnqGL0R3PbdWQndL1Qp50qrg71+B28zK5OQmUgcDKLJgzyAAV38t4tOyLMGDD60LneR5W8g==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.0.0 <1.10.0"
+ }
+ },
"node_modules/@opentelemetry/context-async-hooks": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/@opentelemetry/context-async-hooks/-/context-async-hooks-2.0.1.tgz",
@@ -4001,17 +4252,18 @@
"@opentelemetry/api": ">=1.0.0 <1.10.0"
}
},
- "node_modules/@opentelemetry/exporter-logs-otlp-http": {
- "version": "0.203.0",
- "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-logs-otlp-http/-/exporter-logs-otlp-http-0.203.0.tgz",
- "integrity": "sha512-s0hys1ljqlMTbXx2XiplmMJg9wG570Z5lH7wMvrZX6lcODI56sG4HL03jklF63tBeyNwK2RV1/ntXGo3HgG4Qw==",
+ "node_modules/@opentelemetry/exporter-logs-otlp-grpc": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-logs-otlp-grpc/-/exporter-logs-otlp-grpc-0.214.0.tgz",
+ "integrity": "sha512-SwmFRwO8mi6nndzbsjPgSFg7qy1WeNHRFD+s6uCsdiUDUt3+yzI2qiHE3/ub2f37+/CbeGcG+Ugc8Gwr6nu2Aw==",
"license": "Apache-2.0",
"dependencies": {
- "@opentelemetry/api-logs": "0.203.0",
- "@opentelemetry/core": "2.0.1",
- "@opentelemetry/otlp-exporter-base": "0.203.0",
- "@opentelemetry/otlp-transformer": "0.203.0",
- "@opentelemetry/sdk-logs": "0.203.0"
+ "@grpc/grpc-js": "^1.14.3",
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/otlp-exporter-base": "0.214.0",
+ "@opentelemetry/otlp-grpc-exporter-base": "0.214.0",
+ "@opentelemetry/otlp-transformer": "0.214.0",
+ "@opentelemetry/sdk-logs": "0.214.0"
},
"engines": {
"node": "^18.19.0 || >=20.6.0"
@@ -4020,34 +4272,41 @@
"@opentelemetry/api": "^1.3.0"
}
},
- "node_modules/@opentelemetry/exporter-trace-otlp-http": {
- "version": "0.203.0",
- "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-http/-/exporter-trace-otlp-http-0.203.0.tgz",
- "integrity": "sha512-ZDiaswNYo0yq/cy1bBLJFe691izEJ6IgNmkjm4C6kE9ub/OMQqDXORx2D2j8fzTBTxONyzusbaZlqtfmyqURPw==",
+ "node_modules/@opentelemetry/exporter-logs-otlp-grpc/node_modules/@opentelemetry/api-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.214.0.tgz",
+ "integrity": "sha512-40lSJeqYO8Uz2Yj7u94/SJWE/wONa7rmMKjI1ZcIjgf3MHNHv1OZUCrCETGuaRF62d5pQD1wKIW+L4lmSMTzZA==",
"license": "Apache-2.0",
"dependencies": {
- "@opentelemetry/core": "2.0.1",
- "@opentelemetry/otlp-exporter-base": "0.203.0",
- "@opentelemetry/otlp-transformer": "0.203.0",
- "@opentelemetry/resources": "2.0.1",
- "@opentelemetry/sdk-trace-base": "2.0.1"
+ "@opentelemetry/api": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-logs-otlp-grpc/node_modules/@opentelemetry/core": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.6.1.tgz",
+ "integrity": "sha512-8xHSGWpJP9wBxgBpnqGL0R3PbdWQndL1Qp50qrg71+B28zK5OQmUgcDKLJgzyAAV38t4tOyLMGDD60LneR5W8g==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/semantic-conventions": "^1.29.0"
},
"engines": {
"node": "^18.19.0 || >=20.6.0"
},
"peerDependencies": {
- "@opentelemetry/api": "^1.3.0"
+ "@opentelemetry/api": ">=1.0.0 <1.10.0"
}
},
- "node_modules/@opentelemetry/instrumentation": {
- "version": "0.203.0",
- "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.203.0.tgz",
- "integrity": "sha512-ke1qyM+3AK2zPuBPb6Hk/GCsc5ewbLvPNkEuELx/JmANeEp6ZjnZ+wypPAJSucTw0wvCGrUaibDSdcrGFoWxKQ==",
+ "node_modules/@opentelemetry/exporter-logs-otlp-grpc/node_modules/@opentelemetry/otlp-exporter-base": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.214.0.tgz",
+ "integrity": "sha512-u1Gdv0/E9wP+apqWf7Wv2npXmgJtxsW2XL0TEv9FZloTZRuMBKmu8cYVXwS4Hm3q/f/3FuCnPTgiwYvIqRSpRg==",
"license": "Apache-2.0",
"dependencies": {
- "@opentelemetry/api-logs": "0.203.0",
- "import-in-the-middle": "^1.8.1",
- "require-in-the-middle": "^7.1.1"
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/otlp-transformer": "0.214.0"
},
"engines": {
"node": "^18.19.0 || >=20.6.0"
@@ -4056,14 +4315,19 @@
"@opentelemetry/api": "^1.3.0"
}
},
- "node_modules/@opentelemetry/otlp-exporter-base": {
- "version": "0.203.0",
- "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.203.0.tgz",
- "integrity": "sha512-Wbxf7k+87KyvxFr5D7uOiSq/vHXWommvdnNE7vECO3tAhsA2GfOlpWINCMWUEPdHZ7tCXxw6Epp3vgx3jU7llQ==",
+ "node_modules/@opentelemetry/exporter-logs-otlp-grpc/node_modules/@opentelemetry/otlp-transformer": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.214.0.tgz",
+ "integrity": "sha512-DSaYcuBRh6uozfsWN3R8HsN0yDhCuWP7tOFdkUOVaWD1KVJg8m4qiLUsg/tNhTLS9HUYUcwNpwL2eroLtsZZ/w==",
"license": "Apache-2.0",
"dependencies": {
- "@opentelemetry/core": "2.0.1",
- "@opentelemetry/otlp-transformer": "0.203.0"
+ "@opentelemetry/api-logs": "0.214.0",
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/resources": "2.6.1",
+ "@opentelemetry/sdk-logs": "0.214.0",
+ "@opentelemetry/sdk-metrics": "2.6.1",
+ "@opentelemetry/sdk-trace-base": "2.6.1",
+ "protobufjs": "^7.0.0"
},
"engines": {
"node": "^18.19.0 || >=20.6.0"
@@ -4072,19 +4336,84 @@
"@opentelemetry/api": "^1.3.0"
}
},
- "node_modules/@opentelemetry/otlp-transformer": {
+ "node_modules/@opentelemetry/exporter-logs-otlp-grpc/node_modules/@opentelemetry/resources": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.6.1.tgz",
+ "integrity": "sha512-lID/vxSuKWXM55XhAKNoYXu9Cutoq5hFdkbTdI/zDKQktXzcWBVhNsOkiZFTMU9UtEWuGRNe0HUgmsFldIdxVA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.3.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-logs-otlp-grpc/node_modules/@opentelemetry/sdk-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.214.0.tgz",
+ "integrity": "sha512-zf6acnScjhsaBUU22zXZ/sLWim1dfhUAbGXdMmHmNG3LfBnQ3DKsOCITb2IZwoUsNNMTogqFKBnlIPPftUgGwA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/resources": "2.6.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.4.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-logs-otlp-grpc/node_modules/@opentelemetry/sdk-metrics": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-2.6.1.tgz",
+ "integrity": "sha512-9t9hJHX15meBy2NmTJxL+NJfXmnausR2xUDvE19XQce0Qi/GBtDGamU8nS1RMbdgDmhgpm3VaOu2+fiS/SfTpQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/resources": "2.6.1"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.9.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-logs-otlp-grpc/node_modules/@opentelemetry/sdk-trace-base": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.6.1.tgz",
+ "integrity": "sha512-r86ut4T1e8vNwB35CqCcKd45yzqH6/6Wzvpk2/cZB8PsPLlZFTvrh8yfOS3CYZYcUmAx4hHTZJ8AO8Dj8nrdhw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/resources": "2.6.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.3.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-logs-otlp-http": {
"version": "0.203.0",
- "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.203.0.tgz",
- "integrity": "sha512-Y8I6GgoCna0qDQ2W6GCRtaF24SnvqvA8OfeTi7fqigD23u8Jpb4R5KFv/pRvrlGagcCLICMIyh9wiejp4TXu/A==",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-logs-otlp-http/-/exporter-logs-otlp-http-0.203.0.tgz",
+ "integrity": "sha512-s0hys1ljqlMTbXx2XiplmMJg9wG570Z5lH7wMvrZX6lcODI56sG4HL03jklF63tBeyNwK2RV1/ntXGo3HgG4Qw==",
"license": "Apache-2.0",
"dependencies": {
"@opentelemetry/api-logs": "0.203.0",
"@opentelemetry/core": "2.0.1",
- "@opentelemetry/resources": "2.0.1",
- "@opentelemetry/sdk-logs": "0.203.0",
- "@opentelemetry/sdk-metrics": "2.0.1",
- "@opentelemetry/sdk-trace-base": "2.0.1",
- "protobufjs": "^7.3.0"
+ "@opentelemetry/otlp-exporter-base": "0.203.0",
+ "@opentelemetry/otlp-transformer": "0.203.0",
+ "@opentelemetry/sdk-logs": "0.203.0"
},
"engines": {
"node": "^18.19.0 || >=20.6.0"
@@ -4093,53 +4422,5898 @@
"@opentelemetry/api": "^1.3.0"
}
},
- "node_modules/@opentelemetry/resources": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.0.1.tgz",
- "integrity": "sha512-dZOB3R6zvBwDKnHDTB4X1xtMArB/d324VsbiPkX/Yu0Q8T2xceRthoIVFhJdvgVM2QhGVUyX9tzwiNxGtoBJUw==",
+ "node_modules/@opentelemetry/exporter-logs-otlp-proto": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-logs-otlp-proto/-/exporter-logs-otlp-proto-0.214.0.tgz",
+ "integrity": "sha512-IWAVvCO1TlpotRjFmhQFz9RSfQy5BsLtDRBtptSrXZRwfyRPpuql/RMe5zdmu0Gxl3ERDFwOzOqkf3bwy7Jzcw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/otlp-exporter-base": "0.214.0",
+ "@opentelemetry/otlp-transformer": "0.214.0",
+ "@opentelemetry/resources": "2.6.1",
+ "@opentelemetry/sdk-logs": "0.214.0",
+ "@opentelemetry/sdk-trace-base": "2.6.1"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-logs-otlp-proto/node_modules/@opentelemetry/api-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.214.0.tgz",
+ "integrity": "sha512-40lSJeqYO8Uz2Yj7u94/SJWE/wONa7rmMKjI1ZcIjgf3MHNHv1OZUCrCETGuaRF62d5pQD1wKIW+L4lmSMTzZA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-logs-otlp-proto/node_modules/@opentelemetry/core": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.6.1.tgz",
+ "integrity": "sha512-8xHSGWpJP9wBxgBpnqGL0R3PbdWQndL1Qp50qrg71+B28zK5OQmUgcDKLJgzyAAV38t4tOyLMGDD60LneR5W8g==",
"license": "Apache-2.0",
"dependencies": {
- "@opentelemetry/core": "2.0.1",
"@opentelemetry/semantic-conventions": "^1.29.0"
},
"engines": {
- "node": "^18.19.0 || >=20.6.0"
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.0.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-logs-otlp-proto/node_modules/@opentelemetry/otlp-exporter-base": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.214.0.tgz",
+ "integrity": "sha512-u1Gdv0/E9wP+apqWf7Wv2npXmgJtxsW2XL0TEv9FZloTZRuMBKmu8cYVXwS4Hm3q/f/3FuCnPTgiwYvIqRSpRg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/otlp-transformer": "0.214.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-logs-otlp-proto/node_modules/@opentelemetry/otlp-transformer": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.214.0.tgz",
+ "integrity": "sha512-DSaYcuBRh6uozfsWN3R8HsN0yDhCuWP7tOFdkUOVaWD1KVJg8m4qiLUsg/tNhTLS9HUYUcwNpwL2eroLtsZZ/w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/resources": "2.6.1",
+ "@opentelemetry/sdk-logs": "0.214.0",
+ "@opentelemetry/sdk-metrics": "2.6.1",
+ "@opentelemetry/sdk-trace-base": "2.6.1",
+ "protobufjs": "^7.0.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-logs-otlp-proto/node_modules/@opentelemetry/resources": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.6.1.tgz",
+ "integrity": "sha512-lID/vxSuKWXM55XhAKNoYXu9Cutoq5hFdkbTdI/zDKQktXzcWBVhNsOkiZFTMU9UtEWuGRNe0HUgmsFldIdxVA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.3.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-logs-otlp-proto/node_modules/@opentelemetry/sdk-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.214.0.tgz",
+ "integrity": "sha512-zf6acnScjhsaBUU22zXZ/sLWim1dfhUAbGXdMmHmNG3LfBnQ3DKsOCITb2IZwoUsNNMTogqFKBnlIPPftUgGwA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/resources": "2.6.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.4.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-logs-otlp-proto/node_modules/@opentelemetry/sdk-metrics": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-2.6.1.tgz",
+ "integrity": "sha512-9t9hJHX15meBy2NmTJxL+NJfXmnausR2xUDvE19XQce0Qi/GBtDGamU8nS1RMbdgDmhgpm3VaOu2+fiS/SfTpQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/resources": "2.6.1"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.9.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-logs-otlp-proto/node_modules/@opentelemetry/sdk-trace-base": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.6.1.tgz",
+ "integrity": "sha512-r86ut4T1e8vNwB35CqCcKd45yzqH6/6Wzvpk2/cZB8PsPLlZFTvrh8yfOS3CYZYcUmAx4hHTZJ8AO8Dj8nrdhw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/resources": "2.6.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.3.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-metrics-otlp-grpc": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-metrics-otlp-grpc/-/exporter-metrics-otlp-grpc-0.214.0.tgz",
+ "integrity": "sha512-0NGxWHVYHgbp51SEzmsP+Hdups81eRs229STcSWHo3WO0aqY6RpJ9csxfyEtFgaNrBDv6UfOh0je4ss/ROS6XA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@grpc/grpc-js": "^1.14.3",
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/exporter-metrics-otlp-http": "0.214.0",
+ "@opentelemetry/otlp-exporter-base": "0.214.0",
+ "@opentelemetry/otlp-grpc-exporter-base": "0.214.0",
+ "@opentelemetry/otlp-transformer": "0.214.0",
+ "@opentelemetry/resources": "2.6.1",
+ "@opentelemetry/sdk-metrics": "2.6.1"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-metrics-otlp-grpc/node_modules/@opentelemetry/api-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.214.0.tgz",
+ "integrity": "sha512-40lSJeqYO8Uz2Yj7u94/SJWE/wONa7rmMKjI1ZcIjgf3MHNHv1OZUCrCETGuaRF62d5pQD1wKIW+L4lmSMTzZA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-metrics-otlp-grpc/node_modules/@opentelemetry/core": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.6.1.tgz",
+ "integrity": "sha512-8xHSGWpJP9wBxgBpnqGL0R3PbdWQndL1Qp50qrg71+B28zK5OQmUgcDKLJgzyAAV38t4tOyLMGDD60LneR5W8g==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.0.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-metrics-otlp-grpc/node_modules/@opentelemetry/otlp-exporter-base": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.214.0.tgz",
+ "integrity": "sha512-u1Gdv0/E9wP+apqWf7Wv2npXmgJtxsW2XL0TEv9FZloTZRuMBKmu8cYVXwS4Hm3q/f/3FuCnPTgiwYvIqRSpRg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/otlp-transformer": "0.214.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-metrics-otlp-grpc/node_modules/@opentelemetry/otlp-transformer": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.214.0.tgz",
+ "integrity": "sha512-DSaYcuBRh6uozfsWN3R8HsN0yDhCuWP7tOFdkUOVaWD1KVJg8m4qiLUsg/tNhTLS9HUYUcwNpwL2eroLtsZZ/w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/resources": "2.6.1",
+ "@opentelemetry/sdk-logs": "0.214.0",
+ "@opentelemetry/sdk-metrics": "2.6.1",
+ "@opentelemetry/sdk-trace-base": "2.6.1",
+ "protobufjs": "^7.0.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-metrics-otlp-grpc/node_modules/@opentelemetry/resources": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.6.1.tgz",
+ "integrity": "sha512-lID/vxSuKWXM55XhAKNoYXu9Cutoq5hFdkbTdI/zDKQktXzcWBVhNsOkiZFTMU9UtEWuGRNe0HUgmsFldIdxVA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.3.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-metrics-otlp-grpc/node_modules/@opentelemetry/sdk-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.214.0.tgz",
+ "integrity": "sha512-zf6acnScjhsaBUU22zXZ/sLWim1dfhUAbGXdMmHmNG3LfBnQ3DKsOCITb2IZwoUsNNMTogqFKBnlIPPftUgGwA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/resources": "2.6.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.4.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-metrics-otlp-grpc/node_modules/@opentelemetry/sdk-metrics": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-2.6.1.tgz",
+ "integrity": "sha512-9t9hJHX15meBy2NmTJxL+NJfXmnausR2xUDvE19XQce0Qi/GBtDGamU8nS1RMbdgDmhgpm3VaOu2+fiS/SfTpQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/resources": "2.6.1"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.9.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-metrics-otlp-grpc/node_modules/@opentelemetry/sdk-trace-base": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.6.1.tgz",
+ "integrity": "sha512-r86ut4T1e8vNwB35CqCcKd45yzqH6/6Wzvpk2/cZB8PsPLlZFTvrh8yfOS3CYZYcUmAx4hHTZJ8AO8Dj8nrdhw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/resources": "2.6.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.3.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-metrics-otlp-http": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-metrics-otlp-http/-/exporter-metrics-otlp-http-0.214.0.tgz",
+ "integrity": "sha512-Tx/59RmjBgkXJ3qnsD04rpDrVWL53LU/czpgLJh+Ab98nAroe91I7vZ3uGN9mxwPS0jsZEnmqmHygVwB2vRMlA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/otlp-exporter-base": "0.214.0",
+ "@opentelemetry/otlp-transformer": "0.214.0",
+ "@opentelemetry/resources": "2.6.1",
+ "@opentelemetry/sdk-metrics": "2.6.1"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-metrics-otlp-http/node_modules/@opentelemetry/api-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.214.0.tgz",
+ "integrity": "sha512-40lSJeqYO8Uz2Yj7u94/SJWE/wONa7rmMKjI1ZcIjgf3MHNHv1OZUCrCETGuaRF62d5pQD1wKIW+L4lmSMTzZA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-metrics-otlp-http/node_modules/@opentelemetry/core": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.6.1.tgz",
+ "integrity": "sha512-8xHSGWpJP9wBxgBpnqGL0R3PbdWQndL1Qp50qrg71+B28zK5OQmUgcDKLJgzyAAV38t4tOyLMGDD60LneR5W8g==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.0.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-metrics-otlp-http/node_modules/@opentelemetry/otlp-exporter-base": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.214.0.tgz",
+ "integrity": "sha512-u1Gdv0/E9wP+apqWf7Wv2npXmgJtxsW2XL0TEv9FZloTZRuMBKmu8cYVXwS4Hm3q/f/3FuCnPTgiwYvIqRSpRg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/otlp-transformer": "0.214.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-metrics-otlp-http/node_modules/@opentelemetry/otlp-transformer": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.214.0.tgz",
+ "integrity": "sha512-DSaYcuBRh6uozfsWN3R8HsN0yDhCuWP7tOFdkUOVaWD1KVJg8m4qiLUsg/tNhTLS9HUYUcwNpwL2eroLtsZZ/w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/resources": "2.6.1",
+ "@opentelemetry/sdk-logs": "0.214.0",
+ "@opentelemetry/sdk-metrics": "2.6.1",
+ "@opentelemetry/sdk-trace-base": "2.6.1",
+ "protobufjs": "^7.0.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-metrics-otlp-http/node_modules/@opentelemetry/resources": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.6.1.tgz",
+ "integrity": "sha512-lID/vxSuKWXM55XhAKNoYXu9Cutoq5hFdkbTdI/zDKQktXzcWBVhNsOkiZFTMU9UtEWuGRNe0HUgmsFldIdxVA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.3.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-metrics-otlp-http/node_modules/@opentelemetry/sdk-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.214.0.tgz",
+ "integrity": "sha512-zf6acnScjhsaBUU22zXZ/sLWim1dfhUAbGXdMmHmNG3LfBnQ3DKsOCITb2IZwoUsNNMTogqFKBnlIPPftUgGwA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/resources": "2.6.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.4.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-metrics-otlp-http/node_modules/@opentelemetry/sdk-metrics": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-2.6.1.tgz",
+ "integrity": "sha512-9t9hJHX15meBy2NmTJxL+NJfXmnausR2xUDvE19XQce0Qi/GBtDGamU8nS1RMbdgDmhgpm3VaOu2+fiS/SfTpQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/resources": "2.6.1"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.9.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-metrics-otlp-http/node_modules/@opentelemetry/sdk-trace-base": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.6.1.tgz",
+ "integrity": "sha512-r86ut4T1e8vNwB35CqCcKd45yzqH6/6Wzvpk2/cZB8PsPLlZFTvrh8yfOS3CYZYcUmAx4hHTZJ8AO8Dj8nrdhw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/resources": "2.6.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.3.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-metrics-otlp-proto": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-metrics-otlp-proto/-/exporter-metrics-otlp-proto-0.214.0.tgz",
+ "integrity": "sha512-pJIcghFGhx3VSCgP5U+yZx+OMNj0t+ttnhC8IjL5Wza7vWIczctF6t3AGcVQffi2dEqX+ZHANoBwoPR8y6RMKA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/exporter-metrics-otlp-http": "0.214.0",
+ "@opentelemetry/otlp-exporter-base": "0.214.0",
+ "@opentelemetry/otlp-transformer": "0.214.0",
+ "@opentelemetry/resources": "2.6.1",
+ "@opentelemetry/sdk-metrics": "2.6.1"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-metrics-otlp-proto/node_modules/@opentelemetry/api-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.214.0.tgz",
+ "integrity": "sha512-40lSJeqYO8Uz2Yj7u94/SJWE/wONa7rmMKjI1ZcIjgf3MHNHv1OZUCrCETGuaRF62d5pQD1wKIW+L4lmSMTzZA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-metrics-otlp-proto/node_modules/@opentelemetry/core": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.6.1.tgz",
+ "integrity": "sha512-8xHSGWpJP9wBxgBpnqGL0R3PbdWQndL1Qp50qrg71+B28zK5OQmUgcDKLJgzyAAV38t4tOyLMGDD60LneR5W8g==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.0.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-metrics-otlp-proto/node_modules/@opentelemetry/otlp-exporter-base": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.214.0.tgz",
+ "integrity": "sha512-u1Gdv0/E9wP+apqWf7Wv2npXmgJtxsW2XL0TEv9FZloTZRuMBKmu8cYVXwS4Hm3q/f/3FuCnPTgiwYvIqRSpRg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/otlp-transformer": "0.214.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-metrics-otlp-proto/node_modules/@opentelemetry/otlp-transformer": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.214.0.tgz",
+ "integrity": "sha512-DSaYcuBRh6uozfsWN3R8HsN0yDhCuWP7tOFdkUOVaWD1KVJg8m4qiLUsg/tNhTLS9HUYUcwNpwL2eroLtsZZ/w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/resources": "2.6.1",
+ "@opentelemetry/sdk-logs": "0.214.0",
+ "@opentelemetry/sdk-metrics": "2.6.1",
+ "@opentelemetry/sdk-trace-base": "2.6.1",
+ "protobufjs": "^7.0.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-metrics-otlp-proto/node_modules/@opentelemetry/resources": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.6.1.tgz",
+ "integrity": "sha512-lID/vxSuKWXM55XhAKNoYXu9Cutoq5hFdkbTdI/zDKQktXzcWBVhNsOkiZFTMU9UtEWuGRNe0HUgmsFldIdxVA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.3.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-metrics-otlp-proto/node_modules/@opentelemetry/sdk-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.214.0.tgz",
+ "integrity": "sha512-zf6acnScjhsaBUU22zXZ/sLWim1dfhUAbGXdMmHmNG3LfBnQ3DKsOCITb2IZwoUsNNMTogqFKBnlIPPftUgGwA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/resources": "2.6.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.4.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-metrics-otlp-proto/node_modules/@opentelemetry/sdk-metrics": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-2.6.1.tgz",
+ "integrity": "sha512-9t9hJHX15meBy2NmTJxL+NJfXmnausR2xUDvE19XQce0Qi/GBtDGamU8nS1RMbdgDmhgpm3VaOu2+fiS/SfTpQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/resources": "2.6.1"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.9.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-metrics-otlp-proto/node_modules/@opentelemetry/sdk-trace-base": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.6.1.tgz",
+ "integrity": "sha512-r86ut4T1e8vNwB35CqCcKd45yzqH6/6Wzvpk2/cZB8PsPLlZFTvrh8yfOS3CYZYcUmAx4hHTZJ8AO8Dj8nrdhw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/resources": "2.6.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.3.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-prometheus": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-prometheus/-/exporter-prometheus-0.214.0.tgz",
+ "integrity": "sha512-4TGYoZKebUWVuYkV6r5wS2dUF4zH7EbWFw/Uqz1ZM1tGHQeFT9wzHGXq3iSIXMUrwu5jRdxjfMaXrYejPu2kpQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/resources": "2.6.1",
+ "@opentelemetry/sdk-metrics": "2.6.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-prometheus/node_modules/@opentelemetry/core": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.6.1.tgz",
+ "integrity": "sha512-8xHSGWpJP9wBxgBpnqGL0R3PbdWQndL1Qp50qrg71+B28zK5OQmUgcDKLJgzyAAV38t4tOyLMGDD60LneR5W8g==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.0.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-prometheus/node_modules/@opentelemetry/resources": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.6.1.tgz",
+ "integrity": "sha512-lID/vxSuKWXM55XhAKNoYXu9Cutoq5hFdkbTdI/zDKQktXzcWBVhNsOkiZFTMU9UtEWuGRNe0HUgmsFldIdxVA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.3.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-prometheus/node_modules/@opentelemetry/sdk-metrics": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-2.6.1.tgz",
+ "integrity": "sha512-9t9hJHX15meBy2NmTJxL+NJfXmnausR2xUDvE19XQce0Qi/GBtDGamU8nS1RMbdgDmhgpm3VaOu2+fiS/SfTpQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/resources": "2.6.1"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.9.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-trace-otlp-grpc": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-grpc/-/exporter-trace-otlp-grpc-0.214.0.tgz",
+ "integrity": "sha512-FWRZ7AWoTryYhthralHkfXUuyO3l7cRsnr49WcDio1orl2a7KxT8aDZdwQtV1adzoUvZ9Gfo+IstElghCS4zfw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@grpc/grpc-js": "^1.14.3",
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/otlp-exporter-base": "0.214.0",
+ "@opentelemetry/otlp-grpc-exporter-base": "0.214.0",
+ "@opentelemetry/otlp-transformer": "0.214.0",
+ "@opentelemetry/resources": "2.6.1",
+ "@opentelemetry/sdk-trace-base": "2.6.1"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/api-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.214.0.tgz",
+ "integrity": "sha512-40lSJeqYO8Uz2Yj7u94/SJWE/wONa7rmMKjI1ZcIjgf3MHNHv1OZUCrCETGuaRF62d5pQD1wKIW+L4lmSMTzZA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/core": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.6.1.tgz",
+ "integrity": "sha512-8xHSGWpJP9wBxgBpnqGL0R3PbdWQndL1Qp50qrg71+B28zK5OQmUgcDKLJgzyAAV38t4tOyLMGDD60LneR5W8g==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.0.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/otlp-exporter-base": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.214.0.tgz",
+ "integrity": "sha512-u1Gdv0/E9wP+apqWf7Wv2npXmgJtxsW2XL0TEv9FZloTZRuMBKmu8cYVXwS4Hm3q/f/3FuCnPTgiwYvIqRSpRg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/otlp-transformer": "0.214.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/otlp-transformer": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.214.0.tgz",
+ "integrity": "sha512-DSaYcuBRh6uozfsWN3R8HsN0yDhCuWP7tOFdkUOVaWD1KVJg8m4qiLUsg/tNhTLS9HUYUcwNpwL2eroLtsZZ/w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/resources": "2.6.1",
+ "@opentelemetry/sdk-logs": "0.214.0",
+ "@opentelemetry/sdk-metrics": "2.6.1",
+ "@opentelemetry/sdk-trace-base": "2.6.1",
+ "protobufjs": "^7.0.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/resources": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.6.1.tgz",
+ "integrity": "sha512-lID/vxSuKWXM55XhAKNoYXu9Cutoq5hFdkbTdI/zDKQktXzcWBVhNsOkiZFTMU9UtEWuGRNe0HUgmsFldIdxVA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.3.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/sdk-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.214.0.tgz",
+ "integrity": "sha512-zf6acnScjhsaBUU22zXZ/sLWim1dfhUAbGXdMmHmNG3LfBnQ3DKsOCITb2IZwoUsNNMTogqFKBnlIPPftUgGwA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/resources": "2.6.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.4.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/sdk-metrics": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-2.6.1.tgz",
+ "integrity": "sha512-9t9hJHX15meBy2NmTJxL+NJfXmnausR2xUDvE19XQce0Qi/GBtDGamU8nS1RMbdgDmhgpm3VaOu2+fiS/SfTpQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/resources": "2.6.1"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.9.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/sdk-trace-base": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.6.1.tgz",
+ "integrity": "sha512-r86ut4T1e8vNwB35CqCcKd45yzqH6/6Wzvpk2/cZB8PsPLlZFTvrh8yfOS3CYZYcUmAx4hHTZJ8AO8Dj8nrdhw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/resources": "2.6.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.3.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-trace-otlp-http": {
+ "version": "0.203.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-http/-/exporter-trace-otlp-http-0.203.0.tgz",
+ "integrity": "sha512-ZDiaswNYo0yq/cy1bBLJFe691izEJ6IgNmkjm4C6kE9ub/OMQqDXORx2D2j8fzTBTxONyzusbaZlqtfmyqURPw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.0.1",
+ "@opentelemetry/otlp-exporter-base": "0.203.0",
+ "@opentelemetry/otlp-transformer": "0.203.0",
+ "@opentelemetry/resources": "2.0.1",
+ "@opentelemetry/sdk-trace-base": "2.0.1"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-trace-otlp-proto": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-proto/-/exporter-trace-otlp-proto-0.214.0.tgz",
+ "integrity": "sha512-ON0spYWb2yAdQ9b+ItNyK0c6qdtcs+0eVR4YFJkhJL7agfT8sHFg0e5EesauSRiTHPZHiDobI92k77q0lwAmqg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/otlp-exporter-base": "0.214.0",
+ "@opentelemetry/otlp-transformer": "0.214.0",
+ "@opentelemetry/resources": "2.6.1",
+ "@opentelemetry/sdk-trace-base": "2.6.1"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/api-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.214.0.tgz",
+ "integrity": "sha512-40lSJeqYO8Uz2Yj7u94/SJWE/wONa7rmMKjI1ZcIjgf3MHNHv1OZUCrCETGuaRF62d5pQD1wKIW+L4lmSMTzZA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/core": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.6.1.tgz",
+ "integrity": "sha512-8xHSGWpJP9wBxgBpnqGL0R3PbdWQndL1Qp50qrg71+B28zK5OQmUgcDKLJgzyAAV38t4tOyLMGDD60LneR5W8g==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.0.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/otlp-exporter-base": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.214.0.tgz",
+ "integrity": "sha512-u1Gdv0/E9wP+apqWf7Wv2npXmgJtxsW2XL0TEv9FZloTZRuMBKmu8cYVXwS4Hm3q/f/3FuCnPTgiwYvIqRSpRg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/otlp-transformer": "0.214.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/otlp-transformer": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.214.0.tgz",
+ "integrity": "sha512-DSaYcuBRh6uozfsWN3R8HsN0yDhCuWP7tOFdkUOVaWD1KVJg8m4qiLUsg/tNhTLS9HUYUcwNpwL2eroLtsZZ/w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/resources": "2.6.1",
+ "@opentelemetry/sdk-logs": "0.214.0",
+ "@opentelemetry/sdk-metrics": "2.6.1",
+ "@opentelemetry/sdk-trace-base": "2.6.1",
+ "protobufjs": "^7.0.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/resources": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.6.1.tgz",
+ "integrity": "sha512-lID/vxSuKWXM55XhAKNoYXu9Cutoq5hFdkbTdI/zDKQktXzcWBVhNsOkiZFTMU9UtEWuGRNe0HUgmsFldIdxVA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.3.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/sdk-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.214.0.tgz",
+ "integrity": "sha512-zf6acnScjhsaBUU22zXZ/sLWim1dfhUAbGXdMmHmNG3LfBnQ3DKsOCITb2IZwoUsNNMTogqFKBnlIPPftUgGwA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/resources": "2.6.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.4.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/sdk-metrics": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-2.6.1.tgz",
+ "integrity": "sha512-9t9hJHX15meBy2NmTJxL+NJfXmnausR2xUDvE19XQce0Qi/GBtDGamU8nS1RMbdgDmhgpm3VaOu2+fiS/SfTpQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/resources": "2.6.1"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.9.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/sdk-trace-base": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.6.1.tgz",
+ "integrity": "sha512-r86ut4T1e8vNwB35CqCcKd45yzqH6/6Wzvpk2/cZB8PsPLlZFTvrh8yfOS3CYZYcUmAx4hHTZJ8AO8Dj8nrdhw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/resources": "2.6.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.3.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-zipkin": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-zipkin/-/exporter-zipkin-2.6.1.tgz",
+ "integrity": "sha512-km2/hD3inLTqtLnUAHDGz7ZP/VOyZNslrC/iN66x4jkmpckwlONW54LRPNI6fm09/musDtZga9EWsxgwnjGUlw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/resources": "2.6.1",
+ "@opentelemetry/sdk-trace-base": "2.6.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-zipkin/node_modules/@opentelemetry/core": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.6.1.tgz",
+ "integrity": "sha512-8xHSGWpJP9wBxgBpnqGL0R3PbdWQndL1Qp50qrg71+B28zK5OQmUgcDKLJgzyAAV38t4tOyLMGDD60LneR5W8g==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.0.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-zipkin/node_modules/@opentelemetry/resources": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.6.1.tgz",
+ "integrity": "sha512-lID/vxSuKWXM55XhAKNoYXu9Cutoq5hFdkbTdI/zDKQktXzcWBVhNsOkiZFTMU9UtEWuGRNe0HUgmsFldIdxVA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.3.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-zipkin/node_modules/@opentelemetry/sdk-trace-base": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.6.1.tgz",
+ "integrity": "sha512-r86ut4T1e8vNwB35CqCcKd45yzqH6/6Wzvpk2/cZB8PsPLlZFTvrh8yfOS3CYZYcUmAx4hHTZJ8AO8Dj8nrdhw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/resources": "2.6.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.3.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation": {
+ "version": "0.203.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.203.0.tgz",
+ "integrity": "sha512-ke1qyM+3AK2zPuBPb6Hk/GCsc5ewbLvPNkEuELx/JmANeEp6ZjnZ+wypPAJSucTw0wvCGrUaibDSdcrGFoWxKQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.203.0",
+ "import-in-the-middle": "^1.8.1",
+ "require-in-the-middle": "^7.1.1"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-amqplib": {
+ "version": "0.61.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-amqplib/-/instrumentation-amqplib-0.61.0.tgz",
+ "integrity": "sha512-mCKoyTGfRNisge4br0NpOFSy2Z1NnEW8hbCJdUDdJFHrPqVzc4IIBPA/vX0U+LUcQqrQvJX+HMIU0dbDRe0i0Q==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "^2.0.0",
+ "@opentelemetry/instrumentation": "^0.214.0",
+ "@opentelemetry/semantic-conventions": "^1.33.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-amqplib/node_modules/@opentelemetry/api-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.214.0.tgz",
+ "integrity": "sha512-40lSJeqYO8Uz2Yj7u94/SJWE/wONa7rmMKjI1ZcIjgf3MHNHv1OZUCrCETGuaRF62d5pQD1wKIW+L4lmSMTzZA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-amqplib/node_modules/@opentelemetry/instrumentation": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.214.0.tgz",
+ "integrity": "sha512-MHqEX5Dk59cqVah5LiARMACku7jXSVk9iVDWOea4x3cr7VfdByeDCURK6o1lntT1JS/Tsovw01UJrBhN3/uC5w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "import-in-the-middle": "^3.0.0",
+ "require-in-the-middle": "^8.0.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-amqplib/node_modules/cjs-module-lexer": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.0.tgz",
+ "integrity": "sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-amqplib/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-amqplib/node_modules/import-in-the-middle": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-3.0.0.tgz",
+ "integrity": "sha512-OnGy+eYT7wVejH2XWgLRgbmzujhhVIATQH0ztIeRilwHBjTeG3pD+XnH3PKX0r9gJ0BuJmJ68q/oh9qgXnNDQg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "acorn": "^8.15.0",
+ "acorn-import-attributes": "^1.9.5",
+ "cjs-module-lexer": "^2.2.0",
+ "module-details-from-path": "^1.0.4"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-amqplib/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-amqplib/node_modules/require-in-the-middle": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-8.0.1.tgz",
+ "integrity": "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.3.5",
+ "module-details-from-path": "^1.0.3"
+ },
+ "engines": {
+ "node": ">=9.3.0 || >=8.10.0 <9.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-aws-lambda": {
+ "version": "0.66.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-aws-lambda/-/instrumentation-aws-lambda-0.66.0.tgz",
+ "integrity": "sha512-ObWWLwgjMXTsvete1O78ULLEKur9GdFLR+TvGGb56Srih7ifwcWa2jsnq+4PI8k5wwHuEyxB5SlMjwkKW7rTCQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/instrumentation": "^0.214.0",
+ "@opentelemetry/semantic-conventions": "^1.27.0",
+ "@types/aws-lambda": "^8.10.155"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-aws-lambda/node_modules/@opentelemetry/api-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.214.0.tgz",
+ "integrity": "sha512-40lSJeqYO8Uz2Yj7u94/SJWE/wONa7rmMKjI1ZcIjgf3MHNHv1OZUCrCETGuaRF62d5pQD1wKIW+L4lmSMTzZA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-aws-lambda/node_modules/@opentelemetry/instrumentation": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.214.0.tgz",
+ "integrity": "sha512-MHqEX5Dk59cqVah5LiARMACku7jXSVk9iVDWOea4x3cr7VfdByeDCURK6o1lntT1JS/Tsovw01UJrBhN3/uC5w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "import-in-the-middle": "^3.0.0",
+ "require-in-the-middle": "^8.0.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-aws-lambda/node_modules/@types/aws-lambda": {
+ "version": "8.10.161",
+ "resolved": "https://registry.npmjs.org/@types/aws-lambda/-/aws-lambda-8.10.161.tgz",
+ "integrity": "sha512-rUYdp+MQwSFocxIOcSsYSF3YYYC/uUpMbCY/mbO21vGqfrEYvNSoPyKYDj6RhXXpPfS0KstW9RwG3qXh9sL7FQ==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-aws-lambda/node_modules/cjs-module-lexer": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.0.tgz",
+ "integrity": "sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-aws-lambda/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-aws-lambda/node_modules/import-in-the-middle": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-3.0.0.tgz",
+ "integrity": "sha512-OnGy+eYT7wVejH2XWgLRgbmzujhhVIATQH0ztIeRilwHBjTeG3pD+XnH3PKX0r9gJ0BuJmJ68q/oh9qgXnNDQg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "acorn": "^8.15.0",
+ "acorn-import-attributes": "^1.9.5",
+ "cjs-module-lexer": "^2.2.0",
+ "module-details-from-path": "^1.0.4"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-aws-lambda/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-aws-lambda/node_modules/require-in-the-middle": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-8.0.1.tgz",
+ "integrity": "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.3.5",
+ "module-details-from-path": "^1.0.3"
+ },
+ "engines": {
+ "node": ">=9.3.0 || >=8.10.0 <9.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-aws-sdk": {
+ "version": "0.69.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-aws-sdk/-/instrumentation-aws-sdk-0.69.0.tgz",
+ "integrity": "sha512-JfSp3anFL5Lx/ysQSa4MnKxvSsXSnYpgQ831Y+yNs5wJZcJC4tB+YpnKH+bU5oFdKEF59FpI6Gn5Wg2vjVpR2A==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "^2.0.0",
+ "@opentelemetry/instrumentation": "^0.214.0",
+ "@opentelemetry/semantic-conventions": "^1.34.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-aws-sdk/node_modules/@opentelemetry/api-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.214.0.tgz",
+ "integrity": "sha512-40lSJeqYO8Uz2Yj7u94/SJWE/wONa7rmMKjI1ZcIjgf3MHNHv1OZUCrCETGuaRF62d5pQD1wKIW+L4lmSMTzZA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-aws-sdk/node_modules/@opentelemetry/instrumentation": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.214.0.tgz",
+ "integrity": "sha512-MHqEX5Dk59cqVah5LiARMACku7jXSVk9iVDWOea4x3cr7VfdByeDCURK6o1lntT1JS/Tsovw01UJrBhN3/uC5w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "import-in-the-middle": "^3.0.0",
+ "require-in-the-middle": "^8.0.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-aws-sdk/node_modules/cjs-module-lexer": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.0.tgz",
+ "integrity": "sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-aws-sdk/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-aws-sdk/node_modules/import-in-the-middle": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-3.0.0.tgz",
+ "integrity": "sha512-OnGy+eYT7wVejH2XWgLRgbmzujhhVIATQH0ztIeRilwHBjTeG3pD+XnH3PKX0r9gJ0BuJmJ68q/oh9qgXnNDQg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "acorn": "^8.15.0",
+ "acorn-import-attributes": "^1.9.5",
+ "cjs-module-lexer": "^2.2.0",
+ "module-details-from-path": "^1.0.4"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-aws-sdk/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-aws-sdk/node_modules/require-in-the-middle": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-8.0.1.tgz",
+ "integrity": "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.3.5",
+ "module-details-from-path": "^1.0.3"
+ },
+ "engines": {
+ "node": ">=9.3.0 || >=8.10.0 <9.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-bunyan": {
+ "version": "0.59.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-bunyan/-/instrumentation-bunyan-0.59.0.tgz",
+ "integrity": "sha512-XaZoIpc2U/WxE//kEyQsGuke9JezPOeeWJUkbHkZt+ojzPbYcAXZR4m9KmxSNbHu++bx1Zy3oBQ3erEXHGoDqA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "^0.214.0",
+ "@opentelemetry/instrumentation": "^0.214.0",
+ "@types/bunyan": "1.8.11"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-bunyan/node_modules/@opentelemetry/api-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.214.0.tgz",
+ "integrity": "sha512-40lSJeqYO8Uz2Yj7u94/SJWE/wONa7rmMKjI1ZcIjgf3MHNHv1OZUCrCETGuaRF62d5pQD1wKIW+L4lmSMTzZA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-bunyan/node_modules/@opentelemetry/instrumentation": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.214.0.tgz",
+ "integrity": "sha512-MHqEX5Dk59cqVah5LiARMACku7jXSVk9iVDWOea4x3cr7VfdByeDCURK6o1lntT1JS/Tsovw01UJrBhN3/uC5w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "import-in-the-middle": "^3.0.0",
+ "require-in-the-middle": "^8.0.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-bunyan/node_modules/cjs-module-lexer": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.0.tgz",
+ "integrity": "sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-bunyan/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-bunyan/node_modules/import-in-the-middle": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-3.0.0.tgz",
+ "integrity": "sha512-OnGy+eYT7wVejH2XWgLRgbmzujhhVIATQH0ztIeRilwHBjTeG3pD+XnH3PKX0r9gJ0BuJmJ68q/oh9qgXnNDQg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "acorn": "^8.15.0",
+ "acorn-import-attributes": "^1.9.5",
+ "cjs-module-lexer": "^2.2.0",
+ "module-details-from-path": "^1.0.4"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-bunyan/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-bunyan/node_modules/require-in-the-middle": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-8.0.1.tgz",
+ "integrity": "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.3.5",
+ "module-details-from-path": "^1.0.3"
+ },
+ "engines": {
+ "node": ">=9.3.0 || >=8.10.0 <9.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-cassandra-driver": {
+ "version": "0.59.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-cassandra-driver/-/instrumentation-cassandra-driver-0.59.0.tgz",
+ "integrity": "sha512-WtbENFKo4HRBwyffUEN+LSTdjDrBMyfaEYO362VVEhLoFWsFbGGXVApL7rIOhM2LjL04Oel6uJyJC6E4nvCgAA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/instrumentation": "^0.214.0",
+ "@opentelemetry/semantic-conventions": "^1.37.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-cassandra-driver/node_modules/@opentelemetry/api-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.214.0.tgz",
+ "integrity": "sha512-40lSJeqYO8Uz2Yj7u94/SJWE/wONa7rmMKjI1ZcIjgf3MHNHv1OZUCrCETGuaRF62d5pQD1wKIW+L4lmSMTzZA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-cassandra-driver/node_modules/@opentelemetry/instrumentation": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.214.0.tgz",
+ "integrity": "sha512-MHqEX5Dk59cqVah5LiARMACku7jXSVk9iVDWOea4x3cr7VfdByeDCURK6o1lntT1JS/Tsovw01UJrBhN3/uC5w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "import-in-the-middle": "^3.0.0",
+ "require-in-the-middle": "^8.0.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-cassandra-driver/node_modules/cjs-module-lexer": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.0.tgz",
+ "integrity": "sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-cassandra-driver/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-cassandra-driver/node_modules/import-in-the-middle": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-3.0.0.tgz",
+ "integrity": "sha512-OnGy+eYT7wVejH2XWgLRgbmzujhhVIATQH0ztIeRilwHBjTeG3pD+XnH3PKX0r9gJ0BuJmJ68q/oh9qgXnNDQg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "acorn": "^8.15.0",
+ "acorn-import-attributes": "^1.9.5",
+ "cjs-module-lexer": "^2.2.0",
+ "module-details-from-path": "^1.0.4"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-cassandra-driver/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-cassandra-driver/node_modules/require-in-the-middle": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-8.0.1.tgz",
+ "integrity": "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.3.5",
+ "module-details-from-path": "^1.0.3"
+ },
+ "engines": {
+ "node": ">=9.3.0 || >=8.10.0 <9.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-connect": {
+ "version": "0.57.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-connect/-/instrumentation-connect-0.57.0.tgz",
+ "integrity": "sha512-FMEBChnI4FLN5TE9DHwfH7QpNir1JzXno1uz/TAucVdLCyrG0jTrKIcNHt/i30A0M2AunNBCkcd8Ei26dIPKdg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "^2.0.0",
+ "@opentelemetry/instrumentation": "^0.214.0",
+ "@opentelemetry/semantic-conventions": "^1.27.0",
+ "@types/connect": "3.4.38"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-connect/node_modules/@opentelemetry/api-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.214.0.tgz",
+ "integrity": "sha512-40lSJeqYO8Uz2Yj7u94/SJWE/wONa7rmMKjI1ZcIjgf3MHNHv1OZUCrCETGuaRF62d5pQD1wKIW+L4lmSMTzZA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-connect/node_modules/@opentelemetry/instrumentation": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.214.0.tgz",
+ "integrity": "sha512-MHqEX5Dk59cqVah5LiARMACku7jXSVk9iVDWOea4x3cr7VfdByeDCURK6o1lntT1JS/Tsovw01UJrBhN3/uC5w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "import-in-the-middle": "^3.0.0",
+ "require-in-the-middle": "^8.0.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-connect/node_modules/cjs-module-lexer": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.0.tgz",
+ "integrity": "sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-connect/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-connect/node_modules/import-in-the-middle": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-3.0.0.tgz",
+ "integrity": "sha512-OnGy+eYT7wVejH2XWgLRgbmzujhhVIATQH0ztIeRilwHBjTeG3pD+XnH3PKX0r9gJ0BuJmJ68q/oh9qgXnNDQg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "acorn": "^8.15.0",
+ "acorn-import-attributes": "^1.9.5",
+ "cjs-module-lexer": "^2.2.0",
+ "module-details-from-path": "^1.0.4"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-connect/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-connect/node_modules/require-in-the-middle": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-8.0.1.tgz",
+ "integrity": "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.3.5",
+ "module-details-from-path": "^1.0.3"
+ },
+ "engines": {
+ "node": ">=9.3.0 || >=8.10.0 <9.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-cucumber": {
+ "version": "0.30.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-cucumber/-/instrumentation-cucumber-0.30.0.tgz",
+ "integrity": "sha512-Zx/PXw5o6VkMRcDT+SizbBTJiWdnkivsrVeFgaT1KM14bSbBULPNms+NX6/gsgD0Mkfik3np7HjfKyvipwQ9FA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/instrumentation": "^0.214.0",
+ "@opentelemetry/semantic-conventions": "^1.27.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-cucumber/node_modules/@opentelemetry/api-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.214.0.tgz",
+ "integrity": "sha512-40lSJeqYO8Uz2Yj7u94/SJWE/wONa7rmMKjI1ZcIjgf3MHNHv1OZUCrCETGuaRF62d5pQD1wKIW+L4lmSMTzZA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-cucumber/node_modules/@opentelemetry/instrumentation": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.214.0.tgz",
+ "integrity": "sha512-MHqEX5Dk59cqVah5LiARMACku7jXSVk9iVDWOea4x3cr7VfdByeDCURK6o1lntT1JS/Tsovw01UJrBhN3/uC5w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "import-in-the-middle": "^3.0.0",
+ "require-in-the-middle": "^8.0.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-cucumber/node_modules/cjs-module-lexer": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.0.tgz",
+ "integrity": "sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-cucumber/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-cucumber/node_modules/import-in-the-middle": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-3.0.0.tgz",
+ "integrity": "sha512-OnGy+eYT7wVejH2XWgLRgbmzujhhVIATQH0ztIeRilwHBjTeG3pD+XnH3PKX0r9gJ0BuJmJ68q/oh9qgXnNDQg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "acorn": "^8.15.0",
+ "acorn-import-attributes": "^1.9.5",
+ "cjs-module-lexer": "^2.2.0",
+ "module-details-from-path": "^1.0.4"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-cucumber/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-cucumber/node_modules/require-in-the-middle": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-8.0.1.tgz",
+ "integrity": "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.3.5",
+ "module-details-from-path": "^1.0.3"
+ },
+ "engines": {
+ "node": ">=9.3.0 || >=8.10.0 <9.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-dataloader": {
+ "version": "0.31.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-dataloader/-/instrumentation-dataloader-0.31.0.tgz",
+ "integrity": "sha512-f654tZFQXS5YeLDNb9KySrwtg7SnqZN119FauD7acBoTzuLduaiGTNz88ixcVSOOMGZ+EjJu/RFtx5klObC95g==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/instrumentation": "^0.214.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-dataloader/node_modules/@opentelemetry/api-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.214.0.tgz",
+ "integrity": "sha512-40lSJeqYO8Uz2Yj7u94/SJWE/wONa7rmMKjI1ZcIjgf3MHNHv1OZUCrCETGuaRF62d5pQD1wKIW+L4lmSMTzZA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-dataloader/node_modules/@opentelemetry/instrumentation": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.214.0.tgz",
+ "integrity": "sha512-MHqEX5Dk59cqVah5LiARMACku7jXSVk9iVDWOea4x3cr7VfdByeDCURK6o1lntT1JS/Tsovw01UJrBhN3/uC5w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "import-in-the-middle": "^3.0.0",
+ "require-in-the-middle": "^8.0.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-dataloader/node_modules/cjs-module-lexer": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.0.tgz",
+ "integrity": "sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-dataloader/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-dataloader/node_modules/import-in-the-middle": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-3.0.0.tgz",
+ "integrity": "sha512-OnGy+eYT7wVejH2XWgLRgbmzujhhVIATQH0ztIeRilwHBjTeG3pD+XnH3PKX0r9gJ0BuJmJ68q/oh9qgXnNDQg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "acorn": "^8.15.0",
+ "acorn-import-attributes": "^1.9.5",
+ "cjs-module-lexer": "^2.2.0",
+ "module-details-from-path": "^1.0.4"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-dataloader/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-dataloader/node_modules/require-in-the-middle": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-8.0.1.tgz",
+ "integrity": "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.3.5",
+ "module-details-from-path": "^1.0.3"
+ },
+ "engines": {
+ "node": ">=9.3.0 || >=8.10.0 <9.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-dns": {
+ "version": "0.57.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-dns/-/instrumentation-dns-0.57.0.tgz",
+ "integrity": "sha512-VJ0p1y0lPhDTIT/kuSgZOG2FJceFQfFgjKCz6k0rh+MyZKwEDTqvmkZUbA8qwgWB5m3fMqttK73jWZyzQNZnTw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/instrumentation": "^0.214.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-dns/node_modules/@opentelemetry/api-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.214.0.tgz",
+ "integrity": "sha512-40lSJeqYO8Uz2Yj7u94/SJWE/wONa7rmMKjI1ZcIjgf3MHNHv1OZUCrCETGuaRF62d5pQD1wKIW+L4lmSMTzZA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-dns/node_modules/@opentelemetry/instrumentation": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.214.0.tgz",
+ "integrity": "sha512-MHqEX5Dk59cqVah5LiARMACku7jXSVk9iVDWOea4x3cr7VfdByeDCURK6o1lntT1JS/Tsovw01UJrBhN3/uC5w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "import-in-the-middle": "^3.0.0",
+ "require-in-the-middle": "^8.0.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-dns/node_modules/cjs-module-lexer": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.0.tgz",
+ "integrity": "sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-dns/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-dns/node_modules/import-in-the-middle": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-3.0.0.tgz",
+ "integrity": "sha512-OnGy+eYT7wVejH2XWgLRgbmzujhhVIATQH0ztIeRilwHBjTeG3pD+XnH3PKX0r9gJ0BuJmJ68q/oh9qgXnNDQg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "acorn": "^8.15.0",
+ "acorn-import-attributes": "^1.9.5",
+ "cjs-module-lexer": "^2.2.0",
+ "module-details-from-path": "^1.0.4"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-dns/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-dns/node_modules/require-in-the-middle": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-8.0.1.tgz",
+ "integrity": "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.3.5",
+ "module-details-from-path": "^1.0.3"
+ },
+ "engines": {
+ "node": ">=9.3.0 || >=8.10.0 <9.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-express": {
+ "version": "0.62.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-express/-/instrumentation-express-0.62.0.tgz",
+ "integrity": "sha512-Tvx+vgAZKEQxU3Rx+xWLiR0mLxHwmk69/8ya04+VsV9WYh8w6Lhx5hm5yAMvo1wy0KqWgFKBLwSeo3sHCwdOww==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "^2.0.0",
+ "@opentelemetry/instrumentation": "^0.214.0",
+ "@opentelemetry/semantic-conventions": "^1.27.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-express/node_modules/@opentelemetry/api-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.214.0.tgz",
+ "integrity": "sha512-40lSJeqYO8Uz2Yj7u94/SJWE/wONa7rmMKjI1ZcIjgf3MHNHv1OZUCrCETGuaRF62d5pQD1wKIW+L4lmSMTzZA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-express/node_modules/@opentelemetry/instrumentation": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.214.0.tgz",
+ "integrity": "sha512-MHqEX5Dk59cqVah5LiARMACku7jXSVk9iVDWOea4x3cr7VfdByeDCURK6o1lntT1JS/Tsovw01UJrBhN3/uC5w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "import-in-the-middle": "^3.0.0",
+ "require-in-the-middle": "^8.0.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-express/node_modules/cjs-module-lexer": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.0.tgz",
+ "integrity": "sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-express/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-express/node_modules/import-in-the-middle": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-3.0.0.tgz",
+ "integrity": "sha512-OnGy+eYT7wVejH2XWgLRgbmzujhhVIATQH0ztIeRilwHBjTeG3pD+XnH3PKX0r9gJ0BuJmJ68q/oh9qgXnNDQg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "acorn": "^8.15.0",
+ "acorn-import-attributes": "^1.9.5",
+ "cjs-module-lexer": "^2.2.0",
+ "module-details-from-path": "^1.0.4"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-express/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-express/node_modules/require-in-the-middle": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-8.0.1.tgz",
+ "integrity": "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.3.5",
+ "module-details-from-path": "^1.0.3"
+ },
+ "engines": {
+ "node": ">=9.3.0 || >=8.10.0 <9.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-fs": {
+ "version": "0.33.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-fs/-/instrumentation-fs-0.33.0.tgz",
+ "integrity": "sha512-sCZWXGalQ01wr3tAhSR9ucqFJ0phidpAle6/17HVjD6gN8FLmZMK/8sKxdXYHy3PbnlV1P4zeiSVFNKpbFMNLA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "^2.0.0",
+ "@opentelemetry/instrumentation": "^0.214.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-fs/node_modules/@opentelemetry/api-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.214.0.tgz",
+ "integrity": "sha512-40lSJeqYO8Uz2Yj7u94/SJWE/wONa7rmMKjI1ZcIjgf3MHNHv1OZUCrCETGuaRF62d5pQD1wKIW+L4lmSMTzZA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-fs/node_modules/@opentelemetry/instrumentation": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.214.0.tgz",
+ "integrity": "sha512-MHqEX5Dk59cqVah5LiARMACku7jXSVk9iVDWOea4x3cr7VfdByeDCURK6o1lntT1JS/Tsovw01UJrBhN3/uC5w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "import-in-the-middle": "^3.0.0",
+ "require-in-the-middle": "^8.0.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-fs/node_modules/cjs-module-lexer": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.0.tgz",
+ "integrity": "sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-fs/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-fs/node_modules/import-in-the-middle": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-3.0.0.tgz",
+ "integrity": "sha512-OnGy+eYT7wVejH2XWgLRgbmzujhhVIATQH0ztIeRilwHBjTeG3pD+XnH3PKX0r9gJ0BuJmJ68q/oh9qgXnNDQg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "acorn": "^8.15.0",
+ "acorn-import-attributes": "^1.9.5",
+ "cjs-module-lexer": "^2.2.0",
+ "module-details-from-path": "^1.0.4"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-fs/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-fs/node_modules/require-in-the-middle": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-8.0.1.tgz",
+ "integrity": "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.3.5",
+ "module-details-from-path": "^1.0.3"
+ },
+ "engines": {
+ "node": ">=9.3.0 || >=8.10.0 <9.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-generic-pool": {
+ "version": "0.57.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-generic-pool/-/instrumentation-generic-pool-0.57.0.tgz",
+ "integrity": "sha512-orhmlaK+ZIW9hKU+nHTbXrCSXZcH83AescTqmpamHRobRmYSQwRbD0a1odc0yAzuzOtxYiHiXAnpnIpaSSY7Ow==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/instrumentation": "^0.214.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-generic-pool/node_modules/@opentelemetry/api-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.214.0.tgz",
+ "integrity": "sha512-40lSJeqYO8Uz2Yj7u94/SJWE/wONa7rmMKjI1ZcIjgf3MHNHv1OZUCrCETGuaRF62d5pQD1wKIW+L4lmSMTzZA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-generic-pool/node_modules/@opentelemetry/instrumentation": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.214.0.tgz",
+ "integrity": "sha512-MHqEX5Dk59cqVah5LiARMACku7jXSVk9iVDWOea4x3cr7VfdByeDCURK6o1lntT1JS/Tsovw01UJrBhN3/uC5w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "import-in-the-middle": "^3.0.0",
+ "require-in-the-middle": "^8.0.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-generic-pool/node_modules/cjs-module-lexer": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.0.tgz",
+ "integrity": "sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-generic-pool/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-generic-pool/node_modules/import-in-the-middle": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-3.0.0.tgz",
+ "integrity": "sha512-OnGy+eYT7wVejH2XWgLRgbmzujhhVIATQH0ztIeRilwHBjTeG3pD+XnH3PKX0r9gJ0BuJmJ68q/oh9qgXnNDQg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "acorn": "^8.15.0",
+ "acorn-import-attributes": "^1.9.5",
+ "cjs-module-lexer": "^2.2.0",
+ "module-details-from-path": "^1.0.4"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-generic-pool/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-generic-pool/node_modules/require-in-the-middle": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-8.0.1.tgz",
+ "integrity": "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.3.5",
+ "module-details-from-path": "^1.0.3"
+ },
+ "engines": {
+ "node": ">=9.3.0 || >=8.10.0 <9.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-graphql": {
+ "version": "0.62.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-graphql/-/instrumentation-graphql-0.62.0.tgz",
+ "integrity": "sha512-3YNuLVPUxafXkH1jBAbGsKNsP3XVzcFDhCDCE3OqBwCwShlqQbLMRMFh1T/d5jaVZiGVmSsfof+ICKD2iOV8xg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/instrumentation": "^0.214.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-graphql/node_modules/@opentelemetry/api-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.214.0.tgz",
+ "integrity": "sha512-40lSJeqYO8Uz2Yj7u94/SJWE/wONa7rmMKjI1ZcIjgf3MHNHv1OZUCrCETGuaRF62d5pQD1wKIW+L4lmSMTzZA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-graphql/node_modules/@opentelemetry/instrumentation": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.214.0.tgz",
+ "integrity": "sha512-MHqEX5Dk59cqVah5LiARMACku7jXSVk9iVDWOea4x3cr7VfdByeDCURK6o1lntT1JS/Tsovw01UJrBhN3/uC5w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "import-in-the-middle": "^3.0.0",
+ "require-in-the-middle": "^8.0.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-graphql/node_modules/cjs-module-lexer": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.0.tgz",
+ "integrity": "sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-graphql/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-graphql/node_modules/import-in-the-middle": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-3.0.0.tgz",
+ "integrity": "sha512-OnGy+eYT7wVejH2XWgLRgbmzujhhVIATQH0ztIeRilwHBjTeG3pD+XnH3PKX0r9gJ0BuJmJ68q/oh9qgXnNDQg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "acorn": "^8.15.0",
+ "acorn-import-attributes": "^1.9.5",
+ "cjs-module-lexer": "^2.2.0",
+ "module-details-from-path": "^1.0.4"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-graphql/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-graphql/node_modules/require-in-the-middle": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-8.0.1.tgz",
+ "integrity": "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.3.5",
+ "module-details-from-path": "^1.0.3"
+ },
+ "engines": {
+ "node": ">=9.3.0 || >=8.10.0 <9.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-grpc": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-grpc/-/instrumentation-grpc-0.214.0.tgz",
+ "integrity": "sha512-qU7NMLuXvu+ZvX6LJWJuxfqHvUvCAexduBWnM7OFUVHnkwo/HorWa9qyDFBXEdUE2fypCcYWZkon37wv9y/lDw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/instrumentation": "0.214.0",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-grpc/node_modules/@opentelemetry/api-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.214.0.tgz",
+ "integrity": "sha512-40lSJeqYO8Uz2Yj7u94/SJWE/wONa7rmMKjI1ZcIjgf3MHNHv1OZUCrCETGuaRF62d5pQD1wKIW+L4lmSMTzZA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-grpc/node_modules/@opentelemetry/instrumentation": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.214.0.tgz",
+ "integrity": "sha512-MHqEX5Dk59cqVah5LiARMACku7jXSVk9iVDWOea4x3cr7VfdByeDCURK6o1lntT1JS/Tsovw01UJrBhN3/uC5w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "import-in-the-middle": "^3.0.0",
+ "require-in-the-middle": "^8.0.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-grpc/node_modules/cjs-module-lexer": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.0.tgz",
+ "integrity": "sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-grpc/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-grpc/node_modules/import-in-the-middle": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-3.0.0.tgz",
+ "integrity": "sha512-OnGy+eYT7wVejH2XWgLRgbmzujhhVIATQH0ztIeRilwHBjTeG3pD+XnH3PKX0r9gJ0BuJmJ68q/oh9qgXnNDQg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "acorn": "^8.15.0",
+ "acorn-import-attributes": "^1.9.5",
+ "cjs-module-lexer": "^2.2.0",
+ "module-details-from-path": "^1.0.4"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-grpc/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-grpc/node_modules/require-in-the-middle": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-8.0.1.tgz",
+ "integrity": "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.3.5",
+ "module-details-from-path": "^1.0.3"
+ },
+ "engines": {
+ "node": ">=9.3.0 || >=8.10.0 <9.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-hapi": {
+ "version": "0.60.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-hapi/-/instrumentation-hapi-0.60.0.tgz",
+ "integrity": "sha512-aNljZKYrEa7obLAxd1bCEDxF7kzCLGXTuTJZ8lMR9rIVEjmuKBXN1gfqpm/OB//Zc2zP4iIve1jBp7sr3mQV6w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "^2.0.0",
+ "@opentelemetry/instrumentation": "^0.214.0",
+ "@opentelemetry/semantic-conventions": "^1.27.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-hapi/node_modules/@opentelemetry/api-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.214.0.tgz",
+ "integrity": "sha512-40lSJeqYO8Uz2Yj7u94/SJWE/wONa7rmMKjI1ZcIjgf3MHNHv1OZUCrCETGuaRF62d5pQD1wKIW+L4lmSMTzZA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-hapi/node_modules/@opentelemetry/instrumentation": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.214.0.tgz",
+ "integrity": "sha512-MHqEX5Dk59cqVah5LiARMACku7jXSVk9iVDWOea4x3cr7VfdByeDCURK6o1lntT1JS/Tsovw01UJrBhN3/uC5w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "import-in-the-middle": "^3.0.0",
+ "require-in-the-middle": "^8.0.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-hapi/node_modules/cjs-module-lexer": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.0.tgz",
+ "integrity": "sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-hapi/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-hapi/node_modules/import-in-the-middle": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-3.0.0.tgz",
+ "integrity": "sha512-OnGy+eYT7wVejH2XWgLRgbmzujhhVIATQH0ztIeRilwHBjTeG3pD+XnH3PKX0r9gJ0BuJmJ68q/oh9qgXnNDQg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "acorn": "^8.15.0",
+ "acorn-import-attributes": "^1.9.5",
+ "cjs-module-lexer": "^2.2.0",
+ "module-details-from-path": "^1.0.4"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-hapi/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-hapi/node_modules/require-in-the-middle": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-8.0.1.tgz",
+ "integrity": "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.3.5",
+ "module-details-from-path": "^1.0.3"
+ },
+ "engines": {
+ "node": ">=9.3.0 || >=8.10.0 <9.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-http": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-http/-/instrumentation-http-0.214.0.tgz",
+ "integrity": "sha512-FlkDhZDRjDJDcO2LcSCtjRpkal1NJ8y0fBqBhTvfAR3JSYY2jAIj1kSS5IjmEBt4c3aWv+u/lqLuoCDrrKCSKg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/instrumentation": "0.214.0",
+ "@opentelemetry/semantic-conventions": "^1.29.0",
+ "forwarded-parse": "2.1.2"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-http/node_modules/@opentelemetry/api-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.214.0.tgz",
+ "integrity": "sha512-40lSJeqYO8Uz2Yj7u94/SJWE/wONa7rmMKjI1ZcIjgf3MHNHv1OZUCrCETGuaRF62d5pQD1wKIW+L4lmSMTzZA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-http/node_modules/@opentelemetry/core": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.6.1.tgz",
+ "integrity": "sha512-8xHSGWpJP9wBxgBpnqGL0R3PbdWQndL1Qp50qrg71+B28zK5OQmUgcDKLJgzyAAV38t4tOyLMGDD60LneR5W8g==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.0.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-http/node_modules/@opentelemetry/instrumentation": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.214.0.tgz",
+ "integrity": "sha512-MHqEX5Dk59cqVah5LiARMACku7jXSVk9iVDWOea4x3cr7VfdByeDCURK6o1lntT1JS/Tsovw01UJrBhN3/uC5w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "import-in-the-middle": "^3.0.0",
+ "require-in-the-middle": "^8.0.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-http/node_modules/cjs-module-lexer": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.0.tgz",
+ "integrity": "sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-http/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-http/node_modules/import-in-the-middle": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-3.0.0.tgz",
+ "integrity": "sha512-OnGy+eYT7wVejH2XWgLRgbmzujhhVIATQH0ztIeRilwHBjTeG3pD+XnH3PKX0r9gJ0BuJmJ68q/oh9qgXnNDQg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "acorn": "^8.15.0",
+ "acorn-import-attributes": "^1.9.5",
+ "cjs-module-lexer": "^2.2.0",
+ "module-details-from-path": "^1.0.4"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-http/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-http/node_modules/require-in-the-middle": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-8.0.1.tgz",
+ "integrity": "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.3.5",
+ "module-details-from-path": "^1.0.3"
+ },
+ "engines": {
+ "node": ">=9.3.0 || >=8.10.0 <9.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-ioredis": {
+ "version": "0.62.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-ioredis/-/instrumentation-ioredis-0.62.0.tgz",
+ "integrity": "sha512-ZYt//zcPve8qklaZX+5Z4MkU7UpEkFRrxsf2cnaKYBitqDnsCN69CPAuuMOX6NYdW2rG9sFy7V/QWtBlP5XiNQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/instrumentation": "^0.214.0",
+ "@opentelemetry/redis-common": "^0.38.2",
+ "@opentelemetry/semantic-conventions": "^1.33.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-ioredis/node_modules/@opentelemetry/api-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.214.0.tgz",
+ "integrity": "sha512-40lSJeqYO8Uz2Yj7u94/SJWE/wONa7rmMKjI1ZcIjgf3MHNHv1OZUCrCETGuaRF62d5pQD1wKIW+L4lmSMTzZA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-ioredis/node_modules/@opentelemetry/instrumentation": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.214.0.tgz",
+ "integrity": "sha512-MHqEX5Dk59cqVah5LiARMACku7jXSVk9iVDWOea4x3cr7VfdByeDCURK6o1lntT1JS/Tsovw01UJrBhN3/uC5w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "import-in-the-middle": "^3.0.0",
+ "require-in-the-middle": "^8.0.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-ioredis/node_modules/cjs-module-lexer": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.0.tgz",
+ "integrity": "sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-ioredis/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-ioredis/node_modules/import-in-the-middle": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-3.0.0.tgz",
+ "integrity": "sha512-OnGy+eYT7wVejH2XWgLRgbmzujhhVIATQH0ztIeRilwHBjTeG3pD+XnH3PKX0r9gJ0BuJmJ68q/oh9qgXnNDQg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "acorn": "^8.15.0",
+ "acorn-import-attributes": "^1.9.5",
+ "cjs-module-lexer": "^2.2.0",
+ "module-details-from-path": "^1.0.4"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-ioredis/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-ioredis/node_modules/require-in-the-middle": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-8.0.1.tgz",
+ "integrity": "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.3.5",
+ "module-details-from-path": "^1.0.3"
+ },
+ "engines": {
+ "node": ">=9.3.0 || >=8.10.0 <9.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-kafkajs": {
+ "version": "0.23.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-kafkajs/-/instrumentation-kafkajs-0.23.0.tgz",
+ "integrity": "sha512-4K+nVo+zI+aDz0Z85SObwbdixIbzS9moIuKJaYsdlzcHYnKOPtB7ya8r8Ezivy/GVIBHiKJVq4tv+BEkgOMLaQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/instrumentation": "^0.214.0",
+ "@opentelemetry/semantic-conventions": "^1.30.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-kafkajs/node_modules/@opentelemetry/api-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.214.0.tgz",
+ "integrity": "sha512-40lSJeqYO8Uz2Yj7u94/SJWE/wONa7rmMKjI1ZcIjgf3MHNHv1OZUCrCETGuaRF62d5pQD1wKIW+L4lmSMTzZA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-kafkajs/node_modules/@opentelemetry/instrumentation": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.214.0.tgz",
+ "integrity": "sha512-MHqEX5Dk59cqVah5LiARMACku7jXSVk9iVDWOea4x3cr7VfdByeDCURK6o1lntT1JS/Tsovw01UJrBhN3/uC5w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "import-in-the-middle": "^3.0.0",
+ "require-in-the-middle": "^8.0.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-kafkajs/node_modules/cjs-module-lexer": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.0.tgz",
+ "integrity": "sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-kafkajs/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-kafkajs/node_modules/import-in-the-middle": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-3.0.0.tgz",
+ "integrity": "sha512-OnGy+eYT7wVejH2XWgLRgbmzujhhVIATQH0ztIeRilwHBjTeG3pD+XnH3PKX0r9gJ0BuJmJ68q/oh9qgXnNDQg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "acorn": "^8.15.0",
+ "acorn-import-attributes": "^1.9.5",
+ "cjs-module-lexer": "^2.2.0",
+ "module-details-from-path": "^1.0.4"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-kafkajs/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-kafkajs/node_modules/require-in-the-middle": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-8.0.1.tgz",
+ "integrity": "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.3.5",
+ "module-details-from-path": "^1.0.3"
+ },
+ "engines": {
+ "node": ">=9.3.0 || >=8.10.0 <9.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-knex": {
+ "version": "0.58.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-knex/-/instrumentation-knex-0.58.0.tgz",
+ "integrity": "sha512-Hc/o8fSsaWxZ8r1Yw4rNDLwTpUopTf4X32y4W6UhlHmW8Wizz8wfhgOKIelSeqFVTKBBPIDUOsQWuIMxBmu8Bw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/instrumentation": "^0.214.0",
+ "@opentelemetry/semantic-conventions": "^1.33.1"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-knex/node_modules/@opentelemetry/api-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.214.0.tgz",
+ "integrity": "sha512-40lSJeqYO8Uz2Yj7u94/SJWE/wONa7rmMKjI1ZcIjgf3MHNHv1OZUCrCETGuaRF62d5pQD1wKIW+L4lmSMTzZA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-knex/node_modules/@opentelemetry/instrumentation": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.214.0.tgz",
+ "integrity": "sha512-MHqEX5Dk59cqVah5LiARMACku7jXSVk9iVDWOea4x3cr7VfdByeDCURK6o1lntT1JS/Tsovw01UJrBhN3/uC5w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "import-in-the-middle": "^3.0.0",
+ "require-in-the-middle": "^8.0.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-knex/node_modules/cjs-module-lexer": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.0.tgz",
+ "integrity": "sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-knex/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-knex/node_modules/import-in-the-middle": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-3.0.0.tgz",
+ "integrity": "sha512-OnGy+eYT7wVejH2XWgLRgbmzujhhVIATQH0ztIeRilwHBjTeG3pD+XnH3PKX0r9gJ0BuJmJ68q/oh9qgXnNDQg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "acorn": "^8.15.0",
+ "acorn-import-attributes": "^1.9.5",
+ "cjs-module-lexer": "^2.2.0",
+ "module-details-from-path": "^1.0.4"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-knex/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-knex/node_modules/require-in-the-middle": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-8.0.1.tgz",
+ "integrity": "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.3.5",
+ "module-details-from-path": "^1.0.3"
+ },
+ "engines": {
+ "node": ">=9.3.0 || >=8.10.0 <9.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-koa": {
+ "version": "0.62.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-koa/-/instrumentation-koa-0.62.0.tgz",
+ "integrity": "sha512-uVip0VuGUQXZ+vFxkKxAUNq8qNl+VFlyHDh/U6IQ8COOEDfbEchdaHnpFrMYF3psZRUuoSIgb7xOeXj00RdwDA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "^2.0.0",
+ "@opentelemetry/instrumentation": "^0.214.0",
+ "@opentelemetry/semantic-conventions": "^1.36.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.9.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-koa/node_modules/@opentelemetry/api-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.214.0.tgz",
+ "integrity": "sha512-40lSJeqYO8Uz2Yj7u94/SJWE/wONa7rmMKjI1ZcIjgf3MHNHv1OZUCrCETGuaRF62d5pQD1wKIW+L4lmSMTzZA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-koa/node_modules/@opentelemetry/instrumentation": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.214.0.tgz",
+ "integrity": "sha512-MHqEX5Dk59cqVah5LiARMACku7jXSVk9iVDWOea4x3cr7VfdByeDCURK6o1lntT1JS/Tsovw01UJrBhN3/uC5w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "import-in-the-middle": "^3.0.0",
+ "require-in-the-middle": "^8.0.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-koa/node_modules/cjs-module-lexer": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.0.tgz",
+ "integrity": "sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-koa/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-koa/node_modules/import-in-the-middle": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-3.0.0.tgz",
+ "integrity": "sha512-OnGy+eYT7wVejH2XWgLRgbmzujhhVIATQH0ztIeRilwHBjTeG3pD+XnH3PKX0r9gJ0BuJmJ68q/oh9qgXnNDQg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "acorn": "^8.15.0",
+ "acorn-import-attributes": "^1.9.5",
+ "cjs-module-lexer": "^2.2.0",
+ "module-details-from-path": "^1.0.4"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-koa/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-koa/node_modules/require-in-the-middle": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-8.0.1.tgz",
+ "integrity": "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.3.5",
+ "module-details-from-path": "^1.0.3"
+ },
+ "engines": {
+ "node": ">=9.3.0 || >=8.10.0 <9.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-lru-memoizer": {
+ "version": "0.58.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-lru-memoizer/-/instrumentation-lru-memoizer-0.58.0.tgz",
+ "integrity": "sha512-6grM3TdMyHzlGY1cUA+mwoPueB1F3dYKgKtZIH6jOFXqfHAByyLTc+6PFjGM9tKh52CFBJaDwodNlL/Td39z7Q==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/instrumentation": "^0.214.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-lru-memoizer/node_modules/@opentelemetry/api-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.214.0.tgz",
+ "integrity": "sha512-40lSJeqYO8Uz2Yj7u94/SJWE/wONa7rmMKjI1ZcIjgf3MHNHv1OZUCrCETGuaRF62d5pQD1wKIW+L4lmSMTzZA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-lru-memoizer/node_modules/@opentelemetry/instrumentation": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.214.0.tgz",
+ "integrity": "sha512-MHqEX5Dk59cqVah5LiARMACku7jXSVk9iVDWOea4x3cr7VfdByeDCURK6o1lntT1JS/Tsovw01UJrBhN3/uC5w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "import-in-the-middle": "^3.0.0",
+ "require-in-the-middle": "^8.0.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-lru-memoizer/node_modules/cjs-module-lexer": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.0.tgz",
+ "integrity": "sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-lru-memoizer/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-lru-memoizer/node_modules/import-in-the-middle": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-3.0.0.tgz",
+ "integrity": "sha512-OnGy+eYT7wVejH2XWgLRgbmzujhhVIATQH0ztIeRilwHBjTeG3pD+XnH3PKX0r9gJ0BuJmJ68q/oh9qgXnNDQg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "acorn": "^8.15.0",
+ "acorn-import-attributes": "^1.9.5",
+ "cjs-module-lexer": "^2.2.0",
+ "module-details-from-path": "^1.0.4"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-lru-memoizer/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-lru-memoizer/node_modules/require-in-the-middle": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-8.0.1.tgz",
+ "integrity": "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.3.5",
+ "module-details-from-path": "^1.0.3"
+ },
+ "engines": {
+ "node": ">=9.3.0 || >=8.10.0 <9.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-memcached": {
+ "version": "0.57.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-memcached/-/instrumentation-memcached-0.57.0.tgz",
+ "integrity": "sha512-z/a4vC+hmQn4o+NYgDlQE5DJNKH9nwtzvTOAgG1bwO1hdX+w9Nr3kd9dKRwN7e6EiQESrPCh6iiE0xwh9x1WDw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/instrumentation": "^0.214.0",
+ "@opentelemetry/semantic-conventions": "^1.33.0",
+ "@types/memcached": "^2.2.6"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-memcached/node_modules/@opentelemetry/api-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.214.0.tgz",
+ "integrity": "sha512-40lSJeqYO8Uz2Yj7u94/SJWE/wONa7rmMKjI1ZcIjgf3MHNHv1OZUCrCETGuaRF62d5pQD1wKIW+L4lmSMTzZA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-memcached/node_modules/@opentelemetry/instrumentation": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.214.0.tgz",
+ "integrity": "sha512-MHqEX5Dk59cqVah5LiARMACku7jXSVk9iVDWOea4x3cr7VfdByeDCURK6o1lntT1JS/Tsovw01UJrBhN3/uC5w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "import-in-the-middle": "^3.0.0",
+ "require-in-the-middle": "^8.0.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-memcached/node_modules/cjs-module-lexer": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.0.tgz",
+ "integrity": "sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-memcached/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-memcached/node_modules/import-in-the-middle": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-3.0.0.tgz",
+ "integrity": "sha512-OnGy+eYT7wVejH2XWgLRgbmzujhhVIATQH0ztIeRilwHBjTeG3pD+XnH3PKX0r9gJ0BuJmJ68q/oh9qgXnNDQg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "acorn": "^8.15.0",
+ "acorn-import-attributes": "^1.9.5",
+ "cjs-module-lexer": "^2.2.0",
+ "module-details-from-path": "^1.0.4"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-memcached/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-memcached/node_modules/require-in-the-middle": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-8.0.1.tgz",
+ "integrity": "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.3.5",
+ "module-details-from-path": "^1.0.3"
+ },
+ "engines": {
+ "node": ">=9.3.0 || >=8.10.0 <9.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-mongodb": {
+ "version": "0.67.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mongodb/-/instrumentation-mongodb-0.67.0.tgz",
+ "integrity": "sha512-1WJp5N1lYfHq2IhECOTewFs5Tf2NfUOwQRqs/rZdXKTezArMlucxgzAaqcgp3A3YREXopXTpXHsxZTGHjNhMdQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/instrumentation": "^0.214.0",
+ "@opentelemetry/semantic-conventions": "^1.33.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-mongodb/node_modules/@opentelemetry/api-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.214.0.tgz",
+ "integrity": "sha512-40lSJeqYO8Uz2Yj7u94/SJWE/wONa7rmMKjI1ZcIjgf3MHNHv1OZUCrCETGuaRF62d5pQD1wKIW+L4lmSMTzZA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-mongodb/node_modules/@opentelemetry/instrumentation": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.214.0.tgz",
+ "integrity": "sha512-MHqEX5Dk59cqVah5LiARMACku7jXSVk9iVDWOea4x3cr7VfdByeDCURK6o1lntT1JS/Tsovw01UJrBhN3/uC5w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "import-in-the-middle": "^3.0.0",
+ "require-in-the-middle": "^8.0.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-mongodb/node_modules/cjs-module-lexer": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.0.tgz",
+ "integrity": "sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-mongodb/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-mongodb/node_modules/import-in-the-middle": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-3.0.0.tgz",
+ "integrity": "sha512-OnGy+eYT7wVejH2XWgLRgbmzujhhVIATQH0ztIeRilwHBjTeG3pD+XnH3PKX0r9gJ0BuJmJ68q/oh9qgXnNDQg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "acorn": "^8.15.0",
+ "acorn-import-attributes": "^1.9.5",
+ "cjs-module-lexer": "^2.2.0",
+ "module-details-from-path": "^1.0.4"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-mongodb/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-mongodb/node_modules/require-in-the-middle": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-8.0.1.tgz",
+ "integrity": "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.3.5",
+ "module-details-from-path": "^1.0.3"
+ },
+ "engines": {
+ "node": ">=9.3.0 || >=8.10.0 <9.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-mongoose": {
+ "version": "0.60.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mongoose/-/instrumentation-mongoose-0.60.0.tgz",
+ "integrity": "sha512-8BahAZpKsOoc+lrZGb7Ofn4g3z8qtp5IxDfvAVpKXsEheQN7ONMH5djT5ihy6yf8yyeQJGS0gXFfpEAEeEHqQg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "^2.0.0",
+ "@opentelemetry/instrumentation": "^0.214.0",
+ "@opentelemetry/semantic-conventions": "^1.33.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-mongoose/node_modules/@opentelemetry/api-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.214.0.tgz",
+ "integrity": "sha512-40lSJeqYO8Uz2Yj7u94/SJWE/wONa7rmMKjI1ZcIjgf3MHNHv1OZUCrCETGuaRF62d5pQD1wKIW+L4lmSMTzZA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-mongoose/node_modules/@opentelemetry/instrumentation": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.214.0.tgz",
+ "integrity": "sha512-MHqEX5Dk59cqVah5LiARMACku7jXSVk9iVDWOea4x3cr7VfdByeDCURK6o1lntT1JS/Tsovw01UJrBhN3/uC5w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "import-in-the-middle": "^3.0.0",
+ "require-in-the-middle": "^8.0.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-mongoose/node_modules/cjs-module-lexer": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.0.tgz",
+ "integrity": "sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-mongoose/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-mongoose/node_modules/import-in-the-middle": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-3.0.0.tgz",
+ "integrity": "sha512-OnGy+eYT7wVejH2XWgLRgbmzujhhVIATQH0ztIeRilwHBjTeG3pD+XnH3PKX0r9gJ0BuJmJ68q/oh9qgXnNDQg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "acorn": "^8.15.0",
+ "acorn-import-attributes": "^1.9.5",
+ "cjs-module-lexer": "^2.2.0",
+ "module-details-from-path": "^1.0.4"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-mongoose/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-mongoose/node_modules/require-in-the-middle": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-8.0.1.tgz",
+ "integrity": "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.3.5",
+ "module-details-from-path": "^1.0.3"
+ },
+ "engines": {
+ "node": ">=9.3.0 || >=8.10.0 <9.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-mysql": {
+ "version": "0.60.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mysql/-/instrumentation-mysql-0.60.0.tgz",
+ "integrity": "sha512-08pO8GFPEIz2zquKDGteBZDNmwketdgH8hTe9rVYgW9kCJXq1Psj3wPQGx+VaX4ZJKCfPeoLMYup9+cxHvZyVQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/instrumentation": "^0.214.0",
+ "@opentelemetry/semantic-conventions": "^1.33.0",
+ "@types/mysql": "2.15.27"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-mysql/node_modules/@opentelemetry/api-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.214.0.tgz",
+ "integrity": "sha512-40lSJeqYO8Uz2Yj7u94/SJWE/wONa7rmMKjI1ZcIjgf3MHNHv1OZUCrCETGuaRF62d5pQD1wKIW+L4lmSMTzZA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-mysql/node_modules/@opentelemetry/instrumentation": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.214.0.tgz",
+ "integrity": "sha512-MHqEX5Dk59cqVah5LiARMACku7jXSVk9iVDWOea4x3cr7VfdByeDCURK6o1lntT1JS/Tsovw01UJrBhN3/uC5w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "import-in-the-middle": "^3.0.0",
+ "require-in-the-middle": "^8.0.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-mysql/node_modules/cjs-module-lexer": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.0.tgz",
+ "integrity": "sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-mysql/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-mysql/node_modules/import-in-the-middle": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-3.0.0.tgz",
+ "integrity": "sha512-OnGy+eYT7wVejH2XWgLRgbmzujhhVIATQH0ztIeRilwHBjTeG3pD+XnH3PKX0r9gJ0BuJmJ68q/oh9qgXnNDQg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "acorn": "^8.15.0",
+ "acorn-import-attributes": "^1.9.5",
+ "cjs-module-lexer": "^2.2.0",
+ "module-details-from-path": "^1.0.4"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-mysql/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-mysql/node_modules/require-in-the-middle": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-8.0.1.tgz",
+ "integrity": "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.3.5",
+ "module-details-from-path": "^1.0.3"
+ },
+ "engines": {
+ "node": ">=9.3.0 || >=8.10.0 <9.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-mysql2": {
+ "version": "0.60.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mysql2/-/instrumentation-mysql2-0.60.0.tgz",
+ "integrity": "sha512-m/5d3bxQALllCzezYDk/6vajh0tj5OijMMvOZGr+qN1NMXm1dzMNwyJ0gNZW7Fo3YFRyj/jJMxIw+W7d525dlw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/instrumentation": "^0.214.0",
+ "@opentelemetry/semantic-conventions": "^1.33.0",
+ "@opentelemetry/sql-common": "^0.41.2"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-mysql2/node_modules/@opentelemetry/api-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.214.0.tgz",
+ "integrity": "sha512-40lSJeqYO8Uz2Yj7u94/SJWE/wONa7rmMKjI1ZcIjgf3MHNHv1OZUCrCETGuaRF62d5pQD1wKIW+L4lmSMTzZA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-mysql2/node_modules/@opentelemetry/instrumentation": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.214.0.tgz",
+ "integrity": "sha512-MHqEX5Dk59cqVah5LiARMACku7jXSVk9iVDWOea4x3cr7VfdByeDCURK6o1lntT1JS/Tsovw01UJrBhN3/uC5w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "import-in-the-middle": "^3.0.0",
+ "require-in-the-middle": "^8.0.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-mysql2/node_modules/cjs-module-lexer": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.0.tgz",
+ "integrity": "sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-mysql2/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-mysql2/node_modules/import-in-the-middle": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-3.0.0.tgz",
+ "integrity": "sha512-OnGy+eYT7wVejH2XWgLRgbmzujhhVIATQH0ztIeRilwHBjTeG3pD+XnH3PKX0r9gJ0BuJmJ68q/oh9qgXnNDQg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "acorn": "^8.15.0",
+ "acorn-import-attributes": "^1.9.5",
+ "cjs-module-lexer": "^2.2.0",
+ "module-details-from-path": "^1.0.4"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-mysql2/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-mysql2/node_modules/require-in-the-middle": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-8.0.1.tgz",
+ "integrity": "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.3.5",
+ "module-details-from-path": "^1.0.3"
+ },
+ "engines": {
+ "node": ">=9.3.0 || >=8.10.0 <9.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-nestjs-core": {
+ "version": "0.60.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-nestjs-core/-/instrumentation-nestjs-core-0.60.0.tgz",
+ "integrity": "sha512-BZqFAoD+frnwjpb0/T4kEEQMhl2YykZch4n2MMLKAVTzTehTBBV2hZxvFF629ipS+WOGBKjCjz1dycU9QNIckQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/instrumentation": "^0.214.0",
+ "@opentelemetry/semantic-conventions": "^1.30.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-nestjs-core/node_modules/@opentelemetry/api-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.214.0.tgz",
+ "integrity": "sha512-40lSJeqYO8Uz2Yj7u94/SJWE/wONa7rmMKjI1ZcIjgf3MHNHv1OZUCrCETGuaRF62d5pQD1wKIW+L4lmSMTzZA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-nestjs-core/node_modules/@opentelemetry/instrumentation": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.214.0.tgz",
+ "integrity": "sha512-MHqEX5Dk59cqVah5LiARMACku7jXSVk9iVDWOea4x3cr7VfdByeDCURK6o1lntT1JS/Tsovw01UJrBhN3/uC5w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "import-in-the-middle": "^3.0.0",
+ "require-in-the-middle": "^8.0.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-nestjs-core/node_modules/cjs-module-lexer": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.0.tgz",
+ "integrity": "sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-nestjs-core/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-nestjs-core/node_modules/import-in-the-middle": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-3.0.0.tgz",
+ "integrity": "sha512-OnGy+eYT7wVejH2XWgLRgbmzujhhVIATQH0ztIeRilwHBjTeG3pD+XnH3PKX0r9gJ0BuJmJ68q/oh9qgXnNDQg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "acorn": "^8.15.0",
+ "acorn-import-attributes": "^1.9.5",
+ "cjs-module-lexer": "^2.2.0",
+ "module-details-from-path": "^1.0.4"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-nestjs-core/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-nestjs-core/node_modules/require-in-the-middle": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-8.0.1.tgz",
+ "integrity": "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.3.5",
+ "module-details-from-path": "^1.0.3"
+ },
+ "engines": {
+ "node": ">=9.3.0 || >=8.10.0 <9.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-net": {
+ "version": "0.58.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-net/-/instrumentation-net-0.58.0.tgz",
+ "integrity": "sha512-NkvEqgt8etd4dwJ+KlKMBzf7SQd+TVVu5UlB1Rt8aOabZ7X3QWCnkgRzfXozAMkZJmUQ3KV4NsBI5nvmngNUdA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/instrumentation": "^0.214.0",
+ "@opentelemetry/semantic-conventions": "^1.33.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-net/node_modules/@opentelemetry/api-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.214.0.tgz",
+ "integrity": "sha512-40lSJeqYO8Uz2Yj7u94/SJWE/wONa7rmMKjI1ZcIjgf3MHNHv1OZUCrCETGuaRF62d5pQD1wKIW+L4lmSMTzZA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-net/node_modules/@opentelemetry/instrumentation": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.214.0.tgz",
+ "integrity": "sha512-MHqEX5Dk59cqVah5LiARMACku7jXSVk9iVDWOea4x3cr7VfdByeDCURK6o1lntT1JS/Tsovw01UJrBhN3/uC5w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "import-in-the-middle": "^3.0.0",
+ "require-in-the-middle": "^8.0.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-net/node_modules/cjs-module-lexer": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.0.tgz",
+ "integrity": "sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-net/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-net/node_modules/import-in-the-middle": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-3.0.0.tgz",
+ "integrity": "sha512-OnGy+eYT7wVejH2XWgLRgbmzujhhVIATQH0ztIeRilwHBjTeG3pD+XnH3PKX0r9gJ0BuJmJ68q/oh9qgXnNDQg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "acorn": "^8.15.0",
+ "acorn-import-attributes": "^1.9.5",
+ "cjs-module-lexer": "^2.2.0",
+ "module-details-from-path": "^1.0.4"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-net/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-net/node_modules/require-in-the-middle": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-8.0.1.tgz",
+ "integrity": "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.3.5",
+ "module-details-from-path": "^1.0.3"
+ },
+ "engines": {
+ "node": ">=9.3.0 || >=8.10.0 <9.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-openai": {
+ "version": "0.12.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-openai/-/instrumentation-openai-0.12.0.tgz",
+ "integrity": "sha512-HPEw6Zgk/6oMgO/azb7TuYziaU87FnaFTpd74MXqPk2YUhCcRFwT3YZywO/VQ0sjhDX/TqTPEMemTEPwuQNU4w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "^0.214.0",
+ "@opentelemetry/instrumentation": "^0.214.0",
+ "@opentelemetry/semantic-conventions": "^1.36.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-openai/node_modules/@opentelemetry/api-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.214.0.tgz",
+ "integrity": "sha512-40lSJeqYO8Uz2Yj7u94/SJWE/wONa7rmMKjI1ZcIjgf3MHNHv1OZUCrCETGuaRF62d5pQD1wKIW+L4lmSMTzZA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-openai/node_modules/@opentelemetry/instrumentation": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.214.0.tgz",
+ "integrity": "sha512-MHqEX5Dk59cqVah5LiARMACku7jXSVk9iVDWOea4x3cr7VfdByeDCURK6o1lntT1JS/Tsovw01UJrBhN3/uC5w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "import-in-the-middle": "^3.0.0",
+ "require-in-the-middle": "^8.0.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-openai/node_modules/cjs-module-lexer": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.0.tgz",
+ "integrity": "sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-openai/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-openai/node_modules/import-in-the-middle": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-3.0.0.tgz",
+ "integrity": "sha512-OnGy+eYT7wVejH2XWgLRgbmzujhhVIATQH0ztIeRilwHBjTeG3pD+XnH3PKX0r9gJ0BuJmJ68q/oh9qgXnNDQg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "acorn": "^8.15.0",
+ "acorn-import-attributes": "^1.9.5",
+ "cjs-module-lexer": "^2.2.0",
+ "module-details-from-path": "^1.0.4"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-openai/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-openai/node_modules/require-in-the-middle": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-8.0.1.tgz",
+ "integrity": "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.3.5",
+ "module-details-from-path": "^1.0.3"
+ },
+ "engines": {
+ "node": ">=9.3.0 || >=8.10.0 <9.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-oracledb": {
+ "version": "0.39.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-oracledb/-/instrumentation-oracledb-0.39.0.tgz",
+ "integrity": "sha512-CmRiX9Khbui9CQS3ZOOmf8RfXdmwSdVJAWQUk8S/gQqlm7xwK853rsP5T1GBSqGyntM9c2En3KpgRGvmk+LCvg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/instrumentation": "^0.214.0",
+ "@opentelemetry/semantic-conventions": "^1.34.0",
+ "@types/oracledb": "6.5.2"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-oracledb/node_modules/@opentelemetry/api-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.214.0.tgz",
+ "integrity": "sha512-40lSJeqYO8Uz2Yj7u94/SJWE/wONa7rmMKjI1ZcIjgf3MHNHv1OZUCrCETGuaRF62d5pQD1wKIW+L4lmSMTzZA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-oracledb/node_modules/@opentelemetry/instrumentation": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.214.0.tgz",
+ "integrity": "sha512-MHqEX5Dk59cqVah5LiARMACku7jXSVk9iVDWOea4x3cr7VfdByeDCURK6o1lntT1JS/Tsovw01UJrBhN3/uC5w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "import-in-the-middle": "^3.0.0",
+ "require-in-the-middle": "^8.0.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-oracledb/node_modules/cjs-module-lexer": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.0.tgz",
+ "integrity": "sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-oracledb/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-oracledb/node_modules/import-in-the-middle": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-3.0.0.tgz",
+ "integrity": "sha512-OnGy+eYT7wVejH2XWgLRgbmzujhhVIATQH0ztIeRilwHBjTeG3pD+XnH3PKX0r9gJ0BuJmJ68q/oh9qgXnNDQg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "acorn": "^8.15.0",
+ "acorn-import-attributes": "^1.9.5",
+ "cjs-module-lexer": "^2.2.0",
+ "module-details-from-path": "^1.0.4"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-oracledb/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-oracledb/node_modules/require-in-the-middle": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-8.0.1.tgz",
+ "integrity": "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.3.5",
+ "module-details-from-path": "^1.0.3"
+ },
+ "engines": {
+ "node": ">=9.3.0 || >=8.10.0 <9.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-pg": {
+ "version": "0.66.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-pg/-/instrumentation-pg-0.66.0.tgz",
+ "integrity": "sha512-KxfLGXBb7k2ueaPJfq2GXBDXBly8P+SpR/4Mj410hhNgmQF3sCqwXvUBQxZQkDAmsdBAoenM+yV1LhtsMRamcA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "^2.0.0",
+ "@opentelemetry/instrumentation": "^0.214.0",
+ "@opentelemetry/semantic-conventions": "^1.34.0",
+ "@opentelemetry/sql-common": "^0.41.2",
+ "@types/pg": "8.15.6",
+ "@types/pg-pool": "2.0.7"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-pg/node_modules/@opentelemetry/api-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.214.0.tgz",
+ "integrity": "sha512-40lSJeqYO8Uz2Yj7u94/SJWE/wONa7rmMKjI1ZcIjgf3MHNHv1OZUCrCETGuaRF62d5pQD1wKIW+L4lmSMTzZA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-pg/node_modules/@opentelemetry/instrumentation": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.214.0.tgz",
+ "integrity": "sha512-MHqEX5Dk59cqVah5LiARMACku7jXSVk9iVDWOea4x3cr7VfdByeDCURK6o1lntT1JS/Tsovw01UJrBhN3/uC5w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "import-in-the-middle": "^3.0.0",
+ "require-in-the-middle": "^8.0.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-pg/node_modules/cjs-module-lexer": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.0.tgz",
+ "integrity": "sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-pg/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-pg/node_modules/import-in-the-middle": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-3.0.0.tgz",
+ "integrity": "sha512-OnGy+eYT7wVejH2XWgLRgbmzujhhVIATQH0ztIeRilwHBjTeG3pD+XnH3PKX0r9gJ0BuJmJ68q/oh9qgXnNDQg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "acorn": "^8.15.0",
+ "acorn-import-attributes": "^1.9.5",
+ "cjs-module-lexer": "^2.2.0",
+ "module-details-from-path": "^1.0.4"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-pg/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-pg/node_modules/require-in-the-middle": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-8.0.1.tgz",
+ "integrity": "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.3.5",
+ "module-details-from-path": "^1.0.3"
+ },
+ "engines": {
+ "node": ">=9.3.0 || >=8.10.0 <9.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-pino": {
+ "version": "0.60.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-pino/-/instrumentation-pino-0.60.0.tgz",
+ "integrity": "sha512-B36CgHiloKjkFlXkyh3qb4E/KNdnQiO6q8NqKBjYayvvZodshnvz5kPyaV+Fk0N30NwOHn/JgmO1x5tcjYtUvQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "^0.214.0",
+ "@opentelemetry/core": "^2.0.0",
+ "@opentelemetry/instrumentation": "^0.214.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-pino/node_modules/@opentelemetry/api-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.214.0.tgz",
+ "integrity": "sha512-40lSJeqYO8Uz2Yj7u94/SJWE/wONa7rmMKjI1ZcIjgf3MHNHv1OZUCrCETGuaRF62d5pQD1wKIW+L4lmSMTzZA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-pino/node_modules/@opentelemetry/instrumentation": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.214.0.tgz",
+ "integrity": "sha512-MHqEX5Dk59cqVah5LiARMACku7jXSVk9iVDWOea4x3cr7VfdByeDCURK6o1lntT1JS/Tsovw01UJrBhN3/uC5w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "import-in-the-middle": "^3.0.0",
+ "require-in-the-middle": "^8.0.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-pino/node_modules/cjs-module-lexer": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.0.tgz",
+ "integrity": "sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-pino/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-pino/node_modules/import-in-the-middle": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-3.0.0.tgz",
+ "integrity": "sha512-OnGy+eYT7wVejH2XWgLRgbmzujhhVIATQH0ztIeRilwHBjTeG3pD+XnH3PKX0r9gJ0BuJmJ68q/oh9qgXnNDQg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "acorn": "^8.15.0",
+ "acorn-import-attributes": "^1.9.5",
+ "cjs-module-lexer": "^2.2.0",
+ "module-details-from-path": "^1.0.4"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-pino/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-pino/node_modules/require-in-the-middle": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-8.0.1.tgz",
+ "integrity": "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.3.5",
+ "module-details-from-path": "^1.0.3"
+ },
+ "engines": {
+ "node": ">=9.3.0 || >=8.10.0 <9.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-redis": {
+ "version": "0.62.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-redis/-/instrumentation-redis-0.62.0.tgz",
+ "integrity": "sha512-y3pPpot7WzR/8JtHcYlTYsyY8g+pbFhAqbwAuG5bLPnR6v6pt1rQc0DpH0OlGP/9CZbWBP+Zhwp9yFoygf/ZXQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/instrumentation": "^0.214.0",
+ "@opentelemetry/redis-common": "^0.38.2",
+ "@opentelemetry/semantic-conventions": "^1.27.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-redis/node_modules/@opentelemetry/api-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.214.0.tgz",
+ "integrity": "sha512-40lSJeqYO8Uz2Yj7u94/SJWE/wONa7rmMKjI1ZcIjgf3MHNHv1OZUCrCETGuaRF62d5pQD1wKIW+L4lmSMTzZA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-redis/node_modules/@opentelemetry/instrumentation": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.214.0.tgz",
+ "integrity": "sha512-MHqEX5Dk59cqVah5LiARMACku7jXSVk9iVDWOea4x3cr7VfdByeDCURK6o1lntT1JS/Tsovw01UJrBhN3/uC5w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "import-in-the-middle": "^3.0.0",
+ "require-in-the-middle": "^8.0.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-redis/node_modules/cjs-module-lexer": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.0.tgz",
+ "integrity": "sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-redis/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-redis/node_modules/import-in-the-middle": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-3.0.0.tgz",
+ "integrity": "sha512-OnGy+eYT7wVejH2XWgLRgbmzujhhVIATQH0ztIeRilwHBjTeG3pD+XnH3PKX0r9gJ0BuJmJ68q/oh9qgXnNDQg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "acorn": "^8.15.0",
+ "acorn-import-attributes": "^1.9.5",
+ "cjs-module-lexer": "^2.2.0",
+ "module-details-from-path": "^1.0.4"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-redis/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-redis/node_modules/require-in-the-middle": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-8.0.1.tgz",
+ "integrity": "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.3.5",
+ "module-details-from-path": "^1.0.3"
+ },
+ "engines": {
+ "node": ">=9.3.0 || >=8.10.0 <9.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-restify": {
+ "version": "0.59.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-restify/-/instrumentation-restify-0.59.0.tgz",
+ "integrity": "sha512-zQ8M7acaHR3STolma45wLqleYJdRMs+cuVtyVgHSBZusyv6FTDxQs8sGVfvitmxThUATo/xlbXSUEwEO/itgLg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "^2.0.0",
+ "@opentelemetry/instrumentation": "^0.214.0",
+ "@opentelemetry/semantic-conventions": "^1.27.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-restify/node_modules/@opentelemetry/api-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.214.0.tgz",
+ "integrity": "sha512-40lSJeqYO8Uz2Yj7u94/SJWE/wONa7rmMKjI1ZcIjgf3MHNHv1OZUCrCETGuaRF62d5pQD1wKIW+L4lmSMTzZA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-restify/node_modules/@opentelemetry/instrumentation": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.214.0.tgz",
+ "integrity": "sha512-MHqEX5Dk59cqVah5LiARMACku7jXSVk9iVDWOea4x3cr7VfdByeDCURK6o1lntT1JS/Tsovw01UJrBhN3/uC5w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "import-in-the-middle": "^3.0.0",
+ "require-in-the-middle": "^8.0.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-restify/node_modules/cjs-module-lexer": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.0.tgz",
+ "integrity": "sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-restify/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-restify/node_modules/import-in-the-middle": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-3.0.0.tgz",
+ "integrity": "sha512-OnGy+eYT7wVejH2XWgLRgbmzujhhVIATQH0ztIeRilwHBjTeG3pD+XnH3PKX0r9gJ0BuJmJ68q/oh9qgXnNDQg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "acorn": "^8.15.0",
+ "acorn-import-attributes": "^1.9.5",
+ "cjs-module-lexer": "^2.2.0",
+ "module-details-from-path": "^1.0.4"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-restify/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-restify/node_modules/require-in-the-middle": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-8.0.1.tgz",
+ "integrity": "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.3.5",
+ "module-details-from-path": "^1.0.3"
+ },
+ "engines": {
+ "node": ">=9.3.0 || >=8.10.0 <9.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-router": {
+ "version": "0.58.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-router/-/instrumentation-router-0.58.0.tgz",
+ "integrity": "sha512-0txTRUeQn+nDofZ0hQ1i4DuNURA7DnewfxcdmwfA0LMFNY1DZsr47vm6yfEezkii3eIGW+lubipjPYawxXYwzw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/instrumentation": "^0.214.0",
+ "@opentelemetry/semantic-conventions": "^1.27.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-router/node_modules/@opentelemetry/api-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.214.0.tgz",
+ "integrity": "sha512-40lSJeqYO8Uz2Yj7u94/SJWE/wONa7rmMKjI1ZcIjgf3MHNHv1OZUCrCETGuaRF62d5pQD1wKIW+L4lmSMTzZA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-router/node_modules/@opentelemetry/instrumentation": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.214.0.tgz",
+ "integrity": "sha512-MHqEX5Dk59cqVah5LiARMACku7jXSVk9iVDWOea4x3cr7VfdByeDCURK6o1lntT1JS/Tsovw01UJrBhN3/uC5w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "import-in-the-middle": "^3.0.0",
+ "require-in-the-middle": "^8.0.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-router/node_modules/cjs-module-lexer": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.0.tgz",
+ "integrity": "sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-router/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-router/node_modules/import-in-the-middle": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-3.0.0.tgz",
+ "integrity": "sha512-OnGy+eYT7wVejH2XWgLRgbmzujhhVIATQH0ztIeRilwHBjTeG3pD+XnH3PKX0r9gJ0BuJmJ68q/oh9qgXnNDQg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "acorn": "^8.15.0",
+ "acorn-import-attributes": "^1.9.5",
+ "cjs-module-lexer": "^2.2.0",
+ "module-details-from-path": "^1.0.4"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-router/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-router/node_modules/require-in-the-middle": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-8.0.1.tgz",
+ "integrity": "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.3.5",
+ "module-details-from-path": "^1.0.3"
+ },
+ "engines": {
+ "node": ">=9.3.0 || >=8.10.0 <9.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-runtime-node": {
+ "version": "0.27.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-runtime-node/-/instrumentation-runtime-node-0.27.0.tgz",
+ "integrity": "sha512-5S/Xd03scYSSZX3Pg6qfxIgpq2CCUIqBoJPnIgE41NM1tLiCm9zplQw6+699Uhj97mIthBHsGTwgdJCBc1vzkg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/instrumentation": "^0.214.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-runtime-node/node_modules/@opentelemetry/api-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.214.0.tgz",
+ "integrity": "sha512-40lSJeqYO8Uz2Yj7u94/SJWE/wONa7rmMKjI1ZcIjgf3MHNHv1OZUCrCETGuaRF62d5pQD1wKIW+L4lmSMTzZA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-runtime-node/node_modules/@opentelemetry/instrumentation": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.214.0.tgz",
+ "integrity": "sha512-MHqEX5Dk59cqVah5LiARMACku7jXSVk9iVDWOea4x3cr7VfdByeDCURK6o1lntT1JS/Tsovw01UJrBhN3/uC5w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "import-in-the-middle": "^3.0.0",
+ "require-in-the-middle": "^8.0.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-runtime-node/node_modules/cjs-module-lexer": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.0.tgz",
+ "integrity": "sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-runtime-node/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-runtime-node/node_modules/import-in-the-middle": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-3.0.0.tgz",
+ "integrity": "sha512-OnGy+eYT7wVejH2XWgLRgbmzujhhVIATQH0ztIeRilwHBjTeG3pD+XnH3PKX0r9gJ0BuJmJ68q/oh9qgXnNDQg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "acorn": "^8.15.0",
+ "acorn-import-attributes": "^1.9.5",
+ "cjs-module-lexer": "^2.2.0",
+ "module-details-from-path": "^1.0.4"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-runtime-node/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-runtime-node/node_modules/require-in-the-middle": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-8.0.1.tgz",
+ "integrity": "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.3.5",
+ "module-details-from-path": "^1.0.3"
+ },
+ "engines": {
+ "node": ">=9.3.0 || >=8.10.0 <9.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-socket.io": {
+ "version": "0.61.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-socket.io/-/instrumentation-socket.io-0.61.0.tgz",
+ "integrity": "sha512-/yhFfR/iW8nf+sgHn5KLiPauF//rTP7a/Hxcl/khgXzbVPsT1AhRvJ8HbPvNVWrJqki52ztucuEFeO00DcncyQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/instrumentation": "^0.214.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-socket.io/node_modules/@opentelemetry/api-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.214.0.tgz",
+ "integrity": "sha512-40lSJeqYO8Uz2Yj7u94/SJWE/wONa7rmMKjI1ZcIjgf3MHNHv1OZUCrCETGuaRF62d5pQD1wKIW+L4lmSMTzZA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-socket.io/node_modules/@opentelemetry/instrumentation": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.214.0.tgz",
+ "integrity": "sha512-MHqEX5Dk59cqVah5LiARMACku7jXSVk9iVDWOea4x3cr7VfdByeDCURK6o1lntT1JS/Tsovw01UJrBhN3/uC5w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "import-in-the-middle": "^3.0.0",
+ "require-in-the-middle": "^8.0.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-socket.io/node_modules/cjs-module-lexer": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.0.tgz",
+ "integrity": "sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-socket.io/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-socket.io/node_modules/import-in-the-middle": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-3.0.0.tgz",
+ "integrity": "sha512-OnGy+eYT7wVejH2XWgLRgbmzujhhVIATQH0ztIeRilwHBjTeG3pD+XnH3PKX0r9gJ0BuJmJ68q/oh9qgXnNDQg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "acorn": "^8.15.0",
+ "acorn-import-attributes": "^1.9.5",
+ "cjs-module-lexer": "^2.2.0",
+ "module-details-from-path": "^1.0.4"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-socket.io/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-socket.io/node_modules/require-in-the-middle": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-8.0.1.tgz",
+ "integrity": "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.3.5",
+ "module-details-from-path": "^1.0.3"
+ },
+ "engines": {
+ "node": ">=9.3.0 || >=8.10.0 <9.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-tedious": {
+ "version": "0.33.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-tedious/-/instrumentation-tedious-0.33.0.tgz",
+ "integrity": "sha512-Q6WQwAD01MMTub31GlejoiFACYNw26J426wyjvU7by7fDIr2nZXNW4vhTGs7i7F0TnXBO3xN688g1tdUgYwJ5w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/instrumentation": "^0.214.0",
+ "@opentelemetry/semantic-conventions": "^1.33.0",
+ "@types/tedious": "^4.0.14"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-tedious/node_modules/@opentelemetry/api-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.214.0.tgz",
+ "integrity": "sha512-40lSJeqYO8Uz2Yj7u94/SJWE/wONa7rmMKjI1ZcIjgf3MHNHv1OZUCrCETGuaRF62d5pQD1wKIW+L4lmSMTzZA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-tedious/node_modules/@opentelemetry/instrumentation": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.214.0.tgz",
+ "integrity": "sha512-MHqEX5Dk59cqVah5LiARMACku7jXSVk9iVDWOea4x3cr7VfdByeDCURK6o1lntT1JS/Tsovw01UJrBhN3/uC5w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "import-in-the-middle": "^3.0.0",
+ "require-in-the-middle": "^8.0.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-tedious/node_modules/cjs-module-lexer": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.0.tgz",
+ "integrity": "sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-tedious/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-tedious/node_modules/import-in-the-middle": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-3.0.0.tgz",
+ "integrity": "sha512-OnGy+eYT7wVejH2XWgLRgbmzujhhVIATQH0ztIeRilwHBjTeG3pD+XnH3PKX0r9gJ0BuJmJ68q/oh9qgXnNDQg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "acorn": "^8.15.0",
+ "acorn-import-attributes": "^1.9.5",
+ "cjs-module-lexer": "^2.2.0",
+ "module-details-from-path": "^1.0.4"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-tedious/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-tedious/node_modules/require-in-the-middle": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-8.0.1.tgz",
+ "integrity": "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.3.5",
+ "module-details-from-path": "^1.0.3"
+ },
+ "engines": {
+ "node": ">=9.3.0 || >=8.10.0 <9.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-undici": {
+ "version": "0.24.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-undici/-/instrumentation-undici-0.24.0.tgz",
+ "integrity": "sha512-oKzZ3uvqP17sV0EsoQcJgjEfIp0kiZRbYu/eD8p13Cbahumf8lb/xpYeNr/hfAJ4owzEtIDcGIjprfLcYbIKBQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "^2.0.0",
+ "@opentelemetry/instrumentation": "^0.214.0",
+ "@opentelemetry/semantic-conventions": "^1.24.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.7.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-undici/node_modules/@opentelemetry/api-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.214.0.tgz",
+ "integrity": "sha512-40lSJeqYO8Uz2Yj7u94/SJWE/wONa7rmMKjI1ZcIjgf3MHNHv1OZUCrCETGuaRF62d5pQD1wKIW+L4lmSMTzZA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-undici/node_modules/@opentelemetry/instrumentation": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.214.0.tgz",
+ "integrity": "sha512-MHqEX5Dk59cqVah5LiARMACku7jXSVk9iVDWOea4x3cr7VfdByeDCURK6o1lntT1JS/Tsovw01UJrBhN3/uC5w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "import-in-the-middle": "^3.0.0",
+ "require-in-the-middle": "^8.0.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-undici/node_modules/cjs-module-lexer": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.0.tgz",
+ "integrity": "sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-undici/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-undici/node_modules/import-in-the-middle": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-3.0.0.tgz",
+ "integrity": "sha512-OnGy+eYT7wVejH2XWgLRgbmzujhhVIATQH0ztIeRilwHBjTeG3pD+XnH3PKX0r9gJ0BuJmJ68q/oh9qgXnNDQg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "acorn": "^8.15.0",
+ "acorn-import-attributes": "^1.9.5",
+ "cjs-module-lexer": "^2.2.0",
+ "module-details-from-path": "^1.0.4"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-undici/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-undici/node_modules/require-in-the-middle": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-8.0.1.tgz",
+ "integrity": "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.3.5",
+ "module-details-from-path": "^1.0.3"
+ },
+ "engines": {
+ "node": ">=9.3.0 || >=8.10.0 <9.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-winston": {
+ "version": "0.58.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-winston/-/instrumentation-winston-0.58.0.tgz",
+ "integrity": "sha512-v64eFPrWG7u2xZzU/Zz/jbMIL4etoLrqGqeLyVIW2rxwzp2QriGZEk90Xt2p7Yo/WBbTnl5nuruIinhNG406IA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "^0.214.0",
+ "@opentelemetry/instrumentation": "^0.214.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-winston/node_modules/@opentelemetry/api-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.214.0.tgz",
+ "integrity": "sha512-40lSJeqYO8Uz2Yj7u94/SJWE/wONa7rmMKjI1ZcIjgf3MHNHv1OZUCrCETGuaRF62d5pQD1wKIW+L4lmSMTzZA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-winston/node_modules/@opentelemetry/instrumentation": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.214.0.tgz",
+ "integrity": "sha512-MHqEX5Dk59cqVah5LiARMACku7jXSVk9iVDWOea4x3cr7VfdByeDCURK6o1lntT1JS/Tsovw01UJrBhN3/uC5w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "import-in-the-middle": "^3.0.0",
+ "require-in-the-middle": "^8.0.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-winston/node_modules/cjs-module-lexer": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.0.tgz",
+ "integrity": "sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-winston/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-winston/node_modules/import-in-the-middle": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-3.0.0.tgz",
+ "integrity": "sha512-OnGy+eYT7wVejH2XWgLRgbmzujhhVIATQH0ztIeRilwHBjTeG3pD+XnH3PKX0r9gJ0BuJmJ68q/oh9qgXnNDQg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "acorn": "^8.15.0",
+ "acorn-import-attributes": "^1.9.5",
+ "cjs-module-lexer": "^2.2.0",
+ "module-details-from-path": "^1.0.4"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@opentelemetry/instrumentation-winston/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/instrumentation-winston/node_modules/require-in-the-middle": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-8.0.1.tgz",
+ "integrity": "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.3.5",
+ "module-details-from-path": "^1.0.3"
+ },
+ "engines": {
+ "node": ">=9.3.0 || >=8.10.0 <9.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/otlp-exporter-base": {
+ "version": "0.203.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.203.0.tgz",
+ "integrity": "sha512-Wbxf7k+87KyvxFr5D7uOiSq/vHXWommvdnNE7vECO3tAhsA2GfOlpWINCMWUEPdHZ7tCXxw6Epp3vgx3jU7llQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.0.1",
+ "@opentelemetry/otlp-transformer": "0.203.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/otlp-grpc-exporter-base": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-grpc-exporter-base/-/otlp-grpc-exporter-base-0.214.0.tgz",
+ "integrity": "sha512-IDP6zcyA24RhNZ289MP6eToIZcinlmirHjX8v3zKCQ2ZhPpt5cGwkN91tCth337lqHIgWcTy90uKRiX/SzALDw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@grpc/grpc-js": "^1.14.3",
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/otlp-exporter-base": "0.214.0",
+ "@opentelemetry/otlp-transformer": "0.214.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/otlp-grpc-exporter-base/node_modules/@opentelemetry/api-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.214.0.tgz",
+ "integrity": "sha512-40lSJeqYO8Uz2Yj7u94/SJWE/wONa7rmMKjI1ZcIjgf3MHNHv1OZUCrCETGuaRF62d5pQD1wKIW+L4lmSMTzZA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/otlp-grpc-exporter-base/node_modules/@opentelemetry/core": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.6.1.tgz",
+ "integrity": "sha512-8xHSGWpJP9wBxgBpnqGL0R3PbdWQndL1Qp50qrg71+B28zK5OQmUgcDKLJgzyAAV38t4tOyLMGDD60LneR5W8g==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.0.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/otlp-grpc-exporter-base/node_modules/@opentelemetry/otlp-exporter-base": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.214.0.tgz",
+ "integrity": "sha512-u1Gdv0/E9wP+apqWf7Wv2npXmgJtxsW2XL0TEv9FZloTZRuMBKmu8cYVXwS4Hm3q/f/3FuCnPTgiwYvIqRSpRg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/otlp-transformer": "0.214.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/otlp-grpc-exporter-base/node_modules/@opentelemetry/otlp-transformer": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.214.0.tgz",
+ "integrity": "sha512-DSaYcuBRh6uozfsWN3R8HsN0yDhCuWP7tOFdkUOVaWD1KVJg8m4qiLUsg/tNhTLS9HUYUcwNpwL2eroLtsZZ/w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/resources": "2.6.1",
+ "@opentelemetry/sdk-logs": "0.214.0",
+ "@opentelemetry/sdk-metrics": "2.6.1",
+ "@opentelemetry/sdk-trace-base": "2.6.1",
+ "protobufjs": "^7.0.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/otlp-grpc-exporter-base/node_modules/@opentelemetry/resources": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.6.1.tgz",
+ "integrity": "sha512-lID/vxSuKWXM55XhAKNoYXu9Cutoq5hFdkbTdI/zDKQktXzcWBVhNsOkiZFTMU9UtEWuGRNe0HUgmsFldIdxVA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.3.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/otlp-grpc-exporter-base/node_modules/@opentelemetry/sdk-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.214.0.tgz",
+ "integrity": "sha512-zf6acnScjhsaBUU22zXZ/sLWim1dfhUAbGXdMmHmNG3LfBnQ3DKsOCITb2IZwoUsNNMTogqFKBnlIPPftUgGwA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/resources": "2.6.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.4.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/otlp-grpc-exporter-base/node_modules/@opentelemetry/sdk-metrics": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-2.6.1.tgz",
+ "integrity": "sha512-9t9hJHX15meBy2NmTJxL+NJfXmnausR2xUDvE19XQce0Qi/GBtDGamU8nS1RMbdgDmhgpm3VaOu2+fiS/SfTpQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/resources": "2.6.1"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.9.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/otlp-grpc-exporter-base/node_modules/@opentelemetry/sdk-trace-base": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.6.1.tgz",
+ "integrity": "sha512-r86ut4T1e8vNwB35CqCcKd45yzqH6/6Wzvpk2/cZB8PsPLlZFTvrh8yfOS3CYZYcUmAx4hHTZJ8AO8Dj8nrdhw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/resources": "2.6.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.3.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/otlp-transformer": {
+ "version": "0.203.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.203.0.tgz",
+ "integrity": "sha512-Y8I6GgoCna0qDQ2W6GCRtaF24SnvqvA8OfeTi7fqigD23u8Jpb4R5KFv/pRvrlGagcCLICMIyh9wiejp4TXu/A==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.203.0",
+ "@opentelemetry/core": "2.0.1",
+ "@opentelemetry/resources": "2.0.1",
+ "@opentelemetry/sdk-logs": "0.203.0",
+ "@opentelemetry/sdk-metrics": "2.0.1",
+ "@opentelemetry/sdk-trace-base": "2.0.1",
+ "protobufjs": "^7.3.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/propagator-b3": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-b3/-/propagator-b3-2.6.1.tgz",
+ "integrity": "sha512-Dvz9TA6cPqIbxolSzQ5x9br6iQlqdGhVYrm+oYc7pfJ7LaVXz8F0XIqhWbnKB5YvfZ6SUmabBUUxnvHs/9uhxA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.6.1"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.0.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/core": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.6.1.tgz",
+ "integrity": "sha512-8xHSGWpJP9wBxgBpnqGL0R3PbdWQndL1Qp50qrg71+B28zK5OQmUgcDKLJgzyAAV38t4tOyLMGDD60LneR5W8g==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.0.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/propagator-jaeger": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-jaeger/-/propagator-jaeger-2.6.1.tgz",
+ "integrity": "sha512-kKFMxBcjBZAC1vBch5mtZ/dJQvcAEKWga+c+q5iGgRLPIE6Mc649zEwMaCIQCzalziMJQiyUadFYMHmELB7AFw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.6.1"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.0.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/propagator-jaeger/node_modules/@opentelemetry/core": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.6.1.tgz",
+ "integrity": "sha512-8xHSGWpJP9wBxgBpnqGL0R3PbdWQndL1Qp50qrg71+B28zK5OQmUgcDKLJgzyAAV38t4tOyLMGDD60LneR5W8g==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.0.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/redis-common": {
+ "version": "0.38.2",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/redis-common/-/redis-common-0.38.2.tgz",
+ "integrity": "sha512-1BCcU93iwSRZvDAgwUxC/DV4T/406SkMfxGqu5ojc3AvNI+I9GhV7v0J1HljsczuuhcnFLYqD5VmwVXfCGHzxA==",
+ "license": "Apache-2.0",
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ }
+ },
+ "node_modules/@opentelemetry/resource-detector-alibaba-cloud": {
+ "version": "0.33.4",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/resource-detector-alibaba-cloud/-/resource-detector-alibaba-cloud-0.33.4.tgz",
+ "integrity": "sha512-S07KBOB3+BHV0xjuN4sCRP7x44p2rW0ieGDzoRu1f8Sbvw9Gw4f1oL83tfXiOb0fGPVt8DF4P+39UcggHQsACA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "^2.0.0",
+ "@opentelemetry/resources": "^2.0.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/resource-detector-aws": {
+ "version": "2.14.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/resource-detector-aws/-/resource-detector-aws-2.14.0.tgz",
+ "integrity": "sha512-1a0YMG6wZuLUfwkSgfe77vN60V5SmK//kM+JsQFT7dOKLyFvpN5A+TpX/eFdaqnhg89CxyF7XpKMBbg1DGv5bw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "^2.0.0",
+ "@opentelemetry/resources": "^2.0.0",
+ "@opentelemetry/semantic-conventions": "^1.27.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/resource-detector-azure": {
+ "version": "0.22.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/resource-detector-azure/-/resource-detector-azure-0.22.0.tgz",
+ "integrity": "sha512-/cYJBFACVqPSWNFU2gdx/wh8kB98YK4dyIhWh1IU2z1iFDrLHpwVjEIS8xLazSqJDntTTqeb8GVSlUlPF3B1pg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "^2.0.0",
+ "@opentelemetry/resources": "^2.0.0",
+ "@opentelemetry/semantic-conventions": "^1.37.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/resource-detector-container": {
+ "version": "0.8.5",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/resource-detector-container/-/resource-detector-container-0.8.5.tgz",
+ "integrity": "sha512-vWlfpiCHKWVrT/3EHgJfRLGX8ghVsEZ6CBHhJo5sAQQnwInDNcXjbBJm74Jiyqt0eg7NLeT0EfpXHCUSeYgFaA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "^2.0.0",
+ "@opentelemetry/resources": "^2.0.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/resource-detector-gcp": {
+ "version": "0.49.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/resource-detector-gcp/-/resource-detector-gcp-0.49.0.tgz",
+ "integrity": "sha512-JP4wrArxUBEGUCfd4SijKJXjspVs/3/eGH6siIlaVdRwf0XLEi4lXI+MdQuWSo4L4sEUCj6igojYzsuHZiuWDA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "^2.0.0",
+ "@opentelemetry/resources": "^2.0.0",
+ "gcp-metadata": "^8.0.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/resources": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.0.1.tgz",
+ "integrity": "sha512-dZOB3R6zvBwDKnHDTB4X1xtMArB/d324VsbiPkX/Yu0Q8T2xceRthoIVFhJdvgVM2QhGVUyX9tzwiNxGtoBJUw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.0.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.3.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/sdk-logs": {
+ "version": "0.203.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.203.0.tgz",
+ "integrity": "sha512-vM2+rPq0Vi3nYA5akQD2f3QwossDnTDLvKbea6u/A2NZ3XDkPxMfo/PNrDoXhDUD/0pPo2CdH5ce/thn9K0kLw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.203.0",
+ "@opentelemetry/core": "2.0.1",
+ "@opentelemetry/resources": "2.0.1"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.4.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/sdk-metrics": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-2.0.1.tgz",
+ "integrity": "sha512-wf8OaJoSnujMAHWR3g+/hGvNcsC16rf9s1So4JlMiFaFHiE4HpIA3oUh+uWZQ7CNuK8gVW/pQSkgoa5HkkOl0g==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.0.1",
+ "@opentelemetry/resources": "2.0.1"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.9.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/sdk-node": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-node/-/sdk-node-0.214.0.tgz",
+ "integrity": "sha512-gl2XvQBJuPjhGcw9SsnQO5qxChAPMuGRPFaD8lqtF+Cey91NgGUQ0sio2vlDFOSm3JOLzc44vL+OAfx1dXuZjg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "@opentelemetry/configuration": "0.214.0",
+ "@opentelemetry/context-async-hooks": "2.6.1",
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/exporter-logs-otlp-grpc": "0.214.0",
+ "@opentelemetry/exporter-logs-otlp-http": "0.214.0",
+ "@opentelemetry/exporter-logs-otlp-proto": "0.214.0",
+ "@opentelemetry/exporter-metrics-otlp-grpc": "0.214.0",
+ "@opentelemetry/exporter-metrics-otlp-http": "0.214.0",
+ "@opentelemetry/exporter-metrics-otlp-proto": "0.214.0",
+ "@opentelemetry/exporter-prometheus": "0.214.0",
+ "@opentelemetry/exporter-trace-otlp-grpc": "0.214.0",
+ "@opentelemetry/exporter-trace-otlp-http": "0.214.0",
+ "@opentelemetry/exporter-trace-otlp-proto": "0.214.0",
+ "@opentelemetry/exporter-zipkin": "2.6.1",
+ "@opentelemetry/instrumentation": "0.214.0",
+ "@opentelemetry/otlp-exporter-base": "0.214.0",
+ "@opentelemetry/propagator-b3": "2.6.1",
+ "@opentelemetry/propagator-jaeger": "2.6.1",
+ "@opentelemetry/resources": "2.6.1",
+ "@opentelemetry/sdk-logs": "0.214.0",
+ "@opentelemetry/sdk-metrics": "2.6.1",
+ "@opentelemetry/sdk-trace-base": "2.6.1",
+ "@opentelemetry/sdk-trace-node": "2.6.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.3.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/sdk-node/node_modules/@opentelemetry/api-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.214.0.tgz",
+ "integrity": "sha512-40lSJeqYO8Uz2Yj7u94/SJWE/wONa7rmMKjI1ZcIjgf3MHNHv1OZUCrCETGuaRF62d5pQD1wKIW+L4lmSMTzZA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/sdk-node/node_modules/@opentelemetry/context-async-hooks": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/context-async-hooks/-/context-async-hooks-2.6.1.tgz",
+ "integrity": "sha512-XHzhwRNkBpeP8Fs/qjGrAf9r9PRv67wkJQ/7ZPaBQQ68DYlTBBx5MF9LvPx7mhuXcDessKK2b+DcxqwpgkcivQ==",
+ "license": "Apache-2.0",
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.0.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/sdk-node/node_modules/@opentelemetry/core": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.6.1.tgz",
+ "integrity": "sha512-8xHSGWpJP9wBxgBpnqGL0R3PbdWQndL1Qp50qrg71+B28zK5OQmUgcDKLJgzyAAV38t4tOyLMGDD60LneR5W8g==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.0.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/sdk-node/node_modules/@opentelemetry/exporter-logs-otlp-http": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-logs-otlp-http/-/exporter-logs-otlp-http-0.214.0.tgz",
+ "integrity": "sha512-9qv2Tl/Hq6qc5pJCbzFJnzA0uvlb9DgM70yGJPYf3bA5LlLkRCpcn81i4JbcIH4grlQIWY6A+W7YG0LLvS1BAw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/otlp-exporter-base": "0.214.0",
+ "@opentelemetry/otlp-transformer": "0.214.0",
+ "@opentelemetry/sdk-logs": "0.214.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/sdk-node/node_modules/@opentelemetry/exporter-trace-otlp-http": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-http/-/exporter-trace-otlp-http-0.214.0.tgz",
+ "integrity": "sha512-kIN8nTBMgV2hXzV/a20BCFilPZdAIMYYJGSgfMMRm/Xa+07y5hRDS2Vm12A/z8Cdu3Sq++ZvJfElokX2rkgGgw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/otlp-exporter-base": "0.214.0",
+ "@opentelemetry/otlp-transformer": "0.214.0",
+ "@opentelemetry/resources": "2.6.1",
+ "@opentelemetry/sdk-trace-base": "2.6.1"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/sdk-node/node_modules/@opentelemetry/instrumentation": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.214.0.tgz",
+ "integrity": "sha512-MHqEX5Dk59cqVah5LiARMACku7jXSVk9iVDWOea4x3cr7VfdByeDCURK6o1lntT1JS/Tsovw01UJrBhN3/uC5w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "import-in-the-middle": "^3.0.0",
+ "require-in-the-middle": "^8.0.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/sdk-node/node_modules/@opentelemetry/otlp-exporter-base": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.214.0.tgz",
+ "integrity": "sha512-u1Gdv0/E9wP+apqWf7Wv2npXmgJtxsW2XL0TEv9FZloTZRuMBKmu8cYVXwS4Hm3q/f/3FuCnPTgiwYvIqRSpRg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/otlp-transformer": "0.214.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/sdk-node/node_modules/@opentelemetry/otlp-transformer": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.214.0.tgz",
+ "integrity": "sha512-DSaYcuBRh6uozfsWN3R8HsN0yDhCuWP7tOFdkUOVaWD1KVJg8m4qiLUsg/tNhTLS9HUYUcwNpwL2eroLtsZZ/w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/resources": "2.6.1",
+ "@opentelemetry/sdk-logs": "0.214.0",
+ "@opentelemetry/sdk-metrics": "2.6.1",
+ "@opentelemetry/sdk-trace-base": "2.6.1",
+ "protobufjs": "^7.0.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/sdk-node/node_modules/@opentelemetry/resources": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.6.1.tgz",
+ "integrity": "sha512-lID/vxSuKWXM55XhAKNoYXu9Cutoq5hFdkbTdI/zDKQktXzcWBVhNsOkiZFTMU9UtEWuGRNe0HUgmsFldIdxVA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.3.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/sdk-node/node_modules/@opentelemetry/sdk-logs": {
+ "version": "0.214.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.214.0.tgz",
+ "integrity": "sha512-zf6acnScjhsaBUU22zXZ/sLWim1dfhUAbGXdMmHmNG3LfBnQ3DKsOCITb2IZwoUsNNMTogqFKBnlIPPftUgGwA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.214.0",
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/resources": "2.6.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.4.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/sdk-node/node_modules/@opentelemetry/sdk-metrics": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-2.6.1.tgz",
+ "integrity": "sha512-9t9hJHX15meBy2NmTJxL+NJfXmnausR2xUDvE19XQce0Qi/GBtDGamU8nS1RMbdgDmhgpm3VaOu2+fiS/SfTpQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/resources": "2.6.1"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.9.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/sdk-node/node_modules/@opentelemetry/sdk-trace-base": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.6.1.tgz",
+ "integrity": "sha512-r86ut4T1e8vNwB35CqCcKd45yzqH6/6Wzvpk2/cZB8PsPLlZFTvrh8yfOS3CYZYcUmAx4hHTZJ8AO8Dj8nrdhw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/resources": "2.6.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.3.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/sdk-node/node_modules/@opentelemetry/sdk-trace-node": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-node/-/sdk-trace-node-2.6.1.tgz",
+ "integrity": "sha512-Hh2i4FwHWRFhnO2Q/p6svMxy8MPsNCG0uuzUY3glqm0rwM0nQvbTO1dXSp9OqQoTKXcQzaz9q1f65fsurmOhNw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/context-async-hooks": "2.6.1",
+ "@opentelemetry/core": "2.6.1",
+ "@opentelemetry/sdk-trace-base": "2.6.1"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.0.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/sdk-node/node_modules/cjs-module-lexer": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.0.tgz",
+ "integrity": "sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/sdk-node/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
},
- "peerDependencies": {
- "@opentelemetry/api": ">=1.3.0 <1.10.0"
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
}
},
- "node_modules/@opentelemetry/sdk-logs": {
- "version": "0.203.0",
- "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.203.0.tgz",
- "integrity": "sha512-vM2+rPq0Vi3nYA5akQD2f3QwossDnTDLvKbea6u/A2NZ3XDkPxMfo/PNrDoXhDUD/0pPo2CdH5ce/thn9K0kLw==",
+ "node_modules/@opentelemetry/sdk-node/node_modules/import-in-the-middle": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-3.0.0.tgz",
+ "integrity": "sha512-OnGy+eYT7wVejH2XWgLRgbmzujhhVIATQH0ztIeRilwHBjTeG3pD+XnH3PKX0r9gJ0BuJmJ68q/oh9qgXnNDQg==",
"license": "Apache-2.0",
"dependencies": {
- "@opentelemetry/api-logs": "0.203.0",
- "@opentelemetry/core": "2.0.1",
- "@opentelemetry/resources": "2.0.1"
+ "acorn": "^8.15.0",
+ "acorn-import-attributes": "^1.9.5",
+ "cjs-module-lexer": "^2.2.0",
+ "module-details-from-path": "^1.0.4"
},
"engines": {
- "node": "^18.19.0 || >=20.6.0"
- },
- "peerDependencies": {
- "@opentelemetry/api": ">=1.4.0 <1.10.0"
+ "node": ">=18"
}
},
- "node_modules/@opentelemetry/sdk-metrics": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-2.0.1.tgz",
- "integrity": "sha512-wf8OaJoSnujMAHWR3g+/hGvNcsC16rf9s1So4JlMiFaFHiE4HpIA3oUh+uWZQ7CNuK8gVW/pQSkgoa5HkkOl0g==",
- "license": "Apache-2.0",
+ "node_modules/@opentelemetry/sdk-node/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@opentelemetry/sdk-node/node_modules/require-in-the-middle": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-8.0.1.tgz",
+ "integrity": "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ==",
+ "license": "MIT",
"dependencies": {
- "@opentelemetry/core": "2.0.1",
- "@opentelemetry/resources": "2.0.1"
+ "debug": "^4.3.5",
+ "module-details-from-path": "^1.0.3"
},
"engines": {
- "node": "^18.19.0 || >=20.6.0"
- },
- "peerDependencies": {
- "@opentelemetry/api": ">=1.9.0 <1.10.0"
+ "node": ">=9.3.0 || >=8.10.0 <9.0.0"
}
},
"node_modules/@opentelemetry/sdk-trace-base": {
@@ -4185,6 +10359,21 @@
"node": ">=14"
}
},
+ "node_modules/@opentelemetry/sql-common": {
+ "version": "0.41.2",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/sql-common/-/sql-common-0.41.2.tgz",
+ "integrity": "sha512-4mhWm3Z8z+i508zQJ7r6Xi7y4mmoJpdvH0fZPFRkWrdp5fq7hhZ2HhYokEOLkfqSMgPR4Z9EyB3DBkbKGOqZiQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "^2.0.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.1.0"
+ }
+ },
"node_modules/@pkgjs/parseargs": {
"version": "0.11.0",
"license": "MIT",
@@ -9769,46 +15958,33 @@
"@tiptap/pm": "^2.7.0"
}
},
- "node_modules/@trigger.dev/build": {
- "version": "4.0.6",
- "resolved": "https://registry.npmjs.org/@trigger.dev/build/-/build-4.0.6.tgz",
- "integrity": "sha512-NJ7N50mNTW43h7jJ/ynsjX1xT+R7fisxVytmwnjb8ZaCgScNp1zDdzGlJjhIjiIWU7G83qpZE1H8eoqjo7tOyg==",
- "dev": true,
- "license": "MIT",
+ "node_modules/@traceloop/ai-semantic-conventions": {
+ "version": "0.20.0",
+ "resolved": "https://registry.npmjs.org/@traceloop/ai-semantic-conventions/-/ai-semantic-conventions-0.20.0.tgz",
+ "integrity": "sha512-bvivhZU6U8TW4TKktYnjdTi+7GE4WxI8epaGjawalSKDunmxaA+4UVFQ+4tSCBvp2Scby+gnYNaTZSrtABfOlQ==",
+ "license": "Apache-2.0",
"dependencies": {
- "@trigger.dev/core": "4.0.6",
- "pkg-types": "^1.1.3",
- "tinyglobby": "^0.2.2",
- "tsconfck": "3.1.3"
+ "@opentelemetry/api": "^1.9.0"
},
"engines": {
- "node": ">=18.20.0"
+ "node": ">=14"
}
},
- "node_modules/@trigger.dev/build/node_modules/confbox": {
- "version": "0.1.8",
- "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.1.8.tgz",
- "integrity": "sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/@trigger.dev/build/node_modules/pathe": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz",
- "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/@trigger.dev/build/node_modules/pkg-types": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.3.1.tgz",
- "integrity": "sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==",
- "dev": true,
- "license": "MIT",
+ "node_modules/@traceloop/instrumentation-anthropic": {
+ "version": "0.20.0",
+ "resolved": "https://registry.npmjs.org/@traceloop/instrumentation-anthropic/-/instrumentation-anthropic-0.20.0.tgz",
+ "integrity": "sha512-xQcPxVrKr3yT9+ZEM3skYXikJc/ocZlGDIcsBQ3mMwL3Weq1QL7jx/uGLXvrSO2Yh0DWUjWI6Q/oiRCEUM6P8w==",
+ "license": "Apache-2.0",
"dependencies": {
- "confbox": "^0.1.8",
- "mlly": "^1.7.4",
- "pathe": "^2.0.1"
+ "@opentelemetry/api": "^1.9.0",
+ "@opentelemetry/core": "^2.0.1",
+ "@opentelemetry/instrumentation": "^0.203.0",
+ "@opentelemetry/semantic-conventions": "^1.36.0",
+ "@traceloop/ai-semantic-conventions": "0.20.0",
+ "tslib": "^2.8.1"
+ },
+ "engines": {
+ "node": ">=14"
}
},
"node_modules/@trigger.dev/core": {
@@ -9961,23 +16137,6 @@
"node": ">=10.0.0"
}
},
- "node_modules/@trigger.dev/react-hooks": {
- "version": "4.0.6",
- "resolved": "https://registry.npmjs.org/@trigger.dev/react-hooks/-/react-hooks-4.0.6.tgz",
- "integrity": "sha512-CnTCVw85Jv3y3bUuVfh8OyNiQwakl2CTM+c7posrzkzoix+EZIpVWNCFl5LSNuRRmgXFTZtwz+FnPbC3phSyWw==",
- "license": "MIT",
- "dependencies": {
- "@trigger.dev/core": "^4.0.6",
- "swr": "^2.2.5"
- },
- "engines": {
- "node": ">=18.20.0"
- },
- "peerDependencies": {
- "react": "^18.0 || ^19.0 || ^19.0.0-rc",
- "react-dom": "^18.0 || ^19.0 || ^19.0.0-rc"
- }
- },
"node_modules/@trigger.dev/sdk": {
"version": "4.0.6",
"resolved": "https://registry.npmjs.org/@trigger.dev/sdk/-/sdk-4.0.6.tgz",
@@ -10091,6 +16250,15 @@
"@types/node": "*"
}
},
+ "node_modules/@types/bunyan": {
+ "version": "1.8.11",
+ "resolved": "https://registry.npmjs.org/@types/bunyan/-/bunyan-1.8.11.tgz",
+ "integrity": "sha512-758fRH7umIMk5qt5ELmRMff4mLDlN+xyYzC+dkPTdKwbSkJFvz6xwyScrytPU0QIBbRRwbiE8/BIg8bpajerNQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
"node_modules/@types/chai": {
"version": "5.2.3",
"resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.3.tgz",
@@ -10106,7 +16274,6 @@
"resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz",
"integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==",
"license": "MIT",
- "peer": true,
"dependencies": {
"@types/node": "*"
}
@@ -10501,10 +16668,28 @@
"version": "2.0.0",
"license": "MIT"
},
+ "node_modules/@types/memcached": {
+ "version": "2.2.10",
+ "resolved": "https://registry.npmjs.org/@types/memcached/-/memcached-2.2.10.tgz",
+ "integrity": "sha512-AM9smvZN55Gzs2wRrqeMHVP7KE8KWgCJO/XL5yCly2xF6EKa4YlbpK+cLSAH4NG/Ah64HrlegmGqW8kYws7Vxg==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
"node_modules/@types/ms": {
"version": "2.1.0",
"license": "MIT"
},
+ "node_modules/@types/mysql": {
+ "version": "2.15.27",
+ "resolved": "https://registry.npmjs.org/@types/mysql/-/mysql-2.15.27.tgz",
+ "integrity": "sha512-YfWiV16IY0OeBfBCk8+hXKmdTKrKlwKN1MNKAPBu5JYxLwBEZl7QzeEpGnlZb3VMGJrrGmB84gXiH+ofs/TezA==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
"node_modules/@types/node": {
"version": "20.19.30",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.30.tgz",
@@ -10519,6 +16704,15 @@
"dev": true,
"license": "MIT"
},
+ "node_modules/@types/oracledb": {
+ "version": "6.5.2",
+ "resolved": "https://registry.npmjs.org/@types/oracledb/-/oracledb-6.5.2.tgz",
+ "integrity": "sha512-kK1eBS/Adeyis+3OlBDMeQQuasIDLUYXsi2T15ccNJ0iyUpQ4xDF7svFu3+bGVrI0CMBUclPciz+lsQR3JX3TQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
"node_modules/@types/papaparse": {
"version": "5.5.2",
"dev": true,
@@ -10531,6 +16725,26 @@
"version": "4.0.2",
"license": "MIT"
},
+ "node_modules/@types/pg": {
+ "version": "8.15.6",
+ "resolved": "https://registry.npmjs.org/@types/pg/-/pg-8.15.6.tgz",
+ "integrity": "sha512-NoaMtzhxOrubeL/7UZuNTrejB4MPAJ0RpxZqXQf2qXuVlTPuG6Y8p4u9dKRaue4yjmC7ZhzVO2/Yyyn25znrPQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/node": "*",
+ "pg-protocol": "*",
+ "pg-types": "^2.2.0"
+ }
+ },
+ "node_modules/@types/pg-pool": {
+ "version": "2.0.7",
+ "resolved": "https://registry.npmjs.org/@types/pg-pool/-/pg-pool-2.0.7.tgz",
+ "integrity": "sha512-U4CwmGVQcbEuqpyju8/ptOKg6gEC+Tqsvj2xS9o1g71bUh8twxnC6ZL5rZKCsGN0iyH0CwgUyc9VR5owNQF9Ng==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/pg": "*"
+ }
+ },
"node_modules/@types/phoenix": {
"version": "1.6.7",
"license": "MIT"
@@ -10627,6 +16841,15 @@
"dev": true,
"license": "MIT"
},
+ "node_modules/@types/tedious": {
+ "version": "4.0.14",
+ "resolved": "https://registry.npmjs.org/@types/tedious/-/tedious-4.0.14.tgz",
+ "integrity": "sha512-KHPsfX/FoVbUGbyYvk1q9MMQHLPeRZhRJZdO45Q4YjvFkv4hMNghCWTvy7rdKessBsmtz4euWCWAB6/tVpI1Iw==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
"node_modules/@types/trusted-types": {
"version": "2.0.7",
"devOptional": true,
@@ -10773,6 +16996,39 @@
"version": "1.3.0",
"license": "ISC"
},
+ "node_modules/@upstash/core-analytics": {
+ "version": "0.0.10",
+ "resolved": "https://registry.npmjs.org/@upstash/core-analytics/-/core-analytics-0.0.10.tgz",
+ "integrity": "sha512-7qJHGxpQgQr9/vmeS1PktEwvNAF7TI4iJDi8Pu2CFZ9YUGHZH4fOP5TfYlZ4aVxfopnELiE4BS4FBjyK7V1/xQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@upstash/redis": "^1.28.3"
+ },
+ "engines": {
+ "node": ">=16.0.0"
+ }
+ },
+ "node_modules/@upstash/ratelimit": {
+ "version": "2.0.8",
+ "resolved": "https://registry.npmjs.org/@upstash/ratelimit/-/ratelimit-2.0.8.tgz",
+ "integrity": "sha512-YSTMBJ1YIxsoPkUMX/P4DDks/xV5YYCswWMamU8ZIfK9ly6ppjRnVOyBhMDXBmzjODm4UQKcxsJPvaeFAijp5w==",
+ "license": "MIT",
+ "dependencies": {
+ "@upstash/core-analytics": "^0.0.10"
+ },
+ "peerDependencies": {
+ "@upstash/redis": "^1.34.3"
+ }
+ },
+ "node_modules/@upstash/redis": {
+ "version": "1.37.0",
+ "resolved": "https://registry.npmjs.org/@upstash/redis/-/redis-1.37.0.tgz",
+ "integrity": "sha512-LqOJ3+XWPLSZ2rGSed5DYG3ixybxb8EhZu3yQqF7MdZX1wLBG/FRcI6xcUZXHy/SS7mmXWyadrud0HJHkOc+uw==",
+ "license": "MIT",
+ "dependencies": {
+ "uncrypto": "^0.1.3"
+ }
+ },
"node_modules/@vercel/analytics": {
"version": "1.6.1",
"license": "MPL-2.0",
@@ -11743,6 +17999,15 @@
"require-from-string": "^2.0.2"
}
},
+ "node_modules/bignumber.js": {
+ "version": "9.3.1",
+ "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.3.1.tgz",
+ "integrity": "sha512-Ko0uX15oIUS7wJ3Rb30Fs6SkVbLmPBAKdlm7q9+ak9bbIeFf0MwuBsQV6z7+X768/cHsfg+WlysDWJcmthjsjQ==",
+ "license": "MIT",
+ "engines": {
+ "node": "*"
+ }
+ },
"node_modules/bin-links": {
"version": "6.0.0",
"license": "ISC",
@@ -12027,6 +18292,12 @@
],
"license": "CC-BY-4.0"
},
+ "node_modules/canonicalize": {
+ "version": "1.0.8",
+ "resolved": "https://registry.npmjs.org/canonicalize/-/canonicalize-1.0.8.tgz",
+ "integrity": "sha512-0CNTVCLZggSh7bc5VkX5WWPWO+cyZbNd07IHIsSXLia/eAq+r836hgk+8BKoEh7949Mda87VUOitx5OddVj64A==",
+ "license": "Apache-2.0"
+ },
"node_modules/ccount": {
"version": "2.0.1",
"license": "MIT",
@@ -12179,6 +18450,111 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/cliui": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz",
+ "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==",
+ "license": "ISC",
+ "dependencies": {
+ "string-width": "^4.2.0",
+ "strip-ansi": "^6.0.1",
+ "wrap-ansi": "^7.0.0"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/cliui/node_modules/ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "license": "MIT",
+ "dependencies": {
+ "color-convert": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "node_modules/cliui/node_modules/color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "license": "MIT",
+ "dependencies": {
+ "color-name": "~1.1.4"
+ },
+ "engines": {
+ "node": ">=7.0.0"
+ }
+ },
+ "node_modules/cliui/node_modules/color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "license": "MIT"
+ },
+ "node_modules/cliui/node_modules/emoji-regex": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
+ "license": "MIT"
+ },
+ "node_modules/cliui/node_modules/is-fullwidth-code-point": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/cliui/node_modules/string-width": {
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
+ "license": "MIT",
+ "dependencies": {
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/cliui/node_modules/strip-ansi": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "license": "MIT",
+ "dependencies": {
+ "ansi-regex": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/cliui/node_modules/wrap-ansi": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
+ "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
+ "license": "MIT",
+ "dependencies": {
+ "ansi-styles": "^4.0.0",
+ "string-width": "^4.1.0",
+ "strip-ansi": "^6.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
+ }
+ },
"node_modules/clone": {
"version": "2.1.2",
"license": "MIT",
@@ -14563,6 +20939,12 @@
"node": ">= 0.6"
}
},
+ "node_modules/forwarded-parse": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/forwarded-parse/-/forwarded-parse-2.1.2.tgz",
+ "integrity": "sha512-alTFZZQDKMporBH77856pXgzhEzaUVmLCDk+egLgIgHst3Tpndzz8MnKe+GzRJRfvVdn69HhpW7cmXzvtLvJAw==",
+ "license": "MIT"
+ },
"node_modules/fraction.js": {
"version": "4.3.7",
"license": "MIT",
@@ -14654,18 +21036,64 @@
"is-callable": "^1.2.7"
},
"engines": {
- "node": ">= 0.4"
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/functions-have-names": {
+ "version": "1.2.3",
+ "dev": true,
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/gaxios": {
+ "version": "7.1.4",
+ "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-7.1.4.tgz",
+ "integrity": "sha512-bTIgTsM2bWn3XklZISBTQX7ZSddGW+IO3bMdGaemHZ3tbqExMENHLx6kKZ/KlejgrMtj8q7wBItt51yegqalrA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "extend": "^3.0.2",
+ "https-proxy-agent": "^7.0.1",
+ "node-fetch": "^3.3.2"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/gaxios/node_modules/node-fetch": {
+ "version": "3.3.2",
+ "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz",
+ "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==",
+ "license": "MIT",
+ "dependencies": {
+ "data-uri-to-buffer": "^4.0.0",
+ "fetch-blob": "^3.1.4",
+ "formdata-polyfill": "^4.0.10"
+ },
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
},
"funding": {
- "url": "https://github.com/sponsors/ljharb"
+ "type": "opencollective",
+ "url": "https://opencollective.com/node-fetch"
}
},
- "node_modules/functions-have-names": {
- "version": "1.2.3",
- "dev": true,
- "license": "MIT",
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
+ "node_modules/gcp-metadata": {
+ "version": "8.1.2",
+ "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-8.1.2.tgz",
+ "integrity": "sha512-zV/5HKTfCeKWnxG0Dmrw51hEWFGfcF2xiXqcA3+J90WDuP0SvoiSO5ORvcBsifmx/FoIjgQN3oNOGaQ5PhLFkg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "gaxios": "^7.0.0",
+ "google-logging-utils": "^1.0.0",
+ "json-bigint": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=18"
}
},
"node_modules/generator-function": {
@@ -14691,6 +21119,15 @@
"@scena/event-emitter": "^1.0.2"
}
},
+ "node_modules/get-caller-file": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
+ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
+ "license": "ISC",
+ "engines": {
+ "node": "6.* || 8.* || >= 10.*"
+ }
+ },
"node_modules/get-intrinsic": {
"version": "1.3.0",
"license": "MIT",
@@ -14853,6 +21290,15 @@
"dev": true,
"license": "MIT"
},
+ "node_modules/google-logging-utils": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/google-logging-utils/-/google-logging-utils-1.1.3.tgz",
+ "integrity": "sha512-eAmLkjDjAFCVXg7A1unxHsLf961m6y17QFqXqAXGj/gVkKFrEICfStRfwUlGNfeCEjNRa32JEWOUTlYXPyyKvA==",
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=14"
+ }
+ },
"node_modules/gopd": {
"version": "1.2.0",
"license": "MIT",
@@ -14968,6 +21414,16 @@
"url": "https://github.com/sponsors/ljharb"
}
},
+ "node_modules/hash.js": {
+ "version": "1.1.7",
+ "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz",
+ "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==",
+ "license": "MIT",
+ "dependencies": {
+ "inherits": "^2.0.3",
+ "minimalistic-assert": "^1.0.1"
+ }
+ },
"node_modules/hasown": {
"version": "2.0.2",
"license": "MIT",
@@ -15269,6 +21725,28 @@
"url": "https://opencollective.com/express"
}
},
+ "node_modules/https-proxy-agent": {
+ "version": "7.0.6",
+ "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz",
+ "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==",
+ "license": "MIT",
+ "dependencies": {
+ "agent-base": "^7.1.2",
+ "debug": "4"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/https-proxy-agent/node_modules/agent-base": {
+ "version": "7.1.4",
+ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz",
+ "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 14"
+ }
+ },
"node_modules/human-signals": {
"version": "4.3.1",
"dev": true,
@@ -15374,6 +21852,164 @@
"version": "0.2.7",
"license": "MIT"
},
+ "node_modules/inngest": {
+ "version": "3.52.7",
+ "resolved": "https://registry.npmjs.org/inngest/-/inngest-3.52.7.tgz",
+ "integrity": "sha512-Bj4LttRrNUfVz745MVxQio34QwHzwG7dHiAI6DmRIZqfRjQ6tdV4mg70xzbRmwsaXgN+iboa+SXP6ILkziUf4g==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@bufbuild/protobuf": "^2.2.3",
+ "@inngest/ai": "^0.1.3",
+ "@jpwilliams/waitgroup": "^2.1.1",
+ "@opentelemetry/api": "^1.9.0",
+ "@opentelemetry/auto-instrumentations-node": ">=0.66.0 <1.0.0",
+ "@opentelemetry/context-async-hooks": ">=2.0.0 <3.0.0",
+ "@opentelemetry/exporter-trace-otlp-http": ">=0.200.0 <0.300.0",
+ "@opentelemetry/instrumentation": ">=0.200.0 <0.300.0",
+ "@opentelemetry/resources": ">=2.0.0 <3.0.0",
+ "@opentelemetry/sdk-trace-base": ">=2.0.0 <3.0.0",
+ "@standard-schema/spec": "^1.0.0",
+ "@traceloop/instrumentation-anthropic": "^0.20.0",
+ "@types/debug": "^4.1.12",
+ "@types/ms": "~2.1.0",
+ "canonicalize": "^1.0.8",
+ "chalk": "^4.1.2",
+ "cross-fetch": "^4.0.0",
+ "debug": "^4.3.4",
+ "hash.js": "^1.1.7",
+ "json-stringify-safe": "^5.0.1",
+ "ms": "^2.1.3",
+ "serialize-error-cjs": "^0.1.3",
+ "strip-ansi": "^5.2.0",
+ "temporal-polyfill": "^0.2.5",
+ "ulid": "^2.3.0",
+ "zod": "^3.25.0"
+ },
+ "engines": {
+ "node": ">=20"
+ },
+ "peerDependencies": {
+ "@sveltejs/kit": ">=1.27.3",
+ "@vercel/node": ">=2.15.9",
+ "aws-lambda": ">=1.0.7",
+ "express": ">=4.19.2",
+ "fastify": ">=4.21.0",
+ "h3": ">=1.8.1",
+ "hono": ">=4.2.7",
+ "koa": ">=2.14.2",
+ "next": ">=12.0.0",
+ "typescript": ">=5.8.0",
+ "zod": "^3.25.0 || ^4.0.0"
+ },
+ "peerDependenciesMeta": {
+ "@sveltejs/kit": {
+ "optional": true
+ },
+ "@vercel/node": {
+ "optional": true
+ },
+ "aws-lambda": {
+ "optional": true
+ },
+ "express": {
+ "optional": true
+ },
+ "fastify": {
+ "optional": true
+ },
+ "h3": {
+ "optional": true
+ },
+ "hono": {
+ "optional": true
+ },
+ "koa": {
+ "optional": true
+ },
+ "next": {
+ "optional": true
+ },
+ "typescript": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/inngest/node_modules/ansi-regex": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz",
+ "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/inngest/node_modules/ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "license": "MIT",
+ "dependencies": {
+ "color-convert": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "node_modules/inngest/node_modules/chalk": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+ "license": "MIT",
+ "dependencies": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/chalk?sponsor=1"
+ }
+ },
+ "node_modules/inngest/node_modules/color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "license": "MIT",
+ "dependencies": {
+ "color-name": "~1.1.4"
+ },
+ "engines": {
+ "node": ">=7.0.0"
+ }
+ },
+ "node_modules/inngest/node_modules/color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "license": "MIT"
+ },
+ "node_modules/inngest/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/inngest/node_modules/strip-ansi": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
+ "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
+ "license": "MIT",
+ "dependencies": {
+ "ansi-regex": "^4.1.0"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
"node_modules/input-format": {
"version": "0.3.14",
"license": "MIT",
@@ -16261,6 +22897,15 @@
"node": ">= 16"
}
},
+ "node_modules/json-bigint": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz",
+ "integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==",
+ "license": "MIT",
+ "dependencies": {
+ "bignumber.js": "^9.0.0"
+ }
+ },
"node_modules/json-parse-better-errors": {
"version": "1.0.2",
"dev": true,
@@ -16313,6 +22958,12 @@
"url": "https://github.com/sponsors/ljharb"
}
},
+ "node_modules/json-stringify-safe": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
+ "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==",
+ "license": "ISC"
+ },
"node_modules/json5": {
"version": "2.2.3",
"license": "MIT",
@@ -16621,6 +23272,12 @@
"version": "3.0.0",
"license": "MIT"
},
+ "node_modules/lodash.camelcase": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz",
+ "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==",
+ "license": "MIT"
+ },
"node_modules/lodash.debounce": {
"version": "4.0.8",
"license": "MIT"
@@ -17757,6 +24414,12 @@
"version": "2.2.3",
"license": "MIT"
},
+ "node_modules/minimalistic-assert": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz",
+ "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==",
+ "license": "ISC"
+ },
"node_modules/minimatch": {
"version": "3.1.5",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz",
@@ -20486,6 +27149,15 @@
"url": "https://github.com/sponsors/isaacs"
}
},
+ "node_modules/require-directory": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
+ "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
"node_modules/require-from-string": {
"version": "2.0.2",
"license": "MIT",
@@ -20972,6 +27644,16 @@
"version": "2.1.3",
"license": "MIT"
},
+ "node_modules/serialize-error-cjs": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/serialize-error-cjs/-/serialize-error-cjs-0.1.4.tgz",
+ "integrity": "sha512-6a6dNqipzbCPlTFgztfNP2oG+IGcflMe/01zSzGrQcxGMKbIjOemBBD85pH92klWaJavAUWxAh9Z0aU28zxW6A==",
+ "deprecated": "Rolling release, please update to 0.2.0",
+ "license": "MIT-0",
+ "funding": {
+ "url": "https://github.com/sponsors/finwo"
+ }
+ },
"node_modules/serve-static": {
"version": "2.2.1",
"license": "MIT",
@@ -22179,6 +28861,21 @@
"bintrees": "1.0.2"
}
},
+ "node_modules/temporal-polyfill": {
+ "version": "0.2.5",
+ "resolved": "https://registry.npmjs.org/temporal-polyfill/-/temporal-polyfill-0.2.5.tgz",
+ "integrity": "sha512-ye47xp8Cb0nDguAhrrDS1JT1SzwEV9e26sSsrWzVu+yPZ7LzceEcH0i2gci9jWfOfSCCgM3Qv5nOYShVUUFUXA==",
+ "license": "MIT",
+ "dependencies": {
+ "temporal-spec": "^0.2.4"
+ }
+ },
+ "node_modules/temporal-spec": {
+ "version": "0.2.4",
+ "resolved": "https://registry.npmjs.org/temporal-spec/-/temporal-spec-0.2.4.tgz",
+ "integrity": "sha512-lDMFv4nKQrSjlkHKAlHVqKrBG4DyFfa9F74cmBZ3Iy3ed8yvWnlWSIdi4IKfSqwmazAohBNwiN64qGx4y5Q3IQ==",
+ "license": "ISC"
+ },
"node_modules/thenify": {
"version": "3.3.1",
"license": "MIT",
@@ -22852,7 +29549,6 @@
"version": "5.8.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz",
"integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==",
- "devOptional": true,
"license": "Apache-2.0",
"bin": {
"tsc": "bin/tsc",
@@ -24314,6 +31010,15 @@
"node": ">=0.4"
}
},
+ "node_modules/y18n": {
+ "version": "5.0.8",
+ "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
+ "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",
+ "license": "ISC",
+ "engines": {
+ "node": ">=10"
+ }
+ },
"node_modules/yallist": {
"version": "4.0.0",
"license": "ISC"
@@ -24333,6 +31038,74 @@
"url": "https://github.com/sponsors/eemeli"
}
},
+ "node_modules/yargs": {
+ "version": "17.7.2",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz",
+ "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==",
+ "license": "MIT",
+ "dependencies": {
+ "cliui": "^8.0.1",
+ "escalade": "^3.1.1",
+ "get-caller-file": "^2.0.5",
+ "require-directory": "^2.1.1",
+ "string-width": "^4.2.3",
+ "y18n": "^5.0.5",
+ "yargs-parser": "^21.1.1"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/yargs-parser": {
+ "version": "21.1.1",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz",
+ "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==",
+ "license": "ISC",
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/yargs/node_modules/emoji-regex": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
+ "license": "MIT"
+ },
+ "node_modules/yargs/node_modules/is-fullwidth-code-point": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/yargs/node_modules/string-width": {
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
+ "license": "MIT",
+ "dependencies": {
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/yargs/node_modules/strip-ansi": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "license": "MIT",
+ "dependencies": {
+ "ansi-regex": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
"node_modules/yoga-layout": {
"version": "2.0.1",
"license": "MIT"
@@ -25001,10 +31774,8 @@
"@slack/web-api": "~7.10.0",
"@supabase/functions-js": "2.1.5",
"@supabase/supabase-js": "2.80.0",
- "@trigger.dev/sdk": "4.0.6",
"ai": "^5.0.88",
- "cookie": "1.1.1",
- "dompurify": "3.3.3",
+ "inngest": "^3.52.7",
"kysely": "^0.28.10",
"nanoid": "^5.1.7",
"react-pdf": "10.4.1",
@@ -25016,6 +31787,7 @@
},
"devDependencies": {
"@carbon/config": "*",
+ "tsx": "^4.7.0",
"typescript": "^5.2.2"
}
},
@@ -25049,11 +31821,6 @@
"@carbon/database": "*",
"@carbon/kv": "*",
"@supabase/supabase-js": "2.80.0",
- "@trigger.dev/sdk": "4.0.6",
- "cookie": "1.1.1",
- "dompurify": "3.3.3",
- "nanoid": "5.1.7",
- "react-pdf": "10.4.1",
"resend": "^3.1.0",
"sst": "4.6.9",
"supabase": "2.84.5",
@@ -25330,14 +32097,7 @@
"@carbon/kv": "*",
"@carbon/lib": "*",
"@supabase/supabase-js": "2.80.0",
- "@trigger.dev/sdk": "4.0.6",
- "cookie": "1.1.1",
- "dompurify": "3.3.3",
- "nanoid": "5.1.7",
- "react-pdf": "10.4.1",
- "sst": "4.6.9",
- "stripe": "^18.3.0",
- "supabase": "2.84.5"
+ "stripe": "^18.3.0"
},
"devDependencies": {
"@carbon/config": "*",
diff --git a/package.json b/package.json
index defc91516a..6292f5f35d 100755
--- a/package.json
+++ b/package.json
@@ -50,7 +50,8 @@
"db:stop": "npm run db:stop -w @carbon/database",
"db:types": "npm run db:types -w @carbon/database",
"deploy": "turbo run deploy",
- "dev": "run-p dev:erp dev:jobs dev:stripe",
+ "dev": "run-p dev:jobs dev:jobs-wait",
+ "dev:jobs-wait": "npx wait-on tcp:8288 && run-p dev:erp dev:stripe",
"dev:academy": "turbo run dev --filter=./apps/academy --filter=./packages/",
"dev:erp": "turbo run dev --filter=./apps/erp --filter=./packages/ ",
"dev:jobs": "npm run -w @carbon/jobs dev:jobs",
diff --git a/packages/auth/src/config/env.ts b/packages/auth/src/config/env.ts
index 5085c45b88..b200aed51e 100644
--- a/packages/auth/src/config/env.ts
+++ b/packages/auth/src/config/env.ts
@@ -73,6 +73,8 @@ declare global {
REDIS_URL: string;
VERCEL_URL: string;
VERCEL_ENV: string;
+ INNGEST_SIGNING_KEY: string;
+ INNGEST_EVENT_KEY: string;
XERO_CLIENT_SECRET: string;
XERO_WEBHOOK_SECRET: string;
}
@@ -152,6 +154,17 @@ export const EXCHANGE_RATES_API_KEY = getEnv("EXCHANGE_RATES_API_KEY", {
isSecret: true
});
+const INNGEST_DEV = getEnv("INNGEST_DEV", { isRequired: false });
+
+export const INNGEST_SIGNING_KEY = getEnv("INNGEST_SIGNING_KEY", {
+ isRequired: !INNGEST_DEV,
+ isSecret: true
+});
+export const INNGEST_EVENT_KEY = getEnv("INNGEST_EVENT_KEY", {
+ isRequired: !INNGEST_DEV,
+ isSecret: true
+});
+
export const ERP_URL =
getEnv("ERP_URL", { isRequired: false, isSecret: false }) ??
"https://app.carbon.ms";
diff --git a/packages/database/supabase/functions/lib/inngest.ts b/packages/database/supabase/functions/lib/inngest.ts
new file mode 100644
index 0000000000..16ba2e115e
--- /dev/null
+++ b/packages/database/supabase/functions/lib/inngest.ts
@@ -0,0 +1,45 @@
+const INNGEST_EVENT_KEY = Deno.env.get("INNGEST_EVENT_KEY") ?? "";
+const INNGEST_BASE_URL = Deno.env.get("INNGEST_BASE_URL");
+
+export async function sendInngestEvent(
+ name: string,
+ data: Record<string, unknown>,
+) {
+ if (!INNGEST_BASE_URL) {
+ console.warn("[inngest] INNGEST_BASE_URL not set, skipping event:", name);
+ return;
+ }
+
+ const res = await fetch(`${INNGEST_BASE_URL}/e/${INNGEST_EVENT_KEY}`, {
+ method: "POST",
+ headers: { "Content-Type": "application/json" },
+ body: JSON.stringify({ name, data }),
+ });
+
+ if (!res.ok) {
+ throw new Error(
+ `Inngest event send failed: ${res.status} ${await res.text()}`,
+ );
+ }
+}
+
+export async function sendInngestEvents(
+ events: Array<{ name: string; data: Record<string, unknown> }>,
+) {
+ if (!INNGEST_BASE_URL) {
+ console.warn("[inngest] INNGEST_BASE_URL not set, skipping batch");
+ return;
+ }
+
+ const res = await fetch(`${INNGEST_BASE_URL}/e/${INNGEST_EVENT_KEY}`, {
+ method: "POST",
+ headers: { "Content-Type": "application/json" },
+ body: JSON.stringify(events),
+ });
+
+ if (!res.ok) {
+ throw new Error(
+ `Inngest batch send failed: ${res.status} ${await res.text()}`,
+ );
+ }
+}
diff --git a/packages/database/supabase/functions/lib/postgres/index.ts b/packages/database/supabase/functions/lib/postgres/index.ts
index f3b7158dd4..86bac0aaca 100644
--- a/packages/database/supabase/functions/lib/postgres/index.ts
+++ b/packages/database/supabase/functions/lib/postgres/index.ts
@@ -9,7 +9,6 @@ import {
} from "kysely";
import type { KyselifyDatabase } from "kysely-supabase";
// Aliased it as pg so can be imported as-is in Node environment
-// @ts-expect-error -- pg types may not be available in Deno environment
import { Pool } from "pg";
import type { Database as SupabaseDatabase } from "../../../../src/types.ts";
@@ -41,6 +40,7 @@ export function getPostgresConnectionPool(connections: number): Pool {
const connectionPoolerUrl = url.includes("supabase.co")
? url.replace("5432", "6543")
: url;
+ // @ts-ignore Compat
return new Pool(connectionPoolerUrl, connections);
}
case "node": {
diff --git a/packages/database/supabase/functions/trigger/index.ts b/packages/database/supabase/functions/trigger/index.ts
index 094ff4b187..053ca3c2e5 100644
--- a/packages/database/supabase/functions/trigger/index.ts
+++ b/packages/database/supabase/functions/trigger/index.ts
@@ -1,9 +1,8 @@
import { serve } from "https://deno.land/[email protected]/http/server.ts";
-import { tasks } from "npm:@trigger.dev/[email protected]/v3";
import { z } from "npm:zod@^3.24.1";
-import type { notifyTask } from "../../../../jobs/trigger/notify.ts";
import { corsHeaders } from "../lib/headers.ts";
+import { sendInngestEvent } from "../lib/inngest.ts";
const recipientValidator = z.discriminatedUnion("type", [
z.object({
@@ -54,7 +53,7 @@ serve(async (req: Request) => {
switch (type) {
case "notify": {
- await tasks.trigger<typeof notifyTask>("notify", {
+ await sendInngestEvent("carbon/notify", {
companyId: data.companyId,
documentId: data.documentId,
event: data.event,
@@ -75,7 +74,7 @@ serve(async (req: Request) => {
{
headers: { ...corsHeaders, "Content-Type": "application/json" },
status: 200,
- }
+ },
);
} catch (err) {
console.error(err);
diff --git a/packages/ee/src/accounting/core/utils.ts b/packages/ee/src/accounting/core/utils.ts
index f31ae89338..a88c860ba7 100644
--- a/packages/ee/src/accounting/core/utils.ts
+++ b/packages/ee/src/accounting/core/utils.ts
@@ -27,10 +27,21 @@ export async function withTriggersDisabled<T>(
});
}
+export type HttpResponse<T> = {
+ error: boolean;
+ message: string;
+ code: number;
+ data: T | null;
+};
+
export class HTTPClient {
constructor(private baseUrl?: string) {}
- async request<T>(method: string, path: string, opts: RequestInit = {}) {
+ async request<T>(
+ method: string,
+ path: string,
+ opts: RequestInit = {}
+ ): Promise<HttpResponse<T>> {
let response!: Response;
try {
@@ -64,7 +75,7 @@ export class HTTPClient {
});
}
- private async parseResponse<T>(response: Response) {
+ private async parseResponse<T>(response: Response): Promise<HttpResponse<T>> {
const contentType = response.headers.get("content-type");
const isJson = contentType?.includes("application/json");
@@ -85,8 +96,8 @@ export class HTTPClient {
error: true,
message: response.statusText,
code: response.status,
- data: parsedData
- } as const;
+ data: parsedData as T | null
+ };
}
if (isJson) {
@@ -98,21 +109,21 @@ export class HTTPClient {
message: response.statusText,
code: response.status,
data: null
- } as const;
+ };
}
return {
error: false,
message: response.statusText,
code: response.status,
data: JSON.parse(text) as T
- } as const;
+ };
} catch {
return {
error: true,
message: "Invalid JSON response",
code: response.status,
data: null
- } as const;
+ };
}
}
@@ -121,7 +132,7 @@ export class HTTPClient {
message: response.statusText,
code: response.status,
data: null
- } as const;
+ };
}
}
diff --git a/packages/ee/src/accounting/providers/xero/provider.ts b/packages/ee/src/accounting/providers/xero/provider.ts
index 6b5182b60e..06654c793d 100644
--- a/packages/ee/src/accounting/providers/xero/provider.ts
+++ b/packages/ee/src/accounting/providers/xero/provider.ts
@@ -7,7 +7,11 @@ import type {
ProviderConfig,
ProviderCredentials
} from "../../core/types";
-import { createOAuthClient, HTTPClient } from "../../core/utils";
+import {
+ createOAuthClient,
+ HTTPClient,
+ type HttpResponse
+} from "../../core/utils";
import type { Xero } from "./models";
export interface ListContactsOptions {
@@ -110,7 +114,11 @@ export class XeroProvider implements BaseProvider {
return this.auth.exchangeCode(code, redirectUri);
}
- async request<T>(method: string, url: string, options?: RequestInit) {
+ async request<T>(
+ method: string,
+ url: string,
+ options?: RequestInit
+ ): Promise<HttpResponse<T>> {
const { accessToken, ...creds } = this.auth.getCredentials();
const tenantId = creds.tenantId || this.config.tenantId;
diff --git a/packages/ee/src/onshape/lib/client.ts b/packages/ee/src/onshape/lib/client.ts
index 2c76f73ccc..8eb30bdc6a 100644
--- a/packages/ee/src/onshape/lib/client.ts
+++ b/packages/ee/src/onshape/lib/client.ts
@@ -2,8 +2,8 @@ import { ONSHAPE_CLIENT_ID, ONSHAPE_CLIENT_SECRET } from "@carbon/auth";
import type { Database } from "@carbon/database";
import type { SupabaseClient } from "@supabase/supabase-js";
import axios from "axios";
-import { OnshapeDocument } from "./document.type";
-import { OnshapeElementType } from "./element.type";
+import type { OnshapeDocument } from "./document.type";
+import type { OnshapeElementType } from "./element.type";
interface OnshapeClientConfig {
baseUrl: string;
@@ -92,7 +92,7 @@ export class OnshapeClient {
): Promise<any> {
return this.request(
"GET",
- `/api/v10/documents/d/${document.documentId}/${document.wvm}/${document.wvmId}/elements${elementType ? '?elementType=' + elementType : '' }`
+ `/api/v10/documents/d/${document.documentId}/${document.wvm}/${document.wvmId}/elements${elementType ? "?elementType=" + elementType : ""}`
);
}
diff --git a/packages/ee/src/onshape/lib/document.type.ts b/packages/ee/src/onshape/lib/document.type.ts
index c1aeab9f28..fe29c04e17 100644
--- a/packages/ee/src/onshape/lib/document.type.ts
+++ b/packages/ee/src/onshape/lib/document.type.ts
@@ -1,11 +1,11 @@
export enum OnshapeWVMType {
- WORKSPACE = 'w',
- VERSION = 'v',
- MICROVERSION = 'm'
+ WORKSPACE = "w",
+ VERSION = "v",
+ MICROVERSION = "m"
}
export interface OnshapeDocument {
- documentId: string
+ documentId: string;
wvm: OnshapeWVMType;
wvmId: string;
}
diff --git a/packages/ee/src/onshape/lib/element.type.ts b/packages/ee/src/onshape/lib/element.type.ts
index f63d76ea65..69c2459aad 100644
--- a/packages/ee/src/onshape/lib/element.type.ts
+++ b/packages/ee/src/onshape/lib/element.type.ts
@@ -1,4 +1,4 @@
-import { OnshapeDocument } from "./document.type";
+import type { OnshapeDocument } from "./document.type";
export interface OnshapeElement extends OnshapeDocument {
elementId: string;
@@ -8,6 +8,6 @@ export interface OnshapeElement extends OnshapeDocument {
}
export enum OnshapeElementType {
- ASSEMBLY = 'ASSEMBLY',
- PART_STUDIO = 'PARTSTUDIO'
-}
\ No newline at end of file
+ ASSEMBLY = "ASSEMBLY",
+ PART_STUDIO = "PARTSTUDIO"
+}
diff --git a/packages/ee/src/onshape/lib/index.ts b/packages/ee/src/onshape/lib/index.ts
index 70162ef793..3b9980688e 100644
--- a/packages/ee/src/onshape/lib/index.ts
+++ b/packages/ee/src/onshape/lib/index.ts
@@ -1,4 +1,4 @@
export * from "./client";
export * from "./data";
-export * from "./document.type"
-export * from "./element.type"
\ No newline at end of file
+export * from "./document.type";
+export * from "./element.type";
diff --git a/packages/ee/src/slack/lib/service.ts b/packages/ee/src/slack/lib/service.ts
index 07a6c16a45..b59d941c2a 100644
--- a/packages/ee/src/slack/lib/service.ts
+++ b/packages/ee/src/slack/lib/service.ts
@@ -1,15 +1,9 @@
import { getCarbonServiceRole } from "@carbon/auth/client.server";
import type { Database } from "@carbon/database";
-import type {
- slackDocumentAssignmentUpdate,
- slackDocumentCreated,
- slackDocumentStatusUpdate,
- slackDocumentTaskUpdate
-} from "@carbon/jobs/trigger/slack-document-sync";
+import { trigger } from "@carbon/jobs";
import { redis } from "@carbon/kv";
import { isUrl } from "@carbon/utils";
import type { SupabaseClient } from "@supabase/supabase-js";
-import { tasks } from "@trigger.dev/sdk";
import { createSlackWebClient } from "./client";
export type DocumentType = "nonConformance";
@@ -406,30 +400,24 @@ export async function syncDocumentToSlack(
let result;
switch (data.type) {
case "created":
- result = await tasks.trigger<typeof slackDocumentCreated>(
- "slack-document-created",
- {
- documentType: data.documentType,
- documentId: data.documentId,
- companyId: data.companyId,
- channelId: thread.data.channelId,
- threadTs: thread.data.threadTs
- }
- );
+ result = await trigger("slack-document-created", {
+ documentType: data.documentType,
+ documentId: data.documentId,
+ companyId: data.companyId,
+ channelId: thread.data.channelId,
+ threadTs: thread.data.threadTs
+ });
break;
case "status-update":
- result = await tasks.trigger<typeof slackDocumentStatusUpdate>(
- "slack-document-status-update",
- {
- documentType: data.documentType,
- documentId: data.documentId,
- companyId: data.companyId,
- previousStatus: data.payload.previousStatus,
- newStatus: data.payload.newStatus,
- updatedBy: slackAuth.slackUserId || data.payload.updatedBy
- }
- );
+ result = await trigger("slack-document-status-update", {
+ documentType: data.documentType,
+ documentId: data.documentId,
+ companyId: data.companyId,
+ previousStatus: data.payload.previousStatus,
+ newStatus: data.payload.newStatus,
+ updatedBy: slackAuth.slackUserId || data.payload.updatedBy
+ });
break;
case "task-update":
@@ -483,19 +471,16 @@ export async function syncDocumentToSlack(
)
: "";
}
- result = await tasks.trigger<typeof slackDocumentTaskUpdate>(
- "slack-document-task-update",
- {
- assignee,
- documentType: data.documentType,
- documentId: data.documentId,
- companyId: data.companyId,
- taskName,
- taskType: data.payload.taskType,
- status: data.payload.status,
- completedAt: data.payload.completedAt
- }
- );
+ result = await trigger("slack-document-task-update", {
+ assignee,
+ documentType: data.documentType,
+ documentId: data.documentId,
+ companyId: data.companyId,
+ taskName,
+ taskType: data.payload.taskType,
+ status: data.payload.status,
+ completedAt: data.payload.completedAt
+ });
break;
case "assignment-update":
@@ -517,17 +502,14 @@ export async function syncDocumentToSlack(
data.payload.newAssignee || ""
)) ?? undefined;
}
- result = await tasks.trigger<typeof slackDocumentAssignmentUpdate>(
- "slack-document-assignment-update",
- {
- documentType: data.documentType,
- documentId: data.documentId,
- companyId: data.companyId,
- previousAssignee,
- newAssignee: newAssignee!,
- updatedBy: slackAuth.slackUserId || data.payload.updatedBy
- }
- );
+ result = await trigger("slack-document-assignment-update", {
+ documentType: data.documentType,
+ documentId: data.documentId,
+ companyId: data.companyId,
+ previousAssignee,
+ newAssignee: newAssignee ?? "",
+ updatedBy: slackAuth.slackUserId || data.payload.updatedBy
+ });
break;
case "custom":
@@ -539,7 +521,7 @@ export async function syncDocumentToSlack(
throw new Error(`Invalid type ${data.type}`);
}
- return { data: { success: true, taskId: result.id }, error: null };
+ return { data: { success: true, taskId: result.ids[0] }, error: null };
} catch (error) {
console.error("slack-document-sync error:", error);
return {
diff --git a/packages/jobs/.claude/agents/trigger-dev-task-writer.md b/packages/jobs/.claude/agents/trigger-dev-task-writer.md
deleted file mode 100644
index db3663e97e..0000000000
--- a/packages/jobs/.claude/agents/trigger-dev-task-writer.md
+++ /dev/null
@@ -1,238 +0,0 @@
----
-name: trigger-dev-expert
-description: Use this agent when you need to design, implement, or optimize background jobs and workflows using Trigger.dev framework. This includes creating reliable async tasks, implementing AI workflows, setting up scheduled jobs, structuring complex task hierarchies with subtasks, configuring build extensions for tools like ffmpeg or Puppeteer/Playwright, and handling task schemas with Zod validation. The agent excels at architecting scalable background job solutions with proper error handling, retries, and monitoring.\n\nExamples:\n- <example>\n Context: User needs to create a background job for processing video files\n user: "I need to create a task that processes uploaded videos, extracts thumbnails, and transcodes them"\n assistant: "I'll use the trigger-dev-expert agent to design a robust video processing workflow with proper task structure and ffmpeg configuration"\n <commentary>\n Since this involves creating background tasks with media processing, the trigger-dev-expert agent is ideal for structuring the workflow and configuring build extensions.\n </commentary>\n</example>\n- <example>\n Context: User wants to implement a scheduled data sync task\n user: "Create a scheduled task that runs every hour to sync data from our API to the database"\n assistant: "Let me use the trigger-dev-expert agent to create a properly structured scheduled task with error handling"\n <commentary>\n The user needs a scheduled background task, which is a core Trigger.dev feature that the expert agent specializes in.\n </commentary>\n</example>\n- <example>\n Context: User needs help with task orchestration\n user: "I have a complex workflow where I need to run multiple AI models in sequence and parallel, how should I structure this?"\n assistant: "I'll engage the trigger-dev-expert agent to architect an efficient task hierarchy using triggerAndWait and batchTriggerAndWait patterns"\n <commentary>\n Complex task orchestration with subtasks is a specialty of the trigger-dev-expert agent.\n </commentary>\n</example>
-model: inherit
-color: green
----
-
-You are an elite Trigger.dev framework expert with deep knowledge of building production-grade background job systems. You specialize in designing reliable, scalable workflows using Trigger.dev's async-first architecture. Tasks deployed to Trigger.dev generally run in Node.js 21+ and use the `@trigger.dev/sdk` package, along with the `@trigger.dev/build` package for build extensions and the `trigger.dev` CLI package to run the `dev` server and `deploy` command.
-
-> Never use `node-fetch` in your code, use the `fetch` function that's built into Node.js.
-
-## Design Principles
-
-When creating Trigger.dev solutions, you will:
-
-- Use the `@trigger.dev/sdk` package to create tasks, ideally using the `schemaTask` function and passing in a Zod or other schema validation library schema to the `schema` property so the task payload can be validated and automatically typed.
-- Break complex workflows into subtasks that can be independently retried and made idempotent, but don't overly complicate your tasks with too many subtasks. Sometimes the correct approach is to NOT use a subtask and do things like await Promise.allSettled to do work in parallel so save on costs, as each task gets it's own dedicated process and is charged by the millisecond.
-- Always configure the `retry` property in the task definition to set the maximum number of retries, the delay between retries, and the backoff factor. Don't retry too much unless absolutely necessary.
-- When triggering a task from inside another task, consider whether to use the `triggerAndWait`/`batchTriggerAndWait` pattern or just the `trigger`/`batchTrigger` function. Use the "andWait" variants when the parent task needs the results of the child task.
-- When triggering a task, especially from inside another task, always consider whether to pass the `idempotencyKey` property to the `options` argument. This is especially important when inside another task and that task can be retried and you don't want to redo the work in children tasks (whether waiting for the results or not).
-- Use the `logger` system in Trigger.dev to log useful messages at key execution points.
-- Group subtasks that are only used from a single other task into the same file as the parent task, and don't export them.
-
-> Important: Never wrap triggerAndWait or batchTriggerAndWait calls in a Promise.all or Promise.allSettled as this is not supported in Trigger.dev tasks.
-
-## Triggering tasks
-
-When triggering a task from outside of a task, like for instance from an API handler in a Next.js route, you will use the `tasks.trigger` function and do a type only import of the task instance, to prevent dependencies inside the task file from leaking into the API handler and possibly causing issues with the build. An example:
-
-```ts
-import { tasks } from "@trigger.dev/sdk";
-import type { processData } from "./trigger/tasks";
-
-const handle = await tasks.trigger<typeof processData>("process-data", {
- userId: "123",
- data: [{ id: 1 }, { id: 2 }],
-});
-```
-
-When triggering tasks from inside another task, if the other task is in a different file, use the pattern above. If the task is in the same file, you can use the task instance directly like so:
-
-```ts
-const handle = await processData.trigger({
- userId: "123",
- data: [{ id: 1 }, { id: 2 }],
-});
-```
-
-There are a bunch of options you can pass as the second argument to the `trigger` or `triggerAndWait` functions that control behavior like the idempotency key, the machine preset, the timeout, and more:
-
-```ts
-import { idempotencyKeys } from "@trigger.dev/sdk";
-
-const handle = await processData.trigger(
- {
- userId: "123",
- },
- {
- delay: "1h", // Will delay the task by 1 hour
- ttl: "10m", // Will automatically cancel the task if not dequeued within 10 minutes
- idempotencyKey: await idempotencyKeys.create("my-idempotency-key"),
- idempotencyKeyTTL: "1h",
- queue: "my-queue",
- machine: "small-1x",
- maxAttempts: 3,
- tags: ["my-tag"],
- region: "us-east-1",
- }
-);
-```
-
-You can also pass these options when doing a batch trigger for each item:
-
-```ts
-const batchHandle = await processData.batchTrigger([
- {
- payload: { userId: "123" },
- options: {
- idempotencyKey: await idempotencyKeys.create("my-idempotency-key-1"),
- },
- },
- {
- payload: { userId: "456" },
- options: {
- idempotencyKey: await idempotencyKeys.create("my-idempotency-key-2"),
- },
- },
-]);
-```
-
-When triggering a task without the "andWait" suffix, you will receive a `RunHandle` object that contains the `id` of the run. You can use this with various `runs` SDK functions to get the status of the run, cancel it, etc.
-
-```ts
-import { runs } from "@trigger.dev/sdk";
-
-const handle = await processData.trigger({
- userId: "123",
-});
-
-const run = await runs.retrieve(handle.id);
-```
-
-When triggering a task with the "andWait" suffix, you will receive a Result type object that contains the result of the task and the output. Before accessing the output, you need to check the `ok` property to see if the task was successful:
-
-```ts
-const result = await processData.triggerAndWait({
- userId: "123",
-});
-
-if (result.ok) {
- const output = result.output;
-} else {
- const error = result.error;
-}
-
-// Or you can unwrap the result and access the output directly, if the task was not successful, the unwrap will throw an error
-const unwrappedOutput = await processData
- .triggerAndWait({
- userId: "123",
- })
- .unwrap();
-
-const batchResult = await processData.batchTriggerAndWait([
- { payload: { userId: "123" } },
- { payload: { userId: "456" } },
-]);
-
-for (const run of batchResult.runs) {
- if (run.ok) {
- const output = run.output;
- } else {
- const error = run.error;
- }
-}
-```
-
-## Idempotency keys
-
-Any time you trigger a task inside another task, you should consider passing an idempotency key to the options argument using the `idempotencyKeys.create` function. This will ensure that the task is only triggered once per task run, even if the parent task is retried. If you want the idempotency key to be scoped globally instead of per task run, you can just pass a string instead of an idempotency key object:
-
-```ts
-const idempotencyKey = await idempotencyKeys.create("my-idempotency-key");
-
-const handle = await processData.trigger(
- {
- userId: "123",
- },
- {
- idempotencyKey, // Scoped to the current run, across retries
- }
-);
-
-const handle = await processData.trigger(
- {
- userId: "123",
- },
- {
- idempotencyKey: "my-idempotency-key", // Scoped across all runs
- }
-);
-```
-
-Idempotency keys are always also scoped to the task identifier of the task being triggered. This means you can use the same idempotency key for different tasks, and they will not conflict with each other.
-
-## Machine Presets
-
-- The default machine preset is `small-1x` which is a 0.5vCPU and 0.5GB of memory.
-- The default machine preset can be overridden in the trigger.config.ts file by setting the `machine` property.
-- The machine preset for a specific task can be overridden in the task definition by setting the `machine` property.
-- You can set the machine preset at trigger time by passing in the `machine` property in the options argument to any of the trigger functions.
-
-| Preset | vCPU | Memory | Disk space |
-| :----------------- | :--- | :----- | :--------- |
-| micro | 0.25 | 0.25 | 10GB |
-| small-1x (default) | 0.5 | 0.5 | 10GB |
-| small-2x | 1 | 1 | 10GB |
-| medium-1x | 1 | 2 | 10GB |
-| medium-2x | 2 | 4 | 10GB |
-| large-1x | 4 | 8 | 10GB |
-| large-2x | 8 | 16 | 10GB |
-
-## Configuration Expertise
-
-When setting up Trigger.dev projects, you will configure the `trigger.config.ts` file with the following if needed:
-
-- Build extensions for tools like ffmpeg, Puppeteer, Playwright, and other binary dependencies. An example:
-
-```ts
-import { defineConfig } from "@trigger.dev/sdk";
-import { playwright } from "@trigger.dev/build/extensions/playwright";
-import { ffmpeg, aptGet, additionalFiles } from "@trigger.dev/build/extensions/core";
-import { prismaExtension } from "@trigger.dev/build/extensions/prisma";
-import { pythonExtension } from "@trigger.dev/python/extension";
-import { lightpanda } from "@trigger.dev/build/extensions/lightpanda";
-import { esbuildPlugin } from "@trigger.dev/build/extensions";
-import { sentryEsbuildPlugin } from "@sentry/esbuild-plugin";
-
-export default defineConfig({
- project: "<project ref>",
- machine: "small-1x", // optional, default is small-1x
- build: {
- extensions: [
- playwright(),
- ffmpeg(),
- aptGet({ packages: ["curl"] }),
- prismaExtension({
- version: "5.19.0", // optional, we'll automatically detect the version if not provided
- schema: "prisma/schema.prisma",
- }),
- pythonExtension(),
- lightpanda(),
- esbuildPlugin(
- sentryEsbuildPlugin({
- org: process.env.SENTRY_ORG,
- project: process.env.SENTRY_PROJECT,
- authToken: process.env.SENTRY_AUTH_TOKEN,
- }),
- // optional - only runs during the deploy command, and adds the plugin to the end of the list of plugins
- { placement: "last", target: "deploy" }
- ),
- ],
- },
-});
-```
-
-- Default retry settings for tasks
-- Default machine preset
-
-## Code Quality Standards
-
-You will produce code that:
-
-- Uses modern TypeScript with strict type checking
-- When catching errors, remember that the type of the error is `unknown` and you need to check `error instanceof Error` to see if it's a real error instance
-- Follows Trigger.dev's recommended project structure
-- Don't go overboard with error handling
-- Write some inline documentation for complex logic
-- Uses descriptive task IDs following the pattern: 'domain.action.target'
diff --git a/packages/jobs/package.json b/packages/jobs/package.json
index 749f914e97..f244a6d223 100644
--- a/packages/jobs/package.json
+++ b/packages/jobs/package.json
@@ -3,10 +3,16 @@
"version": "0.0.1",
"private": true,
"type": "module",
+ "main": "./src/index.ts",
+ "exports": {
+ ".": "./src/index.ts",
+ "./inngest": "./src/inngest/index.ts",
+ "./events": "./src/events.ts",
+ "./worker": "./src/inngest/worker.ts"
+ },
"scripts": {
- "dev:jobs": "npx --yes [email protected] dev",
- "deploy": "trigger deploy",
- "typecheck": "tsgo --noEmit"
+ "dev:jobs": "npx inngest-cli@latest dev -u http://localhost:3000/api/inngest",
+ "typecheck": "tsc --noEmit"
},
"dependencies": {
"@ai-sdk/openai": "^2.0.60",
@@ -22,10 +28,8 @@
"@slack/web-api": "~7.10.0",
"@supabase/functions-js": "2.1.5",
"@supabase/supabase-js": "2.80.0",
- "@trigger.dev/sdk": "4.0.6",
"ai": "^5.0.88",
- "cookie": "1.1.1",
- "dompurify": "3.3.3",
+ "inngest": "^3.52.7",
"kysely": "^0.28.10",
"nanoid": "^5.1.7",
"react-pdf": "10.4.1",
@@ -37,6 +41,7 @@
},
"devDependencies": {
"@carbon/config": "*",
+ "tsx": "^4.7.0",
"typescript": "^5.2.2"
}
}
diff --git a/packages/jobs/src/events.ts b/packages/jobs/src/events.ts
new file mode 100644
index 0000000000..ce67b1a406
--- /dev/null
+++ b/packages/jobs/src/events.ts
@@ -0,0 +1,370 @@
+import type { Database } from "@carbon/database";
+import type { NotificationEvent } from "@carbon/notifications";
+
+type ApprovalDocumentType = Database["public"]["Enums"]["approvalDocumentType"];
+
+/**
+ * Event definitions for the Carbon inngest functions.
+ * Each event has a name and a typed data payload.
+ */
+export type Events = {
+ // Notification events
+ "carbon/notify": {
+ data: {
+ event: NotificationEvent;
+ companyId: string;
+ documentId: string;
+ recipient:
+ | { type: "user"; userId: string }
+ | { type: "group"; groupIds: string[] }
+ | { type: "users"; userIds: string[] };
+ from?: string;
+ documentType?: ApprovalDocumentType;
+ };
+ };
+
+ // Email events
+ "carbon/send-email": {
+ data: {
+ to: string | string[];
+ cc?: string | string[];
+ from?: string;
+ subject: string;
+ text: string;
+ html: string;
+ attachments?: Array<{ filename: string; content: string }>;
+ companyId: string;
+ };
+ };
+
+ // Model thumbnail generation
+ "carbon/model-thumbnail": {
+ data: {
+ modelId: string;
+ companyId: string;
+ };
+ };
+
+ // Permission updates
+ "carbon/update-permissions": {
+ data: {
+ id: string;
+ addOnly: boolean;
+ permissions: Record<
+ string,
+ { view: boolean; create: boolean; update: boolean; delete: boolean }
+ >;
+ companyId: string;
+ };
+ };
+
+ // MES recalculation
+ "carbon/recalculate": {
+ data: {
+ type: "jobRequirements" | "jobMakeMethodRequirements";
+ id: string;
+ companyId: string;
+ userId: string;
+ };
+ };
+
+ // User administration
+ "carbon/user-admin": {
+ data:
+ | {
+ id: string;
+ type: "deactivate";
+ companyId: string;
+ }
+ | {
+ id: string;
+ type: "resend";
+ location: string;
+ ip: string;
+ companyId: string;
+ };
+ };
+
+ // Job rescheduling
+ "carbon/reschedule-job": {
+ data: {
+ jobId: string;
+ companyId: string;
+ userId: string;
+ mode?: "initial" | "reschedule";
+ direction?: "backward" | "forward";
+ };
+ };
+
+ // Post transaction (accounting)
+ "carbon/post-transaction": {
+ data: {
+ documentId: string;
+ type: "receipt" | "purchase-invoice" | "shipment";
+ userId: string;
+ companyId: string;
+ };
+ };
+
+ // Slack document sync (4 specific events)
+ "carbon/slack-document-created": {
+ data: {
+ documentType: string;
+ documentId: string;
+ companyId: string;
+ channelId: string;
+ threadTs: string;
+ };
+ };
+
+ "carbon/slack-document-status-update": {
+ data: {
+ documentType: string;
+ documentId: string;
+ companyId: string;
+ previousStatus: string;
+ newStatus: string;
+ updatedBy: string;
+ reason?: string;
+ };
+ };
+
+ "carbon/slack-document-task-update": {
+ data: {
+ documentType: string;
+ documentId: string;
+ companyId: string;
+ taskType: "investigation" | "action" | "approval";
+ taskName: string;
+ status: string;
+ assignee?: string | null;
+ completedAt?: string;
+ };
+ };
+
+ "carbon/slack-document-assignment-update": {
+ data: {
+ documentType: string;
+ documentId: string;
+ companyId: string;
+ previousAssignee?: string;
+ newAssignee: string;
+ updatedBy: string;
+ };
+ };
+
+ // Onboarding
+ "carbon/onboard": {
+ data: {
+ type: "lead" | "customer";
+ companyId: string;
+ userId: string;
+ plan?: string;
+ };
+ };
+
+ // Event queue processing (PGMQ consumer)
+ "carbon/event-queue.process": {
+ data: Record<string, never>;
+ };
+
+ // Event handlers
+ "carbon/event-webhook": {
+ data: {
+ msgId: number;
+ url: string;
+ config: {
+ headers?: Record<string, string>;
+ [key: string]: unknown;
+ };
+ data: {
+ table: string;
+ recordId: string;
+ operation: "INSERT" | "UPDATE" | "DELETE";
+ [key: string]: unknown;
+ };
+ };
+ };
+
+ "carbon/event-workflow": {
+ data: {
+ msgId: number;
+ workflowId: string;
+ data: {
+ table: string;
+ recordId: string;
+ operation: "INSERT" | "UPDATE" | "DELETE";
+ [key: string]: unknown;
+ };
+ };
+ };
+
+ "carbon/event-sync": {
+ data: {
+ records: Array<{
+ event: {
+ table: string;
+ recordId: string;
+ operation: "INSERT" | "UPDATE" | "DELETE";
+ [key: string]: unknown;
+ };
+ companyId: string;
+ handlerConfig: Record<string, unknown>;
+ }>;
+ };
+ };
+
+ "carbon/event-search": {
+ data: {
+ records: Array<{
+ event: {
+ table: string;
+ recordId: string;
+ operation: "INSERT" | "UPDATE" | "DELETE";
+ [key: string]: unknown;
+ };
+ companyId: string;
+ }>;
+ };
+ };
+
+ "carbon/event-audit": {
+ data: {
+ records: Array<{
+ event: {
+ table: string;
+ recordId: string;
+ operation: "INSERT" | "UPDATE" | "DELETE";
+ [key: string]: unknown;
+ };
+ companyId: string;
+ actorId?: string;
+ handlerConfig: Record<string, unknown>;
+ }>;
+ };
+ };
+
+ "carbon/event-embedding": {
+ data: {
+ records: Array<{
+ event: {
+ table: string;
+ recordId: string;
+ operation: "INSERT" | "UPDATE" | "DELETE" | "TRUNCATE";
+ [key: string]: unknown;
+ };
+ companyId: string;
+ }>;
+ };
+ };
+
+ // Cleanup tasks
+ "carbon/cleanup": {
+ data: Record<string, never>;
+ };
+
+ // MRP calculation
+ "carbon/mrp": {
+ data: {
+ companyId?: string;
+ };
+ };
+
+ // Weekly tasks
+ "carbon/weekly": {
+ data: Record<string, never>;
+ };
+
+ // Dispatch
+ "carbon/dispatch": {
+ data: {
+ companyId?: string;
+ };
+ };
+
+ // Exchange rates update
+ "carbon/update-exchange-rates": {
+ data: Record<string, never>;
+ };
+
+ // Audit archive (scheduled, no payload)
+ "carbon/audit-archive": {
+ data: Record<string, never>;
+ };
+
+ // Accounting backfill
+ "carbon/accounting-backfill": {
+ data: {
+ companyId: string;
+ provider: string;
+ batchSize?: number;
+ entityTypes?: {
+ customers?: boolean;
+ vendors?: boolean;
+ items?: boolean;
+ };
+ };
+ };
+
+ // Sync external accounting (accepts the full AccountingSyncSchema payload)
+ "carbon/sync-external-accounting": {
+ data: {
+ companyId: string;
+ provider: string;
+ syncDirection: "push-to-accounting" | "pull-from-accounting" | "two-way";
+ entities: Array<{
+ entityType: string;
+ entityId: string;
+ }>;
+ };
+ };
+
+ // Paperless parts integration (full webhook payload)
+ "carbon/paperless-parts": {
+ data: {
+ apiKey: string;
+ companyId: string;
+ payload: {
+ type: string;
+ created: string;
+ object: string;
+ data: Record<string, unknown>;
+ };
+ };
+ };
+
+ // Linear integration (full webhook payload)
+ "carbon/linear-sync": {
+ data: {
+ companyId: string;
+ event: {
+ type: string;
+ action: string;
+ data: {
+ id: string;
+ assigneeId?: string;
+ [key: string]: unknown;
+ };
+ };
+ };
+ };
+
+ // Jira integration (full webhook payload)
+ "carbon/jira-sync": {
+ data: {
+ companyId: string;
+ event: {
+ timestamp?: number;
+ webhookEvent: string;
+ issue?: {
+ id: string;
+ key: string;
+ fields: Record<string, unknown>;
+ };
+ changelog?: {
+ items: Array<Record<string, unknown>>;
+ };
+ };
+ };
+ };
+};
diff --git a/packages/jobs/src/index.ts b/packages/jobs/src/index.ts
new file mode 100644
index 0000000000..6206e55e1d
--- /dev/null
+++ b/packages/jobs/src/index.ts
@@ -0,0 +1,8 @@
+// Main package exports - only what app code needs
+
+export type { Events } from "./events.js";
+export {
+ syncIssueFromJiraSchema,
+ syncIssueFromLinearSchema
+} from "./schemas.js";
+export { batchTrigger, trigger } from "./trigger.js";
diff --git a/packages/jobs/src/inngest/client.ts b/packages/jobs/src/inngest/client.ts
new file mode 100644
index 0000000000..fda4b8f438
--- /dev/null
+++ b/packages/jobs/src/inngest/client.ts
@@ -0,0 +1,10 @@
+import { Inngest } from "inngest";
+
+/**
+ * The Inngest client for Carbon jobs.
+ * This client is used to define functions and send events.
+ */
+export const inngest = new Inngest({ id: "carbon" });
+
+// Re-export the typed client for use in functions
+export type InngestClient = typeof inngest;
diff --git a/packages/jobs/src/inngest/functions/events/audit.ts b/packages/jobs/src/inngest/functions/events/audit.ts
new file mode 100644
index 0000000000..d5380edf08
--- /dev/null
+++ b/packages/jobs/src/inngest/functions/events/audit.ts
@@ -0,0 +1,358 @@
+import { getCarbonServiceRole } from "@carbon/auth/client.server";
+import {
+ auditConfig,
+ getEntityConfigsForTable,
+ isAuditableTable,
+ isChildTable,
+ isExtensionTable,
+ isIndirectTable,
+ isRootTable
+} from "@carbon/database/audit.config";
+import type {
+ AuditDiff,
+ CreateAuditLogEntry
+} from "@carbon/database/audit.types";
+import { groupBy } from "@carbon/utils";
+import { z } from "zod";
+import { inngest } from "../../client";
+
+const AuditRecordSchema = z.object({
+ event: z.object({
+ table: z.string(),
+ operation: z.enum(["INSERT", "UPDATE", "DELETE", "TRUNCATE"]),
+ recordId: z.string(),
+ new: z.record(z.any()).nullable(),
+ old: z.record(z.any()).nullable(),
+ timestamp: z.string()
+ }),
+ companyId: z.string(),
+ actorId: z.string().nullish(),
+ handlerConfig: z.record(z.any())
+});
+
+const AuditPayloadSchema = z.object({
+ records: z.array(AuditRecordSchema)
+});
+
+export type AuditPayload = z.infer<typeof AuditPayloadSchema>;
+
+/**
+ * Compute the diff between old and new record values.
+ */
+function computeDiff(
+ old: Record<string, unknown>,
+ newRecord: Record<string, unknown>
+): AuditDiff | null {
+ const diff: AuditDiff = {};
+ const skipFields = auditConfig.skipFields;
+
+ const allKeys = new Set([...Object.keys(old), ...Object.keys(newRecord)]);
+
+ for (const key of allKeys) {
+ if ((skipFields as readonly string[]).includes(key)) continue;
+
+ const oldValue = old[key];
+ const newValue = newRecord[key];
+
+ if (JSON.stringify(oldValue) !== JSON.stringify(newValue)) {
+ if (
+ typeof oldValue === "object" &&
+ oldValue !== null &&
+ typeof newValue === "object" &&
+ newValue !== null &&
+ !Array.isArray(oldValue) &&
+ !Array.isArray(newValue)
+ ) {
+ const nestedDiff = computeNestedDiff(
+ oldValue as Record<string, unknown>,
+ newValue as Record<string, unknown>,
+ key
+ );
+ Object.assign(diff, nestedDiff);
+ } else {
+ diff[key] = { old: oldValue, new: newValue };
+ }
+ }
+ }
+
+ return Object.keys(diff).length > 0 ? diff : null;
+}
+
+function computeNestedDiff(
+ old: Record<string, unknown>,
+ newRecord: Record<string, unknown>,
+ prefix: string
+): AuditDiff {
+ const diff: AuditDiff = {};
+
+ const allKeys = new Set([...Object.keys(old), ...Object.keys(newRecord)]);
+
+ for (const key of allKeys) {
+ const oldValue = old[key];
+ const newValue = newRecord[key];
+
+ if (JSON.stringify(oldValue) !== JSON.stringify(newValue)) {
+ diff[`${prefix}.${key}`] = { old: oldValue, new: newValue };
+ }
+ }
+
+ return diff;
+}
+
+type AuditRpcClient = {
+ rpc(
+ fn: "insert_audit_log_batch",
+ params: { p_company_id: string; p_entries: object[] }
+ ): Promise<{ data: number | null; error: any }>;
+};
+
+export const auditFunction = inngest.createFunction(
+ {
+ id: "event-handler-audit",
+ retries: 3
+ },
+ { event: "carbon/event-audit" },
+ async ({ event, step }) => {
+ const payload = AuditPayloadSchema.parse(event.data);
+
+ console.log(`Processing ${payload.records.length} audit log events`);
+
+ const results = {
+ inserted: 0,
+ skipped: 0,
+ failed: 0
+ };
+
+ const client = getCarbonServiceRole();
+
+ type AuditRecord = (typeof payload.records)[number];
+ const byCompany = groupBy(payload.records, (r) => r.companyId);
+
+ for (const [companyId, records] of Object.entries(byCompany) as [
+ string,
+ AuditRecord[]
+ ][]) {
+ if (!companyId || companyId === "undefined") {
+ console.log(`Skipping ${records.length} records: missing companyId`);
+ results.skipped += records.length;
+ continue;
+ }
+
+ const companyResult = await step.run(`audit-${companyId}`, async () => {
+ const stepResults = { inserted: 0, skipped: 0, failed: 0 };
+
+ // Check if company has audit logs enabled
+ const { data: company } = await client
+ .from("company")
+ .select("auditLogEnabled")
+ .eq("id", companyId)
+ .single();
+
+ if (
+ !(company as { auditLogEnabled: boolean } | null)?.auditLogEnabled
+ ) {
+ console.log(
+ `Skipping ${records.length} records: audit logging disabled for company ${companyId}`
+ );
+ stepResults.skipped += records.length;
+ return stepResults;
+ }
+
+ const entries: CreateAuditLogEntry[] = [];
+
+ for (const record of records) {
+ const tableName = record.event.table;
+
+ if (!isAuditableTable(tableName)) {
+ console.log(`Skipping: table "${tableName}" is not auditable`);
+ stepResults.skipped++;
+ continue;
+ }
+
+ if (record.event.operation === "TRUNCATE") {
+ console.log(
+ `Skipping: TRUNCATE on "${tableName}" is not meaningful`
+ );
+ stepResults.skipped++;
+ continue;
+ }
+
+ try {
+ const actorId =
+ record.actorId ??
+ record.event.new?.updatedBy ??
+ record.event.new?.createdBy ??
+ record.event.old?.updatedBy ??
+ record.event.old?.createdBy;
+
+ let diff: AuditDiff | null = null;
+ if (
+ record.event.operation === "UPDATE" &&
+ record.event.old &&
+ record.event.new
+ ) {
+ diff = computeDiff(
+ record.event.old as Record<string, unknown>,
+ record.event.new as Record<string, unknown>
+ );
+
+ if (!diff) {
+ console.log(
+ `Skipping: no meaningful diff for UPDATE on "${tableName}" record ${record.event.recordId}`
+ );
+ stepResults.skipped++;
+ continue;
+ }
+ }
+
+ const operation = record.event
+ .operation as CreateAuditLogEntry["operation"];
+ const entryActorId = (actorId as string) ?? null;
+ const entryMetadata = record.handlerConfig.metadata ?? null;
+
+ const entityConfigs = getEntityConfigsForTable(tableName);
+
+ if (entityConfigs.length === 0) {
+ console.log(
+ `Skipping: no entity config found for table "${tableName}"`
+ );
+ stepResults.skipped++;
+ continue;
+ }
+
+ let entriesCreatedForRecord = 0;
+
+ for (const entityEntry of entityConfigs) {
+ const { entityType, tableConfig } = entityEntry;
+
+ if (
+ record.event.operation === "INSERT" &&
+ !isRootTable(tableConfig)
+ ) {
+ console.log(
+ `Skipping: INSERT on non-root table "${tableName}" for entity "${entityType}"`
+ );
+ continue;
+ }
+
+ if (isRootTable(tableConfig)) {
+ entries.push({
+ tableName,
+ entityType,
+ entityId: record.event.recordId,
+ operation,
+ actorId: entryActorId,
+ diff,
+ metadata: entryMetadata
+ });
+ entriesCreatedForRecord++;
+ } else if (isExtensionTable(tableConfig)) {
+ entries.push({
+ tableName,
+ entityType,
+ entityId: record.event.recordId,
+ operation,
+ actorId: entryActorId,
+ diff,
+ metadata: entryMetadata
+ });
+ entriesCreatedForRecord++;
+ } else if (isChildTable(tableConfig)) {
+ const recordData = record.event.new ?? record.event.old;
+ const entityId = recordData?.[tableConfig.entityIdColumn];
+
+ if (!entityId) {
+ console.log(
+ `Skipping: could not resolve entity ID from column "${tableConfig.entityIdColumn}" for "${tableName}" record ${record.event.recordId}`
+ );
+ continue;
+ }
+
+ entries.push({
+ tableName,
+ entityType,
+ entityId: String(entityId),
+ operation,
+ actorId: entryActorId,
+ diff,
+ metadata: entryMetadata
+ });
+ entriesCreatedForRecord++;
+ } else if (isIndirectTable(tableConfig)) {
+ const { junction, fk, entityIdColumn } = tableConfig.resolve;
+
+ const { data: junctionRow } = await client
+ .from(junction as any)
+ .select(entityIdColumn)
+ .eq(fk, record.event.recordId)
+ .limit(1)
+ .maybeSingle();
+
+ const row = junctionRow as unknown as Record<
+ string,
+ unknown
+ > | null;
+ if (row && row[entityIdColumn]) {
+ entries.push({
+ tableName,
+ entityType,
+ entityId: String(row[entityIdColumn]),
+ operation,
+ actorId: entryActorId,
+ diff,
+ metadata: entryMetadata
+ });
+ entriesCreatedForRecord++;
+ } else {
+ console.log(
+ `Skipping: no parent entity found via junction "${junction}" for "${tableName}" record ${record.event.recordId} (entity: ${entityType})`
+ );
+ }
+ }
+ }
+
+ if (entriesCreatedForRecord === 0) {
+ console.log(
+ `Skipping: could not resolve any entity for "${tableName}" record ${record.event.recordId}`
+ );
+ stepResults.skipped++;
+ }
+ } catch (error) {
+ console.error(`Failed to process audit record:`, {
+ error,
+ record
+ });
+ stepResults.failed++;
+ }
+ }
+
+ // Batch insert entries using RPC
+ if (entries.length > 0) {
+ const { data: insertedCount, error } = await (
+ client as unknown as AuditRpcClient
+ ).rpc("insert_audit_log_batch", {
+ p_company_id: companyId,
+ p_entries: entries
+ });
+
+ if (error) {
+ console.error(`Failed to insert audit log entries:`, { error });
+ stepResults.failed += entries.length;
+ } else {
+ stepResults.inserted += insertedCount ?? entries.length;
+ }
+ }
+
+ return stepResults;
+ });
+
+ results.inserted += companyResult.inserted;
+ results.skipped += companyResult.skipped;
+ results.failed += companyResult.failed;
+ }
+
+ console.log("Audit function completed", results);
+
+ return results;
+ }
+);
diff --git a/packages/jobs/src/inngest/functions/events/embedding.ts b/packages/jobs/src/inngest/functions/events/embedding.ts
new file mode 100644
index 0000000000..beb05a7fe6
--- /dev/null
+++ b/packages/jobs/src/inngest/functions/events/embedding.ts
@@ -0,0 +1,104 @@
+import { getCarbonServiceRole } from "@carbon/auth/client.server";
+import { z } from "zod";
+import { inngest } from "../../client.js";
+
+// Fields that affect embeddings for each table
+const EMBEDDING_FIELDS: Record<string, string[]> = {
+ item: ["name", "description"],
+ customer: ["name"],
+ supplier: ["name"]
+};
+
+const EmbeddingRecordSchema = z.object({
+ event: z.object({
+ table: z.string(),
+ operation: z.enum(["INSERT", "UPDATE", "DELETE", "TRUNCATE"]),
+ recordId: z.string(),
+ new: z.record(z.any()).nullable(),
+ old: z.record(z.any()).nullable(),
+ timestamp: z.string()
+ }),
+ companyId: z.string()
+});
+
+const EmbeddingPayloadSchema = z.object({
+ records: z.array(EmbeddingRecordSchema)
+});
+
+export type EmbeddingPayload = z.infer<typeof EmbeddingPayloadSchema>;
+
+export const embeddingFunction = inngest.createFunction(
+ {
+ id: "event-handler-embedding",
+ retries: 3
+ },
+ { event: "carbon/event-embedding" },
+ async ({ event, step }) => {
+ return await step.run("process-embeddings", async () => {
+ const payload = EmbeddingPayloadSchema.parse(event.data);
+
+ const results = { processed: 0, skipped: 0, failed: 0 };
+ const client = getCarbonServiceRole();
+
+ // Filter to only records that need embedding
+ const jobs: { id: string; table: string }[] = [];
+
+ for (const record of payload.records) {
+ const { event } = record;
+ const fields = EMBEDDING_FIELDS[event.table];
+
+ if (!fields) {
+ results.skipped++;
+ continue;
+ }
+
+ if (event.operation === "DELETE" || event.operation === "TRUNCATE") {
+ results.skipped++;
+ continue;
+ }
+
+ if (event.operation === "UPDATE" && event.old && event.new) {
+ const changed = fields.some((f) => event.old![f] !== event.new![f]);
+ if (!changed) {
+ results.skipped++;
+ continue;
+ }
+ }
+
+ jobs.push({ id: event.recordId, table: event.table });
+ }
+
+ if (jobs.length === 0) {
+ console.info(
+ `Embedding handler: nothing to process, skipped=${results.skipped}`
+ );
+ return results;
+ }
+
+ // Call the embed edge function directly with a batch
+ // The edge function expects: [{ jobId, id, table }]
+ // jobId is used for pgmq cleanup — pass -1 since we're not coming from the queue
+ const batch = jobs.map((job, i) => ({
+ jobId: -(i + 1),
+ ...job
+ }));
+
+ const { error } = await client.functions.invoke("embed", {
+ body: batch
+ });
+
+ if (error) {
+ console.error(`Embed edge function failed: ${error.message}`);
+ results.failed = jobs.length;
+ } else {
+ results.processed = jobs.length;
+ }
+
+ console.info(
+ `Embedding handler: processed=${results.processed}, skipped=${results.skipped}, failed=${results.failed}`
+ );
+
+ return results;
+ });
+ }
+);
diff --git a/packages/jobs/src/inngest/functions/events/index.ts b/packages/jobs/src/inngest/functions/events/index.ts
new file mode 100644
index 0000000000..52474890ef
--- /dev/null
+++ b/packages/jobs/src/inngest/functions/events/index.ts
@@ -0,0 +1,7 @@
+export { auditFunction } from "./audit";
+export { embeddingFunction } from "./embedding";
+export { eventQueueFunction } from "./queue";
+export { searchFunction } from "./search";
+export { syncFunction } from "./sync";
+export { webhookFunction } from "./webhook";
+export { workflowFunction } from "./workflow";
diff --git a/packages/jobs/src/inngest/functions/events/queue.ts b/packages/jobs/src/inngest/functions/events/queue.ts
new file mode 100644
index 0000000000..710c549eab
--- /dev/null
+++ b/packages/jobs/src/inngest/functions/events/queue.ts
@@ -0,0 +1,195 @@
+import {
+ getPostgresClient,
+ getPostgresConnectionPool,
+ type KyselyDatabase
+} from "@carbon/database/client";
+import type { HandlerType, QueueMessage } from "@carbon/database/event";
+import { type Kysely, PostgresDriver, sql } from "kysely";
+import { inngest } from "../../client";
+
+const QUEUE_NAME = "event_system"; // Name of the PGMQ queue
+const BATCH_SIZE = 100; // Number of messages to process per run
+const VISIBILITY_TIMEOUT = 30; // Seconds a message is hidden after being read
+const CHUNK_SIZE = 10; // Max events per sendEvent call (keeps under 256KB limit)
+
+function chunk<T>(arr: T[], size: number): T[][] {
+ const chunks: T[][] = [];
+ for (let i = 0; i < arr.length; i += size) {
+ chunks.push(arr.slice(i, i + size));
+ }
+ return chunks;
+}
+
+const getDatabaseClient = (size: number) => {
+ const pool = getPostgresConnectionPool(size);
+ return getPostgresClient(
+ pool,
+ PostgresDriver
+ ) as unknown as Kysely<KyselyDatabase>;
+};
+
+type QueueJob = {
+ msg_id: number;
+ message: QueueMessage;
+};
+
+/**
+ * Event queue cron function - polls PGMQ every minute and routes events to handlers.
+ * This is the critical bridge between PostgreSQL events and inngest handlers.
+ */
+export const eventQueueFunction = inngest.createFunction(
+ {
+ id: "event-queue",
+ retries: 2
+ },
+ { cron: "* * * * *" }, // Every minute
+ async ({ step }) => {
+ // 1. Read batch from PGMQ (checkpointed so replays don't re-read)
+ type ReadQueueResult = {
+ grouped: Record<HandlerType, QueueJob[]>;
+ allIds: number[];
+ };
+
+ const { grouped, allIds } = (await step.run("read-queue", async () => {
+ const pg = getDatabaseClient(1);
+ const { rows: jobs } =
+ await sql<QueueJob>`SELECT * FROM pgmq.read(${QUEUE_NAME}, ${VISIBILITY_TIMEOUT}, ${BATCH_SIZE})`.execute(
+ pg
+ );
+
+ const grouped: Record<HandlerType, QueueJob[]> = {
+ WEBHOOK: [],
+ WORKFLOW: [],
+ SYNC: [],
+ SEARCH: [],
+ AUDIT: [],
+ EMBEDDING: []
+ };
+
+ for (const job of jobs) {
+ grouped[job.message.handlerType].push(job);
+ }
+
+ return {
+ grouped,
+ allIds: jobs.map((j) => j.msg_id)
+ };
+ })) as ReadQueueResult;
+
+ if (allIds.length === 0) {
+ return { processed: 0 };
+ }
+
+ // 3. Dispatch webhooks
+ if (grouped.WEBHOOK.length > 0) {
+ const events = grouped.WEBHOOK.map((job) => ({
+ name: "carbon/event-webhook" as const,
+ data: {
+ msgId: job.msg_id,
+ url: job.message.handlerConfig.url,
+ config: job.message.handlerConfig,
+ data: job.message.event
+ }
+ }));
+
+ const chunks = chunk(events, CHUNK_SIZE);
+ for (let i = 0; i < chunks.length; i++) {
+ await step.sendEvent(`dispatch-webhooks-${i}`, chunks[i]);
+ }
+ }
+
+ // 4. Dispatch workflows
+ if (grouped.WORKFLOW.length > 0) {
+ const events = grouped.WORKFLOW.map((job) => ({
+ name: "carbon/event-workflow" as const,
+ data: {
+ msgId: job.msg_id,
+ workflowId: job.message.handlerConfig.workflowId,
+ data: job.message.event
+ }
+ }));
+
+ const chunks = chunk(events, CHUNK_SIZE);
+ for (let i = 0; i < chunks.length; i++) {
+ await step.sendEvent(`dispatch-workflows-${i}`, chunks[i]);
+ }
+ }
+
+ // 5. Dispatch syncs (chunked)
+ if (grouped.SYNC.length > 0) {
+ const records = grouped.SYNC.map((job) => ({
+ event: job.message.event,
+ companyId: job.message.companyId,
+ handlerConfig: job.message.handlerConfig
+ }));
+
+ const chunks = chunk(records, CHUNK_SIZE);
+ for (let i = 0; i < chunks.length; i++) {
+ await step.sendEvent(`dispatch-syncs-${i}`, {
+ name: "carbon/event-sync" as const,
+ data: { records: chunks[i] }
+ });
+ }
+ }
+
+ // 6. Dispatch searches (chunked)
+ if (grouped.SEARCH.length > 0) {
+ const records = grouped.SEARCH.map((job) => ({
+ event: job.message.event,
+ companyId: job.message.companyId
+ }));
+
+ const chunks = chunk(records, CHUNK_SIZE);
+ for (let i = 0; i < chunks.length; i++) {
+ await step.sendEvent(`dispatch-searches-${i}`, {
+ name: "carbon/event-search" as const,
+ data: { records: chunks[i] }
+ });
+ }
+ }
+
+ // 7. Dispatch audits (chunked)
+ if (grouped.AUDIT.length > 0) {
+ const records = grouped.AUDIT.map((job) => ({
+ event: job.message.event,
+ companyId: job.message.companyId,
+ actorId: job.message.actorId,
+ handlerConfig: job.message.handlerConfig
+ }));
+
+ const chunks = chunk(records, CHUNK_SIZE);
+ for (let i = 0; i < chunks.length; i++) {
+ await step.sendEvent(`dispatch-audits-${i}`, {
+ name: "carbon/event-audit" as const,
+ data: { records: chunks[i] }
+ });
+ }
+ }
+
+ // 8. Dispatch embeddings (chunked)
+ if (grouped.EMBEDDING.length > 0) {
+ const records = grouped.EMBEDDING.map((job) => ({
+ event: job.message.event,
+ companyId: job.message.companyId
+ }));
+
+ const chunks = chunk(records, CHUNK_SIZE);
+ for (let i = 0; i < chunks.length; i++) {
+ await step.sendEvent(`dispatch-embeddings-${i}`, {
+ name: "carbon/event-embedding" as const,
+ data: { records: chunks[i] }
+ });
+ }
+ }
+
+ // 9. Delete processed messages from PGMQ
+ await step.run("delete-processed", async () => {
+ const pg = getDatabaseClient(1);
+ await sql`SELECT pgmq.delete(${QUEUE_NAME}, id::bigint) FROM unnest(${allIds}::bigint[]) AS id`.execute(
+ pg
+ );
+ });
+
+ return { routed: allIds.length };
+ }
+);
diff --git a/packages/jobs/trigger/event/search.ts b/packages/jobs/src/inngest/functions/events/search.ts
similarity index 70%
rename from packages/jobs/trigger/event/search.ts
rename to packages/jobs/src/inngest/functions/events/search.ts
index c21287b9f9..f2e1c9fc1c 100644
--- a/packages/jobs/trigger/event/search.ts
+++ b/packages/jobs/src/inngest/functions/events/search.ts
@@ -1,10 +1,9 @@
import { getCarbonServiceRole } from "@carbon/auth/client.server";
import { groupBy } from "@carbon/utils";
-import { logger, task } from "@trigger.dev/sdk/v3";
import { z } from "zod";
+import { inngest } from "../../client";
// Type for the Supabase client with our custom RPC functions
-// These are defined in the migration but types won't be generated until after migration runs
type SearchRpcClient = ReturnType<typeof getCarbonServiceRole> & {
rpc(
fn: "delete_from_search_index",
@@ -33,7 +32,6 @@ type SearchEntityConfig = {
getLink: (record: Record<string, any>) => string;
getTags: (record: Record<string, any>) => string[];
getMetadata: (record: Record<string, any>) => Record<string, any>;
- // Optional: lookup additional data from related tables
enrichRecord?: (
record: Record<string, any>,
client: ReturnType<typeof getCarbonServiceRole>
@@ -62,9 +60,9 @@ const SEARCH_ENTITY_CONFIGS: Record<string, SearchEntityConfig> = {
return {
...record,
fullName: user?.fullName,
- employeeTypeName: empType?.name,
+ employeeTypeName: empType?.name
};
- },
+ }
},
customer: {
entityType: "customer",
@@ -86,9 +84,9 @@ const SEARCH_ENTITY_CONFIGS: Record<string, SearchEntityConfig> = {
return {
...record,
customerTypeName: custType?.name,
- customerStatusName: custStatus?.name,
+ customerStatusName: custStatus?.name
};
- },
+ }
},
supplier: {
entityType: "supplier",
@@ -104,9 +102,9 @@ const SEARCH_ENTITY_CONFIGS: Record<string, SearchEntityConfig> = {
.single();
return {
...record,
- supplierTypeName: suppType?.name,
+ supplierTypeName: suppType?.name
};
- },
+ }
},
item: {
entityType: "item",
@@ -119,12 +117,12 @@ const SEARCH_ENTITY_CONFIGS: Record<string, SearchEntityConfig> = {
Tool: "/x/tool/",
Consumable: "/x/consumable/",
Material: "/x/material/",
- Fixture: "/x/fixture/",
+ Fixture: "/x/fixture/"
};
return (typeLinks[r.type] || "/x/part/") + r.id;
},
getTags: (r) => [r.type, r.replenishmentSystem].filter(Boolean),
- getMetadata: (r) => ({ active: r.active }),
+ getMetadata: (r) => ({ active: r.active })
},
job: {
entityType: "job",
@@ -147,9 +145,9 @@ const SEARCH_ENTITY_CONFIGS: Record<string, SearchEntityConfig> = {
return {
...record,
itemName: item?.name,
- customerName: customer?.name,
+ customerName: customer?.name
};
- },
+ }
},
purchaseOrder: {
entityType: "purchaseOrder",
@@ -159,7 +157,7 @@ const SEARCH_ENTITY_CONFIGS: Record<string, SearchEntityConfig> = {
getTags: (r) => [r.status].filter(Boolean),
getMetadata: (r) => ({
orderDate: r.orderDate,
- supplierReference: r.supplierReference,
+ supplierReference: r.supplierReference
}),
enrichRecord: async (record, client) => {
const { data: supplier } = await client
@@ -168,7 +166,7 @@ const SEARCH_ENTITY_CONFIGS: Record<string, SearchEntityConfig> = {
.eq("id", record.supplierId)
.single();
return { ...record, supplierName: supplier?.name };
- },
+ }
},
salesInvoice: {
entityType: "salesInvoice",
@@ -184,7 +182,7 @@ const SEARCH_ENTITY_CONFIGS: Record<string, SearchEntityConfig> = {
.eq("id", record.customerId)
.single();
return { ...record, customerName: customer?.name };
- },
+ }
},
purchaseInvoice: {
entityType: "purchaseInvoice",
@@ -200,7 +198,7 @@ const SEARCH_ENTITY_CONFIGS: Record<string, SearchEntityConfig> = {
.eq("id", record.supplierId)
.single();
return { ...record, supplierName: supplier?.name };
- },
+ }
},
nonConformance: {
entityType: "issue",
@@ -216,7 +214,7 @@ const SEARCH_ENTITY_CONFIGS: Record<string, SearchEntityConfig> = {
.eq("id", record.nonConformanceTypeId)
.single();
return { ...record, ncTypeName: ncType?.name };
- },
+ }
},
gauge: {
entityType: "gauge",
@@ -229,7 +227,7 @@ const SEARCH_ENTITY_CONFIGS: Record<string, SearchEntityConfig> = {
),
getMetadata: (r) => ({
nextCalibrationDate: r.nextCalibrationDate,
- serialNumber: r.serialNumber,
+ serialNumber: r.serialNumber
}),
enrichRecord: async (record, client) => {
const { data: gaugeType } = await client
@@ -238,7 +236,7 @@ const SEARCH_ENTITY_CONFIGS: Record<string, SearchEntityConfig> = {
.eq("id", record.gaugeTypeId)
.single();
return { ...record, gaugeTypeName: gaugeType?.name };
- },
+ }
},
quote: {
entityType: "quote",
@@ -250,7 +248,7 @@ const SEARCH_ENTITY_CONFIGS: Record<string, SearchEntityConfig> = {
getMetadata: (r) => ({
customerId: r.customerId,
expirationDate: r.expirationDate,
- customerReference: r.customerReference,
+ customerReference: r.customerReference
}),
enrichRecord: async (record, client) => {
const { data: customer } = await client
@@ -259,7 +257,7 @@ const SEARCH_ENTITY_CONFIGS: Record<string, SearchEntityConfig> = {
.eq("id", record.customerId)
.single();
return { ...record, customerName: customer?.name };
- },
+ }
},
salesRfq: {
entityType: "salesRfq",
@@ -269,7 +267,7 @@ const SEARCH_ENTITY_CONFIGS: Record<string, SearchEntityConfig> = {
getTags: (r) => [r.status].filter(Boolean),
getMetadata: (r) => ({
customerId: r.customerId,
- expirationDate: r.expirationDate,
+ expirationDate: r.expirationDate
}),
enrichRecord: async (record, client) => {
const { data: customer } = await client
@@ -278,7 +276,7 @@ const SEARCH_ENTITY_CONFIGS: Record<string, SearchEntityConfig> = {
.eq("id", record.customerId)
.single();
return { ...record, customerName: customer?.name };
- },
+ }
},
salesOrder: {
entityType: "salesOrder",
@@ -290,7 +288,7 @@ const SEARCH_ENTITY_CONFIGS: Record<string, SearchEntityConfig> = {
getMetadata: (r) => ({
customerId: r.customerId,
orderDate: r.orderDate,
- customerReference: r.customerReference,
+ customerReference: r.customerReference
}),
enrichRecord: async (record, client) => {
const { data: customer } = await client
@@ -299,7 +297,7 @@ const SEARCH_ENTITY_CONFIGS: Record<string, SearchEntityConfig> = {
.eq("id", record.customerId)
.single();
return { ...record, customerName: customer?.name };
- },
+ }
},
supplierQuote: {
entityType: "supplierQuote",
@@ -309,7 +307,7 @@ const SEARCH_ENTITY_CONFIGS: Record<string, SearchEntityConfig> = {
getTags: (r) => [r.status].filter(Boolean),
getMetadata: (r) => ({
supplierId: r.supplierId,
- expirationDate: r.expirationDate,
+ expirationDate: r.expirationDate
}),
enrichRecord: async (record, client) => {
const { data: supplier } = await client
@@ -318,8 +316,8 @@ const SEARCH_ENTITY_CONFIGS: Record<string, SearchEntityConfig> = {
.eq("id", record.supplierId)
.single();
return { ...record, supplierName: supplier?.name };
- },
- },
+ }
+ }
};
const SearchRecordSchema = z.object({
@@ -329,40 +327,37 @@ const SearchRecordSchema = z.object({
recordId: z.string(),
new: z.record(z.any()).nullable(),
old: z.record(z.any()).nullable(),
- timestamp: z.string(),
+ timestamp: z.string()
}),
- companyId: z.string(),
+ companyId: z.string()
});
const SearchPayloadSchema = z.object({
- records: z.array(SearchRecordSchema),
+ records: z.array(SearchRecordSchema)
});
export type SearchPayload = z.infer<typeof SearchPayloadSchema>;
-export const searchTask = task({
- id: "event-handler-search",
- retry: {
- maxAttempts: 3,
- factor: 2,
- randomize: true,
+export const searchFunction = inngest.createFunction(
+ {
+ id: "event-handler-search",
+ retries: 3
},
- run: async (input: unknown) => {
- const payload = SearchPayloadSchema.parse(input);
+ { event: "carbon/event-search" },
+ async ({ event, step }) => {
+ const payload = SearchPayloadSchema.parse(event.data);
- logger.info(`Processing ${payload.records.length} search index events`);
+ console.log(`Processing ${payload.records.length} search index events`);
const results = {
updated: 0,
deleted: 0,
skipped: 0,
- failed: 0,
+ failed: 0
};
- // Cast to include our custom RPC functions (defined in migration)
const client = getCarbonServiceRole() as unknown as SearchRpcClient;
- // Group by companyId for efficient processing
type SearchRecord = (typeof payload.records)[number];
const byCompany = groupBy(payload.records, (r) => r.companyId);
@@ -375,98 +370,115 @@ export const searchTask = task({
continue;
}
- // Process deletions first
- const deletes = records.filter(
- (r) =>
- r.event.operation === "DELETE" || r.event.operation === "TRUNCATE"
- );
+ // Process each company's records as a step
+ const companyResult = await step.run(
+ `search-index-${companyId}`,
+ async () => {
+ const stepResults = { updated: 0, deleted: 0, skipped: 0, failed: 0 };
- for (const del of deletes) {
- const config = SEARCH_ENTITY_CONFIGS[del.event.table];
- if (!config) {
- results.skipped++;
- continue;
- }
+ // Process deletions first
+ const deletes = records.filter(
+ (r) =>
+ r.event.operation === "DELETE" || r.event.operation === "TRUNCATE"
+ );
- try {
- // Use RPC to delete from dynamic table
- await client.rpc("delete_from_search_index", {
- p_company_id: companyId,
- p_entity_type: config.entityType,
- p_entity_id: del.event.recordId,
- });
- results.deleted++;
- } catch (error) {
- logger.error(`Failed to delete from search index:`, {
- error,
- record: del,
- });
- results.failed++;
- }
- }
+ for (const del of deletes) {
+ const config = SEARCH_ENTITY_CONFIGS[del.event.table];
+ if (!config) {
+ stepResults.skipped++;
+ continue;
+ }
- // Process inserts and updates
- const upserts = records.filter(
- (r) => r.event.operation === "INSERT" || r.event.operation === "UPDATE"
- );
+ try {
+ await client.rpc("delete_from_search_index", {
+ p_company_id: companyId,
+ p_entity_type: config.entityType,
+ p_entity_id: del.event.recordId
+ });
+ stepResults.deleted++;
+ } catch (error) {
+ console.error(`Failed to delete from search index:`, {
+ error,
+ record: del
+ });
+ stepResults.failed++;
+ }
+ }
- for (const upsert of upserts) {
- const config = SEARCH_ENTITY_CONFIGS[upsert.event.table];
- if (!config) {
- results.skipped++;
- continue;
- }
+ // Process inserts and updates
+ const upserts = records.filter(
+ (r) =>
+ r.event.operation === "INSERT" || r.event.operation === "UPDATE"
+ );
- try {
- let record = upsert.event.new as Record<string, any>;
+ for (const upsert of upserts) {
+ const config = SEARCH_ENTITY_CONFIGS[upsert.event.table];
+ if (!config) {
+ stepResults.skipped++;
+ continue;
+ }
- // Special handling for employee - skip inactive employees
- if (upsert.event.table === "employee" && record.active === false) {
- await client.rpc("delete_from_search_index", {
- p_company_id: companyId,
- p_entity_type: config.entityType,
- p_entity_id: upsert.event.recordId,
- });
- results.deleted++;
- continue;
- }
+ try {
+ let record = upsert.event.new as Record<string, any>;
- // Enrich record with related data if needed
- if (config.enrichRecord) {
- record = await config.enrichRecord(record, client);
- }
+ // Special handling for employee - skip inactive employees
+ if (
+ upsert.event.table === "employee" &&
+ record.active === false
+ ) {
+ await client.rpc("delete_from_search_index", {
+ p_company_id: companyId,
+ p_entity_type: config.entityType,
+ p_entity_id: upsert.event.recordId
+ });
+ stepResults.deleted++;
+ continue;
+ }
- const title = config.getTitle(record);
- const description = config.getDescription?.(record) || "";
- const link = config.getLink(record);
- const tags = config.getTags(record);
- const metadata = config.getMetadata(record);
+ // Enrich record with related data if needed
+ if (config.enrichRecord) {
+ record = await config.enrichRecord(record, client);
+ }
- // Use RPC to upsert to dynamic table
- await client.rpc("upsert_to_search_index", {
- p_company_id: companyId,
- p_entity_type: config.entityType,
- p_entity_id: upsert.event.recordId,
- p_title: title,
- p_description: description,
- p_link: link,
- p_tags: tags,
- p_metadata: metadata,
- });
+ const title = config.getTitle(record);
+ const description = config.getDescription?.(record) || "";
+ const link = config.getLink(record);
+ const tags = config.getTags(record);
+ const metadata = config.getMetadata(record);
+
+ await client.rpc("upsert_to_search_index", {
+ p_company_id: companyId,
+ p_entity_type: config.entityType,
+ p_entity_id: upsert.event.recordId,
+ p_title: title,
+ p_description: description,
+ p_link: link,
+ p_tags: tags,
+ p_metadata: metadata
+ });
+
+ stepResults.updated++;
+ } catch (error) {
+ console.error(`Failed to update search index:`, {
+ error,
+ record: upsert
+ });
+ stepResults.failed++;
+ }
+ }
- results.updated++;
- } catch (error) {
- logger.error(`Failed to update search index:`, {
- error,
- record: upsert,
- });
- results.failed++;
+ return stepResults;
}
- }
+ );
+
+ results.updated += companyResult.updated;
+ results.deleted += companyResult.deleted;
+ results.skipped += companyResult.skipped;
+ results.failed += companyResult.failed;
}
- logger.info("Search task completed", results);
+ console.log("Search function completed", results);
return results;
- },
-});
+ }
+);
diff --git a/packages/jobs/src/inngest/functions/events/sync.ts b/packages/jobs/src/inngest/functions/events/sync.ts
new file mode 100644
index 0000000000..97094a4f02
--- /dev/null
+++ b/packages/jobs/src/inngest/functions/events/sync.ts
@@ -0,0 +1,240 @@
+import { getCarbonServiceRole } from "@carbon/auth/client.server";
+import {
+ getPostgresClient,
+ getPostgresConnectionPool
+} from "@carbon/database/client";
+import { EventSchema } from "@carbon/database/event";
+import {
+ type AccountingEntityType,
+ type BatchSyncResult,
+ getAccountingIntegration,
+ getProviderIntegration,
+ ProviderID,
+ RatelimitError,
+ SyncFactory
+} from "@carbon/ee/accounting";
+import { groupBy } from "@carbon/utils";
+import { PostgresDriver } from "kysely";
+import { z } from "zod";
+import { inngest } from "../../client";
+
+const SyncRecordSchema = z.object({
+ event: EventSchema,
+ companyId: z.string(),
+ handlerConfig: z.object({
+ provider: z.nativeEnum(ProviderID)
+ })
+});
+
+const SyncPayloadSchema = z.object({
+ records: z.array(SyncRecordSchema)
+});
+
+export type SyncPayload = z.infer<typeof SyncPayloadSchema>;
+
+// Map database table names to accounting entity types
+const TABLE_TO_ENTITY_MAP: Partial<Record<string, AccountingEntityType>> = {
+ customer: "customer",
+ supplier: "vendor",
+ item: "item",
+ purchaseOrder: "purchaseOrder",
+ purchaseInvoice: "bill",
+ salesInvoice: "invoice"
+};
+
+function getEntityTypeFromTable(table: string): AccountingEntityType | null {
+ return TABLE_TO_ENTITY_MAP[table] ?? null;
+}
+
+function getDeduplicatedIds<T>(
+ records: T[],
+ getId: (r: T) => string
+): string[] {
+ return [...new Set(records.map(getId))];
+}
+
+export const syncFunction = inngest.createFunction(
+ {
+ id: "event-handler-sync",
+ retries: 3
+ },
+ { event: "carbon/event-sync" },
+ async ({ event, step }) => {
+ const payload = SyncPayloadSchema.parse(event.data);
+
+ console.log(`Processing ${payload.records.length} sync events`);
+
+ const results = {
+ success: [] as BatchSyncResult[],
+ failed: [] as { recordId: string; error: string }[],
+ skipped: [] as { recordId: string; reason: string }[]
+ };
+
+ // Group records by (companyId, provider) for efficient batch processing
+ const byCompanyProvider = groupBy(payload.records, (r) => {
+ const companyId = r.companyId;
+ const provider = r.handlerConfig.provider;
+ return `${companyId}:${provider}`;
+ });
+
+ const pool = getPostgresConnectionPool(10);
+ const kysely = getPostgresClient(pool, PostgresDriver);
+ const client = getCarbonServiceRole();
+
+ try {
+ for (const [key, records] of Object.entries(byCompanyProvider)) {
+ const [companyId, provider] = key.split(":");
+
+ if (!companyId || companyId === "undefined" || !provider) {
+ for (const r of records) {
+ results.skipped.push({
+ recordId: r.event.recordId,
+ reason: "Missing companyId or provider"
+ });
+ }
+ continue;
+ }
+
+ // Process each company-provider group as a step for checkpointing
+ type GroupResults = {
+ success: BatchSyncResult[];
+ failed: { recordId: string; error: string }[];
+ skipped: { recordId: string; reason: string }[];
+ };
+
+ const groupResult = (await step.run(
+ `sync-${companyId}-${provider}`,
+ async () => {
+ const groupResults: GroupResults = {
+ success: [],
+ failed: [],
+ skipped: []
+ };
+
+ try {
+ // Get integration and provider instance
+ const integration = await getAccountingIntegration(
+ client,
+ companyId,
+ provider as ProviderID
+ );
+
+ const providerInstance = getProviderIntegration(
+ client,
+ companyId,
+ provider as ProviderID,
+ integration.metadata
+ );
+
+ // Group by entity type
+ const byEntityType = groupBy(records, (r) => {
+ const entityType = getEntityTypeFromTable(r.event.table);
+ return entityType ?? "unknown";
+ });
+
+ for (const [entityType, entityRecords] of Object.entries(
+ byEntityType
+ )) {
+ if (entityType === "unknown") {
+ for (const r of entityRecords) {
+ groupResults.skipped.push({
+ recordId: r.event.recordId,
+ reason: `Table '${r.event.table}' has no entity mapping`
+ });
+ }
+ continue;
+ }
+
+ // Separate by operation
+ const inserts = entityRecords.filter(
+ (r) => r.event.operation === "INSERT"
+ );
+ const updates = entityRecords.filter(
+ (r) => r.event.operation === "UPDATE"
+ );
+ const deletes = entityRecords.filter(
+ (r) => r.event.operation === "DELETE"
+ );
+
+ const syncer = SyncFactory.getSyncer({
+ database: kysely,
+ companyId,
+ provider: providerInstance,
+ config: providerInstance.getSyncConfig(
+ entityType as AccountingEntityType
+ ),
+ entityType: entityType as AccountingEntityType
+ });
+
+ // Process INSERTs and UPDATEs (push to accounting)
+ const toSync = [...inserts, ...updates];
+ if (toSync.length > 0) {
+ const entityIds = getDeduplicatedIds(
+ toSync,
+ (r) => r.event.recordId
+ );
+
+ console.log(
+ `Pushing ${entityIds.length} ${entityType} entities to accounting`
+ );
+
+ // Handle rate limiting with retry
+ let result: BatchSyncResult;
+ try {
+ result = await syncer.pushBatchToAccounting(entityIds);
+ } catch (error) {
+ if (error instanceof RatelimitError) {
+ const { retryAfterSeconds } = error.rateLimitInfo;
+ console.warn(
+ `[RATE LIMIT] Hit rate limit, will retry after ${retryAfterSeconds}s`
+ );
+ // Let inngest handle the retry by throwing
+ throw error;
+ }
+ throw error;
+ }
+
+ console.log("Sync result:", { entityType, result });
+ groupResults.success.push(result);
+ }
+
+ // Handle DELETEs (log for now, not yet implemented in syncers)
+ for (const del of deletes) {
+ groupResults.skipped.push({
+ recordId: del.event.recordId,
+ reason: "DELETE operations not yet implemented"
+ });
+ }
+ }
+ } catch (error) {
+ console.error(`Failed to process sync for ${key}:`, error);
+ for (const r of records) {
+ groupResults.failed.push({
+ recordId: r.event.recordId,
+ error:
+ error instanceof Error ? error.message : "Unknown error"
+ });
+ }
+ }
+
+ return groupResults;
+ }
+ )) as GroupResults;
+
+ results.success.push(...groupResult.success);
+ results.failed.push(...groupResult.failed);
+ results.skipped.push(...groupResult.skipped);
+ }
+ } finally {
+ await pool.end();
+ }
+
+ console.log("Sync function completed", {
+ successCount: results.success.reduce((acc, r) => acc + r.successCount, 0),
+ failedCount: results.failed.length,
+ skippedCount: results.skipped.length
+ });
+
+ return results;
+ }
+);
diff --git a/packages/jobs/src/inngest/functions/events/webhook.ts b/packages/jobs/src/inngest/functions/events/webhook.ts
new file mode 100644
index 0000000000..0d4aa6203c
--- /dev/null
+++ b/packages/jobs/src/inngest/functions/events/webhook.ts
@@ -0,0 +1,38 @@
+import axios from "axios";
+import { z } from "zod";
+import { inngest } from "../../client.ts";
+
+const webhookPayloadSchema = z.object({
+ url: z.string().url(),
+ data: z.any(),
+ config: z
+ .object({
+ headers: z.record(z.string()).optional()
+ })
+ .passthrough()
+});
+
+export type WebhookPayload = z.infer<typeof webhookPayloadSchema>;
+
+export const webhookFunction = inngest.createFunction(
+ {
+ id: "event-handler-webhook",
+ retries: 3,
+ idempotency: "event.data.msgId",
+ concurrency: {
+ limit: 0,
+ key: "event.data.data.table + '-' + event.data.data.recordId"
+ }
+ },
+ { event: "carbon/event-webhook" },
+ async ({ event, step }) => {
+ const payload = webhookPayloadSchema.parse(event.data);
+
+ await step.run("send-webhook", async () => {
+ console.log(`Firing webhook to ${payload.url}`);
+ await axios.post(payload.url, payload.data, {
+ headers: payload.config.headers
+ });
+ });
+ }
+);
diff --git a/packages/jobs/src/inngest/functions/events/workflow.ts b/packages/jobs/src/inngest/functions/events/workflow.ts
new file mode 100644
index 0000000000..0f66edc1ba
--- /dev/null
+++ b/packages/jobs/src/inngest/functions/events/workflow.ts
@@ -0,0 +1,31 @@
+import { z } from "zod";
+import { inngest } from "../../client";
+
+const workflowPayloadSchema = z.object({
+ workflowId: z.string(),
+ data: z.any()
+});
+
+export type WorkflowPayload = z.infer<typeof workflowPayloadSchema>;
+
+export const workflowFunction = inngest.createFunction(
+ {
+ id: "event-handler-workflow",
+ retries: 3,
+ idempotency: "event.data.msgId",
+ concurrency: {
+ limit: 0,
+ key: "event.data.data.table + '-' + event.data.data.recordId"
+ }
+ },
+ { event: "carbon/event-workflow" },
+ async ({ event, step }) => {
+ const payload = workflowPayloadSchema.parse(event.data);
+
+ await step.run("trigger-workflow", async () => {
+ console.log(`Triggering workflow ${payload.workflowId}`);
+ // Here you would trigger another business logic function
+ // e.g., await inngest.send({ name: payload.workflowId, data: payload.data });
+ });
+ }
+);
diff --git a/packages/jobs/src/inngest/functions/integrations/accounting-backfill.ts b/packages/jobs/src/inngest/functions/integrations/accounting-backfill.ts
new file mode 100644
index 0000000000..3eae9f2cf8
--- /dev/null
+++ b/packages/jobs/src/inngest/functions/integrations/accounting-backfill.ts
@@ -0,0 +1,777 @@
+/**
+ * Backfill function for syncing entities between Carbon and accounting providers.
+ *
+ * This function respects the per-entity sync direction configuration:
+ * - "pull-from-accounting": Only pull entities from the provider
+ * - "push-to-accounting": Only push Carbon entities to the provider
+ * - "two-way": Pull from provider AND push unsynced Carbon entities
+ *
+ * This prevents unnecessary syncing (e.g., items configured as push-only
+ * won't be pulled from Xero, and POs configured as push-only won't try to pull).
+ */
+import { getCarbonServiceRole } from "@carbon/auth/client.server";
+import {
+ getPostgresClient,
+ getPostgresConnectionPool
+} from "@carbon/database/client";
+import {
+ createMappingService,
+ getAccountingIntegration,
+ getProviderIntegration,
+ ProviderID,
+ RatelimitError,
+ type SyncDirection,
+ SyncFactory,
+ type XeroProvider
+} from "@carbon/ee/accounting";
+import { PostgresDriver } from "kysely";
+import z from "zod";
+import { inngest } from "../../client";
+
+// ============================================================
+// HELPERS
+// ============================================================
+
+/**
+ * Execute an async operation with rate limit handling.
+ * If a RatelimitError is thrown, wait for the specified retry period and retry once.
+ */
+async function withRateLimitRetry<T>(
+ operation: () => Promise<T>,
+ operationName: string,
+ step: {
+ sleep: (id: string, duration: string | number) => Promise<void>;
+ }
+): Promise<T> {
+ try {
+ return await operation();
+ } catch (error) {
+ if (error instanceof RatelimitError) {
+ const { retryAfterSeconds, limitType, details } = error.rateLimitInfo;
+ console.warn(`[RATE LIMIT] ${operationName} hit rate limit`, {
+ limitType,
+ retryAfterSeconds,
+ ...details
+ });
+ await step.sleep(
+ `rate-limit-wait-${operationName}`,
+ `${retryAfterSeconds}s`
+ );
+ console.info(
+ `[RATE LIMIT] Retrying ${operationName} after ${retryAfterSeconds}s wait`
+ );
+ return await operation();
+ }
+ throw error;
+ }
+}
+
+// ============================================================
+// SCHEMAS
+// ============================================================
+
+const BackfillPayloadSchema = z.object({
+ companyId: z.string(),
+ provider: z.nativeEnum(ProviderID),
+ batchSize: z.number().default(25), // Smaller batches to avoid rate limits
+ entityTypes: z
+ .object({
+ customers: z.boolean().default(true),
+ vendors: z.boolean().default(true),
+ items: z.boolean().default(true)
+ })
+ .default({})
+});
+
+/**
+ * Helper to determine if we should pull for a given direction config
+ */
+function shouldPull(direction: SyncDirection): boolean {
+ return direction === "pull-from-accounting" || direction === "two-way";
+}
+
+/**
+ * Helper to determine if we should push for a given direction config
+ */
+function shouldPush(direction: SyncDirection): boolean {
+ return direction === "push-to-accounting" || direction === "two-way";
+}
+
+export type BackfillPayload = z.input<typeof BackfillPayloadSchema>;
+type ParsedBackfillPayload = z.output<typeof BackfillPayloadSchema>;
+
+export const accountingBackfillFunction = inngest.createFunction(
+ { id: "accounting-backfill", retries: 3 },
+ { event: "carbon/accounting-backfill" },
+ async ({ event, step }) => {
+ const payload: ParsedBackfillPayload = BackfillPayloadSchema.parse(
+ event.data
+ );
+ const client = getCarbonServiceRole();
+
+ const integration = await getAccountingIntegration(
+ client,
+ payload.companyId,
+ payload.provider
+ );
+
+ const provider = getProviderIntegration(
+ client,
+ payload.companyId,
+ integration.id,
+ integration.metadata
+ ) as XeroProvider;
+
+ // Get sync direction config for each entity type
+ const customerConfig = provider.getSyncConfig("customer");
+ const vendorConfig = provider.getSyncConfig("vendor");
+ const itemConfig = provider.getSyncConfig("item");
+
+ const result = {
+ customers: { pulled: 0, pushed: 0 },
+ vendors: { pulled: 0, pushed: 0 },
+ items: { pulled: 0, pushed: 0 },
+ totalPulled: 0,
+ totalPushed: 0
+ };
+
+ // Log the sync directions for visibility
+ console.info("[BACKFILL] Starting with entity sync directions:", {
+ customer: {
+ enabled: customerConfig?.enabled,
+ direction: customerConfig?.direction,
+ shouldPull:
+ customerConfig?.enabled && shouldPull(customerConfig.direction),
+ shouldPush:
+ customerConfig?.enabled && shouldPush(customerConfig.direction)
+ },
+ vendor: {
+ enabled: vendorConfig?.enabled,
+ direction: vendorConfig?.direction,
+ shouldPull: vendorConfig?.enabled && shouldPull(vendorConfig.direction),
+ shouldPush: vendorConfig?.enabled && shouldPush(vendorConfig.direction)
+ },
+ item: {
+ enabled: itemConfig?.enabled,
+ direction: itemConfig?.direction,
+ shouldPull: itemConfig?.enabled && shouldPull(itemConfig.direction),
+ shouldPush: itemConfig?.enabled && shouldPush(itemConfig.direction)
+ }
+ });
+
+ // ============================================================
+ // PHASE 1: Pull contacts from accounting (respecting direction config)
+ // ============================================================
+
+ const pullCustomers =
+ payload.entityTypes.customers &&
+ customerConfig?.enabled &&
+ shouldPull(customerConfig.direction);
+
+ const pullVendors =
+ payload.entityTypes.vendors &&
+ vendorConfig?.enabled &&
+ shouldPull(vendorConfig.direction);
+
+ if (pullCustomers || pullVendors) {
+ let page = 1;
+ let hasMore = true;
+
+ console.info("[PULL] Starting contact pull phase", {
+ pullCustomers,
+ pullVendors
+ });
+
+ while (hasMore) {
+ const currentPage = page;
+ const pullResult = await step.run(
+ `pull-contacts-page-${currentPage}`,
+ async () => {
+ const pullClient = getCarbonServiceRole();
+ const pullIntegration = await getAccountingIntegration(
+ pullClient,
+ payload.companyId,
+ payload.provider
+ );
+ const pullProvider = getProviderIntegration(
+ pullClient,
+ payload.companyId,
+ pullIntegration.id,
+ pullIntegration.metadata
+ ) as XeroProvider;
+
+ const pool = getPostgresConnectionPool(5);
+ const kysely = getPostgresClient(pool, PostgresDriver);
+
+ try {
+ console.info(`[PULL] Fetching contacts page ${currentPage}`);
+ const response = await withRateLimitRetry(
+ () =>
+ pullProvider.listContacts({
+ page: currentPage,
+ summaryOnly: true
+ }),
+ `listContacts page ${currentPage}`,
+ step
+ );
+
+ console.info(`[PULL] Contacts page ${currentPage} response`, {
+ count: response.contacts.length,
+ hasMore: response.hasMore,
+ contacts: response.contacts.map((c) => ({
+ id: c.ContactID,
+ name: c.Name,
+ isCustomer: c.IsCustomer,
+ isSupplier: c.IsSupplier
+ }))
+ });
+
+ if (response.contacts.length === 0) {
+ return {
+ hasMore: false,
+ pulled: { customers: 0, vendors: 0 }
+ };
+ }
+
+ let customersPulled = 0;
+ let vendorsPulled = 0;
+
+ // Pull customers
+ if (pullCustomers) {
+ const customers = response.contacts.filter((c) => c.IsCustomer);
+ if (customers.length > 0) {
+ const syncer = SyncFactory.getSyncer({
+ database: kysely,
+ companyId: payload.companyId,
+ provider: pullProvider,
+ config: pullProvider.getSyncConfig("customer"),
+ entityType: "customer"
+ });
+ const ids = customers.map((c) => c.ContactID);
+ const syncResult = await withRateLimitRetry(
+ () => syncer.pullBatchFromAccounting(ids),
+ `pullBatchFromAccounting customers page ${currentPage}`,
+ step
+ );
+ customersPulled = syncResult.successCount;
+ console.info(
+ `[PULL] Page ${currentPage}: pulled ${customersPulled} customers`,
+ {
+ results: syncResult.results.map((r) => ({
+ status: r.status,
+ action: r.action,
+ localId: r.localId,
+ remoteId: r.remoteId,
+ error: r.error
+ }))
+ }
+ );
+ }
+ }
+
+ // Pull vendors
+ if (pullVendors) {
+ const vendors = response.contacts.filter((c) => c.IsSupplier);
+ if (vendors.length > 0) {
+ const syncer = SyncFactory.getSyncer({
+ database: kysely,
+ companyId: payload.companyId,
+ provider: pullProvider,
+ config: pullProvider.getSyncConfig("vendor"),
+ entityType: "vendor"
+ });
+ const ids = vendors.map((c) => c.ContactID);
+ const syncResult = await withRateLimitRetry(
+ () => syncer.pullBatchFromAccounting(ids),
+ `pullBatchFromAccounting vendors page ${currentPage}`,
+ step
+ );
+ vendorsPulled = syncResult.successCount;
+ console.info(
+ `[PULL] Page ${currentPage}: pulled ${vendorsPulled} vendors`,
+ {
+ results: syncResult.results.map((r) => ({
+ status: r.status,
+ action: r.action,
+ localId: r.localId,
+ remoteId: r.remoteId,
+ error: r.error
+ }))
+ }
+ );
+ }
+ }
+
+ return {
+ hasMore: response.hasMore,
+ pulled: {
+ customers: customersPulled,
+ vendors: vendorsPulled
+ }
+ };
+ } finally {
+ await pool.end();
+ }
+ }
+ );
+
+ result.customers.pulled += pullResult.pulled.customers ?? 0;
+ result.vendors.pulled += pullResult.pulled.vendors ?? 0;
+ hasMore = pullResult.hasMore;
+
+ page++;
+
+ // Small delay between pages to avoid rate limits
+ if (hasMore) {
+ await step.sleep(`contacts-page-delay-${currentPage}`, "1s");
+ }
+ }
+ } else {
+ console.info(
+ "[PULL] Skipping contact pull - not enabled or direction is push-only"
+ );
+ }
+
+ // ============================================================
+ // PHASE 2: Pull items from accounting (respecting direction config)
+ // ============================================================
+
+ const pullItems =
+ payload.entityTypes.items &&
+ itemConfig?.enabled &&
+ shouldPull(itemConfig.direction);
+
+ if (pullItems) {
+ let page = 1;
+ let hasMore = true;
+
+ console.info("[PULL] Starting items pull phase");
+
+ while (hasMore) {
+ const currentPage = page;
+ const pullResult = await step.run(
+ `pull-items-page-${currentPage}`,
+ async () => {
+ const pullClient = getCarbonServiceRole();
+ const pullIntegration = await getAccountingIntegration(
+ pullClient,
+ payload.companyId,
+ payload.provider
+ );
+ const pullProvider = getProviderIntegration(
+ pullClient,
+ payload.companyId,
+ pullIntegration.id,
+ pullIntegration.metadata
+ ) as XeroProvider;
+
+ const pool = getPostgresConnectionPool(5);
+ const kysely = getPostgresClient(pool, PostgresDriver);
+
+ try {
+ console.info(`[PULL] Fetching items page ${currentPage}`);
+ const response = await withRateLimitRetry(
+ () => pullProvider.listItems({ page: currentPage }),
+ `listItems page ${currentPage}`,
+ step
+ );
+
+ console.info(`[PULL] Items page ${currentPage} response`, {
+ count: response.items.length,
+ hasMore: response.hasMore,
+ items: response.items.map((i) => ({
+ id: i.ItemID,
+ code: i.Code,
+ name: i.Name
+ }))
+ });
+
+ if (response.items.length === 0) {
+ return { hasMore: false, pulled: { items: 0 } };
+ }
+
+ const syncer = SyncFactory.getSyncer({
+ database: kysely,
+ companyId: payload.companyId,
+ provider: pullProvider,
+ config: pullProvider.getSyncConfig("item"),
+ entityType: "item"
+ });
+ const ids = response.items.map((item) => item.ItemID);
+ const syncResult = await withRateLimitRetry(
+ () => syncer.pullBatchFromAccounting(ids),
+ `pullBatchFromAccounting items page ${currentPage}`,
+ step
+ );
+
+ console.info(
+ `[PULL] Page ${currentPage}: pulled ${syncResult.successCount} items`,
+ {
+ results: syncResult.results.map((r) => ({
+ status: r.status,
+ action: r.action,
+ localId: r.localId,
+ remoteId: r.remoteId,
+ error: r.error
+ }))
+ }
+ );
+
+ return {
+ hasMore: response.hasMore,
+ pulled: { items: syncResult.successCount }
+ };
+ } finally {
+ await pool.end();
+ }
+ }
+ );
+
+ result.items.pulled += pullResult.pulled.items ?? 0;
+ hasMore = pullResult.hasMore;
+
+ page++;
+
+ if (hasMore) {
+ await step.sleep(`items-page-delay-${currentPage}`, "1s");
+ }
+ }
+ } else {
+ console.info(
+ "[PULL] Skipping items pull - not enabled or direction is push-only"
+ );
+ }
+
+ // ============================================================
+ // PHASE 3: Push to accounting (respecting direction config)
+ // ============================================================
+
+ // Push customers if their config allows pushing
+ const pushCustomers =
+ payload.entityTypes.customers &&
+ customerConfig?.enabled &&
+ shouldPush(customerConfig.direction);
+
+ if (pushCustomers) {
+ let hasMore = true;
+ let batchIndex = 0;
+
+ console.info("[PUSH] Starting customers push phase");
+
+ while (hasMore) {
+ const currentBatchIndex = batchIndex;
+ const pushResult = await step.run(
+ `push-customers-batch-${currentBatchIndex}`,
+ async () => {
+ const pushClient = getCarbonServiceRole();
+ const pushIntegration = await getAccountingIntegration(
+ pushClient,
+ payload.companyId,
+ payload.provider
+ );
+ const pushProvider = getProviderIntegration(
+ pushClient,
+ payload.companyId,
+ pushIntegration.id,
+ pushIntegration.metadata
+ ) as XeroProvider;
+
+ const pool = getPostgresConnectionPool(5);
+ const kysely = getPostgresClient(pool, PostgresDriver);
+
+ try {
+ const mappingService = createMappingService(
+ kysely,
+ payload.companyId
+ );
+
+ const unsyncedIds = await mappingService.getUnsyncedEntityIds(
+ "customer",
+ "customer",
+ pushProvider.id,
+ payload.batchSize
+ );
+
+ if (unsyncedIds.length === 0) {
+ return {
+ successCount: 0,
+ hasMore: false
+ };
+ }
+
+ const syncer = SyncFactory.getSyncer({
+ database: kysely,
+ companyId: payload.companyId,
+ provider: pushProvider,
+ config: pushProvider.getSyncConfig("customer"),
+ entityType: "customer"
+ });
+
+ const syncResult = await withRateLimitRetry(
+ () => syncer.pushBatchToAccounting(unsyncedIds),
+ `pushBatchToAccounting customers`,
+ step
+ );
+
+ console.info(
+ `[PUSH] Pushed ${syncResult.successCount}/${unsyncedIds.length} customer entities`,
+ {
+ entityIds: unsyncedIds,
+ results: syncResult.results.map((r) => ({
+ status: r.status,
+ action: r.action,
+ localId: r.localId,
+ remoteId: r.remoteId,
+ error: r.error
+ }))
+ }
+ );
+
+ return {
+ successCount: syncResult.successCount,
+ hasMore: unsyncedIds.length >= payload.batchSize
+ };
+ } finally {
+ await pool.end();
+ }
+ }
+ );
+
+ result.customers.pushed += pushResult.successCount;
+ hasMore = pushResult.hasMore;
+ batchIndex++;
+
+ // Delay between batches
+ if (hasMore) {
+ await step.sleep(`customers-push-delay-${currentBatchIndex}`, "2s");
+ }
+ }
+ } else {
+ console.info(
+ "[PUSH] Skipping customers push - not enabled or direction is pull-only"
+ );
+ }
+
+ // Push vendors if their config allows pushing
+ const pushVendors =
+ payload.entityTypes.vendors &&
+ vendorConfig?.enabled &&
+ shouldPush(vendorConfig.direction);
+
+ if (pushVendors) {
+ let hasMore = true;
+ let batchIndex = 0;
+
+ console.info("[PUSH] Starting vendors push phase");
+
+ while (hasMore) {
+ const currentBatchIndex = batchIndex;
+ const pushResult = await step.run(
+ `push-vendors-batch-${currentBatchIndex}`,
+ async () => {
+ const pushClient = getCarbonServiceRole();
+ const pushIntegration = await getAccountingIntegration(
+ pushClient,
+ payload.companyId,
+ payload.provider
+ );
+ const pushProvider = getProviderIntegration(
+ pushClient,
+ payload.companyId,
+ pushIntegration.id,
+ pushIntegration.metadata
+ ) as XeroProvider;
+
+ const pool = getPostgresConnectionPool(5);
+ const kysely = getPostgresClient(pool, PostgresDriver);
+
+ try {
+ const mappingService = createMappingService(
+ kysely,
+ payload.companyId
+ );
+
+ const unsyncedIds = await mappingService.getUnsyncedEntityIds(
+ "vendor",
+ "supplier",
+ pushProvider.id,
+ payload.batchSize
+ );
+
+ if (unsyncedIds.length === 0) {
+ return {
+ successCount: 0,
+ hasMore: false
+ };
+ }
+
+ const syncer = SyncFactory.getSyncer({
+ database: kysely,
+ companyId: payload.companyId,
+ provider: pushProvider,
+ config: pushProvider.getSyncConfig("vendor"),
+ entityType: "vendor"
+ });
+
+ const syncResult = await withRateLimitRetry(
+ () => syncer.pushBatchToAccounting(unsyncedIds),
+ `pushBatchToAccounting vendors`,
+ step
+ );
+
+ console.info(
+ `[PUSH] Pushed ${syncResult.successCount}/${unsyncedIds.length} vendor entities`,
+ {
+ entityIds: unsyncedIds,
+ results: syncResult.results.map((r) => ({
+ status: r.status,
+ action: r.action,
+ localId: r.localId,
+ remoteId: r.remoteId,
+ error: r.error
+ }))
+ }
+ );
+
+ return {
+ successCount: syncResult.successCount,
+ hasMore: unsyncedIds.length >= payload.batchSize
+ };
+ } finally {
+ await pool.end();
+ }
+ }
+ );
+
+ result.vendors.pushed += pushResult.successCount;
+ hasMore = pushResult.hasMore;
+ batchIndex++;
+
+ if (hasMore) {
+ await step.sleep(`vendors-push-delay-${currentBatchIndex}`, "2s");
+ }
+ }
+ } else {
+ console.info(
+ "[PUSH] Skipping vendors push - not enabled or direction is pull-only"
+ );
+ }
+
+ // Push items if their config allows pushing
+ const pushItems =
+ payload.entityTypes.items &&
+ itemConfig?.enabled &&
+ shouldPush(itemConfig.direction);
+
+ if (pushItems) {
+ let hasMore = true;
+ let batchIndex = 0;
+
+ console.info("[PUSH] Starting items push phase");
+
+ while (hasMore) {
+ const currentBatchIndex = batchIndex;
+ const pushResult = await step.run(
+ `push-items-batch-${currentBatchIndex}`,
+ async () => {
+ const pushClient = getCarbonServiceRole();
+ const pushIntegration = await getAccountingIntegration(
+ pushClient,
+ payload.companyId,
+ payload.provider
+ );
+ const pushProvider = getProviderIntegration(
+ pushClient,
+ payload.companyId,
+ pushIntegration.id,
+ pushIntegration.metadata
+ ) as XeroProvider;
+
+ const pool = getPostgresConnectionPool(5);
+ const kysely = getPostgresClient(pool, PostgresDriver);
+
+ try {
+ const mappingService = createMappingService(
+ kysely,
+ payload.companyId
+ );
+
+ const unsyncedIds = await mappingService.getUnsyncedEntityIds(
+ "item",
+ "item",
+ pushProvider.id,
+ payload.batchSize
+ );
+
+ if (unsyncedIds.length === 0) {
+ return {
+ successCount: 0,
+ hasMore: false
+ };
+ }
+
+ const syncer = SyncFactory.getSyncer({
+ database: kysely,
+ companyId: payload.companyId,
+ provider: pushProvider,
+ config: pushProvider.getSyncConfig("item"),
+ entityType: "item"
+ });
+
+ const syncResult = await withRateLimitRetry(
+ () => syncer.pushBatchToAccounting(unsyncedIds),
+ `pushBatchToAccounting items`,
+ step
+ );
+
+ console.info(
+ `[PUSH] Pushed ${syncResult.successCount}/${unsyncedIds.length} item entities`,
+ {
+ entityIds: unsyncedIds,
+ results: syncResult.results.map((r) => ({
+ status: r.status,
+ action: r.action,
+ localId: r.localId,
+ remoteId: r.remoteId,
+ error: r.error
+ }))
+ }
+ );
+
+ return {
+ successCount: syncResult.successCount,
+ hasMore: unsyncedIds.length >= payload.batchSize
+ };
+ } finally {
+ await pool.end();
+ }
+ }
+ );
+
+ result.items.pushed += pushResult.successCount;
+ hasMore = pushResult.hasMore;
+ batchIndex++;
+
+ if (hasMore) {
+ await step.sleep(`items-push-delay-${currentBatchIndex}`, "2s");
+ }
+ }
+ } else {
+ console.info(
+ "[PUSH] Skipping items push - not enabled or direction is pull-only"
+ );
+ }
+
+ // Calculate totals
+ result.totalPulled =
+ result.customers.pulled + result.vendors.pulled + result.items.pulled;
+ result.totalPushed =
+ result.customers.pushed + result.vendors.pushed + result.items.pushed;
+
+ console.info(
+ `[COMPLETE] Backfill finished. Pulled: ${result.totalPulled}, Pushed: ${result.totalPushed}`
+ );
+
+ return result;
+ }
+);
diff --git a/packages/jobs/src/inngest/functions/integrations/index.ts b/packages/jobs/src/inngest/functions/integrations/index.ts
new file mode 100644
index 0000000000..59f0e36df0
--- /dev/null
+++ b/packages/jobs/src/inngest/functions/integrations/index.ts
@@ -0,0 +1,12 @@
+export { accountingBackfillFunction } from "./accounting-backfill";
+export { jiraSyncFunction, syncIssueFromJiraSchema } from "./jira";
+export { linearSyncFunction, syncIssueFromLinearSchema } from "./linear";
+export { paperlessPartsFunction } from "./paperless-parts";
+export {
+ slackDocumentAssignmentUpdateFunction,
+ slackDocumentCreatedFunction,
+ slackDocumentStatusUpdateFunction,
+ slackDocumentTaskUpdateFunction
+} from "./slack-document-sync";
+export { syncExternalAccountingFunction } from "./sync-external-accounting";
+export { timeCardAutoCloseFunction } from "./timecard-auto-close";
diff --git a/packages/jobs/trigger/jira.ts b/packages/jobs/src/inngest/functions/integrations/jira.ts
similarity index 61%
rename from packages/jobs/trigger/jira.ts
rename to packages/jobs/src/inngest/functions/integrations/jira.ts
index d894d82541..38653bef5a 100644
--- a/packages/jobs/trigger/jira.ts
+++ b/packages/jobs/src/inngest/functions/integrations/jira.ts
@@ -4,72 +4,20 @@ import {
getJiraClient,
linkActionToJiraIssue
} from "@carbon/ee/jira.server";
-import { task } from "@trigger.dev/sdk";
-import { z } from "zod";
-
-const jira = getJiraClient();
-
-// Schema for Jira webhook payload
-export const syncIssueFromJiraSchema = z.object({
- companyId: z.string(),
- event: z.object({
- timestamp: z.number().optional(),
- webhookEvent: z.string(),
- issue: z
- .object({
- id: z.string(),
- key: z.string(),
- fields: z.object({
- summary: z.string().optional(),
- description: z.any().nullable().optional(),
- status: z
- .object({
- name: z.string().optional(),
- statusCategory: z
- .object({
- key: z.string()
- })
- .optional()
- })
- .optional(),
- assignee: z
- .object({
- accountId: z.string().optional(),
- emailAddress: z.string().optional(),
- displayName: z.string().optional()
- })
- .nullable()
- .optional(),
- duedate: z.string().nullable().optional()
- })
- })
- .optional(),
- changelog: z
- .object({
- items: z.array(
- z.object({
- field: z.string(),
- fieldtype: z.string().optional(),
- from: z.string().nullable().optional(),
- fromString: z.string().nullable().optional(),
- to: z.string().nullable().optional(),
- toString: z.string().nullable().optional()
- })
- )
- })
- .optional()
- })
-});
-
-export const syncIssueFromJira = task({
- id: "sync-issue-from-jira",
- retry: {
- maxAttempts: 1
- },
- maxDuration: 5 * 60,
- run: async (payload: z.infer<typeof syncIssueFromJiraSchema>) => {
- console.info(`🔰 Jira webhook received`);
- console.info(`📦 Event type: ${payload.event.webhookEvent}`);
+import { syncIssueFromJiraSchema } from "../../../schemas.js";
+import { inngest } from "../../client";
+
+export { syncIssueFromJiraSchema };
+
+export const jiraSyncFunction = inngest.createFunction(
+ { id: "sync-issue-from-jira", retries: 1 },
+ { event: "carbon/jira-sync" },
+ async ({ event, step }) => {
+ const jira = getJiraClient();
+ const payload = syncIssueFromJiraSchema.parse(event.data);
+
+ console.info(`Jira webhook received`);
+ console.info(`Event type: ${payload.event.webhookEvent}`);
// Only handle issue_updated events
if (
@@ -174,4 +122,4 @@ export const syncIssueFromJira = task({
message: `Synced Jira issue ${fullIssue.key}`
};
}
-});
+);
diff --git a/packages/jobs/trigger/linear.ts b/packages/jobs/src/inngest/functions/integrations/linear.ts
similarity index 68%
rename from packages/jobs/trigger/linear.ts
rename to packages/jobs/src/inngest/functions/integrations/linear.ts
index a798d17a36..5a16a29591 100644
--- a/packages/jobs/trigger/linear.ts
+++ b/packages/jobs/src/inngest/functions/integrations/linear.ts
@@ -4,35 +4,20 @@ import {
getLinearClient,
linkActionToLinearIssue
} from "@carbon/ee/linear.server";
-import { task } from "@trigger.dev/sdk";
-import { z } from "zod";
-
-const linear = getLinearClient()
-
-// Schema for webhook payload - we only need the issue ID since we fetch full details from Linear
-export const syncIssueFromLinearSchema = z.object({
- companyId: z.string(),
- event: z.discriminatedUnion("type", [
- z.object({
- type: z.literal("Issue"),
- action: z.literal("update"),
- data: z.object({
- id: z.string(),
- assigneeId: z.string().optional(),
- }),
- }),
- ]),
-});
-
-export const syncIssueFromLinear = task({
- id: "sync-issue-from-linear",
- retry: {
- maxAttempts: 1,
- },
- maxDuration: 5 * 60,
- run: async (payload: z.infer<typeof syncIssueFromLinearSchema>) => {
- console.info(`🔰 Linear webhook received: ${payload}`);
- console.info(`📦 Payload:`, payload);
+import { syncIssueFromLinearSchema } from "../../../schemas.js";
+import { inngest } from "../../client";
+
+export { syncIssueFromLinearSchema };
+
+export const linearSyncFunction = inngest.createFunction(
+ { id: "sync-issue-from-linear", retries: 1 },
+ { event: "carbon/linear-sync" },
+ async ({ event, step }) => {
+ const linear = getLinearClient();
+ const payload = syncIssueFromLinearSchema.parse(event.data);
+
+ console.info(`Linear webhook received: ${payload}`);
+ console.info(`Payload:`, payload);
const carbon = getCarbonServiceRole();
@@ -43,7 +28,7 @@ export const syncIssueFromLinear = task({
.select("*")
.eq("companyId", payload.companyId)
.eq("id", "linear")
- .single(),
+ .single()
]);
if (company.error || !company.data) {
@@ -71,7 +56,7 @@ export const syncIssueFromLinear = task({
if (!action.data) {
return {
success: false,
- message: `No linked action found for Linear issue ID ${payload.event.data.id}`,
+ message: `No linked action found for Linear issue ID ${payload.event.data.id}`
};
}
@@ -83,7 +68,7 @@ export const syncIssueFromLinear = task({
if (!fullIssue) {
return {
success: false,
- message: `Failed to fetch issue ${payload.event.data.id} from Linear`,
+ message: `Failed to fetch issue ${payload.event.data.id} from Linear`
};
}
@@ -91,11 +76,13 @@ export const syncIssueFromLinear = task({
if (payload.event.data.assigneeId) {
const [linearUser] = await linear.getUsers(payload.companyId, {
- id: payload.event.data.assigneeId,
+ id: payload.event.data.assigneeId
});
const employees = linearUser?.email
- ? await getCompanyEmployees(carbon, payload.companyId, [linearUser.email])
+ ? await getCompanyEmployees(carbon, payload.companyId, [
+ linearUser.email
+ ])
: [];
assignee = employees.length > 0 ? employees[0]!.userId : null;
}
@@ -104,19 +91,19 @@ export const syncIssueFromLinear = task({
actionId: action.data.id,
issue: fullIssue,
assignee,
- syncNotes: true,
+ syncNotes: true
});
if (!updated || updated.error) {
return {
success: false,
- message: `Failed to update action for Linear issue ID ${payload.event.data.id}`,
+ message: `Failed to update action for Linear issue ID ${payload.event.data.id}`
};
}
return {
success: true,
- message: `Synced Linear issue ${payload.event.data.id}`,
+ message: `Synced Linear issue ${payload.event.data.id}`
};
- },
-});
+ }
+);
diff --git a/packages/jobs/trigger/paperless-parts.ts b/packages/jobs/src/inngest/functions/integrations/paperless-parts.ts
similarity index 84%
rename from packages/jobs/trigger/paperless-parts.ts
rename to packages/jobs/src/inngest/functions/integrations/paperless-parts.ts
index 88705c47c7..f2f2b4ccb2 100644
--- a/packages/jobs/trigger/paperless-parts.ts
+++ b/packages/jobs/src/inngest/functions/integrations/paperless-parts.ts
@@ -9,24 +9,24 @@ import {
getPaperlessParts,
insertOrderLines,
insertQuoteLines,
- OrderSchema,
+ OrderSchema
} from "@carbon/ee/paperless-parts";
import type { SupabaseClient } from "@supabase/supabase-js";
-import { task } from "@trigger.dev/sdk";
import { z } from "zod";
+import { inngest } from "../../client";
const payloadSchema = z.discriminatedUnion("type", [
z.object({
type: z.literal("quote.created"),
created: z.string(),
object: z.string(),
- data: z.any(),
+ data: z.any()
}),
z.object({
type: z.literal("quote.status_changed"),
created: z.string(),
object: z.string(),
- data: z.any(),
+ data: z.any()
}),
z.object({
type: z.literal("quote.sent"),
@@ -59,8 +59,8 @@ const payloadSchema = z.discriminatedUnion("type", [
request_for_quote_id: z.string().nullable(),
digital_last_viewed_on: z.string().nullable(),
manual_rfq_received_date: z.string().nullable(),
- authenticated_pdf_quote_url: z.string().nullable(),
- }),
+ authenticated_pdf_quote_url: z.string().nullable()
+ })
}),
z.object({
type: z.literal("order.created"),
@@ -69,61 +69,57 @@ const payloadSchema = z.discriminatedUnion("type", [
data: z.object({
uuid: z.string(),
status: z.string(),
- number: z.number().optional(),
- }),
+ number: z.number().optional()
+ })
}),
z.object({
type: z.literal("order.status_changed"),
created: z.string(),
object: z.string(),
- data: z.any(),
+ data: z.any()
}),
z.object({
type: z.literal("integration_action.requested"),
created: z.string(),
object: z.string(),
- data: z.any(),
+ data: z.any()
}),
z.object({
type: z.literal("integration.turned_on"),
created: z.string(),
object: z.string(),
- data: z.any(),
+ data: z.any()
}),
z.object({
type: z.literal("integration.turned_off"),
created: z.string(),
object: z.string(),
- data: z.any(),
- }),
+ data: z.any()
+ })
]);
const paperlessPartsSchema = z.object({
apiKey: z.string(),
companyId: z.string(),
- payload: payloadSchema,
+ payload: payloadSchema
});
const integrationSchema = z.object({
methodType: z.enum(["Purchase to Order", "Pull from Inventory"]).optional(),
trackingType: z.enum(["Inventory", "Non-Inventory", "Batch"]).optional(),
usePaperlessOrderNumber: z.boolean().optional(),
- billOfProcessBlackList: z.array(z.string()).optional(),
+ billOfProcessBlackList: z.array(z.string()).optional()
});
-export const paperlessPartsTask = task({
- id: "paperless-parts",
- retry: {
- maxAttempts: 1,
- },
- maxDuration: 5 * 60,
- run: async (payload: z.infer<typeof paperlessPartsSchema>) => {
+export const paperlessPartsFunction = inngest.createFunction(
+ { id: "paperless-parts", retries: 1 },
+ { event: "carbon/paperless-parts" },
+ async ({ event, step }) => {
+ const payload = paperlessPartsSchema.parse(event.data);
let result: { success: boolean; message: string };
- console.info(
- `🔰 Paperless Parts webhook received: ${payload.payload.type}`
- );
- console.info(`📦 Payload:`, payload);
+ console.info(`Paperless Parts webhook received: ${payload.payload.type}`);
+ console.info(`Payload:`, payload);
const carbon = getCarbonServiceRole();
const paperless = await getPaperlessParts(payload.apiKey);
@@ -135,7 +131,7 @@ export const paperlessPartsTask = task({
.select("*")
.eq("companyId", payload.companyId)
.eq("id", "paperless-parts")
- .single(),
+ .single()
]);
if (company.error || !company.data) {
@@ -150,7 +146,8 @@ export const paperlessPartsTask = task({
integration.data.metadata
);
let usePaperlessOrderNumber = false;
- let methodType: "Purchase to Order" | "Pull from Inventory" = "Pull from Inventory";
+ let methodType: "Purchase to Order" | "Pull from Inventory" =
+ "Pull from Inventory";
let trackingType: "Inventory" | "Non-Inventory" | "Batch" = "Inventory";
let billOfProcessBlackList: string[] = [];
if (integrationData.success) {
@@ -166,21 +163,21 @@ export const paperlessPartsTask = task({
switch (payload.payload.type) {
case "quote.created":
- console.info(`📫 Processing quote created event`);
+ console.info(`Processing quote created event`);
result = {
success: true,
- message: "Quote created event processed successfully",
+ message: "Quote created event processed successfully"
};
break;
case "quote.status_changed":
- console.info(`📫 Processing quote status changed event`);
+ console.info(`Processing quote status changed event`);
result = {
success: true,
- message: "Quote status changed event processed successfully",
+ message: "Quote status changed event processed successfully"
};
break;
case "quote.sent":
- console.info(`📫 Processing quote sent event`);
+ console.info(`Processing quote sent event`);
const quotePayload = payload.payload.data;
const ppQuoteNumber = quotePayload.number;
@@ -215,10 +212,13 @@ export const paperlessPartsTask = task({
.maybeSingle();
if (existingQuoteMapping?.data?.entityId) {
- console.log("Quote already exists", existingQuoteMapping.data.entityId);
+ console.log(
+ "Quote already exists",
+ existingQuoteMapping.data.entityId
+ );
result = {
success: true,
- message: "Quote already exists",
+ message: "Quote already exists"
};
break;
}
@@ -226,24 +226,24 @@ export const paperlessPartsTask = task({
const [
{
customerId: quoteCustomerId,
- customerContactId: quoteCustomerContactId,
+ customerContactId: quoteCustomerContactId
},
{ createdBy: quoteCreatedBy },
- quoteLocationId,
+ quoteLocationId
] = await Promise.all([
getCustomerIdAndContactId(carbon, paperless, {
company: company.data,
- contact: ppQuote.data.contact,
+ contact: ppQuote.data.contact
}),
getEmployeeAndSalesPersonId(carbon, {
company: company.data,
estimator: ppQuote.data.estimator,
- salesPerson: ppQuote.data.salesperson,
+ salesPerson: ppQuote.data.salesperson
}),
getOrderLocationId(carbon, {
company: company.data,
- sendFrom: (ppQuote.data as any).send_from_facility,
- }),
+ sendFrom: (ppQuote.data as any).send_from_facility
+ })
]);
if (!quoteCustomerId) {
@@ -282,7 +282,7 @@ export const paperlessPartsTask = task({
exchangeRate: 1 as number | undefined,
exchangeRateUpdatedAt: undefined as string | undefined,
expirationDate: undefined as string | undefined,
- revisionId: ppQuoteRevisionNumber ?? 0,
+ revisionId: ppQuoteRevisionNumber ?? 0
};
const [quoteCustomerPayment, quoteCustomerShipping, quoteOpportunity] =
@@ -292,10 +292,13 @@ export const paperlessPartsTask = task({
carbon
.from("opportunity")
.insert([
- { companyId: quote.companyId, customerId: quote.customerId },
+ {
+ companyId: quote.companyId,
+ customerId: quote.customerId
+ }
])
.select("id")
- .single(),
+ .single()
]);
if (quoteCustomerPayment.error) return quoteCustomerPayment;
@@ -305,12 +308,12 @@ export const paperlessPartsTask = task({
paymentTermId: quotePaymentTermId,
invoiceCustomerId: quoteInvoiceCustomerId,
invoiceCustomerContactId: quoteInvoiceCustomerContactId,
- invoiceCustomerLocationId: quoteInvoiceCustomerLocationId,
+ invoiceCustomerLocationId: quoteInvoiceCustomerLocationId
} = quoteCustomerPayment.data;
const {
shippingMethodId: quoteShippingMethodId,
- shippingTermId: quoteShippingTermId,
+ shippingTermId: quoteShippingTermId
} = quoteCustomerShipping.data;
if (quote.currencyCode) {
@@ -333,8 +336,8 @@ export const paperlessPartsTask = task({
.insert([
{
...quote,
- opportunityId: quoteOpportunity.data?.id,
- },
+ opportunityId: quoteOpportunity.data?.id
+ }
])
.select("id, quoteId");
if (insert.error) {
@@ -362,8 +365,8 @@ export const paperlessPartsTask = task({
locationId: quoteLocationId,
shippingMethodId: quoteShippingMethodId,
shippingTermId: quoteShippingTermId,
- companyId: quote.companyId,
- },
+ companyId: quote.companyId
+ }
]),
carbon.from("quotePayment").insert([
{
@@ -372,16 +375,16 @@ export const paperlessPartsTask = task({
invoiceCustomerContactId: quoteInvoiceCustomerContactId,
invoiceCustomerLocationId: quoteInvoiceCustomerLocationId,
paymentTermId: quotePaymentTermId,
- companyId: quote.companyId,
- },
+ companyId: quote.companyId
+ }
]),
upsertExternalLink(carbon, {
documentType: "Quote" as const,
documentId: quoteId,
customerId: quote.customerId,
expiresAt: quote.expirationDate ?? undefined,
- companyId: quote.companyId,
- }),
+ companyId: quote.companyId
+ })
]);
if (quoteShipment.error) {
@@ -414,29 +417,29 @@ export const paperlessPartsTask = task({
quoteItems: ppQuote.data.quote_items ?? [],
defaultMethodType: methodType,
defaultTrackingType: trackingType,
- billOfProcessBlackList,
+ billOfProcessBlackList
});
- console.log("✅ Quote lines successfully created");
+ console.log("Quote lines successfully created");
} catch (error) {
console.error("Failed to insert quote lines:", error);
await deleteQuote(carbon, quoteId);
result = {
success: false,
- message: "Failed to insert quote lines",
+ message: "Failed to insert quote lines"
};
break;
}
- console.info("🔰 New Carbon quote created from Paperless Parts");
+ console.info("New Carbon quote created from Paperless Parts");
result = {
success: true,
- message: "Quote sent event processed successfully",
+ message: "Quote sent event processed successfully"
};
break;
case "order.status_changed":
case "order.created":
- console.info(`📫 Processing order created event`);
+ console.info(`Processing order created event`);
const orderPayload = payload.payload.data;
const orderNumber = orderPayload.number;
@@ -464,7 +467,10 @@ export const paperlessPartsTask = task({
.maybeSingle();
if (existingOrderMapping?.data?.entityId) {
- console.log("Order already exists", existingOrderMapping.data.entityId);
+ console.log(
+ "Order already exists",
+ existingOrderMapping.data.entityId
+ );
const status = getCarbonOrderStatus(orderData.status);
@@ -477,14 +483,14 @@ export const paperlessPartsTask = task({
console.log("Failed to update sales order", update.error);
result = {
success: false,
- message: "Failed to update sales order",
+ message: "Failed to update sales order"
};
break;
}
result = {
success: true,
- message: "Order already exists",
+ message: "Order already exists"
};
break;
}
@@ -492,24 +498,24 @@ export const paperlessPartsTask = task({
const [
{
customerId: orderCustomerId,
- customerContactId: orderCustomerContactId,
+ customerContactId: orderCustomerContactId
},
{ createdBy: orderCreatedBy, salesPersonId: orderSalesPersonId },
- orderLocationId,
+ orderLocationId
] = await Promise.all([
getCustomerIdAndContactId(carbon, paperless, {
company: company.data,
- contact: orderData.contact!,
+ contact: orderData.contact!
}),
getEmployeeAndSalesPersonId(carbon, {
company: company.data,
estimator: orderData.estimator!,
- salesPerson: orderData.sales_person!,
+ salesPerson: orderData.sales_person!
}),
getOrderLocationId(carbon, {
company: company.data,
- sendFrom: orderData.send_from_facility as any,
- }),
+ sendFrom: orderData.send_from_facility as any
+ })
]);
if (!orderCustomerId) {
@@ -521,12 +527,12 @@ export const paperlessPartsTask = task({
const {
shipmentLocationId: orderShipmentLocationId,
- invoiceLocationId: orderInvoiceLocationId,
+ invoiceLocationId: orderInvoiceLocationId
} = await getCustomerLocationIds(carbon, {
company: company.data,
customerId: orderCustomerId,
billingInfo: orderData.billing_info ?? undefined,
- shippingInfo: orderData.shipping_info ?? undefined,
+ shippingInfo: orderData.shipping_info ?? undefined
});
const [orderCustomerPayment, orderCustomerShipping, orderOpportunity] =
@@ -538,11 +544,11 @@ export const paperlessPartsTask = task({
.insert([
{
customerId: orderCustomerId,
- companyId: payload.companyId,
- },
+ companyId: payload.companyId
+ }
])
.select("id")
- .single(),
+ .single()
]);
let salesOrderReadableId: string;
@@ -570,12 +576,12 @@ export const paperlessPartsTask = task({
paymentTermId: orderPaymentTermId,
invoiceCustomerId: orderInvoiceCustomerId,
invoiceCustomerContactId: orderInvoiceCustomerContactId,
- invoiceCustomerLocationId: orderInvoiceCustomerLocationId,
+ invoiceCustomerLocationId: orderInvoiceCustomerLocationId
} = orderCustomerPayment.data;
const {
shippingMethodId: orderShippingMethodId,
- shippingTermId: orderShippingTermId,
+ shippingTermId: orderShippingTermId
} = orderCustomerShipping.data;
if (orderOpportunity.error) {
throw new Error("Failed to create opportunity");
@@ -606,13 +612,13 @@ export const paperlessPartsTask = task({
{
type: "paragraph",
content: [
- { type: "text", text: orderData.private_notes },
- ],
- },
- ],
+ { type: "text", text: orderData.private_notes }
+ ]
+ }
+ ]
}
- : null,
- },
+ : null
+ }
])
.select("id, salesOrderId");
@@ -620,7 +626,7 @@ export const paperlessPartsTask = task({
console.log("Failed to create sales order", salesOrderInsert.error);
result = {
success: false,
- message: "Failed to create sales order",
+ message: "Failed to create sales order"
};
break;
}
@@ -629,7 +635,7 @@ export const paperlessPartsTask = task({
console.log("Failed to get sales order ID");
result = {
success: false,
- message: "Failed to get sales order ID",
+ message: "Failed to get sales order ID"
};
break;
}
@@ -656,8 +662,8 @@ export const paperlessPartsTask = task({
customerLocationId: orderShipmentLocationId,
shippingMethodId: orderShippingMethodId,
shippingTermId: orderShippingTermId,
- companyId: payload.companyId,
- },
+ companyId: payload.companyId
+ }
]),
carbon.from("salesOrderPayment").insert([
{
@@ -666,12 +672,12 @@ export const paperlessPartsTask = task({
invoiceCustomerContactId: orderInvoiceCustomerContactId,
invoiceCustomerLocationId:
orderInvoiceCustomerId === orderCustomerId
- ? orderInvoiceLocationId ?? orderInvoiceCustomerLocationId
+ ? (orderInvoiceLocationId ?? orderInvoiceCustomerLocationId)
: orderInvoiceCustomerLocationId,
paymentTermId: orderPaymentTermId,
- companyId: payload.companyId,
- },
- ]),
+ companyId: payload.companyId
+ }
+ ])
]);
if (orderShipment.error) {
@@ -679,7 +685,7 @@ export const paperlessPartsTask = task({
await deleteSalesOrder(carbon, salesOrderId);
result = {
success: false,
- message: "Failed to create shipment",
+ message: "Failed to create shipment"
};
break;
}
@@ -688,7 +694,7 @@ export const paperlessPartsTask = task({
await deleteSalesOrder(carbon, salesOrderId);
result = {
success: false,
- message: "Failed to create payment",
+ message: "Failed to create payment"
};
break;
}
@@ -704,67 +710,67 @@ export const paperlessPartsTask = task({
orderItems: orderData.order_items || [],
defaultMethodType: methodType,
defaultTrackingType: trackingType,
- billOfProcessBlackList,
+ billOfProcessBlackList
});
- console.log("✅ Order lines successfully created");
+ console.log("Order lines successfully created");
} catch (error) {
console.error("Failed to insert order lines:", error);
await deleteSalesOrder(carbon, salesOrderId);
result = {
success: false,
- message: "Failed to insert order lines",
+ message: "Failed to insert order lines"
};
break;
}
- console.info("🔰 New Carbon sales order created from Paperless Parts");
+ console.info("New Carbon sales order created from Paperless Parts");
result = {
success: true,
- message: "Order created event processed successfully",
+ message: "Order created event processed successfully"
};
break;
case "integration_action.requested":
- console.info(`📫 Processing integration action requested event`);
+ console.info(`Processing integration action requested event`);
result = {
success: true,
- message: "Integration action requested event processed successfully",
+ message: "Integration action requested event processed successfully"
};
break;
case "integration.turned_on":
- console.info(`📫 Processing integration turned on event`);
+ console.info(`Processing integration turned on event`);
result = {
success: true,
- message: "Integration turned on event processed successfully",
+ message: "Integration turned on event processed successfully"
};
break;
case "integration.turned_off":
- console.info(`📫 Processing integration turned off event`);
+ console.info(`Processing integration turned off event`);
result = {
success: true,
- message: "Integration turned off event processed successfully",
+ message: "Integration turned off event processed successfully"
};
break;
default:
- console.error(`❌ Unsupported event type: ${payload.payload}`);
+ console.error(`Unsupported event type: ${payload.payload}`);
result = {
success: false,
- message: `Unsupported event type`,
+ message: `Unsupported event type`
};
break;
}
if (result.success) {
- console.info(`✅ Successfully processed ${payload.payload.type} event`);
+ console.info(`Successfully processed ${payload.payload.type} event`);
} else {
console.error(
- `❌ Failed to process ${payload.payload.type} event: ${result.message}`
+ `Failed to process ${payload.payload.type} event: ${result.message}`
);
}
return result;
- },
-});
+ }
+);
async function getNextSequence(
client: SupabaseClient<Database>,
@@ -773,7 +779,7 @@ async function getNextSequence(
) {
return client.rpc("get_next_sequence", {
sequence_name: table,
- company_id: companyId,
+ company_id: companyId
});
}
@@ -840,7 +846,7 @@ async function upsertExternalLink(
documentId: externalLink.documentId,
customerId: externalLink.customerId,
expiresAt: externalLink.expiresAt,
- companyId: externalLink.companyId,
+ companyId: externalLink.companyId
})
.select("id")
.single();
diff --git a/packages/jobs/trigger/slack-document-sync.ts b/packages/jobs/src/inngest/functions/integrations/slack-document-sync.ts
similarity index 81%
rename from packages/jobs/trigger/slack-document-sync.ts
rename to packages/jobs/src/inngest/functions/integrations/slack-document-sync.ts
index 3126060d80..bac0796ccf 100644
--- a/packages/jobs/trigger/slack-document-sync.ts
+++ b/packages/jobs/src/inngest/functions/integrations/slack-document-sync.ts
@@ -3,30 +3,31 @@ import { getCarbonServiceRole } from "@carbon/auth/client.server";
import type { Database } from "@carbon/database";
import {
type DocumentType,
- type IssueAssignmentUpdate,
- type IssueStatusUpdate,
- type IssueTaskUpdate,
- type NonConformanceData,
formatAssignmentUpdate,
formatDocumentCreated,
formatStatusUpdate,
formatTaskUpdate,
+ type IssueAssignmentUpdate,
+ type IssueStatusUpdate,
+ type IssueTaskUpdate,
+ type NonConformanceData
} from "@carbon/ee/slack/messages";
import { WebClient } from "@slack/web-api";
import type { SupabaseClient } from "@supabase/supabase-js";
-import { task } from "@trigger.dev/sdk";
-
-export const slackDocumentCreated = task({
- id: "slack-document-created",
- run: async (payload: {
- documentType: DocumentType;
- documentId: string;
- companyId: string;
- channelId: string;
- threadTs: string;
- }) => {
+import { inngest } from "../../client";
+
+export const slackDocumentCreatedFunction = inngest.createFunction(
+ { id: "slack-document-created", retries: 1 },
+ { event: "carbon/slack-document-created" },
+ async ({ event, step }) => {
const { documentType, documentId, companyId, channelId, threadTs } =
- payload;
+ event.data as {
+ documentType: DocumentType;
+ documentId: string;
+ companyId: string;
+ channelId: string;
+ threadTs: string;
+ };
try {
const serviceRole = await getCarbonServiceRole();
@@ -60,7 +61,7 @@ export const slackDocumentCreated = task({
token: slackToken,
channelId,
threadTs,
- blocks: formatDocumentCreated(documentData, baseUrl),
+ blocks: formatDocumentCreated(documentData, baseUrl)
});
return { success: true };
@@ -68,20 +69,13 @@ export const slackDocumentCreated = task({
console.error(`Error posting ${documentType} to Slack:`, error);
throw error;
}
- },
-});
-
-export const slackDocumentStatusUpdate = task({
- id: "slack-document-status-update",
- run: async (payload: {
- documentType: DocumentType;
- documentId: string;
- companyId: string;
- previousStatus: string;
- newStatus: string;
- updatedBy: string;
- reason?: string;
- }) => {
+ }
+);
+
+export const slackDocumentStatusUpdateFunction = inngest.createFunction(
+ { id: "slack-document-status-update", retries: 1 },
+ { event: "carbon/slack-document-status-update" },
+ async ({ event, step }) => {
const {
documentType,
documentId,
@@ -89,8 +83,16 @@ export const slackDocumentStatusUpdate = task({
previousStatus,
newStatus,
updatedBy,
- reason,
- } = payload;
+ reason
+ } = event.data as {
+ documentType: DocumentType;
+ documentId: string;
+ companyId: string;
+ previousStatus: string;
+ newStatus: string;
+ updatedBy: string;
+ reason?: string;
+ };
try {
const serviceRole = await getCarbonServiceRole();
@@ -135,7 +137,7 @@ export const slackDocumentStatusUpdate = task({
previousStatus,
newStatus,
updatedBy,
- reason,
+ reason
};
await postToSlackThread({
@@ -146,7 +148,7 @@ export const slackDocumentStatusUpdate = task({
documentType,
documentData.readableId,
statusUpdate
- ),
+ )
});
return { success: true };
@@ -157,21 +159,13 @@ export const slackDocumentStatusUpdate = task({
);
throw error;
}
- },
-});
-
-export const slackDocumentTaskUpdate = task({
- id: "slack-document-task-update",
- run: async (payload: {
- documentType: DocumentType;
- documentId: string;
- companyId: string;
- taskType: "investigation" | "action" | "approval";
- taskName: string;
- status: string;
- assignee?: string | null;
- completedAt?: string;
- }) => {
+ }
+);
+
+export const slackDocumentTaskUpdateFunction = inngest.createFunction(
+ { id: "slack-document-task-update", retries: 1 },
+ { event: "carbon/slack-document-task-update" },
+ async ({ event, step }) => {
const {
documentType,
documentId,
@@ -180,8 +174,17 @@ export const slackDocumentTaskUpdate = task({
taskName,
status,
assignee,
- completedAt,
- } = payload;
+ completedAt
+ } = event.data as {
+ documentType: DocumentType;
+ documentId: string;
+ companyId: string;
+ taskType: "investigation" | "action" | "approval";
+ taskName: string;
+ status: string;
+ assignee?: string | null;
+ completedAt?: string;
+ };
try {
const serviceRole = await getCarbonServiceRole();
@@ -227,7 +230,7 @@ export const slackDocumentTaskUpdate = task({
taskName,
status,
assignee,
- completedAt,
+ completedAt
};
await postToSlackThread({
@@ -238,7 +241,7 @@ export const slackDocumentTaskUpdate = task({
documentType,
documentData.readableId,
taskUpdate
- ),
+ )
});
return { success: true };
@@ -249,27 +252,28 @@ export const slackDocumentTaskUpdate = task({
);
throw error;
}
- },
-});
-
-export const slackDocumentAssignmentUpdate = task({
- id: "slack-document-assignment-update",
- run: async (payload: {
- documentType: DocumentType;
- documentId: string;
- companyId: string;
- previousAssignee?: string;
- newAssignee: string;
- updatedBy: string;
- }) => {
+ }
+);
+
+export const slackDocumentAssignmentUpdateFunction = inngest.createFunction(
+ { id: "slack-document-assignment-update", retries: 1 },
+ { event: "carbon/slack-document-assignment-update" },
+ async ({ event, step }) => {
const {
documentType,
documentId,
companyId,
previousAssignee,
newAssignee,
- updatedBy,
- } = payload;
+ updatedBy
+ } = event.data as {
+ documentType: DocumentType;
+ documentId: string;
+ companyId: string;
+ previousAssignee?: string;
+ newAssignee: string;
+ updatedBy: string;
+ };
try {
const serviceRole = await getCarbonServiceRole();
@@ -313,7 +317,7 @@ export const slackDocumentAssignmentUpdate = task({
const assignmentUpdate: IssueAssignmentUpdate = {
previousAssignee,
newAssignee,
- updatedBy,
+ updatedBy
};
await postToSlackThread({
@@ -324,7 +328,7 @@ export const slackDocumentAssignmentUpdate = task({
documentType,
documentData.readableId,
assignmentUpdate
- ),
+ )
});
return { success: true };
@@ -335,8 +339,8 @@ export const slackDocumentAssignmentUpdate = task({
);
throw error;
}
- },
-});
+ }
+);
async function getDocumentData(
serviceRole: SupabaseClient<Database>,
@@ -364,7 +368,7 @@ async function getDocumentData(
description: data.description,
status: data.status,
createdBy: data.createdBy,
- createdAt: data.createdAt,
+ createdAt: data.createdAt
} as NonConformanceData;
}
@@ -386,7 +390,7 @@ async function getDocumentData(
description: data.customerReference,
status: data.status,
createdBy: data.createdBy,
- createdAt: data.createdAt,
+ createdAt: data.createdAt
};
}
@@ -410,7 +414,7 @@ async function getDocumentData(
description: data.customerReference,
status: data.status,
createdBy: data.createdBy,
- createdAt: data.createdAt,
+ createdAt: data.createdAt
};
}
@@ -432,7 +436,7 @@ async function getDocumentData(
description: data.jobId,
status: data.status,
createdBy: data.createdBy,
- createdAt: data.createdAt,
+ createdAt: data.createdAt
};
}
@@ -461,11 +465,6 @@ async function postToSlackThread(params: {
channel: channelId,
thread_ts: threadTs,
blocks,
- text: text || "Update from Carbon",
+ text: text || "Update from Carbon"
});
}
-
-export const slackNcrCreated = slackDocumentCreated;
-export const slackNcrStatusUpdate = slackDocumentStatusUpdate;
-export const slackNcrTaskUpdate = slackDocumentTaskUpdate;
-export const slackNcrAssignmentUpdate = slackDocumentAssignmentUpdate;
diff --git a/packages/jobs/trigger/sync-external-accounting.ts b/packages/jobs/src/inngest/functions/integrations/sync-external-accounting.ts
similarity index 84%
rename from packages/jobs/trigger/sync-external-accounting.ts
rename to packages/jobs/src/inngest/functions/integrations/sync-external-accounting.ts
index 9040228f32..8e48e9d4c9 100644
--- a/packages/jobs/trigger/sync-external-accounting.ts
+++ b/packages/jobs/src/inngest/functions/integrations/sync-external-accounting.ts
@@ -1,5 +1,5 @@
/**
- * Task to sync entities between accounting providers and Carbon.
+ * Function to sync entities between accounting providers and Carbon.
*
* Handles three sync directions:
* - "push-to-accounting": Push Carbon entities to the accounting provider
@@ -16,40 +16,36 @@
import { getCarbonServiceRole } from "@carbon/auth/client.server";
import {
getPostgresClient,
- getPostgresConnectionPool,
+ getPostgresConnectionPool
} from "@carbon/database/client";
import {
- AccountingEntity,
- BatchSyncResult,
+ type AccountingEntity,
+ type AccountingEntityType,
+ AccountingSyncSchema,
+ type BatchSyncResult,
createMappingService,
getAccountingIntegration,
getProviderIntegration,
- SyncFactory,
- type AccountingEntityType,
- type SyncResult,
+ SyncFactory
} from "@carbon/ee/accounting";
import { groupBy } from "@carbon/utils";
-import { logger, task } from "@trigger.dev/sdk";
import { PostgresDriver } from "kysely";
-import z from "zod";
-import { AccountingSyncSchema } from "../../ee/src/accounting/core/models.ts";
+import { inngest } from "../../client";
// Cooldown period in milliseconds to prevent redundant syncs
// If an entity was synced within this period, skip syncing it again
const SYNC_COOLDOWN_MS = 60000; // 1 minute
const PayloadSchema = AccountingSyncSchema.extend({
- syncDirection: AccountingSyncSchema.shape.syncDirection,
+ syncDirection: AccountingSyncSchema.shape.syncDirection
});
-type Payload = z.infer<typeof PayloadSchema>;
-
-export const syncExternalAccountingTask = task({
- id: "sync-external-accounting",
- maxDuration: 5 * 60 * 1000, // 5 minutes
- run: async (input: Payload) => {
- const payload = PayloadSchema.parse(input);
+export const syncExternalAccountingFunction = inngest.createFunction(
+ { id: "sync-external-accounting", retries: 1 },
+ { event: "carbon/sync-external-accounting" },
+ async ({ event, step }) => {
+ const payload = PayloadSchema.parse(event.data);
const client = getCarbonServiceRole();
@@ -72,7 +68,7 @@ export const syncExternalAccountingTask = task({
const results = {
success: [] as BatchSyncResult[],
- failed: [] as { entities: AccountingEntity[]; error: string }[],
+ failed: [] as { entities: AccountingEntity[]; error: string }[]
};
try {
@@ -83,16 +79,16 @@ export const syncExternalAccountingTask = task({
const entityConfig = provider.getSyncConfig(type);
if (!entityConfig?.enabled) {
- logger.info(`Sync disabled for ${entityType}, skipping`);
+ console.info(`Sync disabled for ${entityType}, skipping`);
continue;
}
try {
- logger.info(
+ console.info(
`Starting sync for ${entities.length} ${entityType} entities`,
{
- direction: input.syncDirection,
- configDirection: entityConfig.direction,
+ direction: payload.syncDirection,
+ configDirection: entityConfig.direction
}
);
@@ -101,19 +97,19 @@ export const syncExternalAccountingTask = task({
companyId: payload.companyId,
provider,
config: entityConfig,
- entityType: type,
+ entityType: type
});
if (entities.length === 0) {
- logger.info(`No entities to sync for type ${entityType}`);
+ console.info(`No entities to sync for type ${entityType}`);
continue;
}
// Determine the effective sync direction
const effectiveDirection =
- input.syncDirection === "two-way"
+ payload.syncDirection === "two-way"
? entityConfig.direction // Use the entity's configured direction
- : input.syncDirection;
+ : payload.syncDirection;
if (effectiveDirection === "push-to-accounting") {
// Filter out entities that were synced recently (cooldown)
@@ -125,7 +121,7 @@ export const syncExternalAccountingTask = task({
);
if (entitiesToSync.length === 0) {
- logger.info(
+ console.info(
`All ${entityType} entities were synced recently, skipping`
);
continue;
@@ -135,7 +131,7 @@ export const syncExternalAccountingTask = task({
entitiesToSync.map((e) => e.entityId)
);
- logger.info("Push sync result:", { entityType, result });
+ console.info("Push sync result:", { entityType, result });
results.success.push(result);
} else if (effectiveDirection === "pull-from-accounting") {
// Filter out entities that were synced recently (cooldown)
@@ -147,7 +143,7 @@ export const syncExternalAccountingTask = task({
);
if (entitiesToSync.length === 0) {
- logger.info(
+ console.info(
`All ${entityType} entities were synced recently, skipping`
);
continue;
@@ -157,7 +153,7 @@ export const syncExternalAccountingTask = task({
entitiesToSync.map((e) => e.entityId)
);
- logger.info("Pull sync result:", { entityType, result });
+ console.info("Pull sync result:", { entityType, result });
results.success.push(result);
} else if (effectiveDirection === "two-way") {
// For two-way sync, we need to determine direction per-entity
@@ -171,9 +167,9 @@ export const syncExternalAccountingTask = task({
entityConfig.owner
);
- logger.info("Two-way sync result:", {
+ console.info("Two-way sync result:", {
entityType,
- ...twoWayResult,
+ ...twoWayResult
});
results.success.push(twoWayResult.pushed);
results.success.push(twoWayResult.pulled);
@@ -183,19 +179,19 @@ export const syncExternalAccountingTask = task({
results.failed.push({
entities: entities,
- error: error instanceof Error ? error.message : "Unknown error",
+ error: error instanceof Error ? error.message : "Unknown error"
});
}
}
} catch (error) {
- logger.error("Sync task failed:", { error });
+ console.error("Sync task failed:", error);
} finally {
await pool.end();
}
return results;
- },
-});
+ }
+);
/**
* Filter entities that were synced within the cooldown period.
@@ -227,7 +223,7 @@ async function filterByCooldown(
if (now - lastSyncedAt > SYNC_COOLDOWN_MS) {
eligibleEntities.push(entity);
} else {
- logger.debug(
+ console.debug(
`Skipping ${entityType} ${entity.entityId} - synced ${
now - lastSyncedAt
}ms ago`
@@ -269,7 +265,7 @@ async function handleTwoWaySync(
if (mapping?.lastSyncedAt) {
const lastSyncedAt = new Date(mapping.lastSyncedAt).getTime();
if (now - lastSyncedAt <= SYNC_COOLDOWN_MS) {
- logger.debug(
+ console.debug(
`Skipping two-way sync for ${entityType} ${entity.entityId} - synced recently`
);
continue;
@@ -296,12 +292,22 @@ async function handleTwoWaySync(
const pushResult =
toPush.length > 0
? await syncer.pushBatchToAccounting(toPush)
- : { results: [], successCount: 0, errorCount: 0, skippedCount: 0 };
+ : {
+ results: [],
+ successCount: 0,
+ errorCount: 0,
+ skippedCount: 0
+ };
const pullResult =
toPull.length > 0
? await syncer.pullBatchFromAccounting(toPull)
- : { results: [], successCount: 0, errorCount: 0, skippedCount: 0 };
+ : {
+ results: [],
+ successCount: 0,
+ errorCount: 0,
+ skippedCount: 0
+ };
return { pushed: pushResult, pulled: pullResult };
}
diff --git a/packages/jobs/src/inngest/functions/integrations/timecard-auto-close.ts b/packages/jobs/src/inngest/functions/integrations/timecard-auto-close.ts
new file mode 100644
index 0000000000..0d6b126446
--- /dev/null
+++ b/packages/jobs/src/inngest/functions/integrations/timecard-auto-close.ts
@@ -0,0 +1,136 @@
+import { getCarbonServiceRole } from "@carbon/auth/client.server";
+import { inngest } from "../../client";
+
+export const timeCardAutoCloseFunction = inngest.createFunction(
+ { id: "timecard-auto-close", retries: 2 },
+ // Run every Sunday at 11pm UTC (after weekly task at 9pm)
+ { cron: "0 23 * * 0" },
+ async ({ step }) => {
+ const serviceRole = getCarbonServiceRole();
+
+ await step.run("auto-close-timecards", async () => {
+ console.log(`Starting timecard auto-close: ${new Date().toISOString()}`);
+
+ try {
+ // 1. Get all companies with time clock enabled
+ const { data: companies, error: companiesError } = await serviceRole
+ .from("companySettings")
+ .select("id")
+ .eq("timeCardEnabled", true);
+
+ if (companiesError) {
+ console.error(`Failed to fetch companies: ${companiesError.message}`);
+ return;
+ }
+
+ console.log(
+ `Found ${companies?.length || 0} companies with time clock enabled`
+ );
+
+ let totalClosed = 0;
+
+ for (const company of companies ?? []) {
+ // 2. Get all open time clock entries for this company
+ const { data: openEntries, error: entriesError } = await serviceRole
+ .from("timeCardEntry")
+ .select("id, employeeId, clockIn")
+ .eq("companyId", company.id)
+ .is("clockOut", null);
+
+ if (entriesError) {
+ console.error(
+ `Failed to fetch open entries for company ${company.id}: ${entriesError.message}`
+ );
+ continue;
+ }
+
+ if (!openEntries || openEntries.length === 0) continue;
+
+ console.log(
+ `Company ${company.id}: ${openEntries.length} open entries`
+ );
+
+ for (const entry of openEntries) {
+ // 3. Get the employee's assigned shift
+ const { data: employeeJob } = await serviceRole
+ .from("employeeJob")
+ .select("shiftId")
+ .eq("id", entry.employeeId)
+ .eq("companyId", company.id)
+ .single();
+
+ let clockOut: Date;
+ let shiftId: string | null = null;
+
+ if (employeeJob?.shiftId) {
+ const { data: shift } = await serviceRole
+ .from("shift")
+ .select("startTime, endTime")
+ .eq("id", employeeJob.shiftId)
+ .single();
+
+ if (shift) {
+ // Calculate shift duration
+ const startParts = shift.startTime.split(":").map(Number);
+ const endParts = shift.endTime.split(":").map(Number);
+ let durationMinutes =
+ endParts[0] * 60 +
+ endParts[1] -
+ (startParts[0] * 60 + startParts[1]);
+ // Handle overnight shifts
+ if (durationMinutes <= 0) durationMinutes += 24 * 60;
+
+ clockOut = new Date(
+ new Date(entry.clockIn).getTime() + durationMinutes * 60000
+ );
+ shiftId = employeeJob.shiftId;
+ } else {
+ // Shift not found, fall back to 8 hours
+ clockOut = new Date(
+ new Date(entry.clockIn).getTime() + 8 * 3600000
+ );
+ }
+ } else {
+ // No shift assigned, fall back to 8 hours
+ clockOut = new Date(
+ new Date(entry.clockIn).getTime() + 8 * 3600000
+ );
+ }
+
+ // 4. Update the entry
+ const { error: updateError } = await serviceRole
+ .from("timeCardEntry")
+ .update({
+ clockOut: clockOut.toISOString(),
+ autoCloseShiftId: shiftId,
+ updatedAt: new Date().toISOString(),
+ note: "Auto-closed by system (Sunday weekly close)"
+ })
+ .eq("id", entry.id);
+
+ if (updateError) {
+ console.error(
+ `Failed to auto-close entry ${entry.id}: ${updateError.message}`
+ );
+ } else {
+ totalClosed++;
+ console.log(
+ `Auto-closed entry ${entry.id} for employee ${entry.employeeId}`
+ );
+ }
+ }
+ }
+
+ console.log(
+ `Timecard auto-close completed: ${totalClosed} entries closed`
+ );
+ } catch (err) {
+ console.error(
+ `Unexpected error in timecard auto-close: ${
+ err instanceof Error ? err.message : String(err)
+ }`
+ );
+ }
+ });
+ }
+);
diff --git a/packages/jobs/src/inngest/functions/notifications/index.ts b/packages/jobs/src/inngest/functions/notifications/index.ts
new file mode 100644
index 0000000000..dbea2e2beb
--- /dev/null
+++ b/packages/jobs/src/inngest/functions/notifications/index.ts
@@ -0,0 +1,2 @@
+export { notifyFunction } from "./notify";
+export { sendEmailFunction } from "./send-email";
diff --git a/packages/jobs/src/inngest/functions/notifications/notify.ts b/packages/jobs/src/inngest/functions/notifications/notify.ts
new file mode 100644
index 0000000000..e4e7cc781b
--- /dev/null
+++ b/packages/jobs/src/inngest/functions/notifications/notify.ts
@@ -0,0 +1,723 @@
+import {
+ ERP_URL,
+ NOVU_API_URL,
+ NOVU_SECRET_KEY,
+ VERCEL_URL
+} from "@carbon/auth";
+import { getCarbonServiceRole } from "@carbon/auth/client.server";
+import type { Database } from "@carbon/database";
+import {
+ type CompanyIntegration,
+ notifyTaskAssigned
+} from "@carbon/ee/notifications";
+import {
+ getSubscriberId,
+ NotificationEvent,
+ NotificationWorkflow,
+ type TriggerPayload,
+ trigger,
+ triggerBulk
+} from "@carbon/notifications";
+import { Novu } from "@novu/node";
+import { inngest } from "../../client";
+
+type ApprovalDocumentType = Database["public"]["Enums"]["approvalDocumentType"];
+
+// Helper function to get company integrations
+async function getCompanyIntegrations(
+ client: ReturnType<typeof getCarbonServiceRole>,
+ companyId: string
+) {
+ return client
+ .from("companyIntegration")
+ .select("*")
+ .eq("companyId", companyId);
+}
+
+function getWorkflow(type: NotificationEvent) {
+ switch (type) {
+ case NotificationEvent.JobAssignment:
+ case NotificationEvent.JobOperationAssignment:
+ case NotificationEvent.MaintenanceDispatchAssignment:
+ case NotificationEvent.MaintenanceDispatchCreated:
+ case NotificationEvent.NonConformanceAssignment:
+ case NotificationEvent.ProcedureAssignment:
+ case NotificationEvent.PurchaseInvoiceAssignment:
+ case NotificationEvent.PurchaseOrderAssignment:
+ case NotificationEvent.QuoteAssignment:
+ case NotificationEvent.RiskAssignment:
+ case NotificationEvent.SalesOrderAssignment:
+ case NotificationEvent.SalesRfqAssignment:
+ case NotificationEvent.SalesRfqReady:
+ case NotificationEvent.StockTransferAssignment:
+ case NotificationEvent.SupplierQuoteAssignment:
+ case NotificationEvent.TrainingAssignment:
+ return NotificationWorkflow.Assignment;
+ case NotificationEvent.JobCompleted:
+ return NotificationWorkflow.JobCompleted;
+ case NotificationEvent.DigitalQuoteResponse:
+ return NotificationWorkflow.DigitalQuoteResponse;
+ case NotificationEvent.SuggestionResponse:
+ return NotificationWorkflow.SuggestionResponse;
+ case NotificationEvent.SupplierQuoteResponse:
+ return NotificationWorkflow.SupplierQuoteResponse;
+ case NotificationEvent.JobOperationMessage:
+ return NotificationWorkflow.Message;
+ case NotificationEvent.ApprovalApproved:
+ case NotificationEvent.ApprovalRejected:
+ case NotificationEvent.ApprovalRequested:
+ return NotificationWorkflow.Approval;
+ default:
+ return null;
+ }
+}
+
+async function getDescription(
+ client: ReturnType<typeof getCarbonServiceRole>,
+ type: NotificationEvent,
+ documentId: string,
+ documentType?: ApprovalDocumentType
+): Promise<string | null> {
+ switch (type) {
+ case NotificationEvent.SalesRfqReady:
+ case NotificationEvent.SalesRfqAssignment: {
+ const salesRfq = await client
+ .from("salesRfq")
+ .select("*")
+ .eq("id", documentId)
+ .single();
+
+ if (salesRfq.error) {
+ console.error("Failed to get salesRfq", salesRfq.error);
+ throw salesRfq.error;
+ }
+
+ if (type === NotificationEvent.SalesRfqReady) {
+ return `RFQ ${salesRfq?.data?.rfqId} is ready for quote`;
+ } else if (type === NotificationEvent.SalesRfqAssignment) {
+ return `RFQ ${salesRfq?.data?.rfqId} assigned to you`;
+ }
+ return null;
+ }
+
+ case NotificationEvent.QuoteAssignment: {
+ const quote = await client
+ .from("quote")
+ .select("*")
+ .eq("id", documentId)
+ .single();
+ if (quote.error) {
+ console.error("Failed to get quote", quote.error);
+ throw quote.error;
+ }
+ return `Quote ${quote?.data?.quoteId} assigned to you`;
+ }
+
+ case NotificationEvent.SalesOrderAssignment: {
+ const salesOrder = await client
+ .from("salesOrder")
+ .select("*")
+ .eq("id", documentId)
+ .single();
+
+ if (salesOrder.error) {
+ console.error("Failed to get salesOrder", salesOrder.error);
+ throw salesOrder.error;
+ }
+
+ return `Sales Order ${salesOrder?.data?.salesOrderId} assigned to you`;
+ }
+
+ case NotificationEvent.MaintenanceDispatchCreated: {
+ const maintenanceDispatchCreated = await client
+ .from("maintenanceDispatch")
+ .select("*")
+ .eq("id", documentId)
+ .single();
+
+ if (maintenanceDispatchCreated.error) {
+ console.error(
+ "Failed to get maintenanceDispatchCreated",
+ maintenanceDispatchCreated.error
+ );
+ throw maintenanceDispatchCreated.error;
+ }
+
+ return `New maintenance dispatch ${maintenanceDispatchCreated?.data?.maintenanceDispatchId} created`;
+ }
+
+ case NotificationEvent.MaintenanceDispatchAssignment: {
+ const maintenanceDispatch = await client
+ .from("maintenanceDispatch")
+ .select("*, workCenter(id, name)")
+ .eq("id", documentId)
+ .single();
+
+ if (maintenanceDispatch.error) {
+ console.error(
+ "Failed to get maintenanceDispatch",
+ maintenanceDispatch.error
+ );
+ throw maintenanceDispatch.error;
+ }
+
+ const workCenterName =
+ maintenanceDispatch.data?.workCenter?.name ?? "Unknown";
+ const dispatchId =
+ maintenanceDispatch.data?.maintenanceDispatchId ?? documentId;
+ return `Maintenance dispatch ${dispatchId} for ${workCenterName} assigned to you`;
+ }
+
+ case NotificationEvent.NonConformanceAssignment: {
+ const nonConformance = await client
+ .from("nonConformance")
+ .select("*")
+ .eq("id", documentId)
+ .single();
+
+ if (nonConformance.error) {
+ console.error("Failed to get nonConformance", nonConformance.error);
+ throw nonConformance.error;
+ }
+
+ return `Issue ${nonConformance?.data?.nonConformanceId} assigned to you`;
+ }
+
+ case NotificationEvent.JobAssignment: {
+ const job = await client
+ .from("job")
+ .select("*")
+ .eq("id", documentId)
+ .single();
+
+ if (job.error) {
+ console.error("Failed to get job", job.error);
+ throw job.error;
+ }
+
+ return `Job ${job?.data?.jobId} assigned to you`;
+ }
+
+ case NotificationEvent.JobCompleted: {
+ const completedJob = await client
+ .from("job")
+ .select("*")
+ .eq("id", documentId)
+ .single();
+
+ if (completedJob.error) {
+ console.error("Failed to get job", completedJob.error);
+ throw completedJob.error;
+ }
+
+ return `Job ${completedJob?.data?.jobId} is complete!`;
+ }
+
+ case NotificationEvent.JobOperationAssignment:
+ case NotificationEvent.JobOperationMessage: {
+ const [, operationId] = documentId.split(":");
+ const jobOperation = await client
+ .from("jobOperation")
+ .select("*, job(id, jobId)")
+ .eq("id", operationId)
+ .single();
+
+ if (jobOperation.error) {
+ console.error("Failed to get jobOperation", jobOperation.error);
+ throw jobOperation.error;
+ }
+
+ if (type === NotificationEvent.JobOperationAssignment) {
+ return `New job operation assigned to you on ${jobOperation?.data?.job?.jobId}`;
+ } else if (type === NotificationEvent.JobOperationMessage) {
+ return `New message on ${jobOperation?.data?.job?.jobId} operation: ${jobOperation?.data?.description}`;
+ }
+ return null;
+ }
+
+ case NotificationEvent.ProcedureAssignment: {
+ const procedure = await client
+ .from("procedure")
+ .select("*")
+ .eq("id", documentId)
+ .single();
+
+ if (procedure.error) {
+ console.error("Failed to get procedure", procedure.error);
+ throw procedure.error;
+ }
+
+ return `Procedure ${procedure?.data?.name} version ${procedure?.data?.version} assigned to you`;
+ }
+
+ case NotificationEvent.DigitalQuoteResponse: {
+ const digitalQuote = await client
+ .from("quote")
+ .select("*")
+ .eq("id", documentId)
+ .single();
+
+ if (digitalQuote.error) {
+ console.error("Failed to get digital quote", digitalQuote.error);
+ throw digitalQuote.error;
+ }
+
+ if (digitalQuote.data.digitalQuoteAcceptedBy) {
+ return `Digital Quote ${digitalQuote?.data?.quoteId} was completed by ${digitalQuote.data.digitalQuoteAcceptedBy}`;
+ }
+
+ if (digitalQuote.data.digitalQuoteRejectedBy) {
+ return `Digital Quote ${digitalQuote?.data?.quoteId} was rejected by ${digitalQuote.data.digitalQuoteRejectedBy}`;
+ }
+
+ return `Digital Quote ${digitalQuote?.data?.quoteId} was accepted`;
+ }
+
+ case NotificationEvent.GaugeCalibrationExpired: {
+ const gaugeCalibration = await client
+ .from("gaugeCalibrationRecord")
+ .select("*")
+ .eq("id", documentId)
+ .single();
+
+ if (gaugeCalibration.error) {
+ console.error("Failed to get gaugeCalibration", gaugeCalibration.error);
+ throw gaugeCalibration.error;
+ }
+
+ return `Gauge ${gaugeCalibration?.data?.gaugeId} is out of calibration`;
+ }
+
+ case NotificationEvent.StockTransferAssignment: {
+ const stockTransfer = await client
+ .from("stockTransfer")
+ .select("*")
+ .eq("id", documentId)
+ .single();
+
+ if (stockTransfer.error) {
+ console.error("Failed to get stockTransfer", stockTransfer.error);
+ throw stockTransfer.error;
+ }
+
+ return `Stock Transfer ${stockTransfer?.data?.stockTransferId} assigned to you`;
+ }
+
+ case NotificationEvent.TrainingAssignment: {
+ const trainingAssignment = await client
+ .from("trainingAssignment")
+ .select("*, training(id, name)")
+ .eq("id", documentId)
+ .single();
+
+ if (trainingAssignment.error) {
+ console.error(
+ "Failed to get trainingAssignment",
+ trainingAssignment.error
+ );
+ throw trainingAssignment.error;
+ }
+
+ return `Training "${trainingAssignment?.data?.training?.name}" assigned to you`;
+ }
+
+ case NotificationEvent.SuggestionResponse: {
+ const suggestion = await client
+ .from("suggestion")
+ .select("*, user(id, fullName)")
+ .eq("id", documentId)
+ .single();
+
+ if (suggestion.error) {
+ console.error("Failed to get suggestion", suggestion.error);
+ throw suggestion.error;
+ }
+
+ const submittedBy = suggestion.data.user?.fullName || "Anonymous";
+ return `New suggestion submitted by ${submittedBy}`;
+ }
+
+ case NotificationEvent.RiskAssignment: {
+ const risk = await client
+ .from("riskRegister")
+ .select("*")
+ .eq("id", documentId)
+ .single();
+
+ if (risk.error) {
+ console.error("Failed to get risk", risk.error);
+ throw risk.error;
+ }
+
+ return `Risk "${risk?.data?.title}" assigned to you`;
+ }
+
+ case NotificationEvent.SupplierQuoteResponse: {
+ const supplierQuote = await client
+ .from("supplierQuote")
+ .select("*")
+ .eq("id", documentId)
+ .single();
+
+ if (supplierQuote.error) {
+ console.error("Failed to get supplier quote", supplierQuote.error);
+ throw supplierQuote.error;
+ }
+
+ const externalNotes = supplierQuote.data.externalNotes as Record<
+ string,
+ unknown
+ > | null;
+ const respondedBy =
+ (externalNotes?.lastSubmittedBy as string | undefined) || "Supplier";
+ return `Supplier Quote ${supplierQuote?.data?.supplierQuoteId} was submitted by ${respondedBy}`;
+ }
+
+ case NotificationEvent.ApprovalRequested: {
+ if (documentType === "purchaseOrder") {
+ const purchaseOrderResult = await client
+ .from("purchaseOrder")
+ .select("purchaseOrderId")
+ .eq("id", documentId)
+ .single();
+
+ if (purchaseOrderResult.error || !purchaseOrderResult.data) {
+ console.error(
+ "Failed to retrieve purchase order for approval notification",
+ purchaseOrderResult.error
+ );
+ return "Purchase order requires your approval";
+ }
+
+ return `Purchase order ${purchaseOrderResult.data.purchaseOrderId} requires your approval`;
+ }
+
+ if (documentType === "qualityDocument") {
+ const qualityDocumentResult = await client
+ .from("qualityDocument")
+ .select("name")
+ .eq("id", documentId)
+ .single();
+
+ if (qualityDocumentResult.error || !qualityDocumentResult.data) {
+ console.error(
+ "Failed to retrieve quality document for approval notification",
+ qualityDocumentResult.error
+ );
+ return "Quality document requires your approval";
+ }
+
+ const qualityDocumentName =
+ qualityDocumentResult.data.name ?? "Untitled";
+ return `Quality document "${qualityDocumentName}" requires your approval`;
+ }
+ return `Approval requested`;
+ }
+
+ case NotificationEvent.ApprovalApproved: {
+ if (documentType === "purchaseOrder") {
+ const poApproved = await client
+ .from("purchaseOrder")
+ .select("purchaseOrderId")
+ .eq("id", documentId)
+ .single();
+ if (poApproved.error || !poApproved.data) {
+ return "Your purchase order was approved";
+ }
+ return `Purchase order ${poApproved.data.purchaseOrderId} was approved`;
+ }
+ if (documentType === "qualityDocument") {
+ const qdApproved = await client
+ .from("qualityDocument")
+ .select("name")
+ .eq("id", documentId)
+ .single();
+ if (qdApproved.error || !qdApproved.data) {
+ return "Your quality document was approved";
+ }
+ return `Quality document "${qdApproved.data.name ?? "Untitled"}" was approved`;
+ }
+ return "Your approval request was approved";
+ }
+
+ case NotificationEvent.ApprovalRejected: {
+ if (documentType === "purchaseOrder") {
+ const poRejected = await client
+ .from("purchaseOrder")
+ .select("purchaseOrderId")
+ .eq("id", documentId)
+ .single();
+ if (poRejected.error || !poRejected.data) {
+ return "Your purchase order was rejected";
+ }
+ return `Purchase order ${poRejected.data.purchaseOrderId} was rejected`;
+ }
+ if (documentType === "qualityDocument") {
+ const qdRejected = await client
+ .from("qualityDocument")
+ .select("name")
+ .eq("id", documentId)
+ .single();
+ if (qdRejected.error || !qdRejected.data) {
+ return "Your quality document was rejected";
+ }
+ return `Quality document "${qdRejected.data.name ?? "Untitled"}" was rejected`;
+ }
+ return "Your approval request was rejected";
+ }
+
+ default:
+ return null;
+ }
+}
+
+export const notifyFunction = inngest.createFunction(
+ {
+ id: "notify",
+ retries: 3
+ },
+ { event: "carbon/notify" },
+ async ({ event, step }) => {
+ const payload = event.data;
+
+ const novu = new Novu(NOVU_SECRET_KEY!, {
+ backendUrl: NOVU_API_URL
+ });
+ const isLocal =
+ VERCEL_URL === undefined || VERCEL_URL.includes("localhost");
+
+ if (isLocal) {
+ console.log("Skipping notify function on local", { payload });
+ return;
+ }
+
+ const client = getCarbonServiceRole();
+
+ const workflow = getWorkflow(payload.event);
+
+ if (!workflow) {
+ console.error(`No workflow found for notification type ${payload.event}`);
+ throw new Error(
+ `No workflow found for notification type ${payload.event}`
+ );
+ }
+
+ const description = await step.run("get-description", async () => {
+ return getDescription(
+ client,
+ payload.event,
+ payload.documentId,
+ payload.documentType
+ );
+ });
+
+ if (!description) {
+ console.error(
+ `No description found for notification type ${payload.event} with documentId ${payload.documentId}`
+ );
+ throw new Error(
+ `No description found for notification type ${payload.event} with documentId ${payload.documentId}`
+ );
+ }
+
+ // Send integration notifications for non-conformance assignment events (e.g., Slack)
+ if (
+ payload.event === NotificationEvent.NonConformanceAssignment &&
+ payload.recipient.type === "user"
+ ) {
+ await step.run("send-integration-notification", async () => {
+ console.log(
+ "Processing non-conformance assignment notification for integrations",
+ {
+ event: payload.event,
+ companyId: payload.companyId,
+ documentId: payload.documentId,
+ recipientUserId:
+ payload.recipient.type === "user"
+ ? payload.recipient.userId
+ : undefined,
+ from: payload.from
+ }
+ );
+
+ try {
+ const integrationsResult = await getCompanyIntegrations(
+ client,
+ payload.companyId
+ );
+
+ if (integrationsResult.data && integrationsResult.data.length > 0) {
+ await notifyTaskAssigned(
+ { client },
+ integrationsResult.data as CompanyIntegration[],
+ {
+ companyId: payload.companyId,
+ userId: payload.from || "system",
+ carbonUrl: `${ERP_URL}/x/issue/${payload.documentId}`,
+ task: {
+ id: payload.documentId,
+ table: "nonConformance",
+ assignee:
+ payload.recipient.type === "user"
+ ? payload.recipient.userId
+ : "",
+ title: description
+ }
+ }
+ );
+ }
+ } catch (error) {
+ console.error(
+ "Failed to send integration assignment notification:",
+ error
+ );
+ // Continue without blocking the main operation
+ }
+ });
+ }
+
+ const baseNotificationPayload = {
+ recordId: payload.documentId,
+ description,
+ event: payload.event,
+ from: payload.from,
+ ...(payload.documentType && { documentType: payload.documentType })
+ };
+
+ if (payload.recipient.type === "user") {
+ await step.run("send-single-notification", async () => {
+ const novuPayload = {
+ workflow,
+ payload: baseNotificationPayload,
+ user: {
+ subscriberId: getSubscriberId({
+ companyId: payload.companyId,
+ userId:
+ payload.recipient.type === "user"
+ ? payload.recipient.userId
+ : ""
+ })
+ }
+ };
+
+ console.log("Sending single user notification to Novu", {
+ event: payload.event,
+ workflow,
+ subscriberId: novuPayload.user.subscriberId,
+ description,
+ documentId: payload.documentId,
+ from: payload.from
+ });
+
+ try {
+ await trigger(novu, novuPayload);
+ console.log("Successfully sent single user notification to Novu");
+ } catch (error) {
+ console.error("Error triggering single user notification");
+ console.error(error);
+ }
+ });
+ } else if (["group", "users"].includes(payload.recipient.type)) {
+ await step.run("send-bulk-notification", async () => {
+ console.log(
+ `triggering notification for group ${payload.recipient.type}`
+ );
+
+ const userIds =
+ payload.recipient.type === "group"
+ ? await client.rpc("users_for_groups", {
+ groups: payload.recipient.groupIds
+ })
+ : {
+ data:
+ payload.recipient.type === "users"
+ ? payload.recipient.userIds
+ : [],
+ error: null
+ };
+
+ if (userIds.error) {
+ console.error("Failed to get userIds", userIds.error);
+ throw userIds.error;
+ }
+
+ if (
+ userIds.data === null ||
+ !Array.isArray(userIds.data) ||
+ userIds.data.length === 0
+ ) {
+ console.log(
+ `No userIds found for payload - skipping Novu notification`,
+ {
+ event: payload.event,
+ recipientType: payload.recipient.type,
+ recipient: payload.recipient,
+ reason: "No users found in group/users list"
+ }
+ );
+ return;
+ }
+
+ // Filter out the sender from recipients if they exist in the userIds
+ const filteredUserIds = payload.from
+ ? (userIds.data as string[]).filter((id) => id !== payload.from)
+ : (userIds.data as string[]);
+
+ if (filteredUserIds.length === 0) {
+ console.log(
+ `No recipients after filtering sender - skipping Novu notification`,
+ {
+ event: payload.event,
+ originalUserCount: userIds.data.length,
+ from: payload.from,
+ reason: "All users filtered out (sender was only recipient)"
+ }
+ );
+ return;
+ }
+
+ const notificationPayloads: TriggerPayload[] =
+ [...new Set(filteredUserIds)].map((userId) => ({
+ workflow,
+ payload: baseNotificationPayload,
+ user: {
+ subscriberId: getSubscriberId({
+ companyId: payload.companyId,
+ userId: userId
+ })
+ }
+ })) ?? [];
+
+ if (notificationPayloads.length > 0) {
+ console.log("Sending bulk notifications to Novu", {
+ event: payload.event,
+ workflow,
+ recipientCount: notificationPayloads.length,
+ description,
+ documentId: payload.documentId,
+ from: payload.from,
+ subscriberIds: notificationPayloads.map((p) => p.user.subscriberId)
+ });
+
+ try {
+ await triggerBulk(novu, notificationPayloads.flat());
+ console.log(
+ `Successfully sent ${notificationPayloads.length} bulk notifications to Novu`
+ );
+ } catch (error) {
+ console.error("Error triggering bulk notifications");
+ console.error(error);
+ }
+ } else {
+ console.log(
+ `No notification payloads generated - skipping Novu notification`,
+ {
+ event: payload.event,
+ reason: "Empty notification payloads array"
+ }
+ );
+ }
+ });
+ }
+ }
+);
diff --git a/packages/jobs/src/inngest/functions/notifications/send-email.ts b/packages/jobs/src/inngest/functions/notifications/send-email.ts
new file mode 100644
index 0000000000..037b507e5d
--- /dev/null
+++ b/packages/jobs/src/inngest/functions/notifications/send-email.ts
@@ -0,0 +1,69 @@
+import { getCarbonServiceRole } from "@carbon/auth/client.server";
+import { Resend as ResendConfig } from "@carbon/ee";
+import { Resend } from "resend";
+import { inngest } from "../../client";
+
+export const sendEmailFunction = inngest.createFunction(
+ {
+ id: "send-email-resend",
+ retries: 3
+ },
+ { event: "carbon/send-email" },
+ async ({ event, step }) => {
+ const payload = event.data;
+ const serviceRole = getCarbonServiceRole();
+
+ const { companyName, integrationMetadata, integrationActive } =
+ await step.run("fetch-company-integration", async () => {
+ const [companyResult, integrationResult] = await Promise.all([
+ serviceRole
+ .from("company")
+ .select("name")
+ .eq("id", payload.companyId)
+ .single(),
+ serviceRole
+ .from("companyIntegration")
+ .select("active, metadata")
+ .eq("companyId", payload.companyId)
+ .eq("id", "resend")
+ .maybeSingle()
+ ]);
+
+ return {
+ companyName: companyResult.data?.name ?? null,
+ integrationActive: integrationResult.data?.active ?? false,
+ integrationMetadata: integrationResult.data?.metadata ?? null
+ };
+ });
+
+ const parsedMetadata = ResendConfig.schema.safeParse(integrationMetadata);
+
+ console.info(parsedMetadata.data?.fromEmail ?? "No email found");
+
+ if (!parsedMetadata.success || !integrationActive) {
+ return { success: false, message: "Invalid or inactive integration" };
+ }
+
+ const result = await step.run("send-email", async () => {
+ const resend = new Resend(parsedMetadata.data.apiKey);
+
+ const email = {
+ from: `${companyName} <${
+ parsedMetadata.data.fromEmail ?? "[email protected]"
+ }>`,
+ to: payload.to,
+ cc: payload.cc,
+ reply_to: payload.from,
+ subject: payload.subject,
+ html: payload.html,
+ text: payload.text,
+ attachments: payload.attachments
+ };
+
+ console.info(`Resend Email Job`);
+ return resend.emails.send(email);
+ });
+
+ return { success: true, result };
+ }
+);
diff --git a/packages/jobs/trigger/audit-archive.ts b/packages/jobs/src/inngest/functions/scheduled/audit-archive.ts
similarity index 53%
rename from packages/jobs/trigger/audit-archive.ts
rename to packages/jobs/src/inngest/functions/scheduled/audit-archive.ts
index f76a36bdb6..44b9ee74cc 100644
--- a/packages/jobs/trigger/audit-archive.ts
+++ b/packages/jobs/src/inngest/functions/scheduled/audit-archive.ts
@@ -1,8 +1,8 @@
+import { gzipSync } from "node:zlib";
import { getCarbonServiceRole } from "@carbon/auth/client.server";
import { auditConfig } from "@carbon/database/audit.config";
import type { AuditLogEntry } from "@carbon/database/audit.types";
-import { logger, schedules } from "@trigger.dev/sdk/v3";
-import { gzipSync } from "node:zlib";
+import { inngest } from "../../client";
// Type for RPC calls
type AuditArchiveRpcClient = {
@@ -16,72 +16,6 @@ type AuditArchiveRpcClient = {
): Promise<{ data: number | null; error: any }>;
};
-/**
- * Scheduled task to archive old audit logs
- * Runs daily at 2 AM UTC
- * Exports audit logs older than retentionDays to gzipped JSONL files
- * Stores them in the private storage bucket and records in auditLogArchive table
- */
-export const auditLogArchiveTask = schedules.task({
- id: "audit-log-archive",
- cron: "0 2 * * *", // Daily at 2 AM UTC
- retry: {
- maxAttempts: 3,
- factor: 2,
- randomize: true,
- },
- run: async () => {
- const client = getCarbonServiceRole();
-
- // Calculate cutoff date
- const cutoffDate = new Date();
- cutoffDate.setDate(cutoffDate.getDate() - auditConfig.retentionDays);
-
- logger.info(`Archiving audit logs older than ${cutoffDate.toISOString()}`);
-
- // Get companies with audit logs enabled
- const { data: companies, error: companiesError } = await client
- .from("company")
- .select("id")
- .eq("auditLogEnabled", true);
-
-
- if (companiesError) {
- logger.error("Failed to fetch companies", { error: companiesError });
- throw new Error(`Failed to fetch companies: ${companiesError.message}`);
- }
-
- const results = {
- companiesProcessed: 0,
- recordsArchived: 0,
- recordsDeleted: 0,
- errors: 0,
- };
-
- for (const company of (companies as { id: string }[]) ?? []) {
- try {
- const archived = await archiveCompanyLogs(
- client as unknown as AuditArchiveRpcClient &
- ReturnType<typeof getCarbonServiceRole>,
- company.id,
- cutoffDate
- );
- results.companiesProcessed++;
- results.recordsArchived += archived.recordsArchived;
- results.recordsDeleted += archived.recordsDeleted;
- } catch (error) {
- logger.error(`Failed to archive logs for company ${company.id}`, {
- error,
- });
- results.errors++;
- }
- }
-
- logger.info("Audit log archive task completed", results);
- return results;
- },
-});
-
async function archiveCompanyLogs(
client: AuditArchiveRpcClient & ReturnType<typeof getCarbonServiceRole>,
companyId: string,
@@ -92,7 +26,7 @@ async function archiveCompanyLogs(
"get_audit_logs_for_archive",
{
p_company_id: companyId,
- p_before_date: cutoffDate.toISOString(),
+ p_before_date: cutoffDate.toISOString()
}
);
@@ -104,17 +38,17 @@ async function archiveCompanyLogs(
return { recordsArchived: 0, recordsDeleted: 0 };
}
- logger.info(`Archiving ${records.length} records for company ${companyId}`);
+ console.log(`Archiving ${records.length} records for company ${companyId}`);
// Convert to JSONL format
const jsonl = records.map((r) => JSON.stringify(r)).join("\n");
const gzipped = gzipSync(Buffer.from(jsonl));
// Generate archive path
- const now = new Date();
- const year = now.getFullYear();
- const month = String(now.getMonth() + 1).padStart(2, "0");
- const day = String(now.getDate()).padStart(2, "0");
+ const nowDate = new Date();
+ const year = nowDate.getFullYear();
+ const month = String(nowDate.getMonth() + 1).padStart(2, "0");
+ const day = String(nowDate.getDate()).padStart(2, "0");
const timestamp = `${year}-${month}-${day}`;
const archivePath = `audit-logs/${companyId}/${year}/${month}/${timestamp}.jsonl.gz`;
@@ -123,7 +57,7 @@ async function archiveCompanyLogs(
.from(auditConfig.archiveBucket)
.upload(archivePath, gzipped, {
contentType: "application/gzip",
- upsert: true,
+ upsert: true
});
if (uploadError) {
@@ -141,7 +75,7 @@ async function archiveCompanyLogs(
startDate: startDate.split("T")[0]!, // Extract date part
endDate: endDate.split("T")[0]!,
rowCount: records.length,
- sizeBytes: gzipped.length,
+ sizeBytes: gzipped.length
});
if (archiveError) {
@@ -155,20 +89,82 @@ async function archiveCompanyLogs(
"delete_old_audit_logs",
{
p_company_id: companyId,
- p_cutoff_date: cutoffDate.toISOString(),
+ p_cutoff_date: cutoffDate.toISOString()
}
);
if (deleteError) {
- logger.error(`Failed to delete archived records for ${companyId}`, {
- error: deleteError,
- });
+ console.error(
+ `Failed to delete archived records for ${companyId}`,
+ deleteError
+ );
// Don't throw - archive was successful, just couldn't clean up
return { recordsArchived: records.length, recordsDeleted: 0 };
}
return {
recordsArchived: records.length,
- recordsDeleted: deletedCount ?? records.length,
+ recordsDeleted: deletedCount ?? records.length
};
}
+
+export const auditArchiveFunction = inngest.createFunction(
+ { id: "audit-log-archive", retries: 2 },
+ { cron: "0 2 * * *" },
+ async ({ step }) => {
+ const results = await step.run("archive-audit-logs", async () => {
+ const client = getCarbonServiceRole();
+
+ // Calculate cutoff date
+ const cutoffDate = new Date();
+ cutoffDate.setDate(cutoffDate.getDate() - auditConfig.retentionDays);
+
+ console.log(
+ `Archiving audit logs older than ${cutoffDate.toISOString()}`
+ );
+
+ // Get companies with audit logs enabled
+ const { data: companies, error: companiesError } = await client
+ .from("company")
+ .select("id")
+ .eq("auditLogEnabled", true);
+
+ if (companiesError) {
+ console.error("Failed to fetch companies", companiesError);
+ throw new Error(`Failed to fetch companies: ${companiesError.message}`);
+ }
+
+ const results = {
+ companiesProcessed: 0,
+ recordsArchived: 0,
+ recordsDeleted: 0,
+ errors: 0
+ };
+
+ for (const company of (companies as { id: string }[]) ?? []) {
+ try {
+ const archived = await archiveCompanyLogs(
+ client as unknown as AuditArchiveRpcClient &
+ ReturnType<typeof getCarbonServiceRole>,
+ company.id,
+ cutoffDate
+ );
+ results.companiesProcessed++;
+ results.recordsArchived += archived.recordsArchived;
+ results.recordsDeleted += archived.recordsDeleted;
+ } catch (error) {
+ console.error(
+ `Failed to archive logs for company ${company.id}`,
+ error
+ );
+ results.errors++;
+ }
+ }
+
+ console.log("Audit log archive task completed", results);
+ return results;
+ });
+
+ return results;
+ }
+);
diff --git a/packages/jobs/trigger/cleanup.ts b/packages/jobs/src/inngest/functions/scheduled/cleanup.ts
similarity index 88%
rename from packages/jobs/trigger/cleanup.ts
rename to packages/jobs/src/inngest/functions/scheduled/cleanup.ts
index 92646d115a..20adec33d6 100644
--- a/packages/jobs/trigger/cleanup.ts
+++ b/packages/jobs/src/inngest/functions/scheduled/cleanup.ts
@@ -5,24 +5,23 @@ import {
getSubscriberId,
NotificationEvent,
NotificationWorkflow,
- triggerBulk,
+ triggerBulk
} from "@carbon/notifications";
import { Novu } from "@novu/node";
-import { schedules } from "@trigger.dev/sdk";
+import { inngest } from "../../client";
-const serviceRole = getCarbonServiceRole();
-const novu = new Novu(NOVU_SECRET_KEY!, {
- backendUrl: NOVU_API_URL,
-});
+export const cleanupFunction = inngest.createFunction(
+ { id: "cleanup", retries: 2 },
+ { cron: "0 7,12,17 * * *" },
+ async ({ step }) => {
+ const serviceRole = getCarbonServiceRole();
+ const novu = new Novu(NOVU_SECRET_KEY!, {
+ backendUrl: NOVU_API_URL
+ });
-export const cleanup = schedules.task({
- id: "cleanup",
- // Run at 7am, 12pm, and 5pm every day
- cron: "0 7,12,17 * * *",
- run: async () => {
- console.log(`🧹 Starting cleanup tasks: ${new Date().toISOString()}`);
+ await step.run("expire-quotes-and-rfqs", async () => {
+ console.log(`Starting cleanup tasks: ${new Date().toISOString()}`);
- try {
// Clean up expired quotes
console.log("Checking for expired quotes...");
const [expiredQuotes, expiredSupplierQuotes] = await Promise.all([
@@ -37,14 +36,12 @@ export const cleanup = schedules.task({
.select("*")
.eq("status", "Active")
.not("expirationDate", "is", null)
- .lt("expirationDate", new Date().toISOString()),
+ .lt("expirationDate", new Date().toISOString())
]);
if (expiredQuotes.error) {
console.error(
- `Error fetching expired quotes: ${JSON.stringify(
- expiredQuotes.error
- )}`
+ `Error fetching expired quotes: ${JSON.stringify(expiredQuotes.error)}`
);
return;
}
@@ -144,14 +141,14 @@ export const cleanup = schedules.task({
documentId: quote.id,
event: NotificationEvent.QuoteExpired,
recordId: quote.id,
- description: `Quote ${quote.quoteId} has expired`,
+ description: `Quote ${quote.quoteId} has expired`
},
user: {
subscriberId: getSubscriberId({
companyId: quote.companyId,
- userId: quote.salesPersonId!,
- }),
- },
+ userId: quote.salesPersonId!
+ })
+ }
};
});
@@ -169,7 +166,9 @@ export const cleanup = schedules.task({
console.log("No notifications to trigger");
}
}
+ });
+ await step.run("check-gauge-calibration", async () => {
// Check for gauges going out of calibration
console.log("Checking for gauges going out of calibration...");
const outOfCalibrationGauges = await serviceRole
@@ -191,7 +190,11 @@ export const cleanup = schedules.task({
// Get unique company IDs
const companyIds = [
- ...new Set(outOfCalibrationGauges.data.map((g) => g.companyId).filter((id): id is string => id !== null)),
+ ...new Set(
+ outOfCalibrationGauges.data
+ .map((g) => g.companyId)
+ .filter((id): id is string => id !== null)
+ )
];
// Fetch all company settings at once
@@ -211,7 +214,7 @@ export const cleanup = schedules.task({
const notificationGroupsByCompany = new Map(
companySettingsResult.data.map((settings) => [
settings.id,
- settings.gaugeCalibrationExpiredNotificationGroup ?? [],
+ settings.gaugeCalibrationExpiredNotificationGroup ?? []
])
);
@@ -238,14 +241,14 @@ export const cleanup = schedules.task({
payload: {
event: NotificationEvent.GaugeCalibrationExpired,
recordId: gauge.id,
- description: `Gauge ${gauge.gaugeId} is out of calibration`,
+ description: `Gauge ${gauge.gaugeId} is out of calibration`
},
user: {
subscriberId: getSubscriberId({
companyId: gauge.companyId,
- userId,
- }),
- },
+ userId
+ })
+ }
});
}
}
@@ -264,7 +267,7 @@ export const cleanup = schedules.task({
gaugeNotificationPayloads.map(
(payload) => payload.payload.recordId
)
- ),
+ )
];
const updateGauges = await serviceRole
@@ -295,13 +298,7 @@ export const cleanup = schedules.task({
console.log("No gauges going out of calibration found");
}
- console.log(`🧹 Cleanup tasks completed: ${new Date().toISOString()}`);
- } catch (error) {
- console.error(
- `Unexpected error in cleanup tasks: ${
- error instanceof Error ? error.message : String(error)
- }`
- );
- }
- },
-});
+ console.log(`Cleanup tasks completed: ${new Date().toISOString()}`);
+ });
+ }
+);
diff --git a/packages/jobs/src/inngest/functions/scheduled/dispatch.ts b/packages/jobs/src/inngest/functions/scheduled/dispatch.ts
new file mode 100644
index 0000000000..0bce30b408
--- /dev/null
+++ b/packages/jobs/src/inngest/functions/scheduled/dispatch.ts
@@ -0,0 +1,358 @@
+import { getCarbonServiceRole } from "@carbon/auth/client.server";
+import { NotificationEvent } from "@carbon/notifications";
+import { getLocalTimeZone, now } from "@internationalized/date";
+import { inngest } from "../../client";
+
+// Day of week mapping (0 = Sunday, 1 = Monday, etc.)
+const dayOfWeekFields = [
+ "sunday",
+ "monday",
+ "tuesday",
+ "wednesday",
+ "thursday",
+ "friday",
+ "saturday"
+] as const;
+
+interface MaintenanceSchedule {
+ id: string;
+ name: string;
+ frequency: string;
+ priority: string;
+ workCenterId: string;
+ nextDueAt: string | null;
+ skipHolidays: boolean;
+ monday: boolean;
+ tuesday: boolean;
+ wednesday: boolean;
+ thursday: boolean;
+ friday: boolean;
+ saturday: boolean;
+ sunday: boolean;
+ procedureId: string | null;
+}
+
+// Check if a date is enabled for the schedule based on day-of-week settings
+function isDayEnabledForSchedule(
+ schedule: MaintenanceSchedule,
+ targetDate: Date
+): boolean {
+ // Only check day-of-week for Daily frequency
+ if (schedule.frequency !== "Daily") {
+ return true;
+ }
+
+ const dayOfWeek = targetDate.getDay(); // 0 = Sunday, 1 = Monday, etc.
+ const dayField = dayOfWeekFields[dayOfWeek];
+ return schedule[dayField] === true;
+}
+
+// Check if a date is a holiday for the company
+async function isHoliday(companyId: string, date: Date): Promise<boolean> {
+ const dateString = date.toISOString().split("T")[0]; // YYYY-MM-DD format
+
+ const serviceRole = getCarbonServiceRole();
+ const { data: holiday, error } = await serviceRole
+ .from("holiday")
+ .select("id")
+ .eq("companyId", companyId)
+ .eq("date", dateString)
+ .maybeSingle();
+
+ if (error) {
+ console.error(`Error checking holiday for ${dateString}: ${error.message}`);
+ return false;
+ }
+
+ return holiday !== null;
+}
+
+export const dispatchFunction = inngest.createFunction(
+ { id: "dispatch", retries: 2 },
+ { cron: "0 6 * * *" },
+ async ({ step }) => {
+ const serviceRole = getCarbonServiceRole();
+
+ return await step.run("generate-maintenance-dispatches", async () => {
+ const currentDateTime = now(getLocalTimeZone());
+ console.log(
+ `Starting maintenance dispatch generation: ${currentDateTime.toString()}`
+ );
+
+ try {
+ // Get all companies with maintenanceGenerateInAdvance enabled
+ const { data: companiesWithSettings, error: settingsError } =
+ await serviceRole
+ .from("companySettings")
+ .select("id, maintenanceGenerateInAdvance, maintenanceAdvanceDays")
+ .eq("maintenanceGenerateInAdvance", true);
+
+ if (settingsError) {
+ console.error(
+ `Failed to fetch company settings: ${settingsError.message}`
+ );
+ return;
+ }
+
+ console.log(
+ `Found ${companiesWithSettings?.length || 0} companies with auto-generation enabled`
+ );
+
+ let totalDispatchesCreated = 0;
+
+ for (const settings of companiesWithSettings ?? []) {
+ const advanceDays = settings.maintenanceAdvanceDays ?? 7;
+ const futureDate = currentDateTime.add({ days: advanceDays });
+
+ // Get active schedules that are due
+ const { data: dueSchedules, error: schedulesError } =
+ await serviceRole
+ .from("maintenanceSchedule")
+ .select("*")
+ .eq("companyId", settings.id)
+ .eq("active", true)
+ .or(
+ `nextDueAt.is.null,nextDueAt.lte.${futureDate.toAbsoluteString()}`
+ );
+
+ if (schedulesError) {
+ console.error(
+ `Failed to fetch schedules for company ${settings.id}: ${schedulesError.message}`
+ );
+ continue;
+ }
+
+ console.log(
+ `Company ${settings.id}: ${dueSchedules?.length || 0} schedules due`
+ );
+
+ for (const schedule of dueSchedules ?? []) {
+ try {
+ const typedSchedule = schedule as MaintenanceSchedule;
+
+ // Track current nextDueAt for this schedule (will be updated as we create dispatches)
+ let currentNextDueAt = typedSchedule.nextDueAt
+ ? new Date(typedSchedule.nextDueAt)
+ : new Date();
+
+ // Loop to create dispatches for all dates within the advance window
+ while (
+ currentNextDueAt <= new Date(futureDate.toAbsoluteString())
+ ) {
+ const targetDate = currentNextDueAt;
+
+ // For Daily schedules, check if this day of week is enabled
+ if (!isDayEnabledForSchedule(typedSchedule, targetDate)) {
+ console.log(
+ `Skipping schedule "${typedSchedule.name}" for ${targetDate.toISOString().split("T")[0]} - day of week not enabled`
+ );
+ // Advance to next day for daily schedules
+ if (typedSchedule.frequency === "Daily") {
+ currentNextDueAt = new Date(currentNextDueAt);
+ currentNextDueAt.setDate(currentNextDueAt.getDate() + 1);
+ continue;
+ }
+ break;
+ }
+
+ // Check if this date is a holiday and skipHolidays is enabled
+ if (typedSchedule.skipHolidays) {
+ const isHolidayDate = await isHoliday(
+ settings.id,
+ targetDate
+ );
+ if (isHolidayDate) {
+ console.log(
+ `Skipping schedule "${typedSchedule.name}" - ${targetDate.toISOString().split("T")[0]} is a holiday`
+ );
+ // Advance to next occurrence based on frequency
+ currentNextDueAt = new Date(currentNextDueAt);
+ switch (typedSchedule.frequency) {
+ case "Daily":
+ currentNextDueAt.setDate(
+ currentNextDueAt.getDate() + 1
+ );
+ break;
+ case "Weekly":
+ currentNextDueAt.setDate(
+ currentNextDueAt.getDate() + 7
+ );
+ break;
+ case "Monthly":
+ currentNextDueAt.setMonth(
+ currentNextDueAt.getMonth() + 1
+ );
+ break;
+ case "Quarterly":
+ currentNextDueAt.setMonth(
+ currentNextDueAt.getMonth() + 3
+ );
+ break;
+ case "Annual":
+ currentNextDueAt.setFullYear(
+ currentNextDueAt.getFullYear() + 1
+ );
+ break;
+ }
+ continue;
+ }
+ }
+
+ // Get next sequence number
+ const { data: sequenceData, error: sequenceError } =
+ await serviceRole.rpc("get_next_sequence", {
+ sequence_name: "maintenanceDispatch",
+ company_id: settings.id
+ });
+
+ if (sequenceError) {
+ console.error(
+ `Failed to get sequence for schedule ${schedule.id}: ${sequenceError.message}`
+ );
+ break;
+ }
+
+ // Create the dispatch
+ const { data: newDispatch, error: dispatchError } =
+ await serviceRole
+ .from("maintenanceDispatch")
+ .insert({
+ maintenanceDispatchId: sequenceData,
+ status: "Open",
+ priority: schedule.priority,
+ source: "Scheduled",
+ severity: "Preventive",
+ oeeImpact: "Planned",
+ workCenterId: schedule.workCenterId,
+ maintenanceScheduleId: schedule.id,
+ procedureId: schedule.procedureId,
+ plannedStartTime: targetDate.toISOString(),
+ companyId: settings.id,
+ createdBy: "system"
+ })
+ .select("id")
+ .single();
+
+ if (dispatchError) {
+ console.error(
+ `Failed to create dispatch for schedule ${schedule.id}: ${dispatchError.message}`
+ );
+ break;
+ }
+
+ // Copy items from schedule to dispatch
+ const { data: scheduleItems } = await serviceRole
+ .from("maintenanceScheduleItem")
+ .select("itemId, quantity, unitOfMeasureCode")
+ .eq("maintenanceScheduleId", schedule.id);
+
+ if (scheduleItems && scheduleItems.length > 0) {
+ await serviceRole.from("maintenanceDispatchItem").insert(
+ scheduleItems.map((item) => ({
+ maintenanceDispatchId: newDispatch.id,
+ itemId: item.itemId,
+ quantity: item.quantity,
+ unitOfMeasureCode: item.unitOfMeasureCode,
+ companyId: settings.id,
+ createdBy: "system"
+ }))
+ );
+ }
+
+ // Link work center
+ await serviceRole.from("maintenanceDispatchWorkCenter").insert({
+ maintenanceDispatchId: newDispatch.id,
+ workCenterId: schedule.workCenterId,
+ companyId: settings.id,
+ createdBy: "system"
+ });
+
+ totalDispatchesCreated++;
+ console.log(
+ `Created dispatch ${sequenceData} for schedule "${schedule.name}" on ${targetDate.toISOString().split("T")[0]}`
+ );
+
+ // Get employees assigned to this work center to notify them
+ const { data: workCenterEmployees } = await (serviceRole as any)
+ .from("workCenterEmployee")
+ .select("userId")
+ .eq("workCenterId", schedule.workCenterId);
+
+ if (workCenterEmployees && workCenterEmployees.length > 0) {
+ const userIds = workCenterEmployees.map(
+ (e: any) => e.userId as string
+ );
+ await inngest.send({
+ name: "carbon/notify",
+ data: {
+ event: NotificationEvent.MaintenanceDispatchCreated,
+ companyId: settings.id,
+ documentId: newDispatch.id,
+ recipient: {
+ type: "users" as const,
+ userIds
+ }
+ }
+ });
+ console.log(
+ `Notified ${userIds.length} work center employees about dispatch ${sequenceData}`
+ );
+ }
+
+ // Calculate next due date based on frequency
+ currentNextDueAt = new Date(currentNextDueAt);
+ switch (schedule.frequency) {
+ case "Daily":
+ currentNextDueAt.setDate(currentNextDueAt.getDate() + 1);
+ break;
+ case "Weekly":
+ currentNextDueAt.setDate(currentNextDueAt.getDate() + 7);
+ break;
+ case "Monthly":
+ currentNextDueAt.setMonth(currentNextDueAt.getMonth() + 1);
+ break;
+ case "Quarterly":
+ currentNextDueAt.setMonth(currentNextDueAt.getMonth() + 3);
+ break;
+ case "Annual":
+ currentNextDueAt.setFullYear(
+ currentNextDueAt.getFullYear() + 1
+ );
+ break;
+ }
+ }
+
+ // Update schedule's lastGeneratedAt and nextDueAt after processing all dates
+ await serviceRole
+ .from("maintenanceSchedule")
+ .update({
+ lastGeneratedAt: currentDateTime.toAbsoluteString(),
+ nextDueAt: currentNextDueAt.toISOString()
+ })
+ .eq("id", schedule.id);
+ } catch (err) {
+ console.error(
+ `Error processing schedule ${schedule.id}: ${
+ err instanceof Error ? err.message : String(err)
+ }`
+ );
+ }
+ }
+ }
+
+ console.log(
+ `Maintenance dispatch generation completed: ${totalDispatchesCreated} dispatches created`
+ );
+
+ return { dispatchesCreated: totalDispatchesCreated };
+ } catch (error) {
+ console.error(
+ `Unexpected error in maintenance generation: ${
+ error instanceof Error ? error.message : String(error)
+ }`
+ );
+ throw error;
+ }
+ });
+ }
+);
diff --git a/packages/jobs/src/inngest/functions/scheduled/index.ts b/packages/jobs/src/inngest/functions/scheduled/index.ts
new file mode 100644
index 0000000000..db13e92aa4
--- /dev/null
+++ b/packages/jobs/src/inngest/functions/scheduled/index.ts
@@ -0,0 +1,6 @@
+export { auditArchiveFunction } from "./audit-archive";
+export { cleanupFunction } from "./cleanup";
+export { dispatchFunction } from "./dispatch";
+export { mrpFunction } from "./mrp";
+export { updateExchangeRatesFunction } from "./update-exchange-rates";
+export { weeklyFunction } from "./weekly";
diff --git a/packages/jobs/src/inngest/functions/scheduled/mrp.ts b/packages/jobs/src/inngest/functions/scheduled/mrp.ts
new file mode 100644
index 0000000000..09f7c192be
--- /dev/null
+++ b/packages/jobs/src/inngest/functions/scheduled/mrp.ts
@@ -0,0 +1,61 @@
+import { getCarbonServiceRole } from "@carbon/auth/client.server";
+import { inngest } from "../../client";
+
+export const mrpFunction = inngest.createFunction(
+ { id: "mrp", retries: 2 },
+ { cron: "0 */3 * * *" },
+ async ({ step }) => {
+ const serviceRole = getCarbonServiceRole();
+ await step.run("run-mrp-for-all-companies", async () => {
+ console.log(
+ `Scheduled MRP Calculation Started: ${new Date().toISOString()}`
+ );
+
+ const companies = await serviceRole
+ .from("companyPlan")
+ .select("id, ...company(name)");
+
+ if (companies.error) {
+ console.error(
+ `Failed to get companies: ${
+ companies.error instanceof Error
+ ? companies.error.message
+ : String(companies.error)
+ }`
+ );
+ return;
+ }
+
+ for (const company of companies.data) {
+ try {
+ const result = await serviceRole.functions.invoke("mrp", {
+ body: {
+ type: "company",
+ id: company.id,
+ companyId: company.id,
+ userId: "system"
+ }
+ });
+
+ if (result.error) {
+ console.error(
+ `Failed to run MRP for company ${company.name}: ${
+ result.error instanceof Error
+ ? result.error.message
+ : String(result.error)
+ }`
+ );
+ } else {
+ console.log(`Successfully ran MRP for company ${company.name}`);
+ }
+ } catch (error) {
+ console.error(
+ `Unexpected error in MRP run task: ${
+ error instanceof Error ? error.message : String(error)
+ }`
+ );
+ }
+ }
+ });
+ }
+);
diff --git a/packages/jobs/src/inngest/functions/scheduled/update-exchange-rates.ts b/packages/jobs/src/inngest/functions/scheduled/update-exchange-rates.ts
new file mode 100644
index 0000000000..583f8fae42
--- /dev/null
+++ b/packages/jobs/src/inngest/functions/scheduled/update-exchange-rates.ts
@@ -0,0 +1,243 @@
+import { EXCHANGE_RATES_API_KEY } from "@carbon/auth";
+import { getCarbonServiceRole } from "@carbon/auth/client.server";
+import type { Rates } from "@carbon/ee/exchange-rates.server";
+import { getExchangeRatesClient } from "@carbon/ee/exchange-rates.server";
+import { inngest } from "../../client";
+
+type CurrencyCode =
+ | "EUR"
+ | "USD"
+ | "GBP"
+ | "JPY"
+ | "CHF"
+ | "CAD"
+ | "AUD"
+ | "CNY"
+ | "INR"
+ | "MXN"
+ | "BRL"
+ | "RUB"
+ | "ZAR"
+ | "TRY"
+ | "SEK"
+ | "NOK"
+ | "DKK"
+ | "SGD"
+ | "HKD"
+ | "TWD"
+ | "THB"
+ | "MYR"
+ | "PHP"
+ | "IDR"
+ | "VND"
+ | "KRW"
+ | "TND"
+ | "MAD"
+ | "AED"
+ | "SAR"
+ | "QAR"
+ | "KWD"
+ | "BHD"
+ | "OMR"
+ | "JOD"
+ | "LYD"
+ | "EGP"
+ | "ILS"
+ | "KZT"
+ | "KGS"
+ | "UZS"
+ | "TJS"
+ | "AZN"
+ | "TMT"
+ | "UYU"
+ | "BYN"
+ | "KZT"
+ | "KGS"
+ | "UZS"
+ | "TJS"
+ | "AZN"
+ | "TMT"
+ | "UYU"
+ | "BYN"
+ | "KZT"
+ | "KGS"
+ | "UZS"
+ | "TJS"
+ | "AZN"
+ | "TMT"
+ | "UYU"
+ | "BYN";
+
+export const updateExchangeRatesFunction = inngest.createFunction(
+ { id: "update-exchange-rates", retries: 2 },
+ { cron: "0 0 * * *" },
+ async ({ step }) => {
+ const serviceRole = getCarbonServiceRole();
+ await step.run("fetch-and-update-exchange-rates", async () => {
+ console.log(`Exchange Rates Task Started: ${new Date().toISOString()}`);
+ const integrations = await serviceRole
+ .from("companyIntegration")
+ .select("active, companyId")
+ .eq("id", "exchange-rates-v1")
+ .eq("active", true);
+
+ if (integrations.error) {
+ console.error(
+ `Error fetching integrations: ${JSON.stringify(integrations.error)}`
+ );
+ return;
+ }
+
+ if (integrations.data?.length === 0) {
+ console.log(
+ "No active exchange rate integrations found. Exiting task."
+ );
+ return;
+ }
+
+ console.log(`Found ${integrations.data.length} active integrations`);
+
+ // Fetch the exchange rates for the base currency of EUR
+ const exchangeRatesClient = getExchangeRatesClient(
+ EXCHANGE_RATES_API_KEY
+ );
+
+ if (!exchangeRatesClient) {
+ console.error(
+ "Exchange rates client is undefined. Check API key configuration."
+ );
+ return;
+ }
+
+ let ratesEUR: Rates;
+ try {
+ ratesEUR = await exchangeRatesClient.getExchangeRates();
+ if (!ratesEUR)
+ throw new Error("No rates returned from exchange rates API");
+ console.log(
+ `Successfully fetched exchange rates with base currency of EUR for ${
+ Object.keys(ratesEUR).length
+ } currencies`
+ );
+ } catch (error) {
+ console.error(
+ `Error fetching exchange rates: ${
+ error instanceof Error ? error.message : String(error)
+ }`
+ );
+ return;
+ }
+
+ // Cache the rates for each currency to avoid unnecessary computations
+ let cachedRates: { [key in CurrencyCode]?: Rates } = {
+ EUR: ratesEUR
+ };
+
+ for (const integration of integrations.data) {
+ console.log(
+ `Processing integration for company ID: ${integration.companyId}`
+ );
+
+ const company = await serviceRole
+ .from("company")
+ .select("*")
+ .eq("id", integration.companyId)
+ .single();
+
+ if (company.error) {
+ console.error(
+ `Error fetching company ${
+ integration.companyId
+ }: ${JSON.stringify(company.error)}`
+ );
+ continue;
+ }
+
+ const baseCurrencyCode = company.data.baseCurrencyCode as CurrencyCode;
+ let rates: Rates | undefined;
+ rates = cachedRates[baseCurrencyCode];
+ // Check if the rates for this base currency are cached, and if not compute them
+ if (rates) {
+ console.log(`Using cached rates for ${baseCurrencyCode}`);
+ } else {
+ console.log(`Computing rates for ${baseCurrencyCode}`);
+ rates = await exchangeRatesClient.convertExchangeRates(
+ baseCurrencyCode,
+ ratesEUR
+ );
+ cachedRates[baseCurrencyCode] = rates;
+ }
+
+ const updatedAt = new Date().toISOString();
+
+ try {
+ const { data, error } = await serviceRole
+ .from("currency")
+ .select("*")
+ .eq("companyId", integration.companyId);
+
+ if (error) {
+ console.error(
+ `Error fetching currencies for company ${
+ integration.companyId
+ }: ${JSON.stringify(error)}`
+ );
+ continue;
+ }
+
+ if (!data || data.length === 0) {
+ console.log(
+ `No currencies found for company ${integration.companyId}`
+ );
+ continue;
+ }
+
+ const updates = data
+ .map((currency) => ({
+ ...currency,
+ exchangeRate: Number(
+ rates[currency.code as CurrencyCode]?.toFixed(
+ currency.decimalPlaces
+ )
+ ),
+ updatedAt
+ }))
+ .filter((currency) => currency.exchangeRate);
+
+ if (updates.length === 0) {
+ console.log(
+ `No currency updates needed for company ${integration.companyId}`
+ );
+ continue;
+ }
+
+ console.log(
+ `Updating ${updates.length} currencies for company ${integration.companyId}`
+ );
+ const { error: upsertError } = await serviceRole
+ .from("currency")
+ .upsert(updates);
+ if (upsertError) {
+ console.error(
+ `Error updating currencies for company ${
+ integration.companyId
+ }: ${JSON.stringify(upsertError)}`
+ );
+ } else {
+ console.log(
+ `Successfully updated currencies for company ${integration.companyId}`
+ );
+ }
+ } catch (err) {
+ console.error(
+ `Unexpected error processing company ${integration.companyId}: ${
+ err instanceof Error ? err.message : String(err)
+ }`
+ );
+ }
+ }
+
+ console.log(`Exchange Rates Task Completed: ${new Date().toISOString()}`);
+ });
+ }
+);
diff --git a/packages/jobs/src/inngest/functions/scheduled/weekly.ts b/packages/jobs/src/inngest/functions/scheduled/weekly.ts
new file mode 100644
index 0000000000..f303cdb79a
--- /dev/null
+++ b/packages/jobs/src/inngest/functions/scheduled/weekly.ts
@@ -0,0 +1,248 @@
+import { getCarbonServiceRole } from "@carbon/auth/client.server";
+import { NotificationEvent } from "@carbon/notifications";
+import { Edition } from "@carbon/utils";
+import { inngest } from "../../client";
+
+export const weeklyFunction = inngest.createFunction(
+ { id: "weekly", retries: 2 },
+ { cron: "0 21 * * 0" },
+ async ({ step }) => {
+ const serviceRole = getCarbonServiceRole();
+ await step.run("cloud-cleanup", async () => {
+ console.log(`Starting weekly tasks: ${new Date().toISOString()}`);
+
+ try {
+ if (process.env.CARBON_EDITION === Edition.Cloud) {
+ const bypassUrl = `${process.env.VERCEL_URL}/api/settings/bypass`;
+ const bypassResponse = await fetch(bypassUrl);
+ if (!bypassResponse.ok) {
+ console.error(
+ `Failed to fetch bypass list: ${bypassResponse.statusText}`
+ );
+ return;
+ }
+ const bypassData = (await bypassResponse.json()) as {
+ bypassList?: string[];
+ };
+ const bypassList = bypassData.bypassList ?? [];
+
+ console.log(`Bypass list: ${bypassList}`);
+
+ // Get all companies
+ const { data: companies, error: companiesError } = await serviceRole
+ .from("company")
+ .select("id, name, createdAt");
+
+ if (companiesError) {
+ console.error(
+ `Failed to fetch companies: ${companiesError.message}`
+ );
+ return;
+ }
+
+ console.log(`Found ${companies?.length || 0} companies`);
+
+ // Get all company plans
+ const { data: companyPlans, error: plansError } = await serviceRole
+ .from("companyPlan")
+ .select("id, stripeSubscriptionStatus");
+
+ if (plansError) {
+ console.error(
+ `Failed to fetch company plans: ${plansError.message}`
+ );
+ return;
+ }
+
+ // Create a map of company plans for quick lookup
+ const planMap = new Map(
+ companyPlans?.map((plan) => [
+ plan.id,
+ plan.stripeSubscriptionStatus
+ ]) || []
+ );
+
+ // Filter companies to delete
+ const oneWeekAgo = new Date();
+ oneWeekAgo.setDate(oneWeekAgo.getDate() - 7);
+
+ const companiesToDelete =
+ companies?.filter((company) => {
+ if (planMap.get(company.id) === "Canceled") {
+ return true;
+ }
+
+ if (bypassList.includes(company.id)) {
+ return false;
+ }
+
+ if (planMap.get(company.id)) {
+ return false;
+ }
+
+ // Keep companies created in the last week
+ const createdAt = new Date(company.createdAt);
+ if (createdAt > oneWeekAgo) {
+ return false;
+ }
+
+ // Delete this company
+ return true;
+ }) || [];
+
+ console.log(`Companies to delete: ${companiesToDelete.length}`);
+
+ const { error: deletedCompaniesError } = await serviceRole
+ .from("company")
+ .delete()
+ .in(
+ "id",
+ companiesToDelete.map((company) => company.id)
+ );
+
+ if (deletedCompaniesError) {
+ console.error(
+ `Failed to delete companies: ${deletedCompaniesError.message}`
+ );
+ return;
+ } else {
+ console.log(`Deleted ${companiesToDelete.length} companies`);
+ for (const company of companiesToDelete) {
+ console.log(`Deleted company ${company.name}`);
+ }
+ }
+
+ // Drop search index tables for companies being deleted
+ for (const company of companiesToDelete) {
+ const { error: dropSearchError } = await serviceRole.rpc(
+ "drop_company_search_index",
+ { p_company_id: company.id }
+ );
+ if (dropSearchError) {
+ console.error(
+ `Failed to drop search index for company ${company.name}: ${dropSearchError.message}`
+ );
+ } else {
+ console.log(`Dropped search index for company ${company.name}`);
+ }
+ }
+ }
+ } catch (error) {
+ console.error(
+ `Unexpected error in cloud cleanup: ${
+ error instanceof Error ? error.message : String(error)
+ }`
+ );
+ }
+ });
+
+ await step.run("notify-outstanding-trainings", async () => {
+ // Notify employees with outstanding trainings (Pending or Overdue)
+ console.log(`Checking for outstanding training assignments...`);
+
+ try {
+ // Get all companies with training assignments
+ const { data: companiesWithTrainings, error: companiesError } =
+ await serviceRole
+ .from("trainingAssignment")
+ .select("companyId")
+ .limit(1000);
+
+ if (companiesError) {
+ console.error(
+ `Failed to fetch companies with trainings: ${companiesError.message}`
+ );
+ return;
+ }
+
+ const uniqueCompanyIds = [
+ ...new Set(companiesWithTrainings?.map((c) => c.companyId) ?? [])
+ ];
+
+ console.log(
+ `Found ${uniqueCompanyIds.length} companies with training assignments`
+ );
+
+ let totalNotifications = 0;
+
+ for (const companyId of uniqueCompanyIds) {
+ const { data: trainingStatus, error: trainingsError } =
+ await serviceRole.rpc("get_training_assignment_status", {
+ p_company_id: companyId
+ });
+
+ if (trainingsError) {
+ console.error(
+ `Failed to fetch trainings for company ${companyId}: ${trainingsError.message}`
+ );
+ continue;
+ }
+
+ // Filter to pending/overdue and dedupe by employee+assignment
+ const outstandingTrainings = (trainingStatus ?? []).filter(
+ (t) => t.status === "Pending" || t.status === "Overdue"
+ );
+
+ // Group by trainingAssignmentId to send one notification per assignment per employee
+ const assignmentsByEmployee = new Map<
+ string,
+ {
+ trainingAssignmentId: string;
+ employeeId: string;
+ companyId: string;
+ trainingName: string;
+ status: string;
+ }
+ >();
+
+ for (const training of outstandingTrainings) {
+ const key = `${training.companyId}:${training.employeeId}:${training.trainingAssignmentId}`;
+ if (!assignmentsByEmployee.has(key)) {
+ assignmentsByEmployee.set(key, training);
+ }
+ }
+
+ // Send notifications for each unique employee-assignment combination
+ for (const [, assignment] of assignmentsByEmployee) {
+ try {
+ await inngest.send({
+ name: "carbon/notify",
+ data: {
+ companyId: assignment.companyId,
+ documentId: assignment.trainingAssignmentId,
+ event: NotificationEvent.TrainingAssignment,
+ recipient: {
+ type: "user" as const,
+ userId: assignment.employeeId
+ }
+ }
+ });
+ console.log(
+ `Sent reminder for training "${assignment.trainingName}" to employee ${assignment.employeeId}`
+ );
+ totalNotifications++;
+ } catch (err) {
+ console.error(
+ `Failed to send training reminder: ${
+ err instanceof Error ? err.message : String(err)
+ }`
+ );
+ }
+ }
+ }
+
+ console.log(
+ `Sent ${totalNotifications} training reminder notifications`
+ );
+ } catch (error) {
+ console.error(
+ `Unexpected error in training notifications: ${
+ error instanceof Error ? error.message : String(error)
+ }`
+ );
+ }
+
+ console.log(`Weekly tasks completed: ${new Date().toISOString()}`);
+ });
+ }
+);
diff --git a/packages/jobs/src/inngest/functions/tasks/index.ts b/packages/jobs/src/inngest/functions/tasks/index.ts
new file mode 100644
index 0000000000..99070d5d73
--- /dev/null
+++ b/packages/jobs/src/inngest/functions/tasks/index.ts
@@ -0,0 +1,7 @@
+export { modelThumbnailFunction } from "./model-thumbnail";
+export { onboardFunction } from "./onboard";
+export { postTransactionFunction } from "./post-transaction";
+export { recalculateFunction } from "./recalculate";
+export { rescheduleJobFunction } from "./reschedule-job";
+export { updatePermissionsFunction } from "./update-permissions";
+export { userAdminFunction } from "./user-admin";
diff --git a/packages/jobs/src/inngest/functions/tasks/model-thumbnail.ts b/packages/jobs/src/inngest/functions/tasks/model-thumbnail.ts
new file mode 100644
index 0000000000..10577dd1e8
--- /dev/null
+++ b/packages/jobs/src/inngest/functions/tasks/model-thumbnail.ts
@@ -0,0 +1,86 @@
+import { SUPABASE_ANON_KEY, SUPABASE_URL, VERCEL_URL } from "@carbon/auth";
+import { getCarbonServiceRole } from "@carbon/auth/client.server";
+import { inngest } from "../../client";
+
+export const modelThumbnailFunction = inngest.createFunction(
+ { id: "model-thumbnail", retries: 3 },
+ { event: "carbon/model-thumbnail" },
+ async ({ event, step }) => {
+ const { modelId, companyId } = event.data;
+
+ const isLocal =
+ VERCEL_URL === undefined || VERCEL_URL.includes("localhost");
+
+ const getModelUrl = (id: string) => {
+ const domain = isLocal ? "http://localhost:3000" : VERCEL_URL;
+ return `${domain}/file/model/${id}`;
+ };
+
+ if (isLocal) {
+ console.log("Skipping model-thumbnail task on local", {
+ payload: event.data
+ });
+ return;
+ }
+
+ await step.run("generate-and-upload-thumbnail", async () => {
+ console.log("Starting model-thumbnail task", { payload: event.data });
+ const client = getCarbonServiceRole();
+
+ const url = getModelUrl(modelId);
+ const imageUrl = `${SUPABASE_URL}/functions/v1/thumbnail`;
+
+ const response = await fetch(imageUrl, {
+ method: "POST",
+ headers: {
+ "Content-Type": "application/json",
+ Authorization: `Bearer ${SUPABASE_ANON_KEY}`
+ },
+ body: JSON.stringify({ url })
+ });
+
+ if (response.status !== 200) {
+ console.log("Failed to generate thumbnail", { response });
+ throw new Error("Failed to generate thumbnail");
+ }
+
+ const blob = new Blob([await response.arrayBuffer()], {
+ type: "image/png"
+ });
+
+ const fileName = `${modelId}.png`;
+ const thumbnailFile = new File([blob], fileName, {
+ type: "image/png"
+ });
+
+ console.log("Uploading thumbnail", { fileName });
+
+ const { data, error } = await client.storage
+ .from("private")
+ .upload(
+ `${companyId}/thumbnails/${modelId}/${fileName}`,
+ thumbnailFile,
+ {
+ upsert: true
+ }
+ );
+
+ if (error) {
+ console.error("Failed to upload thumbnail", { error });
+ }
+
+ const result = await client
+ .from("modelUpload")
+ .update({
+ thumbnailPath: data?.path
+ })
+ .eq("id", modelId);
+
+ if (result.error) {
+ console.error("Failed to update thumbnail path", {
+ error: result.error
+ });
+ }
+ });
+ }
+);
diff --git a/packages/jobs/src/inngest/functions/tasks/onboard.ts b/packages/jobs/src/inngest/functions/tasks/onboard.ts
new file mode 100644
index 0000000000..071c28c02b
--- /dev/null
+++ b/packages/jobs/src/inngest/functions/tasks/onboard.ts
@@ -0,0 +1,355 @@
+import { openai } from "@ai-sdk/openai";
+import { RESEND_DOMAIN } from "@carbon/auth";
+import { getCarbonServiceRole } from "@carbon/auth/client.server";
+import type { Database } from "@carbon/database";
+import { GetStartedEmail, WelcomeEmail } from "@carbon/documents/email";
+import { resend, sendEmail } from "@carbon/lib/resend.server";
+import { getSlackClient } from "@carbon/lib/slack.server";
+import { getTwentyClient } from "@carbon/lib/twenty.server";
+import { render } from "@react-email/components";
+import type { SupabaseClient } from "@supabase/supabase-js";
+import { generateObject } from "ai";
+import { z } from "zod/v3";
+import { inngest } from "../../client";
+
+export const onboardFunction = inngest.createFunction(
+ { id: "onboard", retries: 3 },
+ { event: "carbon/onboard" },
+ async ({ event, step }) => {
+ const { type, companyId, userId, plan } = event.data;
+
+ const carbon = getCarbonServiceRole();
+ const twenty = getTwentyClient();
+ const slack = getSlackClient();
+
+ const { company, user } = await step.run(
+ "load-company-and-user",
+ async () => {
+ const [company, user] = await Promise.all([
+ carbon.from("company").select("*").eq("id", companyId).single(),
+ carbon.from("user").select("*").eq("id", userId).single()
+ ]);
+
+ if (company.error) {
+ console.error("Could not find company", company.error);
+ throw new Error(company.error.message);
+ }
+
+ if (user.error) {
+ console.error("Could not find user", user.error);
+ throw new Error(user.error.message);
+ }
+
+ return { company: company.data, user: user.data };
+ }
+ );
+
+ switch (type) {
+ case "lead":
+ await step.run("create-resend-contact", async () => {
+ console.log(
+ "Processing lead case for user:",
+ userId,
+ "company:",
+ companyId
+ );
+
+ try {
+ await resend.contacts.create({
+ email: user.email,
+ firstName: user.firstName,
+ lastName: user.lastName,
+ unsubscribed: false,
+ audienceId: process.env.RESEND_AUDIENCE_ID!
+ });
+ console.log("Successfully created resend contact for:", user.email);
+ } catch (error) {
+ console.error("Error creating resend contact", error);
+ }
+ });
+
+ const leadType = await step.run("classify-lead", async () => {
+ let type: "Warm" | "Cold" = "Warm";
+ try {
+ const { object } = await generateObject({
+ model: openai("gpt-4o"),
+ schema: z.object({
+ type: z.enum(["Warm", "Cold"]).describe("The type of lead")
+ }),
+ prompt: `
+ The following is a description of a lead for an ERP system.
+ Determine the quality of the lead based on the description.
+ If the company seems like a real business, return "Warm".
+ If it seems like someone is trying to keep their information private by providing a fake company name, return "Cold".
+
+ Description:
+ Company: ${company.name}
+ City: ${company.city}
+ State: ${company.stateProvince}
+ Address: ${company.addressLine1} ${company.addressLine2}
+ Country: ${company.countryCode}
+ Website: ${company.website}
+ Phone: ${company.phone}
+ `,
+ temperature: 0.2
+ });
+ type = (object as any).type as "Warm" | "Cold";
+ console.log("Generated type:", type);
+ } catch (error) {
+ console.error("Error generating type", error);
+ }
+ return type;
+ });
+
+ await step.run("send-slack-lead-notification", async () => {
+ console.log("Attempting to send Slack message to #leads channel");
+ try {
+ const slackResult = await slack.sendMessage({
+ channel: "#leads",
+ text: "New lead 🎉",
+ blocks: [
+ {
+ type: "section",
+ text: {
+ type: "mrkdwn",
+ text:
+ `*New Signup* ${leadType === "Warm" ? "🥁" : "❄️"}\n\n` +
+ `*Contact Information*\n` +
+ `• Name: ${user?.firstName} ${user?.lastName}\n` +
+ `• Email: ${user?.email}\n` +
+ `• Location: ${company.city}, ${company.stateProvince}\n\n` +
+ `• Company: ${company.name}\n\n` +
+ `• Type: ${leadType}\n\n`
+ }
+ }
+ ]
+ });
+ console.log("Successfully sent Slack message:", slackResult);
+ } catch (error) {
+ console.error("Error sending Slack message:", error);
+ }
+ });
+
+ await step.run("add-lead-to-crm", async () => {
+ if (process.env.TWENTY_API_KEY) {
+ try {
+ const twentyPersonId = await twenty.createPerson({
+ name: {
+ firstName: user.firstName,
+ lastName: user.lastName
+ },
+ emails: {
+ primaryEmail: user.email
+ },
+ customerStatus: ["PROSPECTIVE_CUSTOMER"],
+ location: `${company.city}, ${company.stateProvince}`
+ });
+
+ const updateResult = await carbon
+ .from("user")
+ .update({
+ externalId: {
+ twenty: twentyPersonId
+ }
+ } as any)
+ .eq("id", userId);
+
+ console.log("User update result:", updateResult);
+ if (updateResult.error) {
+ console.error(
+ "Error updating user external ID:",
+ updateResult.error
+ );
+ } else {
+ console.log("Successfully updated user external ID");
+ }
+
+ if (leadType === "Warm") {
+ const twentyCompanyId = await twenty.createCompany({
+ name: company.name,
+ domainName: {
+ primaryLinkLabel: removeProtocolFromWebsite(
+ company.website ?? ""
+ ),
+ primaryLinkUrl: ensureProtocolFromWebsite(
+ company.website ?? ""
+ ),
+ additionalLinks: []
+ }
+ });
+
+ const twentyOpportunityId = await twenty.createOpportunity({
+ name: `${company.name} Opportunity`,
+ stage: ["NEW"],
+ companyId: twentyCompanyId,
+ pointOfContactId: twentyPersonId
+ });
+
+ const updateResult = await carbon
+ .from("company")
+ .update({
+ externalId: {
+ twenty: twentyOpportunityId
+ }
+ } as any)
+ .eq("id", companyId);
+
+ console.log("Company update result:", updateResult);
+ if (updateResult.error) {
+ console.error(
+ "Error updating company external ID:",
+ updateResult.error
+ );
+ } else {
+ console.log("Successfully updated company external ID");
+ }
+ }
+ } catch (error) {
+ console.error("Error adding lead to CRM:", error);
+ }
+ } else {
+ console.log("TWENTY_API_KEY not found, skipping CRM integration");
+ }
+ });
+
+ break;
+
+ case "customer":
+ // @ts-ignore
+ const twentyId = user?.externalId?.twenty as string | undefined;
+
+ await step.run("send-slack-customer-notification", async () => {
+ try {
+ slack.sendMessage({
+ channel: "#sales",
+ text: "New Customer",
+ blocks: [
+ {
+ type: "section",
+ text: {
+ type: "mrkdwn",
+ text:
+ `*New Signup*\n\n` +
+ `*Contact Information*\n` +
+ `• Name: ${user?.firstName} ${user?.lastName}\n` +
+ `• Email: ${user.email}\n` +
+ `• Company: ${company?.name}\n\n` +
+ `• Plan: $${plan}\n\n`
+ }
+ }
+ ]
+ });
+ } catch (error) {
+ console.error("Error sending Slack message:", error);
+ }
+ });
+
+ await step.run("update-twenty-customer-status", async () => {
+ if (twentyId) {
+ try {
+ await twenty.updatePerson(twentyId, {
+ customerStatus: ["PILOT_FREE_TRIAL"]
+ });
+ } catch (error) {
+ console.error("Error updating twenty customer status:", error);
+ }
+ }
+ });
+
+ const from = `Brad from Carbon <${
+ RESEND_DOMAIN === "carbon.ms"
+ : `no-reply@${RESEND_DOMAIN}`
+ }>`;
+
+ const sendOnboardingEmail = await step.run(
+ "check-onboarding-email-eligibility",
+ async () => {
+ return shouldSendOnboardingEmailsToUser(carbon, userId);
+ }
+ );
+
+ await step.sleep("wait-5m", "5m");
+
+ if (sendOnboardingEmail) {
+ await step.run("send-welcome-email", async () => {
+ await sendEmail({
+ from,
+ to: user.email,
+ subject: `carbon`,
+ html: await render(WelcomeEmail())
+ });
+ });
+ }
+
+ await step.sleep("wait-3d", "3d");
+
+ if (sendOnboardingEmail) {
+ await step.run("send-get-started-email", async () => {
+ await sendEmail({
+ from,
+ to: user.email,
+ subject: `Get the most out of Carbon`,
+ html: await render(
+ GetStartedEmail({
+ firstName: user.firstName,
+ academyUrl: "https://learn.carbon.ms"
+ })
+ )
+ });
+ });
+ }
+
+ await step.sleep("wait-30d", "30d");
+
+ await step.run("check-plan-status-after-30d", async () => {
+ const planAfter30Days = await carbon
+ .from("companyPlan")
+ .select("*")
+ .eq("id", companyId)
+ .maybeSingle();
+
+ let isPlanActiveAfter30Days =
+ planAfter30Days?.data?.stripeSubscriptionStatus === "Active";
+
+ if (isPlanActiveAfter30Days && twentyId) {
+ await twenty.updatePerson(twentyId, {
+ customerStatus: [
+ isPlanActiveAfter30Days
+ ? "CHURNED_CANCELED"
+ : "EXISTING_CUSTOMER"
+ ]
+ });
+ }
+ });
+
+ break;
+ }
+ }
+);
+
+async function shouldSendOnboardingEmailsToUser(
+ carbon: SupabaseClient<Database>,
+ userId: string
+) {
+ const userToCompany = await carbon
+ .from("userToCompany")
+ .select("*")
+ .eq("userId", userId);
+
+ if (userToCompany.error) {
+ return true;
+ }
+
+ return userToCompany.data.length <= 1;
+}
+
+function removeProtocolFromWebsite(website: string) {
+ if (!website) return undefined;
+ return website.replace(/^https?:\/\//, "").replace(/^www\./, "");
+}
+
+function ensureProtocolFromWebsite(website: string) {
+ if (!website) return undefined;
+ return website.startsWith("http") ? website : `https://${website}`;
+}
diff --git a/packages/jobs/src/inngest/functions/tasks/post-transaction.ts b/packages/jobs/src/inngest/functions/tasks/post-transaction.ts
new file mode 100644
index 0000000000..78489930b2
--- /dev/null
+++ b/packages/jobs/src/inngest/functions/tasks/post-transaction.ts
@@ -0,0 +1,136 @@
+import { getCarbonServiceRole } from "@carbon/auth/client.server";
+import { inngest } from "../../client";
+
+export const postTransactionFunction = inngest.createFunction(
+ { id: "post-transactions", retries: 3 },
+ { event: "carbon/post-transaction" },
+ async ({ event, step }) => {
+ const serviceRole = getCarbonServiceRole();
+ const payload = event.data;
+
+ const result = await step.run("post-transaction", async () => {
+ console.info(
+ `Post transaction ${payload.type} for ${payload.documentId}`
+ );
+
+ let result: { success: boolean; message: string };
+
+ switch (payload.type) {
+ case "receipt":
+ console.info(`Posting receipt ${payload.documentId}`);
+ console.info(payload);
+ const postReceipt = await serviceRole.functions.invoke(
+ "post-receipt",
+ {
+ body: {
+ receiptId: payload.documentId,
+ userId: payload.userId,
+ companyId: payload.companyId
+ }
+ }
+ );
+
+ result = {
+ success: postReceipt.error === null,
+ message: postReceipt.error?.message
+ };
+
+ break;
+ case "purchase-invoice":
+ console.info(`Posting purchase invoice ${payload.documentId}`);
+ console.info(payload);
+ const postPurchaseInvoice = await serviceRole.functions.invoke(
+ "post-purchase-invoice",
+ {
+ body: {
+ invoiceId: payload.documentId,
+ userId: payload.userId,
+ companyId: payload.companyId
+ }
+ }
+ );
+
+ result = {
+ success: postPurchaseInvoice.error === null,
+ message: postPurchaseInvoice.error?.message
+ };
+
+ if (result.success) {
+ // Check if we should update prices on invoice post
+ const companySettings = await serviceRole
+ .from("companySettings")
+ .select("purchasePriceUpdateTiming")
+ .eq("id", payload.companyId)
+ .single();
+
+ if (
+ !companySettings.data?.purchasePriceUpdateTiming ||
+ companySettings.data.purchasePriceUpdateTiming ===
+ "Purchase Invoice Post"
+ ) {
+ console.info(
+ `Updating pricing from invoice ${payload.documentId}`
+ );
+
+ const priceUpdate = await serviceRole.functions.invoke(
+ "update-purchased-prices",
+ {
+ body: {
+ invoiceId: payload.documentId,
+ companyId: payload.companyId,
+ source: "purchaseInvoice"
+ }
+ }
+ );
+
+ result = {
+ success: priceUpdate.error === null,
+ message: priceUpdate.error?.message
+ };
+ }
+ }
+
+ break;
+ case "shipment":
+ console.info(`Posting shipment ${payload.documentId}`);
+ console.info(payload);
+
+ const postShipment = await serviceRole.functions.invoke(
+ "post-shipment",
+ {
+ body: {
+ shipmentId: payload.documentId,
+ userId: payload.userId,
+ companyId: payload.companyId
+ }
+ }
+ );
+
+ result = {
+ success: postShipment.error === null,
+ message: postShipment.error?.message
+ };
+
+ break;
+ default:
+ result = {
+ success: false,
+ message: `Invalid posting type: ${payload.type}`
+ };
+ break;
+ }
+
+ if (result.success) {
+ console.info(`Success ${payload.documentId}`);
+ } else {
+ console.error(
+ `Admin action ${payload.type} failed for ${payload.documentId}: ${result.message}`
+ );
+ }
+
+ return result;
+ });
+
+ return result;
+ }
+);
diff --git a/packages/jobs/src/inngest/functions/tasks/recalculate.ts b/packages/jobs/src/inngest/functions/tasks/recalculate.ts
new file mode 100644
index 0000000000..5cf555944f
--- /dev/null
+++ b/packages/jobs/src/inngest/functions/tasks/recalculate.ts
@@ -0,0 +1,104 @@
+import { getCarbonServiceRole } from "@carbon/auth/client.server";
+import type { FunctionsResponse } from "@supabase/functions-js";
+import { FunctionRegion } from "@supabase/supabase-js";
+import { inngest } from "../../client";
+
+export const recalculateFunction = inngest.createFunction(
+ { id: "recalculate", retries: 3 },
+ { event: "carbon/recalculate" },
+ async ({ event, step }) => {
+ const payload = event.data;
+
+ const result = await step.run("recalculate", async () => {
+ console.info(`Type: ${payload.type}, id: ${payload.id}`);
+
+ const serviceRole = getCarbonServiceRole();
+ let calculateQuantities: FunctionsResponse<{ success: boolean }>;
+
+ switch (payload.type) {
+ case "jobRequirements":
+ console.info(`Recalculating job requirements for ${payload.id}`);
+ calculateQuantities = await recalculateJobRequirements(serviceRole, {
+ id: payload.id,
+ companyId: payload.companyId,
+ userId: payload.userId
+ });
+
+ return {
+ success: !calculateQuantities.error,
+ message: calculateQuantities.error?.message
+ };
+
+ case "jobMakeMethodRequirements":
+ console.info(
+ `Recalculating job make method requirements for ${payload.id}`
+ );
+ calculateQuantities = await recalculateJobMakeMethodRequirements(
+ serviceRole,
+ {
+ id: payload.id,
+ companyId: payload.companyId,
+ userId: payload.userId
+ }
+ );
+
+ return {
+ success: !calculateQuantities.error,
+ message: calculateQuantities.error?.message
+ };
+
+ default:
+ return {
+ success: false,
+ message: `Unknown recalculation type: ${payload.type}`
+ };
+ }
+ });
+
+ if (result.success) {
+ console.info(`Success ${payload.id}`);
+ } else {
+ console.error(
+ `Recalculation ${payload.type} failed for ${payload.id}: ${result.message}`
+ );
+ }
+
+ return result;
+ }
+);
+
+async function recalculateJobRequirements(
+ client: ReturnType<typeof getCarbonServiceRole>,
+ params: {
+ id: string;
+ companyId: string;
+ userId: string;
+ }
+) {
+ return client.functions.invoke("recalculate", {
+ body: {
+ type: "jobRequirements",
+ ...params
+ }
+ });
+}
+
+async function recalculateJobMakeMethodRequirements(
+ client: ReturnType<typeof getCarbonServiceRole>,
+ params: {
+ id: string;
+ companyId: string;
+ userId: string;
+ }
+) {
+ return client.functions.invoke("schedule", {
+ body: {
+ mode: "initial",
+ direction: "backward",
+ jobId: params.id,
+ companyId: params.companyId,
+ userId: params.userId
+ },
+ region: FunctionRegion.UsEast1
+ });
+}
diff --git a/packages/jobs/src/inngest/functions/tasks/reschedule-job.ts b/packages/jobs/src/inngest/functions/tasks/reschedule-job.ts
new file mode 100644
index 0000000000..d4cd8ab698
--- /dev/null
+++ b/packages/jobs/src/inngest/functions/tasks/reschedule-job.ts
@@ -0,0 +1,74 @@
+import { getCarbonServiceRole } from "@carbon/auth/client.server";
+import { inngest } from "../../client";
+
+/**
+ * Unified scheduling function that handles both initial scheduling and rescheduling.
+ * Uses the new unified scheduling engine endpoint.
+ */
+export const rescheduleJobFunction = inngest.createFunction(
+ {
+ id: "schedule-job",
+ retries: 3,
+ concurrency: {
+ limit: 0,
+ key: "event.data.companyId"
+ }
+ },
+ { event: "carbon/reschedule-job" },
+ async ({ event, step }) => {
+ const serviceRole = getCarbonServiceRole();
+ const {
+ jobId,
+ companyId,
+ userId,
+ mode = "reschedule",
+ direction = "backward"
+ } = event.data;
+
+ const result = await step.run("schedule-job", async () => {
+ console.info(
+ `${mode === "initial" ? "Scheduling" : "Rescheduling"} job ${jobId}`
+ );
+
+ try {
+ const { data, error } = await serviceRole.functions.invoke("schedule", {
+ body: {
+ jobId,
+ companyId,
+ userId,
+ mode,
+ direction
+ }
+ });
+
+ if (error) {
+ throw new Error(error.message || `Failed to ${mode} schedule job`);
+ }
+
+ console.info(
+ `${mode === "initial" ? "Scheduled" : "Rescheduled"}: ` +
+ `${data.operationsScheduled} ops, ` +
+ `${data.workCentersAffected.length} WCs, ` +
+ `${data.conflictsDetected} conflicts`
+ );
+
+ return {
+ success: true,
+ operationsScheduled: data.operationsScheduled,
+ conflictsDetected: data.conflictsDetected,
+ workCentersAffected: data.workCentersAffected,
+ assemblyDepth: data.assemblyDepth
+ };
+ } catch (error) {
+ console.error(
+ `${mode === "initial" ? "Scheduling" : "Rescheduling"} failed: ${
+ error instanceof Error ? error.message : String(error)
+ }`
+ );
+ throw error; // Let Inngest handle retries
+ }
+ });
+
+ return result;
+ }
+);
diff --git a/packages/jobs/trigger/update-permissions.ts b/packages/jobs/src/inngest/functions/tasks/update-permissions.ts
similarity index 79%
rename from packages/jobs/trigger/update-permissions.ts
rename to packages/jobs/src/inngest/functions/tasks/update-permissions.ts
index 0c7585e718..ccaa0bcf04 100644
--- a/packages/jobs/trigger/update-permissions.ts
+++ b/packages/jobs/src/inngest/functions/tasks/update-permissions.ts
@@ -1,47 +1,35 @@
-import { task } from "@trigger.dev/sdk";
-import { z } from "zod";
-
import type { Result } from "@carbon/auth";
-import {
- error,
- getClaims,
- getPermissionCacheKey,
- success
-} from "@carbon/auth";
+import { error, getClaims, getPermissionCacheKey, success } from "@carbon/auth";
import { getCarbonServiceRole } from "@carbon/auth/client.server";
import type { Database } from "@carbon/database";
import { redis } from "@carbon/kv";
import type { SupabaseClient } from "@supabase/supabase-js";
+import { inngest } from "../../client";
-const serviceRole = getCarbonServiceRole();
-export const permissionsUpdateSchema = z.object({
- id: z.string(),
- addOnly: z.boolean(),
- permissions: z.record(
- z.string(),
- z.object({
- view: z.boolean(),
- create: z.boolean(),
- update: z.boolean(),
- delete: z.boolean(),
- })
- ),
- companyId: z.string(),
-});
+export const updatePermissionsFunction = inngest.createFunction(
+ { id: "update-permissions", retries: 3 },
+ { event: "carbon/update-permissions" },
+ async ({ event, step }) => {
+ const serviceRole = getCarbonServiceRole();
+ const payload = event.data;
-export const updatePermissionsTask = task({
- id: "update-permissions",
- run: async (payload: z.infer<typeof permissionsUpdateSchema>) => {
- console.info(`🔰 Permission Update for ${payload.id}`);
- const { success, message } = await updatePermissions(serviceRole, payload);
- if (success) {
- console.info(`✅ Permission Update for ${payload.id}`);
- } else {
- console.error(`❌ Permission Update for ${payload.id}: ${message}`);
- }
- return { success, message };
- },
-});
+ const result = await step.run("update-permissions", async () => {
+ console.info(`Permission Update for ${payload.id}`);
+ const { success, message } = await updatePermissions(
+ serviceRole,
+ payload
+ );
+ if (success) {
+ console.info(`Permission Update for ${payload.id} succeeded`);
+ } else {
+ console.error(`Permission Update for ${payload.id} failed: ${message}`);
+ }
+ return { success, message };
+ });
+
+ return result;
+ }
+);
export async function updatePermissions(
client: SupabaseClient<Database>,
@@ -49,8 +37,16 @@ export async function updatePermissions(
id,
permissions,
companyId,
- addOnly = false,
- }: z.infer<typeof permissionsUpdateSchema>
+ addOnly = false
+ }: {
+ id: string;
+ addOnly: boolean;
+ permissions: Record<
+ string,
+ { view: boolean; create: boolean; update: boolean; delete: boolean }
+ >;
+ companyId: string;
+ }
): Promise<Result> {
if (await client.rpc("is_claims_admin")) {
const claims = await getClaims(client, id);
@@ -64,7 +60,7 @@ export async function updatePermissions(
? {}
: claims.data
) as Record<string, string[]>;
- delete updatedPermissions["role"];
+ delete updatedPermissions.role;
// add any missing claims to the current claims
Object.keys(permissions).forEach((name) => {
@@ -118,7 +114,7 @@ export async function updatePermissions(
if (!updatedPermissions[`${module}_view`]?.includes(companyId)) {
updatedPermissions[`${module}_view`] = [
...(updatedPermissions[`${module}_view`] ?? []),
- companyId,
+ companyId
];
}
} else {
@@ -131,7 +127,7 @@ export async function updatePermissions(
if (!updatedPermissions[`${module}_create`]?.includes(companyId)) {
updatedPermissions[`${module}_create`] = [
...(updatedPermissions[`${module}_create`] ?? []),
- companyId,
+ companyId
];
}
} else {
@@ -144,7 +140,7 @@ export async function updatePermissions(
if (!updatedPermissions[`${module}_update`]?.includes(companyId)) {
updatedPermissions[`${module}_update`] = [
...(updatedPermissions[`${module}_update`] ?? []),
- companyId,
+ companyId
];
}
} else {
@@ -157,7 +153,7 @@ export async function updatePermissions(
if (!updatedPermissions[`${module}_delete`]?.includes(companyId)) {
updatedPermissions[`${module}_delete`] = [
...(updatedPermissions[`${module}_delete`] ?? []),
- companyId,
+ companyId
];
}
} else {
diff --git a/packages/jobs/src/inngest/functions/tasks/user-admin.ts b/packages/jobs/src/inngest/functions/tasks/user-admin.ts
new file mode 100644
index 0000000000..a4175f0967
--- /dev/null
+++ b/packages/jobs/src/inngest/functions/tasks/user-admin.ts
@@ -0,0 +1,119 @@
+import type { Result } from "@carbon/auth";
+import { CarbonEdition, getAppUrl, RESEND_DOMAIN } from "@carbon/auth";
+import { getCarbonServiceRole } from "@carbon/auth/client.server";
+import { deactivateUser } from "@carbon/auth/users.server";
+import { InviteEmail } from "@carbon/documents/email";
+import { sendEmail } from "@carbon/lib/resend.server";
+import { updateSubscriptionQuantityForCompany } from "@carbon/stripe/stripe.server";
+import { Edition } from "@carbon/utils";
+import { render } from "@react-email/components";
+import { nanoid } from "nanoid";
+import { inngest } from "../../client";
+
+export const userAdminFunction = inngest.createFunction(
+ { id: "user-admin", retries: 3 },
+ { event: "carbon/user-admin" },
+ async ({ event, step }) => {
+ const serviceRole = getCarbonServiceRole();
+ const payload = event.data;
+
+ const result = await step.run("user-admin-action", async () => {
+ console.log(`User admin update ${payload.type} for ${payload.id}`);
+
+ let result: Result = { success: false, message: "Unknown action" };
+
+ switch (payload.type) {
+ case "deactivate":
+ console.log(`Deactivating ${payload.id}`);
+ result = await deactivateUser(
+ serviceRole,
+ payload.id,
+ payload.companyId
+ );
+ if (result.success && CarbonEdition === Edition.Cloud) {
+ await updateSubscriptionQuantityForCompany(payload.companyId);
+ }
+ break;
+ case "resend":
+ const { id: userId, companyId, location, ip } = payload;
+ console.log(`Resending invite for ${payload.id}`);
+ const [company, user] = await Promise.all([
+ serviceRole
+ .from("company")
+ .select("name")
+ .eq("id", companyId)
+ .single(),
+ serviceRole
+ .from("user")
+ .select("email, fullName")
+ .eq("id", userId)
+ .single()
+ ]);
+
+ if (!company.data || !user.data) {
+ throw new Error("Failed to load company or user");
+ }
+
+ const invite = await serviceRole
+ .from("invite")
+ .select("code, createdBy")
+ .eq("email", user.data.email)
+ .eq("companyId", companyId)
+ .is("acceptedAt", null)
+ .single();
+
+ if (invite.error || !invite.data) {
+ return {
+ success: false,
+ message: "Failed to load existing invite"
+ };
+ }
+
+ const inviter = await serviceRole
+ .from("user")
+ .select("email, fullName")
+ .eq("id", invite.data.createdBy)
+ .single();
+
+ await sendEmail({
+ from: `Carbon <no-reply@${RESEND_DOMAIN}>`,
+ to: user.data.email,
+ subject: `You have been invited to join ${company.data?.name} on Carbon`,
+ headers: {
+ "X-Entity-Ref-ID": nanoid()
+ },
+ html: await render(
+ InviteEmail({
+ invitedByEmail: inviter.data?.email ?? user.data.email,
+ invitedByName: inviter.data?.fullName ?? "",
+ email: user.data.email,
+ name: user.data.fullName ?? "",
+ companyName: company.data.name,
+ inviteLink: `${getAppUrl()}/invite/${invite.data.code}`,
+ ip,
+ location
+ })
+ )
+ });
+
+ result = {
+ success: true,
+ message: `Successfully resent invite for ${payload.id}`
+ };
+ break;
+ }
+
+ if (result.success) {
+ console.log(`Success ${payload.id}`);
+ } else {
+ console.error(
+ `Admin action ${payload.type} failed for ${payload.id}: ${result.message}`
+ );
+ }
+
+ return result;
+ });
+
+ return result;
+ }
+);
diff --git a/packages/jobs/src/inngest/index.ts b/packages/jobs/src/inngest/index.ts
new file mode 100644
index 0000000000..e7930ec45b
--- /dev/null
+++ b/packages/jobs/src/inngest/index.ts
@@ -0,0 +1,84 @@
+// Re-export the inngest client and helpers
+export { inngest } from "./client.ts";
+
+import {
+ auditFunction,
+ embeddingFunction,
+ eventQueueFunction,
+ searchFunction,
+ syncFunction,
+ webhookFunction,
+ workflowFunction
+} from "./functions/events";
+import {
+ accountingBackfillFunction,
+ jiraSyncFunction,
+ linearSyncFunction,
+ paperlessPartsFunction,
+ slackDocumentAssignmentUpdateFunction,
+ slackDocumentCreatedFunction,
+ slackDocumentStatusUpdateFunction,
+ slackDocumentTaskUpdateFunction,
+ syncExternalAccountingFunction,
+ timeCardAutoCloseFunction
+} from "./functions/integrations";
+// Import all functions
+import { notifyFunction, sendEmailFunction } from "./functions/notifications";
+import {
+ auditArchiveFunction,
+ cleanupFunction,
+ dispatchFunction,
+ mrpFunction,
+ updateExchangeRatesFunction,
+ weeklyFunction
+} from "./functions/scheduled";
+import {
+ modelThumbnailFunction,
+ onboardFunction,
+ postTransactionFunction,
+ recalculateFunction,
+ rescheduleJobFunction,
+ updatePermissionsFunction,
+ userAdminFunction
+} from "./functions/tasks";
+
+// Export all functions for serving via serve() or connect()
+export const functions = [
+ // Notifications
+ notifyFunction,
+ sendEmailFunction,
+ // Event handlers
+ auditFunction,
+ eventQueueFunction,
+ searchFunction,
+ syncFunction,
+ webhookFunction,
+ workflowFunction,
+ embeddingFunction,
+ // Tasks
+ modelThumbnailFunction,
+ updatePermissionsFunction,
+ recalculateFunction,
+ userAdminFunction,
+ postTransactionFunction,
+ rescheduleJobFunction,
+ onboardFunction,
+ // Scheduled
+ cleanupFunction,
+ dispatchFunction,
+ auditArchiveFunction,
+ mrpFunction,
+ weeklyFunction,
+ updateExchangeRatesFunction,
+ // Integrations
+ jiraSyncFunction,
+ linearSyncFunction,
+ paperlessPartsFunction,
+ accountingBackfillFunction,
+ syncExternalAccountingFunction,
+ slackDocumentCreatedFunction,
+ slackDocumentStatusUpdateFunction,
+ slackDocumentTaskUpdateFunction,
+ slackDocumentAssignmentUpdateFunction,
+ timeCardAutoCloseFunction
+];
diff --git a/packages/jobs/src/schemas.ts b/packages/jobs/src/schemas.ts
new file mode 100644
index 0000000000..c11ae1ca63
--- /dev/null
+++ b/packages/jobs/src/schemas.ts
@@ -0,0 +1,72 @@
+import { z } from "zod";
+
+/**
+ * Webhook payload schemas.
+ * Extracted into a separate file so they can be imported by app code
+ * without pulling in server-only dependencies.
+ */
+
+export const syncIssueFromJiraSchema = z.object({
+ companyId: z.string(),
+ event: z.object({
+ timestamp: z.number().optional(),
+ webhookEvent: z.string(),
+ issue: z
+ .object({
+ id: z.string(),
+ key: z.string(),
+ fields: z.object({
+ summary: z.string().optional(),
+ description: z.any().nullable().optional(),
+ status: z
+ .object({
+ name: z.string().optional(),
+ statusCategory: z
+ .object({
+ key: z.string()
+ })
+ .optional()
+ })
+ .optional(),
+ assignee: z
+ .object({
+ accountId: z.string().optional(),
+ emailAddress: z.string().optional(),
+ displayName: z.string().optional()
+ })
+ .nullable()
+ .optional(),
+ duedate: z.string().nullable().optional()
+ })
+ })
+ .optional(),
+ changelog: z
+ .object({
+ items: z.array(
+ z.object({
+ field: z.string(),
+ fieldtype: z.string().optional(),
+ from: z.string().nullable().optional(),
+ fromString: z.string().nullable().optional(),
+ to: z.string().nullable().optional(),
+ toString: z.string().nullable().optional()
+ })
+ )
+ })
+ .optional()
+ })
+});
+
+export const syncIssueFromLinearSchema = z.object({
+ companyId: z.string(),
+ event: z.discriminatedUnion("type", [
+ z.object({
+ type: z.literal("Issue"),
+ action: z.literal("update"),
+ data: z.object({
+ id: z.string(),
+ assigneeId: z.string().optional()
+ })
+ })
+ ])
+});
diff --git a/packages/jobs/src/trigger.ts b/packages/jobs/src/trigger.ts
new file mode 100644
index 0000000000..cd950d951e
--- /dev/null
+++ b/packages/jobs/src/trigger.ts
@@ -0,0 +1,74 @@
+import type { Events } from "./events.ts";
+import { inngest } from "./inngest/client.ts";
+
+/**
+ * Map trigger.dev task IDs → inngest event names.
+ * This allows callers to migrate from `tasks.trigger("notify", payload)`
+ * to `trigger("notify", payload)` with minimal changes.
+ */
+const taskToEvent = {
+ notify: "carbon/notify",
+ "send-email-resend": "carbon/send-email",
+ "model-thumbnail": "carbon/model-thumbnail",
+ "update-permissions": "carbon/update-permissions",
+ recalculate: "carbon/recalculate",
+ "user-admin": "carbon/user-admin",
+ "schedule-job": "carbon/reschedule-job",
+ "post-transactions": "carbon/post-transaction",
+ onboard: "carbon/onboard",
+ "accounting-backfill": "carbon/accounting-backfill",
+ "sync-external-accounting": "carbon/sync-external-accounting",
+ "sync-issue-from-jira": "carbon/jira-sync",
+ "sync-issue-from-linear": "carbon/linear-sync",
+ "paperless-parts": "carbon/paperless-parts",
+ "slack-document-created": "carbon/slack-document-created",
+ "slack-document-status-update": "carbon/slack-document-status-update",
+ "slack-document-task-update": "carbon/slack-document-task-update",
+ "slack-document-assignment-update": "carbon/slack-document-assignment-update"
+} as const;
+
+type TaskMap = typeof taskToEvent;
+
+type TaskPayloads = {
+ [K in keyof TaskMap]: TaskMap[K] extends keyof Events
+ ? Events[TaskMap[K]]["data"]
+ : never;
+};
+
+/**
+ * Typed trigger helper — drop-in replacement for `tasks.trigger(taskId, payload)`.
+ *
+ * @example
+ * ```ts
+ * import { trigger } from "@carbon/jobs";
+ * await trigger("notify", { event, companyId, documentId, recipient });
+ * ```
+ */
+export async function trigger<T extends keyof TaskPayloads>(
+ taskId: T,
+ payload: TaskPayloads[T]
+) {
+ const eventName = taskToEvent[taskId];
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ return inngest.send({ name: eventName, data: payload } as any);
+}
+
+/**
+ * Typed batch trigger helper — drop-in replacement for `tasks.batchTrigger(taskId, items)`.
+ *
+ * @example
+ * ```ts
+ * import { batchTrigger } from "@carbon/jobs";
+ * await batchTrigger("recalculate", items.map(i => ({ payload: i })));
+ * ```
+ */
+export async function batchTrigger<T extends keyof TaskPayloads>(
+ taskId: T,
+ items: Array<{ payload: TaskPayloads[T] }>
+) {
+ const eventName = taskToEvent[taskId];
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ return inngest.send(
+ items.map((i) => ({ name: eventName, data: i.payload })) as any
+ );
+}
diff --git a/packages/jobs/trigger.config.ts b/packages/jobs/trigger.config.ts
deleted file mode 100644
index 2a3285aad1..0000000000
--- a/packages/jobs/trigger.config.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-import { defineConfig } from "@trigger.dev/sdk";
-import { config } from "dotenv";
-
-config();
-
-export default defineConfig({
- project: process.env.TRIGGER_PROJECT_ID!,
- maxDuration: 300,
- runtime: "node",
- logLevel: "log",
- retries: {
- enabledInDev: true,
- default: {
- maxAttempts: 3,
- minTimeoutInMs: 1000,
- maxTimeoutInMs: 10000,
- factor: 2,
- randomize: true,
- },
- },
- dirs: ["./trigger"],
-});
diff --git a/packages/jobs/trigger/accounting-backfill.ts b/packages/jobs/trigger/accounting-backfill.ts
deleted file mode 100644
index 881f9bb22e..0000000000
--- a/packages/jobs/trigger/accounting-backfill.ts
+++ /dev/null
@@ -1,722 +0,0 @@
-/**
- * Backfill task for syncing entities between Carbon and accounting providers.
- *
- * This task respects the per-entity sync direction configuration:
- * - "pull-from-accounting": Only pull entities from the provider
- * - "push-to-accounting": Only push Carbon entities to the provider
- * - "two-way": Pull from provider AND push unsynced Carbon entities
- *
- * This prevents unnecessary syncing (e.g., items configured as push-only
- * won't be pulled from Xero, and POs configured as push-only won't try to pull).
- */
-import { getCarbonServiceRole } from "@carbon/auth/client.server";
-import {
- getPostgresClient,
- getPostgresConnectionPool,
-} from "@carbon/database/client";
-import {
- createMappingService,
- getAccountingIntegration,
- getProviderIntegration,
- ProviderID,
- RatelimitError,
- SyncFactory,
- type AccountingEntityType,
- type SyncDirection,
- type XeroProvider,
-} from "@carbon/ee/accounting";
-import { logger, task, wait } from "@trigger.dev/sdk/v3";
-import { PostgresDriver } from "kysely";
-import z from "zod";
-
-// ============================================================
-// HELPERS
-// ============================================================
-
-/**
- * Execute an async operation with rate limit handling.
- * If a RatelimitError is thrown, wait for the specified retry period and retry once.
- */
-async function withRateLimitRetry<T>(
- operation: () => Promise<T>,
- operationName: string
-): Promise<T> {
- try {
- return await operation();
- } catch (error) {
- if (error instanceof RatelimitError) {
- const { retryAfterSeconds, limitType, details } = error.rateLimitInfo;
- logger.warn(`[RATE LIMIT] ${operationName} hit rate limit`, {
- limitType,
- retryAfterSeconds,
- ...details,
- });
- await wait.for({ seconds: retryAfterSeconds });
- logger.info(
- `[RATE LIMIT] Retrying ${operationName} after ${retryAfterSeconds}s wait`
- );
- return await operation();
- }
- throw error;
- }
-}
-
-// ============================================================
-// SCHEMAS
-// ============================================================
-
-const BackfillPayloadSchema = z.object({
- companyId: z.string(),
- provider: z.nativeEnum(ProviderID),
- batchSize: z.number().default(25), // Smaller batches to avoid rate limits
- entityTypes: z
- .object({
- customers: z.boolean().default(true),
- vendors: z.boolean().default(true),
- items: z.boolean().default(true),
- })
- .default({}),
-});
-
-/**
- * Helper to determine if we should pull for a given direction config
- */
-function shouldPull(direction: SyncDirection): boolean {
- return direction === "pull-from-accounting" || direction === "two-way";
-}
-
-/**
- * Helper to determine if we should push for a given direction config
- */
-function shouldPush(direction: SyncDirection): boolean {
- return direction === "push-to-accounting" || direction === "two-way";
-}
-
-const PullPagePayloadSchema = z.object({
- companyId: z.string(),
- provider: z.nativeEnum(ProviderID),
- entityType: z.enum(["contact", "item"]),
- page: z.number(),
- includeCustomers: z.boolean().default(true),
- includeVendors: z.boolean().default(true),
-});
-
-const PushBatchPayloadSchema = z.object({
- companyId: z.string(),
- provider: z.nativeEnum(ProviderID),
- entityType: z.enum(["customer", "supplier", "item"]),
- entityIds: z.array(z.string()),
-});
-
-export type BackfillPayload = z.input<typeof BackfillPayloadSchema>;
-type ParsedBackfillPayload = z.output<typeof BackfillPayloadSchema>;
-
-// ============================================================
-// PULL PAGE TASK - Pulls a single page from external system
-// ============================================================
-
-export const accountingPullPageTask = task({
- id: "accounting-pull-page",
- retry: {
- maxAttempts: 5,
- factor: 2,
- minTimeoutInMs: 2000,
- maxTimeoutInMs: 120000, // Up to 2 minutes for rate limit recovery
- randomize: true,
- },
- run: async (input: z.input<typeof PullPagePayloadSchema>) => {
- const payload = PullPagePayloadSchema.parse(input);
- const client = getCarbonServiceRole();
-
- const integration = await getAccountingIntegration(
- client,
- payload.companyId,
- payload.provider
- );
-
- const provider = getProviderIntegration(
- client,
- payload.companyId,
- integration.id,
- integration.metadata
- ) as XeroProvider;
-
- const pool = getPostgresConnectionPool(5);
- const kysely = getPostgresClient(pool, PostgresDriver);
-
- try {
- if (payload.entityType === "contact") {
- logger.info(`[PULL] Fetching contacts page ${payload.page}`);
- const response = await withRateLimitRetry(
- () =>
- provider.listContacts({
- page: payload.page,
- summaryOnly: true,
- }),
- `listContacts page ${payload.page}`
- );
-
- logger.info(`[PULL] Contacts page ${payload.page} response`, {
- count: response.contacts.length,
- hasMore: response.hasMore,
- contacts: response.contacts.map((c) => ({
- id: c.ContactID,
- name: c.Name,
- isCustomer: c.IsCustomer,
- isSupplier: c.IsSupplier,
- })),
- });
-
- if (response.contacts.length === 0) {
- return { hasMore: false, pulled: { customers: 0, vendors: 0 } };
- }
-
- let customersPulled = 0;
- let vendorsPulled = 0;
-
- // Pull customers
- if (payload.includeCustomers) {
- const customers = response.contacts.filter((c) => c.IsCustomer);
- if (customers.length > 0) {
- const syncer = SyncFactory.getSyncer({
- database: kysely,
- companyId: payload.companyId,
- provider,
- config: provider.getSyncConfig("customer"),
- entityType: "customer",
- });
- const ids = customers.map((c) => c.ContactID);
- const result = await withRateLimitRetry(
- () => syncer.pullBatchFromAccounting(ids),
- `pullBatchFromAccounting customers page ${payload.page}`
- );
- customersPulled = result.successCount;
- logger.info(
- `[PULL] Page ${payload.page}: pulled ${customersPulled} customers`,
- {
- results: result.results.map((r) => ({
- status: r.status,
- action: r.action,
- localId: r.localId,
- remoteId: r.remoteId,
- error: r.error,
- })),
- }
- );
- }
- }
-
- // Pull vendors
- if (payload.includeVendors) {
- const vendors = response.contacts.filter((c) => c.IsSupplier);
- if (vendors.length > 0) {
- const syncer = SyncFactory.getSyncer({
- database: kysely,
- companyId: payload.companyId,
- provider,
- config: provider.getSyncConfig("vendor"),
- entityType: "vendor",
- });
- const ids = vendors.map((c) => c.ContactID);
- const result = await withRateLimitRetry(
- () => syncer.pullBatchFromAccounting(ids),
- `pullBatchFromAccounting vendors page ${payload.page}`
- );
- vendorsPulled = result.successCount;
- logger.info(
- `[PULL] Page ${payload.page}: pulled ${vendorsPulled} vendors`,
- {
- results: result.results.map((r) => ({
- status: r.status,
- action: r.action,
- localId: r.localId,
- remoteId: r.remoteId,
- error: r.error,
- })),
- }
- );
- }
- }
-
- return {
- hasMore: response.hasMore,
- pulled: { customers: customersPulled, vendors: vendorsPulled },
- };
- } else {
- // Items
- logger.info(`[PULL] Fetching items page ${payload.page}`);
- const response = await withRateLimitRetry(
- () => provider.listItems({ page: payload.page }),
- `listItems page ${payload.page}`
- );
-
- logger.info(`[PULL] Items page ${payload.page} response`, {
- count: response.items.length,
- hasMore: response.hasMore,
- items: response.items.map((i) => ({
- id: i.ItemID,
- code: i.Code,
- name: i.Name,
- })),
- });
-
- if (response.items.length === 0) {
- return { hasMore: false, pulled: { items: 0 } };
- }
-
- const syncer = SyncFactory.getSyncer({
- database: kysely,
- companyId: payload.companyId,
- provider,
- config: provider.getSyncConfig("item"),
- entityType: "item",
- });
- const ids = response.items.map((item) => item.ItemID);
- const result = await withRateLimitRetry(
- () => syncer.pullBatchFromAccounting(ids),
- `pullBatchFromAccounting items page ${payload.page}`
- );
-
- logger.info(
- `[PULL] Page ${payload.page}: pulled ${result.successCount} items`,
- {
- results: result.results.map((r) => ({
- status: r.status,
- action: r.action,
- localId: r.localId,
- remoteId: r.remoteId,
- error: r.error,
- })),
- }
- );
-
- return {
- hasMore: response.hasMore,
- pulled: { items: result.successCount },
- };
- }
- } finally {
- await pool.end();
- }
- },
-});
-
-// ============================================================
-// PUSH BATCH TASK - Pushes a batch of entities to external system
-// ============================================================
-
-export const accountingPushBatchTask = task({
- id: "accounting-push-batch",
- retry: {
- maxAttempts: 5,
- factor: 2,
- minTimeoutInMs: 2000,
- maxTimeoutInMs: 120000,
- randomize: true,
- },
- run: async (input: z.input<typeof PushBatchPayloadSchema>) => {
- const payload = PushBatchPayloadSchema.parse(input);
- const client = getCarbonServiceRole();
-
- const integration = await getAccountingIntegration(
- client,
- payload.companyId,
- payload.provider
- );
-
- const provider = getProviderIntegration(
- client,
- payload.companyId,
- integration.id,
- integration.metadata
- ) as XeroProvider;
-
- const pool = getPostgresConnectionPool(5);
- const kysely = getPostgresClient(pool, PostgresDriver);
-
- try {
- // Map entity type to accounting entity type
- const entityType: AccountingEntityType =
- payload.entityType === "supplier" ? "vendor" : payload.entityType;
-
- const syncer = SyncFactory.getSyncer({
- database: kysely,
- companyId: payload.companyId,
- provider,
- config: provider.getSyncConfig(entityType),
- entityType,
- });
-
- const result = await withRateLimitRetry(
- () => syncer.pushBatchToAccounting(payload.entityIds),
- `pushBatchToAccounting ${payload.entityType}`
- );
-
- logger.info(
- `[PUSH] Pushed ${result.successCount}/${payload.entityIds.length} ${payload.entityType} entities`,
- {
- entityIds: payload.entityIds,
- results: result.results.map((r) => ({
- status: r.status,
- action: r.action,
- localId: r.localId,
- remoteId: r.remoteId,
- error: r.error,
- })),
- }
- );
-
- return {
- successCount: result.successCount,
- errorCount: result.errorCount,
- };
- } finally {
- await pool.end();
- }
- },
-});
-
-// ============================================================
-// ORCHESTRATOR TASK - Coordinates the entire backfill process
-// ============================================================
-
-export const accountingBackfillTask = task({
- id: "accounting-backfill",
- retry: {
- maxAttempts: 3,
- factor: 2,
- minTimeoutInMs: 5000,
- maxTimeoutInMs: 60000,
- randomize: true,
- },
- run: async (input: BackfillPayload) => {
- const payload: ParsedBackfillPayload = BackfillPayloadSchema.parse(input);
- const client = getCarbonServiceRole();
-
- const integration = await getAccountingIntegration(
- client,
- payload.companyId,
- payload.provider
- );
-
- const provider = getProviderIntegration(
- client,
- payload.companyId,
- integration.id,
- integration.metadata
- ) as XeroProvider;
-
- // Get sync direction config for each entity type
- const customerConfig = provider.getSyncConfig("customer");
- const vendorConfig = provider.getSyncConfig("vendor");
- const itemConfig = provider.getSyncConfig("item");
-
- const result = {
- customers: { pulled: 0, pushed: 0 },
- vendors: { pulled: 0, pushed: 0 },
- items: { pulled: 0, pushed: 0 },
- totalPulled: 0,
- totalPushed: 0,
- };
-
- // Log the sync directions for visibility
- logger.info("[BACKFILL] Starting with entity sync directions:", {
- customer: {
- enabled: customerConfig?.enabled,
- direction: customerConfig?.direction,
- shouldPull:
- customerConfig?.enabled && shouldPull(customerConfig.direction),
- shouldPush:
- customerConfig?.enabled && shouldPush(customerConfig.direction),
- },
- vendor: {
- enabled: vendorConfig?.enabled,
- direction: vendorConfig?.direction,
- shouldPull: vendorConfig?.enabled && shouldPull(vendorConfig.direction),
- shouldPush: vendorConfig?.enabled && shouldPush(vendorConfig.direction),
- },
- item: {
- enabled: itemConfig?.enabled,
- direction: itemConfig?.direction,
- shouldPull: itemConfig?.enabled && shouldPull(itemConfig.direction),
- shouldPush: itemConfig?.enabled && shouldPush(itemConfig.direction),
- },
- });
-
- // ============================================================
- // PHASE 1: Pull from accounting (respecting direction config)
- // ============================================================
-
- // Determine which contact types to pull based on their direction config
- const pullCustomers =
- payload.entityTypes.customers &&
- customerConfig?.enabled &&
- shouldPull(customerConfig.direction);
-
- const pullVendors =
- payload.entityTypes.vendors &&
- vendorConfig?.enabled &&
- shouldPull(vendorConfig.direction);
-
- // Pull contacts (customers and vendors) if their config allows pulling
- if (pullCustomers || pullVendors) {
- let page = 1;
- let hasMore = true;
-
- logger.info("[PULL] Starting contact pull phase", {
- pullCustomers,
- pullVendors,
- });
-
- while (hasMore) {
- const pullResult = await accountingPullPageTask.triggerAndWait({
- companyId: payload.companyId,
- provider: payload.provider,
- entityType: "contact",
- page,
- includeCustomers: pullCustomers,
- includeVendors: pullVendors,
- });
-
- if (pullResult.ok) {
- result.customers.pulled += pullResult.output.pulled.customers ?? 0;
- result.vendors.pulled += pullResult.output.pulled.vendors ?? 0;
- hasMore = pullResult.output.hasMore;
- } else {
- logger.error(`[PULL] Failed to pull contacts page ${page}`);
- hasMore = false;
- }
-
- page++;
-
- // Small delay between pages to avoid rate limits
- if (hasMore) {
- await wait.for({ seconds: 1 });
- }
- }
- } else {
- logger.info(
- "[PULL] Skipping contact pull - not enabled or direction is push-only"
- );
- }
-
- // Pull items if their config allows pulling
- const pullItems =
- payload.entityTypes.items &&
- itemConfig?.enabled &&
- shouldPull(itemConfig.direction);
-
- if (pullItems) {
- let page = 1;
- let hasMore = true;
-
- logger.info("[PULL] Starting items pull phase");
-
- while (hasMore) {
- const pullResult = await accountingPullPageTask.triggerAndWait({
- companyId: payload.companyId,
- provider: payload.provider,
- entityType: "item",
- page,
- });
-
- if (pullResult.ok) {
- result.items.pulled += pullResult.output.pulled.items ?? 0;
- hasMore = pullResult.output.hasMore;
- } else {
- logger.error(`[PULL] Failed to pull items page ${page}`);
- hasMore = false;
- }
-
- page++;
-
- if (hasMore) {
- await wait.for({ seconds: 1 });
- }
- }
- } else {
- logger.info(
- "[PULL] Skipping items pull - not enabled or direction is push-only"
- );
- }
-
- // ============================================================
- // PHASE 2: Push to accounting (respecting direction config)
- // ============================================================
-
- const pool = getPostgresConnectionPool(5);
- const kysely = getPostgresClient(pool, PostgresDriver);
-
- try {
- const mappingService = createMappingService(kysely, payload.companyId);
-
- // Push customers if their config allows pushing
- const pushCustomers =
- payload.entityTypes.customers &&
- customerConfig?.enabled &&
- shouldPush(customerConfig.direction);
-
- if (pushCustomers) {
- let hasMore = true;
-
- logger.info("[PUSH] Starting customers push phase");
-
- while (hasMore) {
- const unsyncedIds = await mappingService.getUnsyncedEntityIds(
- "customer",
- "customer",
- provider.id,
- payload.batchSize
- );
-
- if (unsyncedIds.length === 0) {
- hasMore = false;
- break;
- }
-
- const pushResult = await accountingPushBatchTask.triggerAndWait({
- companyId: payload.companyId,
- provider: payload.provider,
- entityType: "customer",
- entityIds: unsyncedIds,
- });
-
- if (pushResult.ok) {
- result.customers.pushed += pushResult.output.successCount;
- } else {
- logger.error("[PUSH] Failed to push customers batch");
- }
-
- if (unsyncedIds.length < payload.batchSize) {
- hasMore = false;
- }
-
- // Delay between batches
- if (hasMore) {
- await wait.for({ seconds: 2 });
- }
- }
- } else {
- logger.info(
- "[PUSH] Skipping customers push - not enabled or direction is pull-only"
- );
- }
-
- // Push vendors if their config allows pushing
- const pushVendors =
- payload.entityTypes.vendors &&
- vendorConfig?.enabled &&
- shouldPush(vendorConfig.direction);
-
- if (pushVendors) {
- let hasMore = true;
-
- logger.info("[PUSH] Starting vendors push phase");
-
- while (hasMore) {
- const unsyncedIds = await mappingService.getUnsyncedEntityIds(
- "vendor",
- "supplier",
- provider.id,
- payload.batchSize
- );
-
- if (unsyncedIds.length === 0) {
- hasMore = false;
- break;
- }
-
- const pushResult = await accountingPushBatchTask.triggerAndWait({
- companyId: payload.companyId,
- provider: payload.provider,
- entityType: "supplier",
- entityIds: unsyncedIds,
- });
-
- if (pushResult.ok) {
- result.vendors.pushed += pushResult.output.successCount;
- } else {
- logger.error("[PUSH] Failed to push vendors batch");
- }
-
- if (unsyncedIds.length < payload.batchSize) {
- hasMore = false;
- }
-
- if (hasMore) {
- await wait.for({ seconds: 2 });
- }
- }
- } else {
- logger.info(
- "[PUSH] Skipping vendors push - not enabled or direction is pull-only"
- );
- }
-
- // Push items if their config allows pushing
- const pushItems =
- payload.entityTypes.items &&
- itemConfig?.enabled &&
- shouldPush(itemConfig.direction);
-
- if (pushItems) {
- let hasMore = true;
-
- logger.info("[PUSH] Starting items push phase");
-
- while (hasMore) {
- const unsyncedIds = await mappingService.getUnsyncedEntityIds(
- "item",
- "item",
- provider.id,
- payload.batchSize
- );
-
- if (unsyncedIds.length === 0) {
- hasMore = false;
- break;
- }
-
- const pushResult = await accountingPushBatchTask.triggerAndWait({
- companyId: payload.companyId,
- provider: payload.provider,
- entityType: "item",
- entityIds: unsyncedIds,
- });
-
- if (pushResult.ok) {
- result.items.pushed += pushResult.output.successCount;
- } else {
- logger.error("[PUSH] Failed to push items batch");
- }
-
- if (unsyncedIds.length < payload.batchSize) {
- hasMore = false;
- }
-
- if (hasMore) {
- await wait.for({ seconds: 2 });
- }
- }
- } else {
- logger.info(
- "[PUSH] Skipping items push - not enabled or direction is pull-only"
- );
- }
- } finally {
- await pool.end();
- }
-
- // Calculate totals
- result.totalPulled =
- result.customers.pulled + result.vendors.pulled + result.items.pulled;
- result.totalPushed =
- result.customers.pushed + result.vendors.pushed + result.items.pushed;
-
- logger.info(
- `[COMPLETE] Backfill finished. Pulled: ${result.totalPulled}, Pushed: ${result.totalPushed}`
- );
-
- return result;
- },
-});
diff --git a/packages/jobs/trigger/dispatch.ts b/packages/jobs/trigger/dispatch.ts
deleted file mode 100644
index 24004d306b..0000000000
--- a/packages/jobs/trigger/dispatch.ts
+++ /dev/null
@@ -1,332 +0,0 @@
-import { getCarbonServiceRole } from "@carbon/auth/client.server";
-import { NotificationEvent } from "@carbon/notifications";
-import { schedules } from "@trigger.dev/sdk";
-import { now, getLocalTimeZone } from "@internationalized/date";
-import { notifyTask } from "./notify.ts";
-
-const serviceRole = getCarbonServiceRole();
-
-// Day of week mapping (0 = Sunday, 1 = Monday, etc.)
-const dayOfWeekFields = [
- "sunday",
- "monday",
- "tuesday",
- "wednesday",
- "thursday",
- "friday",
- "saturday"
-] as const;
-
-interface MaintenanceSchedule {
- id: string;
- name: string;
- frequency: string;
- priority: string;
- workCenterId: string;
- nextDueAt: string | null;
- skipHolidays: boolean;
- monday: boolean;
- tuesday: boolean;
- wednesday: boolean;
- thursday: boolean;
- friday: boolean;
- saturday: boolean;
- sunday: boolean;
- procedureId: string | null;
-}
-
-// Check if a date is enabled for the schedule based on day-of-week settings
-function isDayEnabledForSchedule(
- schedule: MaintenanceSchedule,
- targetDate: Date
-): boolean {
- // Only check day-of-week for Daily frequency
- if (schedule.frequency !== "Daily") {
- return true;
- }
-
- const dayOfWeek = targetDate.getDay(); // 0 = Sunday, 1 = Monday, etc.
- const dayField = dayOfWeekFields[dayOfWeek]!;
- return schedule[dayField] === true;
-}
-
-// Check if a date is a holiday for the company
-async function isHoliday(companyId: string, date: Date): Promise<boolean> {
- const dateString = date.toISOString().split("T")[0]!; // YYYY-MM-DD format
-
- const { data: holiday, error } = await serviceRole
- .from("holiday")
- .select("id")
- .eq("companyId", companyId)
- .eq("date", dateString)
- .maybeSingle();
-
- if (error) {
- console.error(`Error checking holiday for ${dateString}: ${error.message}`);
- return false;
- }
-
- return holiday !== null;
-}
-
-export const generateMaintenanceDispatches = schedules.task({
- id: "dispatch",
- // Run daily at 6 AM UTC
- cron: "0 6 * * *",
- run: async () => {
- const currentDateTime = now(getLocalTimeZone());
- console.log(
- `🔧 Starting maintenance dispatch generation: ${currentDateTime.toString()}`
- );
-
- try {
- // Get all companies with maintenanceGenerateInAdvance enabled
- const { data: companiesWithSettings, error: settingsError } =
- await serviceRole
- .from("companySettings")
- .select("id, maintenanceGenerateInAdvance, maintenanceAdvanceDays")
- .eq("maintenanceGenerateInAdvance", true);
-
- if (settingsError) {
- console.error(
- `Failed to fetch company settings: ${settingsError.message}`
- );
- return;
- }
-
- console.log(
- `Found ${companiesWithSettings?.length || 0} companies with auto-generation enabled`
- );
-
- let totalDispatchesCreated = 0;
-
- for (const settings of companiesWithSettings ?? []) {
- const advanceDays = settings.maintenanceAdvanceDays ?? 7;
- const futureDate = currentDateTime.add({ days: advanceDays });
-
- // Get active schedules that are due
- const { data: dueSchedules, error: schedulesError } = await serviceRole
- .from("maintenanceSchedule")
- .select("*")
- .eq("companyId", settings.id)
- .eq("active", true)
- .or(`nextDueAt.is.null,nextDueAt.lte.${futureDate.toAbsoluteString()}`);
-
- if (schedulesError) {
- console.error(
- `Failed to fetch schedules for company ${settings.id}: ${schedulesError.message}`
- );
- continue;
- }
-
- console.log(
- `Company ${settings.id}: ${dueSchedules?.length || 0} schedules due`
- );
-
- for (const schedule of dueSchedules ?? []) {
- try {
- const typedSchedule = schedule as MaintenanceSchedule;
-
- // Track current nextDueAt for this schedule (will be updated as we create dispatches)
- let currentNextDueAt = typedSchedule.nextDueAt
- ? new Date(typedSchedule.nextDueAt)
- : new Date();
-
- // Loop to create dispatches for all dates within the advance window
- while (currentNextDueAt <= new Date(futureDate.toAbsoluteString())) {
- const targetDate = currentNextDueAt;
-
- // For Daily schedules, check if this day of week is enabled
- if (!isDayEnabledForSchedule(typedSchedule, targetDate)) {
- console.log(
- `Skipping schedule "${typedSchedule.name}" for ${targetDate.toISOString().split("T")[0]} - day of week not enabled`
- );
- // Advance to next day for daily schedules
- if (typedSchedule.frequency === "Daily") {
- currentNextDueAt = new Date(currentNextDueAt);
- currentNextDueAt.setDate(currentNextDueAt.getDate() + 1);
- continue;
- }
- break;
- }
-
- // Check if this date is a holiday and skipHolidays is enabled
- if (typedSchedule.skipHolidays) {
- const isHolidayDate = await isHoliday(settings.id, targetDate);
- if (isHolidayDate) {
- console.log(
- `Skipping schedule "${typedSchedule.name}" - ${targetDate.toISOString().split("T")[0]} is a holiday`
- );
- // Advance to next occurrence based on frequency
- currentNextDueAt = new Date(currentNextDueAt);
- switch (typedSchedule.frequency) {
- case "Daily":
- currentNextDueAt.setDate(currentNextDueAt.getDate() + 1);
- break;
- case "Weekly":
- currentNextDueAt.setDate(currentNextDueAt.getDate() + 7);
- break;
- case "Monthly":
- currentNextDueAt.setMonth(currentNextDueAt.getMonth() + 1);
- break;
- case "Quarterly":
- currentNextDueAt.setMonth(currentNextDueAt.getMonth() + 3);
- break;
- case "Annual":
- currentNextDueAt.setFullYear(currentNextDueAt.getFullYear() + 1);
- break;
- }
- continue;
- }
- }
-
- // Get next sequence number
- const { data: sequenceData, error: sequenceError } =
- await serviceRole.rpc("get_next_sequence", {
- sequence_name: "maintenanceDispatch",
- company_id: settings.id
- });
-
- if (sequenceError) {
- console.error(
- `Failed to get sequence for schedule ${schedule.id}: ${sequenceError.message}`
- );
- break;
- }
-
- // Create the dispatch
- const { data: newDispatch, error: dispatchError } = await serviceRole
- .from("maintenanceDispatch")
- .insert({
- maintenanceDispatchId: sequenceData,
- status: "Open",
- priority: schedule.priority,
- source: "Scheduled",
- severity: "Preventive",
- oeeImpact: "Planned",
- workCenterId: schedule.workCenterId,
- maintenanceScheduleId: schedule.id,
- procedureId: schedule.procedureId,
- plannedStartTime: targetDate.toISOString(),
- companyId: settings.id,
- createdBy: "system"
- })
- .select("id")
- .single();
-
- if (dispatchError) {
- console.error(
- `Failed to create dispatch for schedule ${schedule.id}: ${dispatchError.message}`
- );
- break;
- }
-
- // Copy items from schedule to dispatch
- const { data: scheduleItems } = await serviceRole
- .from("maintenanceScheduleItem")
- .select("itemId, quantity, unitOfMeasureCode")
- .eq("maintenanceScheduleId", schedule.id);
-
- if (scheduleItems && scheduleItems.length > 0) {
- await serviceRole.from("maintenanceDispatchItem").insert(
- scheduleItems.map((item) => ({
- maintenanceDispatchId: newDispatch.id,
- itemId: item.itemId,
- quantity: item.quantity,
- unitOfMeasureCode: item.unitOfMeasureCode,
- companyId: settings.id,
- createdBy: "system"
- }))
- );
- }
-
- // Link work center
- await serviceRole.from("maintenanceDispatchWorkCenter").insert({
- maintenanceDispatchId: newDispatch.id,
- workCenterId: schedule.workCenterId,
- companyId: settings.id,
- createdBy: "system"
- });
-
- totalDispatchesCreated++;
- console.log(
- `Created dispatch ${sequenceData} for schedule "${schedule.name}" on ${targetDate.toISOString().split("T")[0]}`
- );
-
- // Get employees assigned to this work center to notify them
- const { data: workCenterEmployees } = await (serviceRole as any)
- .from("workCenterEmployee")
- .select("userId")
- .eq("workCenterId", schedule.workCenterId) as { data: { userId: string }[] | null };
-
- if (workCenterEmployees && workCenterEmployees.length > 0) {
- const userIds = workCenterEmployees.map((e) => e.userId);
- await notifyTask.trigger({
- event: NotificationEvent.MaintenanceDispatchCreated,
- companyId: settings.id,
- documentId: newDispatch.id,
- recipient: {
- type: "users",
- userIds
- }
- });
- console.log(
- `Notified ${userIds.length} work center employees about dispatch ${sequenceData}`
- );
- }
-
- // Calculate next due date based on frequency
- currentNextDueAt = new Date(currentNextDueAt);
- switch (schedule.frequency) {
- case "Daily":
- currentNextDueAt.setDate(currentNextDueAt.getDate() + 1);
- break;
- case "Weekly":
- currentNextDueAt.setDate(currentNextDueAt.getDate() + 7);
- break;
- case "Monthly":
- currentNextDueAt.setMonth(currentNextDueAt.getMonth() + 1);
- break;
- case "Quarterly":
- currentNextDueAt.setMonth(currentNextDueAt.getMonth() + 3);
- break;
- case "Annual":
- currentNextDueAt.setFullYear(currentNextDueAt.getFullYear() + 1);
- break;
- }
- }
-
- // Update schedule's lastGeneratedAt and nextDueAt after processing all dates
- await serviceRole
- .from("maintenanceSchedule")
- .update({
- lastGeneratedAt: currentDateTime.toAbsoluteString(),
- nextDueAt: currentNextDueAt.toISOString()
- })
- .eq("id", schedule.id);
-
- } catch (err) {
- console.error(
- `Error processing schedule ${schedule.id}: ${
- err instanceof Error ? err.message : String(err)
- }`
- );
- }
- }
- }
-
- console.log(
- `🔧 Maintenance dispatch generation completed: ${totalDispatchesCreated} dispatches created`
- );
-
- return { dispatchesCreated: totalDispatchesCreated };
- } catch (error) {
- console.error(
- `Unexpected error in maintenance generation: ${
- error instanceof Error ? error.message : String(error)
- }`
- );
- throw error;
- }
- }
-});
diff --git a/packages/jobs/trigger/event/audit.ts b/packages/jobs/trigger/event/audit.ts
deleted file mode 100644
index 7eff882051..0000000000
--- a/packages/jobs/trigger/event/audit.ts
+++ /dev/null
@@ -1,366 +0,0 @@
-import { getCarbonServiceRole } from "@carbon/auth/client.server";
-import {
- auditConfig,
- getEntityConfigsForTable,
- isAuditableTable,
- isChildTable,
- isExtensionTable,
- isIndirectTable,
- isRootTable,
-} from "@carbon/database/audit.config";
-import type { AuditEntityType } from "@carbon/database/audit.config";
-import type {
- AuditDiff,
- CreateAuditLogEntry,
-} from "@carbon/database/audit.types";
-import { groupBy } from "@carbon/utils";
-import { logger, task } from "@trigger.dev/sdk/v3";
-import { z } from "zod";
-
-const AuditRecordSchema = z.object({
- event: z.object({
- table: z.string(),
- operation: z.enum(["INSERT", "UPDATE", "DELETE", "TRUNCATE"]),
- recordId: z.string(),
- new: z.record(z.any()).nullable(),
- old: z.record(z.any()).nullable(),
- timestamp: z.string(),
- }),
- companyId: z.string(),
- actorId: z.string().nullish(),
- handlerConfig: z.record(z.any()),
-});
-
-const AuditPayloadSchema = z.object({
- records: z.array(AuditRecordSchema),
-});
-
-export type AuditPayload = z.infer<typeof AuditPayloadSchema>;
-
-/**
- * Compute the diff between old and new record values.
- * Supports deep diffing for JSONB fields.
- */
-function computeDiff(
- old: Record<string, unknown>,
- newRecord: Record<string, unknown>
-): AuditDiff | null {
- const diff: AuditDiff = {};
- const skipFields = auditConfig.skipFields;
-
- const allKeys = new Set([...Object.keys(old), ...Object.keys(newRecord)]);
-
- for (const key of allKeys) {
- if ((skipFields as readonly string[]).includes(key)) continue;
-
- const oldValue = old[key];
- const newValue = newRecord[key];
-
- if (JSON.stringify(oldValue) !== JSON.stringify(newValue)) {
- if (
- typeof oldValue === "object" &&
- oldValue !== null &&
- typeof newValue === "object" &&
- newValue !== null &&
- !Array.isArray(oldValue) &&
- !Array.isArray(newValue)
- ) {
- const nestedDiff = computeNestedDiff(
- oldValue as Record<string, unknown>,
- newValue as Record<string, unknown>,
- key
- );
- Object.assign(diff, nestedDiff);
- } else {
- diff[key] = { old: oldValue, new: newValue };
- }
- }
- }
-
- return Object.keys(diff).length > 0 ? diff : null;
-}
-
-/**
- * Compute nested diff for object fields (like customFields).
- */
-function computeNestedDiff(
- old: Record<string, unknown>,
- newRecord: Record<string, unknown>,
- prefix: string
-): AuditDiff {
- const diff: AuditDiff = {};
-
- const allKeys = new Set([...Object.keys(old), ...Object.keys(newRecord)]);
-
- for (const key of allKeys) {
- const oldValue = old[key];
- const newValue = newRecord[key];
-
- if (JSON.stringify(oldValue) !== JSON.stringify(newValue)) {
- diff[`${prefix}.${key}`] = { old: oldValue, new: newValue };
- }
- }
-
- return diff;
-}
-
-// Type for RPC call
-type AuditRpcClient = {
- rpc(
- fn: "insert_audit_log_batch",
- params: { p_company_id: string; p_entries: object[] }
- ): Promise<{ data: number | null; error: any }>;
-};
-
-export const auditTask = task({
- id: "event-handler-audit",
- retry: {
- maxAttempts: 3,
- factor: 2,
- randomize: true,
- },
- run: async (input: unknown) => {
- const payload = AuditPayloadSchema.parse(input);
-
- logger.info(`Processing ${payload.records.length} audit log events`);
-
- const results = {
- inserted: 0,
- skipped: 0,
- failed: 0,
- };
-
- const client = getCarbonServiceRole();
-
- // Group by companyId for efficient processing
- type AuditRecord = (typeof payload.records)[number];
- const byCompany = groupBy(payload.records, (r) => r.companyId);
-
- for (const [companyId, records] of Object.entries(byCompany) as [
- string,
- AuditRecord[]
- ][]) {
- if (!companyId || companyId === "undefined") {
- logger.info(`Skipping ${records.length} records: missing companyId`);
- results.skipped += records.length;
- continue;
- }
-
- // Check if company has audit logs enabled
- const { data: company } = await client
- .from("company")
- .select("auditLogEnabled")
- .eq("id", companyId)
- .single();
-
- if (!(company as { auditLogEnabled: boolean } | null)?.auditLogEnabled) {
- logger.info(
- `Skipping ${records.length} records: audit logging disabled for company ${companyId}`
- );
- results.skipped += records.length;
- continue;
- }
-
- // Process records and build entries
- const entries: CreateAuditLogEntry[] = [];
-
- for (const record of records) {
- const tableName = record.event.table;
-
- // Skip non-auditable tables
- if (!isAuditableTable(tableName)) {
- logger.info(`Skipping: table "${tableName}" is not auditable`);
- results.skipped++;
- continue;
- }
-
- // Skip TRUNCATE operations
- if (record.event.operation === "TRUNCATE") {
- logger.info(`Skipping: TRUNCATE on "${tableName}" is not meaningful`);
- results.skipped++;
- continue;
- }
-
- try {
- // Resolve actorId: event payload first, fallback to record data
- const actorId =
- record.actorId ??
- record.event.new?.updatedBy ??
- record.event.new?.createdBy ??
- record.event.old?.updatedBy ??
- record.event.old?.createdBy;
-
- // Compute diff for UPDATE operations
- let diff: AuditDiff | null = null;
- if (
- record.event.operation === "UPDATE" &&
- record.event.old &&
- record.event.new
- ) {
- diff = computeDiff(
- record.event.old as Record<string, unknown>,
- record.event.new as Record<string, unknown>
- );
-
- if (!diff) {
- logger.info(
- `Skipping: no meaningful diff for UPDATE on "${tableName}" record ${record.event.recordId}`
- );
- results.skipped++;
- continue;
- }
- }
-
- const operation = record.event
- .operation as CreateAuditLogEntry["operation"];
- const entryActorId = (actorId as string) ?? null;
- const entryMetadata = record.handlerConfig.metadata ?? null;
-
- // Get all entity configs that track this table
- const entityConfigs = getEntityConfigsForTable(tableName);
-
- if (entityConfigs.length === 0) {
- logger.info(
- `Skipping: no entity config found for table "${tableName}"`
- );
- results.skipped++;
- continue;
- }
-
- let entriesCreatedForRecord = 0;
-
- for (const entityEntry of entityConfigs) {
- const { entityType, tableConfig } = entityEntry;
-
- // Skip INSERT events for non-root tables — these are just
- // default rows created alongside the parent entity (extensions)
- // or child rows that will get meaningful UPDATEs later.
- if (
- record.event.operation === "INSERT" &&
- !isRootTable(tableConfig)
- ) {
- logger.info(
- `Skipping: INSERT on non-root table "${tableName}" for entity "${entityType}"`
- );
- continue;
- }
-
- if (isRootTable(tableConfig)) {
- // Root table: recordId IS the entity ID
- entries.push({
- tableName,
- entityType,
- entityId: record.event.recordId,
- operation,
- actorId: entryActorId,
- diff,
- metadata: entryMetadata,
- });
- entriesCreatedForRecord++;
- } else if (isExtensionTable(tableConfig)) {
- // Extension table: PK = parent FK, so recordId IS the entity ID
- // (same resolution as root, but INSERT is already skipped above)
- entries.push({
- tableName,
- entityType,
- entityId: record.event.recordId,
- operation,
- actorId: entryActorId,
- diff,
- metadata: entryMetadata,
- });
- entriesCreatedForRecord++;
- } else if (isChildTable(tableConfig)) {
- // Child table: extract entity ID from the named column
- const recordData = record.event.new ?? record.event.old;
- const entityId = recordData?.[tableConfig.entityIdColumn];
-
- if (!entityId) {
- logger.info(
- `Skipping: could not resolve entity ID from column "${tableConfig.entityIdColumn}" for "${tableName}" record ${record.event.recordId}`
- );
- continue;
- }
-
- entries.push({
- tableName,
- entityType,
- entityId: String(entityId),
- operation,
- actorId: entryActorId,
- diff,
- metadata: entryMetadata,
- });
- entriesCreatedForRecord++;
- } else if (isIndirectTable(tableConfig)) {
- // Indirect table: resolve via junction table query
- const { junction, fk, entityIdColumn } = tableConfig.resolve;
-
- const { data: junctionRow } = await client
- .from(junction as any)
- .select(entityIdColumn)
- .eq(fk, record.event.recordId)
- .limit(1)
- .maybeSingle();
-
- const row = junctionRow as unknown as Record<
- string,
- unknown
- > | null;
- if (row && row[entityIdColumn]) {
- entries.push({
- tableName,
- entityType,
- entityId: String(row[entityIdColumn]),
- operation,
- actorId: entryActorId,
- diff,
- metadata: entryMetadata,
- });
- entriesCreatedForRecord++;
- } else {
- logger.info(
- `Skipping: no parent entity found via junction "${junction}" for "${tableName}" record ${record.event.recordId} (entity: ${entityType})`
- );
- }
- }
- }
-
- if (entriesCreatedForRecord === 0) {
- logger.info(
- `Skipping: could not resolve any entity for "${tableName}" record ${record.event.recordId}`
- );
- results.skipped++;
- }
- } catch (error) {
- logger.error(`Failed to process audit record:`, {
- error,
- record,
- });
- results.failed++;
- }
- }
-
- // Batch insert entries using RPC
- if (entries.length > 0) {
- const { data: insertedCount, error } = await (
- client as unknown as AuditRpcClient
- ).rpc("insert_audit_log_batch", {
- p_company_id: companyId,
- p_entries: entries,
- });
-
- if (error) {
- logger.error(`Failed to insert audit log entries:`, { error });
- results.failed += entries.length;
- } else {
- results.inserted += insertedCount ?? entries.length;
- }
- }
- }
-
- logger.info("Audit task completed", results);
-
- return results;
- },
-});
diff --git a/packages/jobs/trigger/event/embedding.ts b/packages/jobs/trigger/event/embedding.ts
deleted file mode 100644
index e27b5e74c4..0000000000
--- a/packages/jobs/trigger/event/embedding.ts
+++ /dev/null
@@ -1,101 +0,0 @@
-import { getCarbonServiceRole } from "@carbon/auth/client.server";
-import { logger, task } from "@trigger.dev/sdk/v3";
-import { z } from "zod";
-
-// Fields that affect embeddings for each table
-const EMBEDDING_FIELDS: Record<string, string[]> = {
- item: ["name", "description"],
- customer: ["name"],
- supplier: ["name"],
-};
-
-const EmbeddingRecordSchema = z.object({
- event: z.object({
- table: z.string(),
- operation: z.enum(["INSERT", "UPDATE", "DELETE", "TRUNCATE"]),
- recordId: z.string(),
- new: z.record(z.any()).nullable(),
- old: z.record(z.any()).nullable(),
- timestamp: z.string(),
- }),
- companyId: z.string(),
-});
-
-const EmbeddingPayloadSchema = z.object({
- records: z.array(EmbeddingRecordSchema),
-});
-
-export type EmbeddingPayload = z.infer<typeof EmbeddingPayloadSchema>;
-
-export const embeddingTask = task({
- id: "event-handler-embedding",
- retry: {
- maxAttempts: 3,
- factor: 2,
- randomize: true,
- },
- run: async (input: unknown) => {
- const payload = EmbeddingPayloadSchema.parse(input);
-
- const results = { processed: 0, skipped: 0, failed: 0 };
- const client = getCarbonServiceRole();
-
- // Filter to only records that need embedding
- const jobs: { id: string; table: string }[] = [];
-
- for (const record of payload.records) {
- const { event } = record;
- const fields = EMBEDDING_FIELDS[event.table];
-
- if (!fields) {
- results.skipped++;
- continue;
- }
-
- if (event.operation === "DELETE" || event.operation === "TRUNCATE") {
- results.skipped++;
- continue;
- }
-
- if (event.operation === "UPDATE" && event.old && event.new) {
- const changed = fields.some((f) => event.old![f] !== event.new![f]);
- if (!changed) {
- results.skipped++;
- continue;
- }
- }
-
- jobs.push({ id: event.recordId, table: event.table });
- }
-
- if (jobs.length === 0) {
- logger.info(`Embedding handler: nothing to process, skipped=${results.skipped}`);
- return results;
- }
-
- // Call the embed edge function directly with a batch
- // The edge function expects: [{ jobId, id, table }]
- // jobId is used for pgmq cleanup — pass -1 since we're not coming from the queue
- const batch = jobs.map((job, i) => ({
- jobId: -(i + 1),
- ...job,
- }));
-
- const { error } = await client.functions.invoke("embed", {
- body: batch,
- });
-
- if (error) {
- logger.error(`Embed edge function failed: ${error.message}`);
- results.failed = jobs.length;
- } else {
- results.processed = jobs.length;
- }
-
- logger.info(
- `Embedding handler: processed=${results.processed}, skipped=${results.skipped}, failed=${results.failed}`
- );
-
- return results;
- },
-});
diff --git a/packages/jobs/trigger/event/queue.ts b/packages/jobs/trigger/event/queue.ts
deleted file mode 100644
index a7d3479c3a..0000000000
--- a/packages/jobs/trigger/event/queue.ts
+++ /dev/null
@@ -1,222 +0,0 @@
-import {
- getPostgresClient,
- getPostgresConnectionPool,
- KyselyDatabase,
-} from "@carbon/database/client";
-import { HandlerType, QueueMessage } from "@carbon/database/event";
-import { all } from "@carbon/utils";
-import { schedules } from "@trigger.dev/sdk";
-import { Kysely, PostgresDriver, sql } from "kysely";
-import { auditTask } from "./audit.ts";
-import { embeddingTask } from "./embedding.ts";
-import { searchTask } from "./search.ts";
-import { syncTask } from "./sync.ts";
-import { webhookTask } from "./webhook.ts";
-import { workflowDispatchTask } from "./workflow.ts";
-
-const QUEUE_NAME = "event_system"; // Name of the PGMQ queue
-const BATCH_SIZE = 250; // Number of messages to process per run
-const VISIBILITY_TIMEOUT = 30; // Seconds a message is hidden after being read
-
-const getDatabaseClient = (size: number) => {
- const pool = getPostgresConnectionPool(size);
- return getPostgresClient(
- pool,
- PostgresDriver
- ) as unknown as Kysely<KyselyDatabase>;
-};
-
-const pg = getDatabaseClient(1);
-
-type QueueJob = {
- msg_id: number;
- message: QueueMessage;
-};
-
-export const eventQueueTask = schedules.task({
- id: "event-queue",
- description: "Polls PGMQ and routes events",
- cron: "* * * * *",
- retry: {
- maxAttempts: 2,
- randomize: true,
- },
- async run() {
- // 1. Read Batch (PGMQ returns these sorted by ID/Time)
- const { rows: jobs } =
- await sql<QueueJob>`SELECT * FROM pgmq.read(${QUEUE_NAME}, ${VISIBILITY_TIMEOUT}, ${BATCH_SIZE})`.execute(
- pg
- );
-
- if (jobs.length === 0) return { processed: 0 };
-
- let total: number[] = [];
-
- // Arrays for batching
- const grouped: Record<HandlerType, QueueJob[]> = {
- WEBHOOK: [],
- WORKFLOW: [],
- SYNC: [],
- SEARCH: [],
- AUDIT: [],
- EMBEDDING: [],
- };
-
- // 2. Sort into Buckets
- for (const job of jobs) {
- grouped[job.message.handlerType].push(job);
- }
-
- const { webhooks, syncs, workflows, searches, audits, embeddings } = await all({
- async webhooks() {
- let queue: number[] = [];
-
- if (grouped.WEBHOOK.length === 0) return queue;
-
- const tasks = grouped.WEBHOOK.map((job) => {
- const event = job.message.event;
- queue.push(job.msg_id);
-
- return {
- payload: {
- url: job.message.handlerConfig.url,
- config: job.message.handlerConfig,
- data: event,
- },
- options: {
- idempotencyKey: `wh_${job.msg_id}`,
- // This tells Trigger.dev: "Queue this, but don't run it until
- // any previous tasks for this specific record are finished."
- concurrencyKey: `record_${event.table}_${event.recordId}`,
- },
- };
- });
-
- await webhookTask.batchTrigger(tasks);
-
- return queue;
- },
- async workflows() {
- let queue: number[] = [];
-
- if (grouped.WORKFLOW.length === 0) return queue;
-
- const tasks = grouped.WORKFLOW.map((job) => {
- const event = job.message.event;
- queue.push(job.msg_id);
-
- return {
- payload: {
- workflowId: job.message.handlerConfig.workflowId,
- data: event,
- },
- options: {
- idempotencyKey: `wf_${job.msg_id}`,
- concurrencyKey: `record_${event.table}_${event.recordId}`,
- },
- };
- });
-
- await workflowDispatchTask.batchTrigger(tasks);
-
- return queue;
- },
- async syncs() {
- let queue: number[] = [];
-
- if (grouped.SYNC.length === 0) return queue;
-
- const records = grouped.SYNC.map((job) => {
- queue.push(job.msg_id);
-
- return {
- event: job.message.event,
- companyId: job.message.companyId,
- handlerConfig: job.message.handlerConfig,
- };
- });
-
- await syncTask.trigger({
- records,
- });
-
- return queue;
- },
- async searches() {
- let queue: number[] = [];
-
- if (grouped.SEARCH.length === 0) return queue;
-
- const records = grouped.SEARCH.map((job) => {
- queue.push(job.msg_id);
-
- return {
- event: job.message.event,
- companyId: job.message.companyId,
- };
- });
-
- await searchTask.trigger({
- records,
- });
-
- return queue;
- },
- async audits() {
- let queue: number[] = [];
-
- if (grouped.AUDIT.length === 0) return queue;
-
- const records = grouped.AUDIT.map((job) => {
- queue.push(job.msg_id);
-
- return {
- event: job.message.event,
- companyId: job.message.companyId,
- actorId: job.message.actorId,
- handlerConfig: job.message.handlerConfig,
- };
- });
-
- await auditTask.trigger({
- records,
- });
-
- return queue;
- },
- async embeddings() {
- let queue: number[] = [];
-
- if (grouped.EMBEDDING.length === 0) return queue;
-
- const records = grouped.EMBEDDING.map((job) => {
- queue.push(job.msg_id);
-
- return {
- event: job.message.event,
- companyId: job.message.companyId,
- };
- });
-
- await embeddingTask.trigger({
- records,
- });
-
- return queue;
- },
- });
-
- total = total.concat(webhooks, workflows, syncs, searches, audits, embeddings);
-
- // 5. Delete from PGMQ
- // We delete immediately because we have successfully offloaded
- // the ordering responsibility to Trigger.dev's internal queue.
- if (total.length > 0) {
- await sql`SELECT pgmq.delete(${QUEUE_NAME}, id::bigint) FROM unnest(${total}::bigint[]) AS id`.execute(
- pg
- );
- }
-
- return { routed: total.length };
- },
-});
diff --git a/packages/jobs/trigger/event/sync.ts b/packages/jobs/trigger/event/sync.ts
deleted file mode 100644
index 67e35411f0..0000000000
--- a/packages/jobs/trigger/event/sync.ts
+++ /dev/null
@@ -1,232 +0,0 @@
-import { getCarbonServiceRole } from "@carbon/auth/client.server";
-import {
- getPostgresClient,
- getPostgresConnectionPool,
-} from "@carbon/database/client";
-import { EventSchema } from "@carbon/database/event";
-import {
- AccountingEntityType,
- BatchSyncResult,
- getAccountingIntegration,
- getProviderIntegration,
- ProviderID,
- RatelimitError,
- SyncFactory,
-} from "@carbon/ee/accounting";
-import { groupBy } from "@carbon/utils";
-import { logger, task, wait } from "@trigger.dev/sdk";
-import { PostgresDriver } from "kysely";
-import { z } from "zod";
-
-const SyncRecordSchema = z.object({
- event: EventSchema,
- companyId: z.string(),
- handlerConfig: z.object({
- provider: z.nativeEnum(ProviderID),
- }),
-});
-
-const SyncPayloadSchema = z.object({
- records: z.array(SyncRecordSchema),
-});
-
-export type SyncPayload = z.infer<typeof SyncPayloadSchema>;
-
-// Map database table names to accounting entity types
-const TABLE_TO_ENTITY_MAP: Partial<Record<string, AccountingEntityType>> = {
- customer: "customer",
- supplier: "vendor",
- item: "item",
- purchaseOrder: "purchaseOrder",
- purchaseInvoice: "bill",
- salesInvoice: "invoice",
-};
-
-function getEntityTypeFromTable(table: string): AccountingEntityType | null {
- return TABLE_TO_ENTITY_MAP[table] ?? null;
-}
-
-function getDeduplicatedIds<T>(
- records: T[],
- getId: (r: T) => string
-): string[] {
- return [...new Set(records.map(getId))];
-}
-
-/**
- * Execute an async operation with rate limit handling.
- * If a RatelimitError is thrown, wait for the specified retry period and retry once.
- */
-async function withRateLimitRetry<T>(
- operation: () => Promise<T>,
- operationName: string
-): Promise<T> {
- try {
- return await operation();
- } catch (error) {
- if (error instanceof RatelimitError) {
- const { retryAfterSeconds, limitType, details } = error.rateLimitInfo;
- logger.warn(`[RATE LIMIT] ${operationName} hit rate limit`, {
- limitType,
- retryAfterSeconds,
- ...details,
- });
- await wait.for({ seconds: retryAfterSeconds });
- logger.info(
- `[RATE LIMIT] Retrying ${operationName} after ${retryAfterSeconds}s wait`
- );
- return await operation();
- }
- throw error;
- }
-}
-
-export const syncTask = task({
- id: "event-handler-sync",
- maxDuration: 5 * 60 * 1000, // 5 minutes
- run: async (input: unknown) => {
- const payload = SyncPayloadSchema.parse(input);
-
- logger.info(`Processing ${payload.records.length} sync events`);
-
- const results = {
- success: [] as BatchSyncResult[],
- failed: [] as { recordId: string; error: string }[],
- skipped: [] as { recordId: string; reason: string }[],
- };
-
- // Group records by (companyId, provider) for efficient batch processing
- const byCompanyProvider = groupBy(payload.records, (r) => {
- const companyId = r.companyId;
- const provider = r.handlerConfig.provider;
- return `${companyId}:${provider}`;
- });
-
- const pool = getPostgresConnectionPool(10);
- const kysely = getPostgresClient(pool, PostgresDriver);
- const client = getCarbonServiceRole();
-
- try {
- for (const [key, records] of Object.entries(byCompanyProvider)) {
- const [companyId, provider] = key.split(":");
-
- if (!companyId || companyId === "undefined" || !provider) {
- for (const r of records) {
- results.skipped.push({
- recordId: r.event.recordId,
- reason: "Missing companyId or provider",
- });
- }
- continue;
- }
-
- try {
- // Get integration and provider instance
- const integration = await getAccountingIntegration(
- client,
- companyId,
- provider as ProviderID
- );
-
- const providerInstance = getProviderIntegration(
- client,
- companyId,
- provider as ProviderID,
- integration.metadata
- );
-
- // Group by entity type
- const byEntityType = groupBy(records, (r) => {
- const entityType = getEntityTypeFromTable(r.event.table);
- return entityType ?? "unknown";
- });
-
- for (const [entityType, entityRecords] of Object.entries(
- byEntityType
- )) {
- if (entityType === "unknown") {
- for (const r of entityRecords) {
- results.skipped.push({
- recordId: r.event.recordId,
- reason: `Table '${r.event.table}' has no entity mapping`,
- });
- }
- continue;
- }
-
- // Separate by operation
- const inserts = entityRecords.filter(
- (r) => r.event.operation === "INSERT"
- );
- const updates = entityRecords.filter(
- (r) => r.event.operation === "UPDATE"
- );
- const deletes = entityRecords.filter(
- (r) => r.event.operation === "DELETE"
- );
-
- const syncer = SyncFactory.getSyncer({
- database: kysely,
- companyId,
- provider: providerInstance,
- config: providerInstance.getSyncConfig(
- entityType as AccountingEntityType
- ),
- entityType: entityType as AccountingEntityType,
- });
-
- // Process INSERTs and UPDATEs (push to accounting)
- const toSync = [...inserts, ...updates];
- if (toSync.length > 0) {
- const entityIds = getDeduplicatedIds(
- toSync,
- (r) => r.event.recordId
- );
-
- logger.info(
- `Pushing ${entityIds.length} ${entityType} entities to accounting`
- );
-
- const result = await withRateLimitRetry(
- () => syncer.pushBatchToAccounting(entityIds),
- `pushBatchToAccounting ${entityType}`
- );
-
- logger.info("Sync result:", { entityType, result });
-
- results.success.push(result);
- }
-
- // Handle DELETEs (log for now, not yet implemented in syncers)
- for (const del of deletes) {
- results.skipped.push({
- recordId: del.event.recordId,
- reason: "DELETE operations not yet implemented",
- });
- }
- }
- } catch (error) {
- logger.error(`Failed to process sync for ${key}:`, { error });
- for (const r of records) {
- results.failed.push({
- recordId: r.event.recordId,
- error: error instanceof Error ? error.message : "Unknown error",
- });
- }
- }
- }
- } catch (error) {
- logger.error("Sync task failed:", { error });
- } finally {
- await pool.end();
- }
-
- logger.info("Sync task completed", {
- successCount: results.success.reduce((acc, r) => acc + r.successCount, 0),
- failedCount: results.failed.length,
- skippedCount: results.skipped.length,
- });
-
- return results;
- },
-});
diff --git a/packages/jobs/trigger/event/webhook.ts b/packages/jobs/trigger/event/webhook.ts
deleted file mode 100644
index 948f4941d5..0000000000
--- a/packages/jobs/trigger/event/webhook.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-import { logger, task } from "@trigger.dev/sdk/v3";
-import axios from "axios";
-import { z } from "zod";
-
-const webhookPayloadSchema = z.object({
- url: z.string().url(),
- data: z.any(),
- config: z
- .object({
- headers: z.record(z.string()).optional(),
- })
- .passthrough(),
-});
-
-export type WebhookPayload = z.infer<typeof webhookPayloadSchema>;
-
-// 1. Generic Webhook Worker
-export const webhookTask = task({
- id: "event-handler-webhook",
- retry: {
- maxAttempts: 3, // Auto-retry on 500s or timeouts
- factor: 2,
- randomize: true,
- },
- run: async (payload: WebhookPayload) => {
- logger.info(`Firing webhook to ${payload.url}`);
-
- await axios.post(payload.url, payload.data, {
- headers: payload.config.headers,
- });
- },
-});
\ No newline at end of file
diff --git a/packages/jobs/trigger/event/workflow.ts b/packages/jobs/trigger/event/workflow.ts
deleted file mode 100644
index 195c4a4efd..0000000000
--- a/packages/jobs/trigger/event/workflow.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import { logger, task } from "@trigger.dev/sdk";
-import { z } from "zod";
-
-const workflowPayloadSchema = z.object({
- workflowId: z.string(),
- data: z.any(),
-});
-
-export type WorkflowPayload = z.infer<typeof workflowPayloadSchema>;
-
-// 2. Workflow Trigger Worker
-export const workflowDispatchTask = task({
- id: "event-handler-workflow",
- run: async (payload: WorkflowPayload) => {
- logger.info(`Triggering workflow ${payload.workflowId}`);
-
- // Here you would trigger another business logic task
- // e.g., await tasks.trigger(payload.workflowId, payload.data);
- },
-});
diff --git a/packages/jobs/trigger/model-thumbnail.ts b/packages/jobs/trigger/model-thumbnail.ts
deleted file mode 100644
index cdd43811c6..0000000000
--- a/packages/jobs/trigger/model-thumbnail.ts
+++ /dev/null
@@ -1,75 +0,0 @@
-import { SUPABASE_ANON_KEY, SUPABASE_URL, VERCEL_URL } from "@carbon/auth";
-import { getCarbonServiceRole } from "@carbon/auth/client.server";
-
-import { task } from "@trigger.dev/sdk";
-
-const isLocal = VERCEL_URL === undefined || VERCEL_URL.includes("localhost");
-
-const getModelUrl = (modelId: string) => {
- const domain = isLocal ? "http://localhost:3000" : VERCEL_URL;
- return `${domain}/file/model/${modelId}`;
-};
-
-export const modelThumbnailTask = task({
- id: "model-thumbnail",
- run: async (payload: { modelId: string; companyId: string }) => {
- const { modelId, companyId } = payload;
-
- if (isLocal) {
- console.log("Skipping model-thumbnail task on local", { payload });
- return;
- }
-
- console.log("Starting model-thumbnail task", { payload });
- const client = getCarbonServiceRole();
-
- const url = getModelUrl(modelId);
- const imageUrl = `${SUPABASE_URL}/functions/v1/thumbnail`;
-
- const response = await fetch(imageUrl, {
- method: "POST",
- headers: {
- "Content-Type": "application/json",
- Authorization: `Bearer ${SUPABASE_ANON_KEY}`,
- },
- body: JSON.stringify({ url }),
- });
-
- if (response.status !== 200) {
- console.log("Failed to generate thumbnail", { response });
- throw new Error("Failed to generate thumbnail");
- }
-
- const blob = new Blob([await response.arrayBuffer()], {
- type: "image/png",
- });
-
- const fileName = `${modelId}.png`;
- const thumbnailFile = new File([blob], fileName, {
- type: "image/png",
- });
-
- console.log("Uploading thumbnail", { fileName });
-
- const { data, error } = await client.storage
- .from("private")
- .upload(`${companyId}/thumbnails/${modelId}/${fileName}`, thumbnailFile, {
- upsert: true,
- });
-
- if (error) {
- console.error("Failed to upload thumbnail", { error });
- }
-
- const result = await client
- .from("modelUpload")
- .update({
- thumbnailPath: data?.path,
- })
- .eq("id", modelId);
-
- if (result.error) {
- console.error("Failed to update thumbnail path", { error: result.error });
- }
- },
-});
diff --git a/packages/jobs/trigger/mrp.ts b/packages/jobs/trigger/mrp.ts
deleted file mode 100644
index ecebf206b3..0000000000
--- a/packages/jobs/trigger/mrp.ts
+++ /dev/null
@@ -1,59 +0,0 @@
-import { getCarbonServiceRole } from "@carbon/auth/client.server";
-import { schedules } from "@trigger.dev/sdk";
-
-const serviceRole = getCarbonServiceRole();
-
-export const mrp = schedules.task({
- id: "mrp",
- cron: "0 */3 * * *", // Run every 3 hours
- run: async () => {
- console.log(
- `🕒 Scheduled MRP Calculation Started: ${new Date().toISOString()}`
- );
-
- const companies = await serviceRole
- .from("companyPlan")
- .select("id, ...company(name)");
-
- if (companies.error) {
- console.error(
- `❌ Failed to get companies: ${
- companies.error instanceof Error
- ? companies.error.message
- : String(companies.error)
- }`
- );
- return;
- }
- for await (const company of companies.data) {
- try {
- const result = await serviceRole.functions.invoke("mrp", {
- body: {
- type: "company",
- id: company.id,
- companyId: company.id,
- userId: "system",
- },
- });
-
- if (result.error) {
- console.error(
- `❌ Failed to run MRP for company ${company.name}: ${
- result.error instanceof Error
- ? result.error.message
- : String(result.error)
- }`
- );
- } else {
- console.log(`✅ Successfully ran MRP for company ${company.name}`);
- }
- } catch (error) {
- console.error(
- `Unexpected error in MRP run task: ${
- error instanceof Error ? error.message : String(error)
- }`
- );
- }
- }
- },
-});
diff --git a/packages/jobs/trigger/notify.ts b/packages/jobs/trigger/notify.ts
deleted file mode 100644
index 8521d27030..0000000000
--- a/packages/jobs/trigger/notify.ts
+++ /dev/null
@@ -1,694 +0,0 @@
-import {
- ERP_URL,
- NOVU_SECRET_KEY,
- VERCEL_URL,
- NOVU_API_URL
-} from "@carbon/auth";
-import { getCarbonServiceRole } from "@carbon/auth/client.server";
-import type { Database } from "@carbon/database";
-import { notifyTaskAssigned } from "@carbon/ee/notifications";
-import {
- getSubscriberId,
- NotificationEvent,
- NotificationWorkflow,
- trigger,
- triggerBulk,
- type TriggerPayload,
-} from "@carbon/notifications";
-import { Novu } from "@novu/node";
-import { task } from "@trigger.dev/sdk";
-
-type ApprovalDocumentType =
- Database["public"]["Enums"]["approvalDocumentType"];
-
-const novu = new Novu(NOVU_SECRET_KEY!, {
- backendUrl: NOVU_API_URL,
-});
-const isLocal = VERCEL_URL === undefined || VERCEL_URL.includes("localhost");
-
-// Helper function to get company integrations
-async function getCompanyIntegrations(client: any, companyId: string) {
- return client
- .from("companyIntegration")
- .select("*")
- .eq("companyId", companyId);
-}
-
-export const notifyTask = task({
- id: "notify",
- run: async (payload: {
- event: NotificationEvent;
- companyId: string;
- documentId: string;
- recipient:
- | {
- type: "user";
- userId: string;
- }
- | {
- type: "group";
- groupIds: string[];
- }
- | {
- type: "users";
- userIds: string[];
- };
- from?: string;
- documentType?: ApprovalDocumentType;
- }) => {
- if (isLocal) {
- console.log("Skipping notify task on local", { payload });
- return;
- }
-
- const client = getCarbonServiceRole();
-
- function getWorkflow(type: NotificationEvent) {
- switch (type) {
- case NotificationEvent.JobAssignment:
- case NotificationEvent.JobOperationAssignment:
- case NotificationEvent.MaintenanceDispatchAssignment:
- case NotificationEvent.MaintenanceDispatchCreated:
- case NotificationEvent.NonConformanceAssignment:
- case NotificationEvent.ProcedureAssignment:
- case NotificationEvent.PurchaseInvoiceAssignment:
- case NotificationEvent.PurchaseOrderAssignment:
- case NotificationEvent.QuoteAssignment:
- case NotificationEvent.RiskAssignment:
- case NotificationEvent.SalesOrderAssignment:
- case NotificationEvent.SalesRfqAssignment:
- case NotificationEvent.SalesRfqReady:
- case NotificationEvent.StockTransferAssignment:
- case NotificationEvent.SupplierQuoteAssignment:
- case NotificationEvent.TrainingAssignment:
- return NotificationWorkflow.Assignment;
- case NotificationEvent.JobCompleted:
- return NotificationWorkflow.JobCompleted;
- case NotificationEvent.DigitalQuoteResponse:
- return NotificationWorkflow.DigitalQuoteResponse;
- case NotificationEvent.SuggestionResponse:
- return NotificationWorkflow.SuggestionResponse;
- case NotificationEvent.SupplierQuoteResponse:
- return NotificationWorkflow.SupplierQuoteResponse;
- case NotificationEvent.JobOperationMessage:
- return NotificationWorkflow.Message;
- case NotificationEvent.ApprovalApproved:
- case NotificationEvent.ApprovalRejected:
- case NotificationEvent.ApprovalRequested:
- return NotificationWorkflow.Approval;
- default:
- return null;
- }
- }
-
- async function getDescription(
- type: NotificationEvent,
- documentId: string,
- documentType?: ApprovalDocumentType
- ) {
- switch (type) {
- case NotificationEvent.SalesRfqReady:
- case NotificationEvent.SalesRfqAssignment:
- const salesRfq = await client
- .from("salesRfq")
- .select("*")
- .eq("id", documentId)
- .single();
-
- if (salesRfq.error) {
- console.error("Failed to get salesRfq", salesRfq.error);
- throw salesRfq.error;
- }
-
- if (type === NotificationEvent.SalesRfqReady) {
- return `RFQ ${salesRfq?.data?.rfqId} is ready for quote`;
- } else if (type === NotificationEvent.SalesRfqAssignment) {
- return `RFQ ${salesRfq?.data?.rfqId} assigned to you`;
- }
-
- case NotificationEvent.QuoteAssignment:
- const quote = await client
- .from("quote")
- .select("*")
- .eq("id", documentId)
- .single();
- if (quote.error) {
- console.error("Failed to get quote", quote.error);
- throw quote.error;
- }
- return `Quote ${quote?.data?.quoteId} assigned to you`;
-
- case NotificationEvent.SalesOrderAssignment:
- const salesOrder = await client
- .from("salesOrder")
- .select("*")
- .eq("id", documentId)
- .single();
-
- if (salesOrder.error) {
- console.error("Failed to get salesOrder", salesOrder.error);
- throw salesOrder.error;
- }
-
- return `Sales Order ${salesOrder?.data?.salesOrderId} assigned to you`;
-
- case NotificationEvent.MaintenanceDispatchCreated:
- const maintenanceDispatchCreated = await client
- .from("maintenanceDispatch")
- .select("*")
- .eq("id", documentId)
- .single();
-
- if (maintenanceDispatchCreated.error) {
- console.error("Failed to get maintenanceDispatchCreated", maintenanceDispatchCreated.error);
- throw maintenanceDispatchCreated.error;
- }
-
- return `New maintenance dispatch ${maintenanceDispatchCreated?.data?.maintenanceDispatchId} created`;
- case NotificationEvent.MaintenanceDispatchAssignment:
- const maintenanceDispatchAssignment = await client
- .from("maintenanceDispatch")
- .select("*")
- .eq("id", documentId)
- .single();
-
- if (maintenanceDispatchAssignment.error) {
- console.error("Failed to get maintenanceDispatchAssignment", maintenanceDispatchAssignment.error);
- throw maintenanceDispatchAssignment.error;
- }
-
- return `Maintenance dispatch ${maintenanceDispatchAssignment?.data?.maintenanceDispatchId} assigned to you`;
-
- case NotificationEvent.NonConformanceAssignment:
- const nonConformance = await client
- .from("nonConformance")
- .select("*")
- .eq("id", documentId)
- .single();
-
- if (nonConformance.error) {
- console.error("Failed to get nonConformance", nonConformance.error);
- throw nonConformance.error;
- }
-
- return `Issue ${nonConformance?.data?.nonConformanceId} assigned to you`;
- case NotificationEvent.JobAssignment:
- const job = await client
- .from("job")
- .select("*")
- .eq("id", documentId)
- .single();
-
- if (job.error) {
- console.error("Failed to get job", job.error);
- throw job.error;
- }
-
- return `Job ${job?.data?.jobId} assigned to you`;
- case NotificationEvent.JobCompleted:
- const completedJob = await client
- .from("job")
- .select("*")
- .eq("id", documentId)
- .single();
-
- if (completedJob.error) {
- console.error("Failed to get job", completedJob.error);
- throw completedJob.error;
- }
-
- return `Job ${completedJob?.data?.jobId} is complete!`;
- case NotificationEvent.JobOperationAssignment:
- case NotificationEvent.JobOperationMessage:
- const [, operationId] = documentId.split(":");
- const jobOperation = await client
- .from("jobOperation")
- .select("*, job(id, jobId)")
- .eq("id", operationId!)
- .single();
-
- if (jobOperation.error) {
- console.error("Failed to get jobOperation", jobOperation.error);
- throw jobOperation.error;
- }
-
- if (type === NotificationEvent.JobOperationAssignment) {
- return `New job operation assigned to you on ${jobOperation?.data?.job?.jobId}`;
- } else if (type === NotificationEvent.JobOperationMessage) {
- return `New message on ${jobOperation?.data?.job?.jobId} operation: ${jobOperation?.data?.description}`;
- }
-
- case NotificationEvent.ProcedureAssignment:
- const procedure = await client
- .from("procedure")
- .select("*")
- .eq("id", documentId)
- .single();
-
- if (procedure.error) {
- console.error("Failed to get procedure", procedure.error);
- throw procedure.error;
- }
-
- return `Procedure ${procedure?.data?.name} version ${procedure?.data?.version} assigned to you`;
-
- case NotificationEvent.DigitalQuoteResponse:
- const digitalQuote = await client
- .from("quote")
- .select("*")
- .eq("id", documentId)
- .single();
-
- if (digitalQuote.error) {
- console.error("Failed to get digital quote", digitalQuote.error);
- throw digitalQuote.error;
- }
-
- if (digitalQuote.data.digitalQuoteAcceptedBy) {
- return `Digital Quote ${digitalQuote?.data?.quoteId} was completed by ${digitalQuote.data.digitalQuoteAcceptedBy}`;
- }
-
- if (digitalQuote.data.digitalQuoteRejectedBy) {
- return `Digital Quote ${digitalQuote?.data?.quoteId} was rejected by ${digitalQuote.data.digitalQuoteRejectedBy}`;
- }
-
- return `Digital Quote ${digitalQuote?.data?.quoteId} was accepted`;
-
- case NotificationEvent.GaugeCalibrationExpired:
- const gaugeCalibration = await client
- .from("gaugeCalibrationRecord")
- .select("*")
- .eq("id", documentId)
- .single();
-
- if (gaugeCalibration.error) {
- console.error(
- "Failed to get gaugeCalibration",
- gaugeCalibration.error
- );
- throw gaugeCalibration.error;
- }
-
- return `Gauge ${gaugeCalibration?.data?.gaugeId} is out of calibration`;
-
- case NotificationEvent.StockTransferAssignment:
- const stockTransfer = await client
- .from("stockTransfer")
- .select("*")
- .eq("id", documentId)
- .single();
-
- if (stockTransfer.error) {
- console.error("Failed to get stockTransfer", stockTransfer.error);
- throw stockTransfer.error;
- }
-
- return `Stock Transfer ${stockTransfer?.data?.stockTransferId} assigned to you`;
-
- case NotificationEvent.TrainingAssignment:
- const trainingAssignment = await client
- .from("trainingAssignment")
- .select("*, training(id, name)")
- .eq("id", documentId)
- .single();
-
- if (trainingAssignment.error) {
- console.error(
- "Failed to get trainingAssignment",
- trainingAssignment.error
- );
- throw trainingAssignment.error;
- }
-
- return `Training "${trainingAssignment?.data?.training?.name}" assigned to you`;
-
- case NotificationEvent.SuggestionResponse:
- const suggestion = await client
- .from("suggestion")
- .select("*, user(id, fullName)")
- .eq("id", documentId)
- .single();
-
- if (suggestion.error) {
- console.error("Failed to get suggestion", suggestion.error);
- throw suggestion.error;
- }
-
- const submittedBy = suggestion.data.user?.fullName || "Anonymous";
- return `New suggestion submitted by ${submittedBy}`;
-
- case NotificationEvent.RiskAssignment:
- const risk = await client
- .from("riskRegister")
- .select("*")
- .eq("id", documentId)
- .single();
-
- if (risk.error) {
- console.error("Failed to get risk", risk.error);
- throw risk.error;
- }
-
- return `Risk "${risk?.data?.title}" assigned to you`;
-
- case NotificationEvent.MaintenanceDispatchAssignment:
- case NotificationEvent.MaintenanceDispatchCreated:
- const maintenanceDispatch = await client
- .from("maintenanceDispatch")
- .select("*, workCenter(id, name)")
- .eq("id", documentId)
- .single();
-
- if (maintenanceDispatch.error) {
- console.error(
- "Failed to get maintenanceDispatch",
- maintenanceDispatch.error
- );
- throw maintenanceDispatch.error;
- }
-
- const workCenterName =
- maintenanceDispatch.data?.workCenter?.name ?? "Unknown";
- const dispatchId =
- maintenanceDispatch.data?.maintenanceDispatchId ?? documentId;
-
- if (type === NotificationEvent.MaintenanceDispatchAssignment) {
- return `Maintenance dispatch ${dispatchId} for ${workCenterName} assigned to you`;
- } else {
- return `New maintenance dispatch ${dispatchId} created for ${workCenterName}`;
- }
-
- case NotificationEvent.SupplierQuoteResponse:
- const supplierQuote = await client
- .from("supplierQuote")
- .select("*")
- .eq("id", documentId)
- .single();
-
-
- if (supplierQuote.error) {
- console.error("Failed to get supplier quote", supplierQuote.error);
- throw supplierQuote.error;
- }
-
- const externalNotes = supplierQuote.data.externalNotes as Record<string, unknown> | null;
- const respondedBy = externalNotes?.lastSubmittedBy as string | undefined || "Supplier";
- return `Supplier Quote ${supplierQuote?.data?.supplierQuoteId} was submitted by ${respondedBy}`;
-
- case NotificationEvent.ApprovalRequested:
- if (documentType === "purchaseOrder") {
- const purchaseOrderResult = await client
- .from("purchaseOrder")
- .select("purchaseOrderId")
- .eq("id", documentId)
- .single();
-
- if (purchaseOrderResult.error || !purchaseOrderResult.data) {
- console.error(
- "Failed to retrieve purchase order for approval notification",
- purchaseOrderResult.error
- );
- return "Purchase order requires your approval";
- }
-
- const purchaseOrderId = purchaseOrderResult.data.purchaseOrderId;
- return `Purchase order ${purchaseOrderId} requires your approval`;
- }
-
- if (documentType === "qualityDocument") {
- const qualityDocumentResult = await client
- .from("qualityDocument")
- .select("name")
- .eq("id", documentId)
- .single();
-
- if (qualityDocumentResult.error || !qualityDocumentResult.data) {
- console.error(
- "Failed to retrieve quality document for approval notification",
- qualityDocumentResult.error
- );
- return "Quality document requires your approval";
- }
-
- const qualityDocumentName =
- qualityDocumentResult.data.name ?? "Untitled";
- return `Quality document "${qualityDocumentName}" requires your approval`;
- }
- return `Approval requested`;
-
- case NotificationEvent.ApprovalApproved:
- if (documentType === "purchaseOrder") {
- const poApproved = await client
- .from("purchaseOrder")
- .select("purchaseOrderId")
- .eq("id", documentId)
- .single();
- if (poApproved.error || !poApproved.data) {
- return "Your purchase order was approved";
- }
- return `Purchase order ${poApproved.data.purchaseOrderId} was approved`;
- }
- if (documentType === "qualityDocument") {
- const qdApproved = await client
- .from("qualityDocument")
- .select("name")
- .eq("id", documentId)
- .single();
- if (qdApproved.error || !qdApproved.data) {
- return "Your quality document was approved";
- }
- return `Quality document "${qdApproved.data.name ?? "Untitled"}" was approved`;
- }
- return "Your approval request was approved";
-
- case NotificationEvent.ApprovalRejected:
- if (documentType === "purchaseOrder") {
- const poRejected = await client
- .from("purchaseOrder")
- .select("purchaseOrderId")
- .eq("id", documentId)
- .single();
- if (poRejected.error || !poRejected.data) {
- return "Your purchase order was rejected";
- }
- return `Purchase order ${poRejected.data.purchaseOrderId} was rejected`;
- }
- if (documentType === "qualityDocument") {
- const qdRejected = await client
- .from("qualityDocument")
- .select("name")
- .eq("id", documentId)
- .single();
- if (qdRejected.error || !qdRejected.data) {
- return "Your quality document was rejected";
- }
- return `Quality document "${qdRejected.data.name ?? "Untitled"}" was rejected`;
- }
- return "Your approval request was rejected";
-
- default:
- return null;
- }
- }
-
- const workflow = getWorkflow(payload.event);
-
- if (!workflow) {
- console.error(`No workflow found for notification type ${payload.event}`);
- throw new Error(
- `No workflow found for notification type ${payload.event}`
- );
- }
-
- const description = await getDescription(
- payload.event,
- payload.documentId,
- payload.documentType
- );
-
- if (!description) {
- console.error(
- `No description found for notification type ${payload.event} with documentId ${payload.documentId}`
- );
- throw new Error(
- `No description found for notification type ${payload.event} with documentId ${payload.documentId}`
- );
- }
-
- // Send integration notifications for non-conformance assignment events (e.g., Slack)
- if (
- payload.event === NotificationEvent.NonConformanceAssignment &&
- payload.recipient.type === "user"
- ) {
- console.log(
- "Processing non-conformance assignment notification for integrations",
- {
- event: payload.event,
- companyId: payload.companyId,
- documentId: payload.documentId,
- recipientUserId: payload.recipient.userId,
- from: payload.from,
- }
- );
-
- try {
- const integrationsResult = await getCompanyIntegrations(
- client,
- payload.companyId
- );
-
- if (integrationsResult.data && integrationsResult.data.length > 0) {
- await notifyTaskAssigned({ client }, integrationsResult.data, {
- companyId: payload.companyId,
- userId: payload.from || "system",
- carbonUrl: `${ERP_URL}/x/issue/${payload.documentId}`,
- task: {
- id: payload.documentId,
- table: "nonConformance",
- assignee: payload.recipient.userId,
- title: description,
- },
- });
- }
- } catch (error) {
- console.error(
- "Failed to send integration assignment notification:",
- error
- );
- // Continue without blocking the main operation
- }
- }
-
- const baseNotificationPayload = {
- recordId: payload.documentId,
- description,
- event: payload.event,
- from: payload.from,
- ...(payload.documentType && { documentType: payload.documentType }),
- };
-
- if (payload.recipient.type === "user") {
- const novuPayload = {
- workflow,
- payload: baseNotificationPayload,
- user: {
- subscriberId: getSubscriberId({
- companyId: payload.companyId,
- userId: payload.recipient.userId,
- }),
- },
- };
-
- console.log("Sending single user notification to Novu", {
- event: payload.event,
- workflow,
- subscriberId: novuPayload.user.subscriberId,
- description,
- documentId: payload.documentId,
- from: payload.from,
- });
-
- try {
- await trigger(novu, novuPayload);
- console.log("Successfully sent single user notification to Novu");
- } catch (error) {
- console.error("Error triggering single user notification");
- console.error(error);
- }
- } else if (["group", "users"].includes(payload.recipient.type)) {
- console.log(
- `triggering notification for group ${payload.recipient.type}`
- );
-
- const userIds =
- payload.recipient.type === "group"
- ? await client.rpc("users_for_groups", {
- groups: payload.recipient.groupIds,
- })
- : {
- data: payload.recipient.userIds,
- error: null,
- };
-
- if (userIds.error) {
- console.error("Failed to get userIds", userIds.error);
- throw userIds.error;
- }
-
- if (
- userIds.data === null ||
- !Array.isArray(userIds.data) ||
- userIds.data.length === 0
- ) {
- console.log(
- `No userIds found for payload - skipping Novu notification`,
- {
- event: payload.event,
- recipientType: payload.recipient.type,
- recipient: payload.recipient,
- reason: "No users found in group/users list",
- }
- );
- return;
- }
-
- // Filter out the sender from recipients if they exist in the userIds
- const filteredUserIds = payload.from
- ? (userIds.data as string[]).filter((id) => id !== payload.from)
- : (userIds.data as string[]);
-
- if (filteredUserIds.length === 0) {
- console.log(
- `No recipients after filtering sender - skipping Novu notification`,
- {
- event: payload.event,
- originalUserCount: userIds.data.length,
- from: payload.from,
- reason: "All users filtered out (sender was only recipient)",
- }
- );
- return;
- }
-
- const notificationPayloads: TriggerPayload[] =
- [...new Set(filteredUserIds)].map((userId) => ({
- workflow,
- payload: baseNotificationPayload,
- user: {
- subscriberId: getSubscriberId({
- companyId: payload.companyId,
- userId: userId,
- }),
- },
- })) ?? [];
-
- if (notificationPayloads.length > 0) {
- console.log("Sending bulk notifications to Novu", {
- event: payload.event,
- workflow,
- recipientCount: notificationPayloads.length,
- description,
- documentId: payload.documentId,
- from: payload.from,
- subscriberIds: notificationPayloads.map(p => p.user.subscriberId),
- });
-
- try {
- await triggerBulk(novu, notificationPayloads.flat());
- console.log(`Successfully sent ${notificationPayloads.length} bulk notifications to Novu`);
- } catch (error) {
- console.error("Error triggering bulk notifications");
- console.error(error);
- }
- } else {
- console.log(
- `No notification payloads generated - skipping Novu notification`,
- {
- event: payload.event,
- reason: "Empty notification payloads array",
- }
- );
- }
- }
- },
-});
\ No newline at end of file
diff --git a/packages/jobs/trigger/onboard.ts b/packages/jobs/trigger/onboard.ts
deleted file mode 100644
index 0da0604bea..0000000000
--- a/packages/jobs/trigger/onboard.ts
+++ /dev/null
@@ -1,333 +0,0 @@
-import { openai } from "@ai-sdk/openai";
-import { RESEND_DOMAIN } from "@carbon/auth";
-import { getCarbonServiceRole } from "@carbon/auth/client.server";
-import type { Database } from "@carbon/database";
-import { GetStartedEmail, WelcomeEmail } from "@carbon/documents/email";
-import { resend, sendEmail } from "@carbon/lib/resend.server";
-import { getSlackClient } from "@carbon/lib/slack.server";
-import { getTwentyClient } from "@carbon/lib/twenty.server";
-import { render } from "@react-email/components";
-import type { SupabaseClient } from "@supabase/supabase-js";
-import { task, wait } from "@trigger.dev/sdk";
-import { generateObject } from "ai";
-import { z } from "zod/v3";
-
-export const onboardTask = task({
- id: "onboard",
- run: async (payload: {
- type: "lead" | "customer";
- companyId: string;
- userId: string;
- plan?: string;
- }) => {
- const { type, companyId, userId, plan } = payload;
-
- const carbon = getCarbonServiceRole();
- const twenty = getTwentyClient();
- const slack = getSlackClient();
-
- const [company, user] = await Promise.all([
- carbon.from("company").select("*").eq("id", companyId).single(),
- carbon.from("user").select("*").eq("id", userId).single(),
- ]);
-
- if (company.error) {
- console.error("Could not find company", company.error);
- throw new Error(company.error.message);
- }
-
- if (user.error) {
- console.error("Could not find user", user.error);
- throw new Error(user.error.message);
- }
-
- switch (type) {
- case "lead":
- console.log(
- "Processing lead case for user:",
- userId,
- "company:",
- companyId
- );
-
- try {
- await resend.contacts.create({
- email: user.data.email,
- firstName: user.data.firstName,
- lastName: user.data.lastName,
- unsubscribed: false,
- audienceId: process.env.RESEND_AUDIENCE_ID!,
- });
- console.log(
- "Successfully created resend contact for:",
- user.data.email
- );
- } catch (error) {
- console.error("Error creating resend contact", error);
- }
-
- let type: "Warm" | "Cold" = "Warm";
- try {
- const { object } = await generateObject({
- model: openai("gpt-4o"),
- schema: z.object({
- type: z.enum(["Warm", "Cold"]).describe("The type of lead"),
- }),
- prompt: `
- The following is a description of a lead for an ERP system.
- Determine the quality of the lead based on the description.
- If the company seems like a real business, return "Warm".
- If it seems like someone is trying to keep their information private by providing a fake company name, return "Cold".
-
- Description:
- Company: ${company.data.name}
- City: ${company.data.city}
- State: ${company.data.stateProvince}
- Address: ${company.data.addressLine1} ${company.data.addressLine2}
- Country: ${company.data.countryCode}
- Website: ${company.data.website}
- Phone: ${company.data.phone}
- `,
- temperature: 0.2,
- });
- type = object.type;
- console.log("Generated type:", type);
- } catch (error) {
- console.error("Error generating type", error);
- }
-
- console.log("Attempting to send Slack message to #leads channel");
- try {
- const slackResult = await slack.sendMessage({
- channel: "#leads",
- text: "New lead 🎉",
- blocks: [
- {
- type: "section",
- text: {
- type: "mrkdwn",
- text:
- `*New Signup* ${type === "Warm" ? "🥁" : "❄️"}\n\n` +
- `*Contact Information*\n` +
- `• Name: ${user.data?.firstName} ${user.data?.lastName}\n` +
- `• Email: ${user.data?.email}\n` +
- `• Location: ${company.data.city}, ${company.data.stateProvince}\n\n` +
- `• Company: ${company.data.name}\n\n` +
- `• Type: ${type}\n\n`,
- },
- },
- ],
- });
- console.log("Successfully sent Slack message:", slackResult);
- } catch (error) {
- console.error("Error sending Slack message:", error);
- }
-
- if (process.env.TWENTY_API_KEY) {
- try {
- const twentyPersonId = await twenty.createPerson({
- name: {
- firstName: user.data.firstName,
- lastName: user.data.lastName,
- },
- emails: {
- primaryEmail: user.data.email,
- },
- customerStatus: ["PROSPECTIVE_CUSTOMER"],
- location: `${company.data.city}, ${company.data.stateProvince}`,
- });
-
- const updateResult = await carbon
- .from("user")
- .update({
- externalId: {
- twenty: twentyPersonId,
- },
- } as any)
- .eq("id", userId);
-
- console.log("User update result:", updateResult);
- if (updateResult.error) {
- console.error(
- "Error updating user external ID:",
- updateResult.error
- );
- } else {
- console.log("Successfully updated user external ID");
- }
-
- if (type === "Warm") {
- const twentyCompanyId = await twenty.createCompany({
- name: company.data.name,
- domainName: {
- primaryLinkLabel: removeProtocolFromWebsite(
- company.data.website ?? ""
- ),
- primaryLinkUrl: ensureProtocolFromWebsite(
- company.data.website ?? ""
- ),
- additionalLinks: [],
- },
- });
-
- const twentyOpportunityId = await twenty.createOpportunity({
- name: `${company.data.name} Opportunity`,
- stage: ["NEW"],
- companyId: twentyCompanyId,
- pointOfContactId: twentyPersonId,
- });
-
- const updateResult = await carbon
- .from("company")
- .update({
- externalId: {
- twenty: twentyOpportunityId,
- },
- } as any)
- .eq("id", companyId);
-
- console.log("Company update result:", updateResult);
- if (updateResult.error) {
- console.error(
- "Error updating company external ID:",
- updateResult.error
- );
- } else {
- console.log("Successfully updated company external ID");
- }
- }
- } catch (error) {
- console.error("Error adding lead to CRM:", error);
- }
- } else {
- console.log("TWENTY_API_KEY not found, skipping CRM integration");
- }
-
- break;
- case "customer":
- // @ts-expect-error
- const twentyId = user.data?.externalId?.twenty as string | undefined;
-
- try {
- slack.sendMessage({
- channel: "#sales",
- text: "New Customer 🔔",
- blocks: [
- {
- type: "section",
- text: {
- type: "mrkdwn",
- text:
- `*New Signup* 🔔\n\n` +
- `*Contact Information*\n` +
- `• Name: ${user.data?.firstName} ${user.data?.lastName}\n` +
- `• Email: ${user.data.email}\n` +
- `• Company: ${company.data?.name}\n\n` +
- `• Plan: $${plan}\n\n`,
- },
- },
- ],
- });
- } catch (error) {
- console.error("Error sending Slack message:", error);
- }
-
- if (twentyId) {
- try {
- await twenty.updatePerson(twentyId, {
- customerStatus: ["PILOT_FREE_TRIAL"],
- });
- } catch (error) {
- console.error("Error updating twenty customer status:", error);
- }
- }
-
- const from = `Brad from Carbon <${
- RESEND_DOMAIN === "carbon.ms"
- : `no-reply@${RESEND_DOMAIN}`
- }>`;
-
- const sendOnboardingEmail = await shouldSendOnboardingEmailsToUser(
- carbon,
- userId
- );
-
- await wait.for({ minutes: 5 });
-
- if (sendOnboardingEmail) {
- await sendEmail({
- from,
- to: user.data.email,
- subject: `carbon`,
- html: await render(WelcomeEmail()),
- });
- }
-
- await wait.for({ days: 3 });
-
- if (sendOnboardingEmail) {
- await sendEmail({
- from,
- to: user.data.email,
- subject: `Get the most out of Carbon`,
- html: await render(
- GetStartedEmail({
- firstName: user.data.firstName,
- academyUrl: "https://learn.carbon.ms",
- })
- ),
- });
- }
-
- await wait.for({ days: 30 });
-
- const planAfter30Days = await carbon
- .from("companyPlan")
- .select("*")
- .eq("id", companyId)
- .maybeSingle();
-
- let isPlanActiveAfter30Days =
- planAfter30Days?.data?.stripeSubscriptionStatus === "Active";
-
- if (isPlanActiveAfter30Days && twentyId) {
- await twenty.updatePerson(twentyId, {
- customerStatus: [
- isPlanActiveAfter30Days
- ? "CHURNED_CANCELED"
- : "EXISTING_CUSTOMER",
- ],
- });
- }
-
- break;
- }
- },
-});
-
-async function shouldSendOnboardingEmailsToUser(
- carbon: SupabaseClient<Database>,
- userId: string
-) {
- const userToCompany = await carbon
- .from("userToCompany")
- .select("*")
- .eq("userId", userId);
-
- if (userToCompany.error) {
- return true;
- }
-
- return userToCompany.data.length <= 1;
-}
-
-function removeProtocolFromWebsite(website: string) {
- if (!website) return undefined;
- return website.replace(/^https?:\/\//, "").replace(/^www\./, "");
-}
-
-function ensureProtocolFromWebsite(website: string) {
- if (!website) return undefined;
- return website.startsWith("http") ? website : `https://${website}`;
-}
diff --git a/packages/jobs/trigger/post-transaction.ts b/packages/jobs/trigger/post-transaction.ts
deleted file mode 100644
index daacd98588..0000000000
--- a/packages/jobs/trigger/post-transaction.ts
+++ /dev/null
@@ -1,138 +0,0 @@
-import { task } from "@trigger.dev/sdk";
-import { z } from "zod";
-
-import { getCarbonServiceRole } from "@carbon/auth/client.server";
-
-const serviceRole = getCarbonServiceRole();
-
-const postTransactionSchema = z.object({
- documentId: z.string(),
- type: z.enum(["receipt", "purchase-invoice", "shipment"]),
- userId: z.string(),
- companyId: z.string(),
-});
-
-export const postTransactionTask = task({
- id: "post-transactions",
- run: async (payload: z.infer<typeof postTransactionSchema>) => {
- console.info(
- `🔰 User admin update ${payload.type} for ${payload.documentId}`
- );
-
- let result: { success: boolean; message: string };
-
- switch (payload.type) {
- case "receipt":
- console.info(`📫 Posting receipt ${payload.documentId}`);
- console.info(payload);
- const postReceipt = await serviceRole.functions.invoke("post-receipt", {
- body: {
- receiptId: payload.documentId,
- userId: payload.userId,
- companyId: payload.companyId,
- },
- });
-
- result = {
- success: postReceipt.error === null,
- message: postReceipt.error?.message,
- };
-
- break;
- case "purchase-invoice":
- console.info(`📫 Posting purchase invoice ${payload.documentId}`);
- console.info(payload);
- const postPurchaseInvoice = await serviceRole.functions.invoke(
- "post-purchase-invoice",
- {
- body: {
- invoiceId: payload.documentId,
- userId: payload.userId,
- companyId: payload.companyId,
- },
- }
- );
-
- result = {
- success: postPurchaseInvoice.error === null,
- message: postPurchaseInvoice.error?.message,
- };
-
- if (result.success) {
- // Check if we should update prices on invoice post
- const companySettings = await serviceRole
- .from("companySettings")
- .select("purchasePriceUpdateTiming")
- .eq("id", payload.companyId)
- .single();
-
- if (
- !companySettings.data?.purchasePriceUpdateTiming ||
- companySettings.data.purchasePriceUpdateTiming ===
- "Purchase Invoice Post"
- ) {
- console.info(
- `💵 Updating pricing from invoice ${payload.documentId}`
- );
-
- const priceUpdate = await serviceRole.functions.invoke(
- "update-purchased-prices",
- {
- body: {
- invoiceId: payload.documentId,
- companyId: payload.companyId,
- source: "purchaseInvoice",
- updatePrices: true,
- updateLeadTimes: false,
- },
- }
- );
-
- result = {
- success: priceUpdate.error === null,
- message: priceUpdate.error?.message,
- };
- }
- }
-
- break;
- case "shipment":
- console.info(`📫 Posting shipment ${payload.documentId}`);
- console.info(payload);
-
- const postShipment = await serviceRole.functions.invoke(
- "post-shipment",
- {
- body: {
- shipmentId: payload.documentId,
- userId: payload.userId,
- companyId: payload.companyId,
- },
- }
- );
-
- result = {
- success: postShipment.error === null,
- message: postShipment.error?.message,
- };
-
- break;
- default:
- result = {
- success: false,
- message: `Invalid posting type: ${payload.type}`,
- };
- break;
- }
-
- if (result.success) {
- console.info(`✅ Success ${payload.documentId}`);
- } else {
- console.error(
- `❌ Admin action ${payload.type} failed for ${payload.documentId}: ${result.message}`
- );
- }
-
- return result;
- },
-});
diff --git a/packages/jobs/trigger/recalculate.ts b/packages/jobs/trigger/recalculate.ts
deleted file mode 100644
index dc67e05f0f..0000000000
--- a/packages/jobs/trigger/recalculate.ts
+++ /dev/null
@@ -1,109 +0,0 @@
-import { getCarbonServiceRole } from "@carbon/auth/client.server";
-import type { FunctionsResponse } from "@supabase/functions-js";
-import { FunctionRegion } from "@supabase/supabase-js";
-import { task } from "@trigger.dev/sdk";
-import { z } from "zod";
-
-const recalculateSchema = z.object({
- type: z.enum(["jobRequirements", "jobMakeMethodRequirements"]),
- id: z.string(),
- companyId: z.string(),
- userId: z.string(),
-});
-
-export const recalculateTask = task({
- id: "recalculate",
- run: async (payload: z.infer<typeof recalculateSchema>) => {
- console.info(`🔰 Type: ${payload.type}, id: ${payload.id}`);
-
- const serviceRole = getCarbonServiceRole();
- let result: { success: boolean; message: string };
- let calculateQuantities: FunctionsResponse<{ success: boolean }>;
-
- switch (payload.type) {
- case "jobRequirements":
- console.info(`📊 Recalculating job requirements for ${payload.id}`);
- calculateQuantities = await recalculateJobRequirements(serviceRole, {
- id: payload.id,
- companyId: payload.companyId,
- userId: payload.userId,
- });
-
- result = {
- success: !calculateQuantities.error,
- message: calculateQuantities.error?.message,
- };
- break;
- case "jobMakeMethodRequirements":
- console.info(
- `📊 Recalculating job make method requirements for ${payload.id}`
- );
- calculateQuantities = await recalculateJobMakeMethodRequirements(
- serviceRole,
- {
- id: payload.id,
- companyId: payload.companyId,
- userId: payload.userId,
- }
- );
-
- result = {
- success: !calculateQuantities.error,
- message: calculateQuantities.error?.message,
- };
- break;
- default:
- result = {
- success: false,
- message: `Unknown recalculation type: ${payload.type}`,
- };
- break;
- }
-
- if (result.success) {
- console.info(`✅ Success ${payload.id}`);
- } else {
- console.error(
- `❌ Recalculation ${payload.type} failed for ${payload.id}: ${result.message}`
- );
- }
-
- return result;
- },
-});
-
-async function recalculateJobRequirements(
- client: ReturnType<typeof getCarbonServiceRole>,
- params: {
- id: string;
- companyId: string;
- userId: string;
- }
-) {
- return client.functions.invoke("recalculate", {
- body: {
- type: "jobRequirements",
- ...params,
- },
- });
-}
-
-async function recalculateJobMakeMethodRequirements(
- client: ReturnType<typeof getCarbonServiceRole>,
- params: {
- id: string;
- companyId: string;
- userId: string;
- }
-) {
- return client.functions.invoke("schedule", {
- body: {
- mode: "initial",
- direction: "backward",
- jobId: params.id,
- companyId: params.companyId,
- userId: params.userId,
- },
- region: FunctionRegion.UsEast1,
- });
-}
diff --git a/packages/jobs/trigger/reschedule-job.ts b/packages/jobs/trigger/reschedule-job.ts
deleted file mode 100644
index 4dbf1b1969..0000000000
--- a/packages/jobs/trigger/reschedule-job.ts
+++ /dev/null
@@ -1,69 +0,0 @@
-import { getCarbonServiceRole } from "@carbon/auth/client.server";
-import { task } from "@trigger.dev/sdk";
-import { z } from "zod";
-
-const serviceRole = getCarbonServiceRole();
-
-const scheduleJobSchema = z.object({
- jobId: z.string(),
- companyId: z.string(),
- userId: z.string(),
- mode: z.enum(["initial", "reschedule"]).default("reschedule"),
- direction: z.enum(["backward", "forward"]).default("backward"),
-});
-
-/**
- * Unified scheduling task that handles both initial scheduling and rescheduling.
- * Uses the new unified scheduling engine endpoint.
- */
-export const scheduleJob = task({
- id: "schedule-job",
- queue: {
- name: "scheduling",
- concurrencyLimit: 5,
- },
- run: async (payload: z.infer<typeof scheduleJobSchema>) => {
- const { jobId, companyId, userId, mode, direction } = payload;
- console.info(
- `🔰 ${mode === "initial" ? "Scheduling" : "Rescheduling"} job ${jobId}`
- );
-
- try {
- const { data, error } = await serviceRole.functions.invoke("schedule", {
- body: {
- jobId,
- companyId,
- userId,
- mode,
- direction,
- },
- });
-
- if (error) {
- throw new Error(error.message || `Failed to ${mode} schedule job`);
- }
-
- console.info(
- `✅ ${mode === "initial" ? "Scheduled" : "Rescheduled"}: ` +
- `${data.operationsScheduled} ops, ` +
- `${data.workCentersAffected.length} WCs, ` +
- `${data.conflictsDetected} conflicts`
- );
-
- return {
- success: true,
- operationsScheduled: data.operationsScheduled,
- conflictsDetected: data.conflictsDetected,
- workCentersAffected: data.workCentersAffected,
- assemblyDepth: data.assemblyDepth,
- };
- } catch (error) {
- console.error(
- `❌ ${mode === "initial" ? "Scheduling" : "Rescheduling"} failed: ${
- error instanceof Error ? error.message : String(error)
- }`
- );
- throw error; // Let Trigger.dev handle retries
- }
- },
-});
diff --git a/packages/jobs/trigger/send-email-resend.ts b/packages/jobs/trigger/send-email-resend.ts
deleted file mode 100644
index b0efef14f5..0000000000
--- a/packages/jobs/trigger/send-email-resend.ts
+++ /dev/null
@@ -1,64 +0,0 @@
-import { getCarbonServiceRole } from "@carbon/auth/client.server";
-import { Resend as ResendConfig } from "@carbon/ee";
-import { task } from "@trigger.dev/sdk";
-import { Resend } from "resend";
-
-const serviceRole = getCarbonServiceRole();
-
-export const sendEmailResendTask = task({
- id: "send-email-resend",
- run: async (payload: {
- to: string | string[];
- cc?: string | string[];
- from?: string;
- subject: string;
- text: string;
- html: string;
- attachments?: Array<{ filename: string; content: any }>;
- companyId: string;
- }) => {
- const [company, integration] = await Promise.all([
- serviceRole
- .from("company")
- .select("name")
- .eq("id", payload.companyId)
- .single(),
- serviceRole
- .from("companyIntegration")
- .select("active, metadata")
- .eq("companyId", payload.companyId)
- .eq("id", "resend")
- .maybeSingle(),
- ]);
-
- const integrationMetadata = ResendConfig.schema.safeParse(
- integration?.data?.metadata,
- );
-
- console.info(integrationMetadata.data?.fromEmail ?? "No email found");
-
- if (!integrationMetadata.success || integration?.data?.active !== true) {
- return { success: false, message: "🔴 Invalid or inactive integration" };
- }
-
- const resend = new Resend(integrationMetadata.data.apiKey);
-
- const email = {
- from: `${company.data?.name} <${
- integrationMetadata.data.fromEmail ?? "[email protected]"
- }>`,
- to: payload.to,
- cc: payload.cc,
- reply_to: payload.from,
- subject: payload.subject,
- html: payload.html,
- text: payload.text,
- attachments: payload.attachments,
- };
-
- console.info(`📬 Resend Email Job`);
- const result = await resend.emails.send(email);
-
- return { success: true, result };
- },
-});
diff --git a/packages/jobs/trigger/timecard-auto-close.ts b/packages/jobs/trigger/timecard-auto-close.ts
deleted file mode 100644
index b070be1071..0000000000
--- a/packages/jobs/trigger/timecard-auto-close.ts
+++ /dev/null
@@ -1,138 +0,0 @@
-import { getCarbonServiceRole } from "@carbon/auth/client.server";
-import { schedules } from "@trigger.dev/sdk";
-
-const serviceRole = getCarbonServiceRole();
-
-export const timeCardAutoClose = schedules.task({
- id: "timecard-auto-close",
- // Run every Sunday at 11pm UTC (after weekly task at 9pm)
- cron: "0 23 * * 0",
- run: async () => {
- console.log(
- `🕐 Starting timecard auto-close: ${new Date().toISOString()}`
- );
-
- try {
- // 1. Get all companies with time clock enabled
- const { data: companies, error: companiesError } = await serviceRole
- .from("companySettings")
- .select("id")
- .eq("timeCardEnabled", true);
-
- if (companiesError) {
- console.error(
- `Failed to fetch companies: ${companiesError.message}`
- );
- return;
- }
-
- console.log(
- `Found ${companies?.length || 0} companies with time clock enabled`
- );
-
- let totalClosed = 0;
-
- for (const company of companies ?? []) {
- // 2. Get all open time clock entries for this company
- const { data: openEntries, error: entriesError } = await serviceRole
- .from("timeCardEntry")
- .select("id, employeeId, clockIn")
- .eq("companyId", company.id)
- .is("clockOut", null);
-
- if (entriesError) {
- console.error(
- `Failed to fetch open entries for company ${company.id}: ${entriesError.message}`
- );
- continue;
- }
-
- if (!openEntries || openEntries.length === 0) continue;
-
- console.log(
- `Company ${company.id}: ${openEntries.length} open entries`
- );
-
- for (const entry of openEntries) {
- // 3. Get the employee's assigned shift
- const { data: employeeJob } = await serviceRole
- .from("employeeJob")
- .select("shiftId")
- .eq("id", entry.employeeId)
- .eq("companyId", company.id)
- .single();
-
- let clockOut: Date;
- let shiftId: string | null = null;
-
- if (employeeJob?.shiftId) {
- const { data: shift } = await serviceRole
- .from("shift")
- .select("startTime, endTime")
- .eq("id", employeeJob.shiftId)
- .single();
-
- if (shift) {
- // Calculate shift duration
- const startParts = shift.startTime.split(":").map(Number);
- const endParts = shift.endTime.split(":").map(Number);
- let durationMinutes =
- (endParts[0] ?? 0) * 60 +
- (endParts[1] ?? 0) -
- ((startParts[0] ?? 0) * 60 + (startParts[1] ?? 0));
- // Handle overnight shifts
- if (durationMinutes <= 0) durationMinutes += 24 * 60;
-
- clockOut = new Date(
- new Date(entry.clockIn).getTime() + durationMinutes * 60000
- );
- shiftId = employeeJob.shiftId;
- } else {
- // Shift not found, fall back to 8 hours
- clockOut = new Date(
- new Date(entry.clockIn).getTime() + 8 * 3600000
- );
- }
- } else {
- // No shift assigned, fall back to 8 hours
- clockOut = new Date(
- new Date(entry.clockIn).getTime() + 8 * 3600000
- );
- }
-
- // 4. Update the entry
- const { error: updateError } = await serviceRole
- .from("timeCardEntry")
- .update({
- clockOut: clockOut.toISOString(),
- autoCloseShiftId: shiftId,
- updatedAt: new Date().toISOString(),
- note: "Auto-closed by system (Sunday weekly close)"
- })
- .eq("id", entry.id);
-
- if (updateError) {
- console.error(
- `Failed to auto-close entry ${entry.id}: ${updateError.message}`
- );
- } else {
- totalClosed++;
- console.log(
- `Auto-closed entry ${entry.id} for employee ${entry.employeeId}`
- );
- }
- }
- }
-
- console.log(
- `🕐 Timecard auto-close completed: ${totalClosed} entries closed`
- );
- } catch (err) {
- console.error(
- `Unexpected error in timecard auto-close: ${
- err instanceof Error ? err.message : String(err)
- }`
- );
- }
- }
-});
diff --git a/packages/jobs/trigger/update-exchange-rates.ts b/packages/jobs/trigger/update-exchange-rates.ts
deleted file mode 100644
index 76a4bb281b..0000000000
--- a/packages/jobs/trigger/update-exchange-rates.ts
+++ /dev/null
@@ -1,240 +0,0 @@
-import { EXCHANGE_RATES_API_KEY } from "@carbon/auth";
-import { getCarbonServiceRole } from "@carbon/auth/client.server";
-import type { Rates } from "@carbon/ee/exchange-rates.server";
-import { getExchangeRatesClient } from "@carbon/ee/exchange-rates.server";
-import { schedules } from "@trigger.dev/sdk";
-
-type CurrencyCode =
- | "EUR"
- | "USD"
- | "GBP"
- | "JPY"
- | "CHF"
- | "CAD"
- | "AUD"
- | "CNY"
- | "INR"
- | "MXN"
- | "BRL"
- | "RUB"
- | "ZAR"
- | "TRY"
- | "SEK"
- | "NOK"
- | "DKK"
- | "SGD"
- | "HKD"
- | "TWD"
- | "THB"
- | "MYR"
- | "PHP"
- | "IDR"
- | "VND"
- | "KRW"
- | "TND"
- | "MAD"
- | "AED"
- | "SAR"
- | "QAR"
- | "KWD"
- | "BHD"
- | "OMR"
- | "JOD"
- | "LYD"
- | "EGP"
- | "ILS"
- | "KZT"
- | "KGS"
- | "UZS"
- | "TJS"
- | "AZN"
- | "TMT"
- | "UYU"
- | "BYN"
- | "KZT"
- | "KGS"
- | "UZS"
- | "TJS"
- | "AZN"
- | "TMT"
- | "UYU"
- | "BYN"
- | "KZT"
- | "KGS"
- | "UZS"
- | "TJS"
- | "AZN"
- | "TMT"
- | "UYU"
- | "BYN";
-
-const serviceRole = getCarbonServiceRole();
-
-export const updateExchangeRates = schedules.task({
- id: "update-exchange-rates",
- cron: "0 0 * * *",
- run: async () => {
- console.log(`💵 Exchange Rates Task Started: ${new Date().toISOString()}`);
- const integrations = await serviceRole
- .from("companyIntegration")
- .select("active, companyId")
- .eq("id", "exchange-rates-v1")
- .eq("active", true);
-
- if (integrations.error) {
- console.error(
- `Error fetching integrations: ${JSON.stringify(integrations.error)}`
- );
- return;
- }
-
- if (integrations.data?.length === 0) {
- console.log("No active exchange rate integrations found. Exiting task.");
- return;
- }
-
- console.log(`Found ${integrations.data.length} active integrations`);
-
- // Fetch the exchange rates for the base currency of EUR
- const exchangeRatesClient = getExchangeRatesClient(EXCHANGE_RATES_API_KEY);
-
- if (!exchangeRatesClient) {
- console.error(
- "Exchange rates client is undefined. Check API key configuration."
- );
- return;
- }
-
- let ratesEUR: Rates;
- try {
- ratesEUR = await exchangeRatesClient.getExchangeRates();
- if (!ratesEUR)
- throw new Error("No rates returned from exchange rates API");
- console.log(
- `Successfully fetched exchange rates with base currency of EUR for ${
- Object.keys(ratesEUR).length
- } currencies`
- );
- } catch (error) {
- console.error(
- `Error fetching exchange rates: ${
- error instanceof Error ? error.message : String(error)
- }`
- );
- return;
- }
-
- // Cache the rates for each currency to avoid unnecessary computations
- let cachedRates: { [key in CurrencyCode]?: Rates } = {
- EUR: ratesEUR,
- };
-
- for (const integration of integrations.data) {
- console.log(
- `Processing integration for company ID: ${integration.companyId}`
- );
-
- const company = await serviceRole
- .from("company")
- .select("*")
- .eq("id", integration.companyId)
- .single();
-
- if (company.error) {
- console.error(
- `Error fetching company ${integration.companyId}: ${JSON.stringify(
- company.error
- )}`
- );
- continue;
- }
-
- const baseCurrencyCode = company.data.baseCurrencyCode as CurrencyCode;
- let rates: Rates | undefined;
- rates = cachedRates[baseCurrencyCode];
- // Check if the rates for this base currency are cached, and if not compute them
- if (rates) {
- console.log(`Using cached rates for ${baseCurrencyCode}`);
- } else {
- console.log(`Computing rates for ${baseCurrencyCode}`);
- rates = await exchangeRatesClient.convertExchangeRates(
- baseCurrencyCode,
- ratesEUR
- );
- cachedRates[baseCurrencyCode] = rates;
- }
-
- const updatedAt = new Date().toISOString();
-
- try {
- const { data, error } = await serviceRole
- .from("currency")
- .select("*")
- .eq("companyId", integration.companyId);
-
- if (error) {
- console.error(
- `Error fetching currencies for company ${
- integration.companyId
- }: ${JSON.stringify(error)}`
- );
- continue;
- }
-
- if (!data || data.length === 0) {
- console.log(
- `No currencies found for company ${integration.companyId}`
- );
- continue;
- }
-
- const updates = data
- .map((currency) => ({
- ...currency,
- exchangeRate: Number(
- rates[currency.code as CurrencyCode]?.toFixed(
- currency.decimalPlaces
- )
- ),
- updatedAt,
- }))
- .filter((currency) => currency.exchangeRate);
-
- if (updates.length === 0) {
- console.log(
- `No currency updates needed for company ${integration.companyId}`
- );
- continue;
- }
-
- console.log(
- `Updating ${updates.length} currencies for company ${integration.companyId}`
- );
- const { error: upsertError } = await serviceRole
- .from("currency")
- .upsert(updates);
- if (upsertError) {
- console.error(
- `Error updating currencies for company ${
- integration.companyId
- }: ${JSON.stringify(upsertError)}`
- );
- } else {
- console.log(
- `Successfully updated currencies for company ${integration.companyId}`
- );
- }
- } catch (err) {
- console.error(
- `Unexpected error processing company ${integration.companyId}: ${
- err instanceof Error ? err.message : String(err)
- }`
- );
- }
- }
-
- console.log(
- `💵 Exchange Rates Task Completed: ${new Date().toISOString()}`
- );
- },
-});
diff --git a/packages/jobs/trigger/user-admin.ts b/packages/jobs/trigger/user-admin.ts
deleted file mode 100644
index a69e956d4d..0000000000
--- a/packages/jobs/trigger/user-admin.ts
+++ /dev/null
@@ -1,125 +0,0 @@
-import { task } from "@trigger.dev/sdk";
-import { z } from "zod";
-
-import type { Result } from "@carbon/auth";
-import { getAppUrl, RESEND_DOMAIN } from "@carbon/auth";
-import { getCarbonServiceRole } from "@carbon/auth/client.server";
-import { deactivateUser } from "@carbon/auth/users.server";
-import { InviteEmail } from "@carbon/documents/email";
-import { sendEmail } from "@carbon/lib/resend.server";
-import { render } from "@react-email/components";
-import { nanoid } from "nanoid";
-
-const serviceRole = getCarbonServiceRole();
-export const userAdminSchema = z.discriminatedUnion("type", [
- z.object({
- id: z.string(),
- type: z.literal("deactivate"),
- companyId: z.string(),
- }),
- z.object({
- id: z.string(),
- type: z.literal("resend"),
- location: z.string(),
- ip: z.string(),
- companyId: z.string(),
- }),
-]);
-
-export const userAdminTask = task({
- id: "user-admin",
- run: async (payload: z.infer<typeof userAdminSchema>) => {
- console.log(`🔰 User admin update ${payload.type} for ${payload.id}`);
-
- let result: Result;
-
- switch (payload.type) {
- case "deactivate":
- console.log(`🚭 Deactivating ${payload.id}`);
- // deactivateUser() handles Stripe subscription quantity update internally
- result = await deactivateUser(
- serviceRole,
- payload.id,
- payload.companyId
- );
- break;
- case "resend":
- const { id: userId, companyId, location, ip } = payload;
- console.log(`🔄 Resending invite for ${payload.id}`);
- const [company, user] = await Promise.all([
- serviceRole
- .from("company")
- .select("name")
- .eq("id", companyId)
- .single(),
- serviceRole
- .from("user")
- .select("email, fullName")
- .eq("id", userId)
- .single(),
- ]);
-
- if (!company.data || !user.data) {
- throw new Error("Failed to load company or user");
- }
-
- const invite = await serviceRole
- .from("invite")
- .select("code, createdBy")
- .eq("email", user.data.email)
- .eq("companyId", companyId)
- .is("acceptedAt", null)
- .single();
-
- if (invite.error || !invite.data) {
- return {
- success: false,
- message: "Failed to load existing invite",
- };
- }
-
- const inviter = await serviceRole
- .from("user")
- .select("email, fullName")
- .eq("id", invite.data.createdBy)
- .single();
-
- await sendEmail({
- from: `Carbon <no-reply@${RESEND_DOMAIN}>`,
- to: user.data.email,
- subject: `You have been invited to join ${company.data?.name} on Carbon`,
- headers: {
- "X-Entity-Ref-ID": nanoid(),
- },
- html: await render(
- InviteEmail({
- invitedByEmail: inviter.data?.email ?? user.data.email,
- invitedByName: inviter.data?.fullName ?? "",
- email: user.data.email,
- name: user.data.fullName ?? "",
- companyName: company.data.name,
- inviteLink: `${getAppUrl()}/invite/${invite.data.code}`,
- ip,
- location,
- })
- ),
- });
-
- result = {
- success: true,
- message: `Successfully resent invite for ${payload.id}`,
- };
- break;
- }
-
- if (result.success) {
- console.log(`✅ Success ${payload.id}`);
- } else {
- console.error(
- `❌ Admin action ${payload.type} failed for ${payload.id}: ${result.message}`
- );
- }
-
- return result;
- },
-});
diff --git a/packages/jobs/trigger/weekly.ts b/packages/jobs/trigger/weekly.ts
deleted file mode 100644
index 28f67c944f..0000000000
--- a/packages/jobs/trigger/weekly.ts
+++ /dev/null
@@ -1,231 +0,0 @@
-import { getCarbonServiceRole } from "@carbon/auth/client.server";
-import { NotificationEvent } from "@carbon/notifications";
-import { schedules } from "@trigger.dev/sdk";
-import { Edition } from "../../utils/src/types.ts";
-import { notifyTask } from "./notify.ts";
-
-const serviceRole = getCarbonServiceRole();
-
-export const weekly = schedules.task({
- id: "weekly",
- // Run every Sunday at 9pm
- cron: "0 21 * * 0",
- run: async () => {
- console.log(`📅 Starting weekly tasks: ${new Date().toISOString()}`);
-
- try {
- if (process.env.CARBON_EDITION === Edition.Cloud) {
- const bypassUrl = `${process.env.VERCEL_URL}/api/settings/bypass`;
- const bypassResponse = await fetch(bypassUrl);
- if (!bypassResponse.ok) {
- console.error(
- `Failed to fetch bypass list: ${bypassResponse.statusText}`
- );
- return;
- }
- const bypassData = (await bypassResponse.json()) as {
- bypassList?: string[];
- };
- const bypassList = bypassData.bypassList ?? [];
-
- console.log(`Bypass list: ${bypassList}`);
-
- // Get all companies
- const { data: companies, error: companiesError } = await serviceRole
- .from("company")
- .select("id, name, createdAt");
-
- if (companiesError) {
- console.error(`Failed to fetch companies: ${companiesError.message}`);
- return;
- }
-
- console.log(`Found ${companies?.length || 0} companies`);
-
- // Get all company plans
- const { data: companyPlans, error: plansError } = await serviceRole
- .from("companyPlan")
- .select("id, stripeSubscriptionStatus");
-
- if (plansError) {
- console.error(`Failed to fetch company plans: ${plansError.message}`);
- return;
- }
-
- // Create a map of company plans for quick lookup
- const planMap = new Map(
- companyPlans?.map((plan) => [
- plan.id,
- plan.stripeSubscriptionStatus,
- ]) || []
- );
-
- // Filter companies to delete
- const oneWeekAgo = new Date();
- oneWeekAgo.setDate(oneWeekAgo.getDate() - 7);
-
- const companiesToDelete =
- companies?.filter((company) => {
- if (planMap.get(company.id) === "Canceled") {
- return true;
- }
-
- if (bypassList.includes(company.id)) {
- return false;
- }
-
- if (planMap.get(company.id)) {
- return false;
- }
-
- // Keep companies created in the last week
- const createdAt = new Date(company.createdAt);
- if (createdAt > oneWeekAgo) {
- return false;
- }
-
- // Delete this company
- return true;
- }) || [];
-
- console.log(`Companies to delete: ${companiesToDelete.length}`);
-
-
-
- const { error: deletedCompaniesError } = await serviceRole
- .from("company")
- .delete()
- .in(
- "id",
- companiesToDelete.map((company) => company.id)
- );
-
- if (deletedCompaniesError) {
- console.error(
- `Failed to delete companies: ${deletedCompaniesError.message}`
- );
- return;
- } else {
- console.log(`Deleted ${companiesToDelete.length} companies`);
- for (const company of companiesToDelete) {
- console.log(`Deleted company ${company.name}`);
- }
- }
-
- // Drop search index tables for companies being deleted
- for (const company of companiesToDelete) {
- const { error: dropSearchError } = await serviceRole.rpc(
- "drop_company_search_index",
- { p_company_id: company.id }
- );
- if (dropSearchError) {
- console.error(
- `Failed to drop search index for company ${company.name}: ${dropSearchError.message}`
- );
- } else {
- console.log(`Dropped search index for company ${company.name}`);
- }
- }
- }
-
- // Notify employees with outstanding trainings (Pending or Overdue)
- console.log(`📚 Checking for outstanding training assignments...`);
-
- // Get all companies with training assignments
- const { data: companiesWithTrainings, error: companiesError } =
- await serviceRole
- .from("trainingAssignment")
- .select("companyId")
- .limit(1000);
-
- if (companiesError) {
- console.error(
- `Failed to fetch companies with trainings: ${companiesError.message}`
- );
- } else {
- const uniqueCompanyIds = [
- ...new Set(companiesWithTrainings?.map((c) => c.companyId) ?? []),
- ];
-
- console.log(
- `Found ${uniqueCompanyIds.length} companies with training assignments`
- );
-
- let totalNotifications = 0;
-
- for (const companyId of uniqueCompanyIds) {
- const { data: trainingStatus, error: trainingsError } =
- await serviceRole.rpc("get_training_assignment_status", {
- p_company_id: companyId,
- });
-
- if (trainingsError) {
- console.error(
- `Failed to fetch trainings for company ${companyId}: ${trainingsError.message}`
- );
- continue;
- }
-
- // Filter to pending/overdue and dedupe by employee+assignment
- const outstandingTrainings = (trainingStatus ?? []).filter(
- (t) => t.status === "Pending" || t.status === "Overdue"
- );
-
- // Group by trainingAssignmentId to send one notification per assignment per employee
- const assignmentsByEmployee = new Map<
- string,
- {
- trainingAssignmentId: string;
- employeeId: string;
- companyId: string;
- trainingName: string;
- status: string;
- }
- >();
-
- for (const training of outstandingTrainings) {
- const key = `${training.companyId}:${training.employeeId}:${training.trainingAssignmentId}`;
- if (!assignmentsByEmployee.has(key)) {
- assignmentsByEmployee.set(key, training);
- }
- }
-
- // Send notifications for each unique employee-assignment combination
- for (const [, assignment] of assignmentsByEmployee) {
- try {
- await notifyTask.triggerAndWait({
- companyId: assignment.companyId,
- documentId: assignment.trainingAssignmentId,
- event: NotificationEvent.TrainingAssignment,
- recipient: {
- type: "user",
- userId: assignment.employeeId,
- },
- });
- console.log(
- `Sent reminder for training "${assignment.trainingName}" to employee ${assignment.employeeId}`
- );
- totalNotifications++;
- } catch (err) {
- console.error(
- `Failed to send training reminder: ${
- err instanceof Error ? err.message : String(err)
- }`
- );
- }
- }
- }
-
- console.log(`Sent ${totalNotifications} training reminder notifications`);
- }
-
- console.log(`📅 Weekly tasks completed: ${new Date().toISOString()}`);
- } catch (error) {
- console.error(
- `Unexpected error in weekly tasks: ${
- error instanceof Error ? error.message : String(error)
- }`
- );
- }
- },
-});
diff --git a/packages/jobs/tsconfig.json b/packages/jobs/tsconfig.json
index 338057a298..525ff49486 100644
--- a/packages/jobs/tsconfig.json
+++ b/packages/jobs/tsconfig.json
@@ -1,16 +1,11 @@
{
"compilerOptions": {
"outDir": "./dist",
- "rootDir": "./trigger",
"sourceMap": true,
"allowImportingTsExtensions": true,
- "module": "ESNext",
- "moduleResolution": "Bundler",
- "jsx": "react-jsx",
- "noEmit": true,
- "noUncheckedIndexedAccess": false
+ "noEmit": true
},
"exclude": ["node_modules"],
"extends": "@carbon/config/tsconfig/base.json",
- "include": ["trigger"]
+ "include": ["src"]
}
diff --git a/packages/lib/package.json b/packages/lib/package.json
index 71b7e04e09..565f604aaf 100644
--- a/packages/lib/package.json
+++ b/packages/lib/package.json
@@ -5,11 +5,6 @@
"@carbon/database": "*",
"@carbon/kv": "*",
"@supabase/supabase-js": "2.80.0",
- "@trigger.dev/sdk": "4.0.6",
- "cookie": "1.1.1",
- "dompurify": "3.3.3",
- "nanoid": "5.1.7",
- "react-pdf": "10.4.1",
"resend": "^3.1.0",
"sst": "4.6.9",
"supabase": "2.84.5",
diff --git a/packages/react/src/ModelViewer.tsx b/packages/react/src/ModelViewer.tsx
index 0bc5f61974..d03a231de3 100644
--- a/packages/react/src/ModelViewer.tsx
+++ b/packages/react/src/ModelViewer.tsx
@@ -1,7 +1,7 @@
import * as OV from "online-3d-viewer";
import { useEffect, useMemo, useRef, useState } from "react";
import { useLocale } from "react-aria-components";
-// @ts-expect-error -- three has no declaration file in this context
+// @ts-ignore -- three has no declaration file in this context
import * as THREE from "three";
import { useMount } from "./hooks";
import { IconButton } from "./IconButton";
diff --git a/packages/stripe/package.json b/packages/stripe/package.json
index 1f360bbcd7..632e2deed5 100644
--- a/packages/stripe/package.json
+++ b/packages/stripe/package.json
@@ -7,14 +7,7 @@
"@carbon/kv": "*",
"@carbon/lib": "*",
"@supabase/supabase-js": "2.80.0",
- "@trigger.dev/sdk": "4.0.6",
- "cookie": "1.1.1",
- "dompurify": "3.3.3",
- "nanoid": "5.1.7",
- "react-pdf": "10.4.1",
- "sst": "4.6.9",
- "stripe": "^18.3.0",
- "supabase": "2.84.5"
+ "stripe": "^18.3.0"
},
"type": "module",
"devDependencies": {
diff --git a/packages/stripe/src/stripe.server.ts b/packages/stripe/src/stripe.server.ts
index 311230a5a4..afaf93c01d 100644
--- a/packages/stripe/src/stripe.server.ts
+++ b/packages/stripe/src/stripe.server.ts
@@ -7,10 +7,10 @@ import {
} from "@carbon/auth";
import { getCarbonServiceRole } from "@carbon/auth/client.server";
import type { Database } from "@carbon/database";
+import { trigger } from "@carbon/jobs";
import { redis } from "@carbon/kv";
import { Edition, Plan } from "@carbon/utils";
import type { SupabaseClient } from "@supabase/supabase-js";
-import { tasks } from "@trigger.dev/sdk";
import { Stripe } from "stripe";
import { z } from "zod";
@@ -473,7 +473,7 @@ async function sendNewCustomerNotification(
);
if (CarbonEdition === Edition.Cloud) {
- tasks.trigger("onboard", {
+ trigger("onboard", {
type: "customer",
companyId,
userId,
diff --git a/scripts/setup-env-files.ts b/scripts/setup-env-files.ts
index bb5e026553..cc867d3832 100644
--- a/scripts/setup-env-files.ts
+++ b/scripts/setup-env-files.ts
@@ -1,4 +1,4 @@
-import { existsSync, symlinkSync, unlinkSync } from "fs";
+import { copyFileSync, existsSync, symlinkSync, unlinkSync } from "fs";
import { join } from "path";
const ROOT_ENV_PATH = join(process.cwd(), ".env");
@@ -45,4 +45,10 @@ if (existsSync(PACKAGES_DIR)) {
});
}
+// Copy root .env into supabase/functions/.env so edge functions get all env vars
+// Must be a copy (not symlink) because edge functions run inside Docker
+const supabaseFunctionsEnv = join(PACKAGES_DIR, "database", "supabase", "functions", ".env");
+copyFileSync(ROOT_ENV_PATH, supabaseFunctionsEnv);
+console.log(`Copied .env to ${supabaseFunctionsEnv}`);
+
console.log("Environment file setup complete!");
diff --git a/sst.config.ts b/sst.config.ts
index 4b36514c44..1617af9b60 100644
--- a/sst.config.ts
+++ b/sst.config.ts
@@ -88,9 +88,8 @@ export default $config({
SUPABASE_DB_URL: process.env.SUPABASE_DB_URL,
SUPABASE_SERVICE_ROLE_KEY: process.env.SUPABASE_SERVICE_ROLE_KEY,
SUPABASE_URL: process.env.SUPABASE_URL,
- TRIGGER_API_URL: process.env.TRIGGER_API_URL,
- TRIGGER_PROJECT_ID: process.env.TRIGGER_PROJECT_ID,
- TRIGGER_SECRET_KEY: process.env.TRIGGER_SECRET_KEY,
+ INNGEST_SIGNING_KEY: process.env.INNGEST_SIGNING_KEY,
+ INNGEST_EVENT_KEY: process.env.INNGEST_EVENT_KEY,
REDIS_URL: process.env.REDIS_URL,
VERCEL_ENV: "production",
VERCEL_URL: process.env.URL_ERP ?? "itar.carbon.ms",
@@ -169,9 +168,8 @@ export default $config({
SUPABASE_DB_URL: process.env.SUPABASE_DB_URL,
SUPABASE_SERVICE_ROLE_KEY: process.env.SUPABASE_SERVICE_ROLE_KEY,
SUPABASE_URL: process.env.SUPABASE_URL,
- TRIGGER_API_URL: process.env.TRIGGER_API_URL,
- TRIGGER_PROJECT_ID: process.env.TRIGGER_PROJECT_ID,
- TRIGGER_SECRET_KEY: process.env.TRIGGER_SECRET_KEY,
+ INNGEST_SIGNING_KEY: process.env.INNGEST_SIGNING_KEY,
+ INNGEST_EVENT_KEY: process.env.INNGEST_EVENT_KEY,
REDIS_URL: process.env.REDIS_URL,
VERCEL_ENV: "production",
VERCEL_URL: process.env.URL_MES ?? "mes.itar.carbon.ms",