# ORM Client
## Setup
```typescript
import { createClient } from './orm';
const db = createClient({
endpoint: 'https://api.example.com/graphql',
headers: { Authorization: 'Bearer ' },
});
```
## Models
| Model | Operations |
|-------|------------|
| `agentModule` | findMany, findOne, create, update, delete |
| `apiSurfaceModule` | findMany, findOne, create, update, delete |
| `appModule` | findMany, findOne, create, update, delete |
| `billingModule` | findMany, findOne, create, update, delete |
| `billingProviderModule` | findMany, findOne, create, update, delete |
| `blueprint` | findMany, findOne, create, update, delete |
| `blueprintConstruction` | findMany, findOne, create, update, delete |
| `blueprintTemplate` | findMany, findOne, create, update, delete |
| `capabilitiesModule` | findMany, findOne, create, update, delete |
| `catalogModule` | findMany, findOne, create, update, delete |
| `clusterModule` | findMany, findOne, create, update, delete |
| `computeLogModule` | findMany, findOne, create, update, delete |
| `connectedAccountsModule` | findMany, findOne, create, update, delete |
| `contentPresetModule` | findMany, findOne, create, update, delete |
| `cryptoAddressesModule` | findMany, findOne, create, update, delete |
| `cryptoAuthModule` | findMany, findOne, create, update, delete |
| `dataCapabilitiesField` | findMany, findOne, create, update, delete |
| `databaseProvisionModule` | findMany, findOne, create, update, delete |
| `databaseSettingsModule` | findMany, findOne, create, update, delete |
| `dbPoolConfig` | findMany, findOne, create, update, delete |
| `dbPool` | findMany, findOne, create, update, delete |
| `dbPresetModule` | findMany, findOne, create, update, delete |
| `dbUsageModule` | findMany, findOne, create, update, delete |
| `defaultIdsModule` | findMany, findOne, create, update, delete |
| `denormalizedTableField` | findMany, findOne, create, update, delete |
| `devicesModule` | findMany, findOne, create, update, delete |
| `domainModule` | findMany, findOne, create, update, delete |
| `emailSenderModule` | findMany, findOne, create, update, delete |
| `emailsModule` | findMany, findOne, create, update, delete |
| `entityTypeProvision` | findMany, findOne, create, update, delete |
| `eventsModule` | findMany, findOne, create, update, delete |
| `fileRefField` | findMany, findOne, create, update, delete |
| `functionDeploymentModule` | findMany, findOne, create, update, delete |
| `functionInvocationModule` | findMany, findOne, create, update, delete |
| `functionModule` | findMany, findOne, create, update, delete |
| `graphExecutionModule` | findMany, findOne, create, update, delete |
| `graphModule` | findMany, findOne, create, update, delete |
| `hierarchyModule` | findMany, findOne, create, update, delete |
| `i18NModule` | findMany, findOne, create, update, delete |
| `identityProvidersModule` | findMany, findOne, create, update, delete |
| `imageModule` | findMany, findOne, create, update, delete |
| `inferenceLogModule` | findMany, findOne, create, update, delete |
| `infraConfigModule` | findMany, findOne, create, update, delete |
| `infraSecretsModule` | findMany, findOne, create, update, delete |
| `integrationProvidersModule` | findMany, findOne, create, update, delete |
| `internalConfigModule` | findMany, findOne, create, update, delete |
| `internalSecretsModule` | findMany, findOne, create, update, delete |
| `invitesModule` | findMany, findOne, create, update, delete |
| `k8sAdmissionModule` | findMany, findOne, create, update, delete |
| `limitsModule` | findMany, findOne, create, update, delete |
| `machineModule` | findMany, findOne, create, update, delete |
| `membershipTypesModule` | findMany, findOne, create, update, delete |
| `membershipsModule` | findMany, findOne, create, update, delete |
| `merkleStoreModule` | findMany, findOne, create, update, delete |
| `namespaceModule` | findMany, findOne, create, update, delete |
| `notificationsModule` | findMany, findOne, create, update, delete |
| `oauthRequestsModule` | findMany, findOne, create, update, delete |
| `pagesModule` | findMany, findOne, create, update, delete |
| `phoneNumbersModule` | findMany, findOne, create, update, delete |
| `plansModule` | findMany, findOne, create, update, delete |
| `principalAuthModule` | findMany, findOne, create, update, delete |
| `profilesModule` | findMany, findOne, create, update, delete |
| `rateLimitMetersModule` | findMany, findOne, create, update, delete |
| `rateLimitsModule` | findMany, findOne, create, update, delete |
| `realtimeModule` | findMany, findOne, create, update, delete |
| `refusalLogModule` | findMany, findOne, create, update, delete |
| `relationProvision` | findMany, findOne, create, update, delete |
| `repositoryModule` | findMany, findOne, create, update, delete |
| `resourceModule` | findMany, findOne, create, update, delete |
| `rlsModule` | findMany, findOne, create, update, delete |
| `routeModule` | findMany, findOne, create, update, delete |
| `scopeTypesModule` | findMany, findOne, create, update, delete |
| `secureTableProvision` | findMany, findOne, create, update, delete |
| `sessionSecretsModule` | findMany, findOne, create, update, delete |
| `sessionsModule` | findMany, findOne, create, update, delete |
| `siteSurfaceModule` | findMany, findOne, create, update, delete |
| `storageLogModule` | findMany, findOne, create, update, delete |
| `storageModule` | findMany, findOne, create, update, delete |
| `transferLogModule` | findMany, findOne, create, update, delete |
| `userAuthModule` | findMany, findOne, create, update, delete |
| `userCredentialsModule` | findMany, findOne, create, update, delete |
| `userSettingsModule` | findMany, findOne, create, update, delete |
| `userSettingsSecurityModule` | findMany, findOne, create, update, delete |
| `userStateModule` | findMany, findOne, create, update, delete |
| `usersModule` | findMany, findOne, create, update, delete |
| `webauthnAuthModule` | findMany, findOne, create, update, delete |
| `webauthnCredentialsModule` | findMany, findOne, create, update, delete |
| `webhookModule` | findMany, findOne, create, update, delete |
## Table Operations
### `db.agentModule`
CRUD operations for AgentModule records.
**Fields:**
| Field | Type | Editable |
|-------|------|----------|
| `agentTableId` | UUID | Yes |
| `agentTableName` | String | Yes |
| `apiName` | String | Yes |
| `databaseId` | UUID | Yes |
| `defaultCapabilities` | String | Yes |
| `defaultVisibility` | String | Yes |
| `entityField` | String | Yes |
| `entityTableId` | UUID | Yes |
| `eventTableId` | UUID | Yes |
| `eventTableName` | String | Yes |
| `hasAgents` | Boolean | Yes |
| `hasAttachments` | Boolean | Yes |
| `hasPlans` | Boolean | Yes |
| `hasRepositoryResources` | Boolean | Yes |
| `hasResources` | Boolean | Yes |
| `hasRuns` | Boolean | Yes |
| `id` | UUID | No |
| `messageTableId` | UUID | Yes |
| `messageTableName` | String | Yes |
| `personaTableId` | UUID | Yes |
| `personaTableName` | String | Yes |
| `planTableId` | UUID | Yes |
| `planTableName` | String | Yes |
| `policies` | JSON | Yes |
| `prefix` | String | Yes |
| `privateApiName` | String | Yes |
| `privateSchemaId` | UUID | Yes |
| `privateSchemaName` | String | Yes |
| `promptsTableId` | UUID | Yes |
| `promptsTableName` | String | Yes |
| `provisions` | JSON | Yes |
| `publicSchemaName` | String | Yes |
| `resourceRepositoryTableId` | UUID | Yes |
| `resourceRepositoryTableName` | String | Yes |
| `resourceTableId` | UUID | Yes |
| `resourceTableName` | String | Yes |
| `resources` | JSON | Yes |
| `runTableId` | UUID | Yes |
| `runTableName` | String | Yes |
| `schemaId` | UUID | Yes |
| `scope` | String | Yes |
| `settleRunCostFunctionName` | String | Yes |
| `taskTableId` | UUID | Yes |
| `taskTableName` | String | Yes |
| `threadTableId` | UUID | Yes |
| `threadTableName` | String | Yes |
| `workspaceTableId` | UUID | Yes |
| `workspaceTableName` | String | Yes |
**Operations:**
```typescript
// List all agentModule records
const items = await db.agentModule.findMany({ select: { agentTableId: true, agentTableName: true, apiName: true, databaseId: true, defaultCapabilities: true, defaultVisibility: true, entityField: true, entityTableId: true, eventTableId: true, eventTableName: true, hasAgents: true, hasAttachments: true, hasPlans: true, hasRepositoryResources: true, hasResources: true, hasRuns: true, id: true, messageTableId: true, messageTableName: true, personaTableId: true, personaTableName: true, planTableId: true, planTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, promptsTableId: true, promptsTableName: true, provisions: true, publicSchemaName: true, resourceRepositoryTableId: true, resourceRepositoryTableName: true, resourceTableId: true, resourceTableName: true, resources: true, runTableId: true, runTableName: true, schemaId: true, scope: true, settleRunCostFunctionName: true, taskTableId: true, taskTableName: true, threadTableId: true, threadTableName: true, workspaceTableId: true, workspaceTableName: true } }).execute();
// Get one by id
const item = await db.agentModule.findOne({ id: '', select: { agentTableId: true, agentTableName: true, apiName: true, databaseId: true, defaultCapabilities: true, defaultVisibility: true, entityField: true, entityTableId: true, eventTableId: true, eventTableName: true, hasAgents: true, hasAttachments: true, hasPlans: true, hasRepositoryResources: true, hasResources: true, hasRuns: true, id: true, messageTableId: true, messageTableName: true, personaTableId: true, personaTableName: true, planTableId: true, planTableName: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, promptsTableId: true, promptsTableName: true, provisions: true, publicSchemaName: true, resourceRepositoryTableId: true, resourceRepositoryTableName: true, resourceTableId: true, resourceTableName: true, resources: true, runTableId: true, runTableName: true, schemaId: true, scope: true, settleRunCostFunctionName: true, taskTableId: true, taskTableName: true, threadTableId: true, threadTableName: true, workspaceTableId: true, workspaceTableName: true } }).execute();
// Create
const created = await db.agentModule.create({ data: { agentTableId: '', agentTableName: '', apiName: '', databaseId: '', defaultCapabilities: '', defaultVisibility: '', entityField: '', entityTableId: '', eventTableId: '', eventTableName: '', hasAgents: '', hasAttachments: '', hasPlans: '', hasRepositoryResources: '', hasResources: '', hasRuns: '', messageTableId: '', messageTableName: '', personaTableId: '', personaTableName: '', planTableId: '', planTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', promptsTableId: '', promptsTableName: '', provisions: '', publicSchemaName: '', resourceRepositoryTableId: '', resourceRepositoryTableName: '', resourceTableId: '', resourceTableName: '', resources: '', runTableId: '', runTableName: '', schemaId: '', scope: '', settleRunCostFunctionName: '', taskTableId: '', taskTableName: '', threadTableId: '', threadTableName: '', workspaceTableId: '', workspaceTableName: '' }, select: { id: true } }).execute();
// Update
const updated = await db.agentModule.update({ where: { id: '' }, data: { agentTableId: '' }, select: { id: true } }).execute();
// Delete
const deleted = await db.agentModule.delete({ where: { id: '' } }).execute();
```
### `db.apiSurfaceModule`
CRUD operations for ApiSurfaceModule records.
**Fields:**
| Field | Type | Editable |
|-------|------|----------|
| `apiName` | String | Yes |
| `apiSchemasTableId` | UUID | Yes |
| `apiSchemasTableName` | String | Yes |
| `apiSettingsTableId` | UUID | Yes |
| `apiSettingsTableName` | String | Yes |
| `apisTableId` | UUID | Yes |
| `apisTableName` | String | Yes |
| `catalogModuleId` | UUID | Yes |
| `corsSettingsTableId` | UUID | Yes |
| `corsSettingsTableName` | String | Yes |
| `databaseId` | UUID | Yes |
| `defaultCapabilities` | String | Yes |
| `entityField` | String | Yes |
| `entityTableId` | UUID | Yes |
| `id` | UUID | No |
| `policies` | JSON | Yes |
| `prefix` | String | Yes |
| `privateApiName` | String | Yes |
| `provisions` | JSON | Yes |
| `publicSchemaName` | String | Yes |
| `schemaId` | UUID | Yes |
| `scope` | String | Yes |
**Operations:**
```typescript
// List all apiSurfaceModule records
const items = await db.apiSurfaceModule.findMany({ select: { apiName: true, apiSchemasTableId: true, apiSchemasTableName: true, apiSettingsTableId: true, apiSettingsTableName: true, apisTableId: true, apisTableName: true, catalogModuleId: true, corsSettingsTableId: true, corsSettingsTableName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute();
// Get one by id
const item = await db.apiSurfaceModule.findOne({ id: '', select: { apiName: true, apiSchemasTableId: true, apiSchemasTableName: true, apiSettingsTableId: true, apiSettingsTableName: true, apisTableId: true, apisTableName: true, catalogModuleId: true, corsSettingsTableId: true, corsSettingsTableName: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute();
// Create
const created = await db.apiSurfaceModule.create({ data: { apiName: '', apiSchemasTableId: '', apiSchemasTableName: '', apiSettingsTableId: '', apiSettingsTableName: '', apisTableId: '', apisTableName: '', catalogModuleId: '', corsSettingsTableId: '', corsSettingsTableName: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', policies: '', prefix: '', privateApiName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, select: { id: true } }).execute();
// Update
const updated = await db.apiSurfaceModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute();
// Delete
const deleted = await db.apiSurfaceModule.delete({ where: { id: '' } }).execute();
```
### `db.appModule`
CRUD operations for AppModule records.
**Fields:**
| Field | Type | Editable |
|-------|------|----------|
| `apiName` | String | Yes |
| `appComponentsTableId` | UUID | Yes |
| `appComponentsTableName` | String | Yes |
| `appStoreIdentitiesTableName` | String | Yes |
| `appsTableId` | UUID | Yes |
| `appsTableName` | String | Yes |
| `catalogModuleId` | UUID | Yes |
| `databaseId` | UUID | Yes |
| `defaultCapabilities` | String | Yes |
| `entityField` | String | Yes |
| `entityTableId` | UUID | Yes |
| `id` | UUID | No |
| `policies` | JSON | Yes |
| `prefix` | String | Yes |
| `privateApiName` | String | Yes |
| `privateSchemaId` | UUID | Yes |
| `privateSchemaName` | String | Yes |
| `provisions` | JSON | Yes |
| `publicSchemaName` | String | Yes |
| `schemaId` | UUID | Yes |
| `scope` | String | Yes |
**Operations:**
```typescript
// List all appModule records
const items = await db.appModule.findMany({ select: { apiName: true, appComponentsTableId: true, appComponentsTableName: true, appStoreIdentitiesTableName: true, appsTableId: true, appsTableName: true, catalogModuleId: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute();
// Get one by id
const item = await db.appModule.findOne({ id: '', select: { apiName: true, appComponentsTableId: true, appComponentsTableName: true, appStoreIdentitiesTableName: true, appsTableId: true, appsTableName: true, catalogModuleId: true, databaseId: true, defaultCapabilities: true, entityField: true, entityTableId: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, schemaId: true, scope: true } }).execute();
// Create
const created = await db.appModule.create({ data: { apiName: '', appComponentsTableId: '', appComponentsTableName: '', appStoreIdentitiesTableName: '', appsTableId: '', appsTableName: '', catalogModuleId: '', databaseId: '', defaultCapabilities: '', entityField: '', entityTableId: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', schemaId: '', scope: '' }, select: { id: true } }).execute();
// Update
const updated = await db.appModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute();
// Delete
const deleted = await db.appModule.delete({ where: { id: '' } }).execute();
```
### `db.billingModule`
CRUD operations for BillingModule records.
**Fields:**
| Field | Type | Editable |
|-------|------|----------|
| `apiName` | String | Yes |
| `balancesTableId` | UUID | Yes |
| `balancesTableName` | String | Yes |
| `creditPacksTableId` | UUID | Yes |
| `creditPacksTableName` | String | Yes |
| `databaseId` | UUID | Yes |
| `defaultCapabilities` | String | Yes |
| `defaultMeterCatalog` | JSON | Yes |
| `grantMeterCreditsFunction` | String | Yes |
| `id` | UUID | No |
| `ledgerTableId` | UUID | Yes |
| `ledgerTableName` | String | Yes |
| `meterCreditsTableId` | UUID | Yes |
| `meterCreditsTableName` | String | Yes |
| `meterDefaultsTableId` | UUID | Yes |
| `meterDefaultsTableName` | String | Yes |
| `meterSourcesTableId` | UUID | Yes |
| `meterSourcesTableName` | String | Yes |
| `metersTableId` | UUID | Yes |
| `metersTableName` | String | Yes |
| `planSubscriptionsTableId` | UUID | Yes |
| `planSubscriptionsTableName` | String | Yes |
| `prefix` | String | Yes |
| `privateApiName` | String | Yes |
| `privateSchemaId` | UUID | Yes |
| `privateSchemaName` | String | Yes |
| `publicSchemaName` | String | Yes |
| `recordUsageFunction` | String | Yes |
| `rollupUsageSummaryFunction` | String | Yes |
| `schemaId` | UUID | Yes |
| `sweepExpiredSubscriptionsFunction` | String | Yes |
**Operations:**
```typescript
// List all billingModule records
const items = await db.billingModule.findMany({ select: { apiName: true, balancesTableId: true, balancesTableName: true, creditPacksTableId: true, creditPacksTableName: true, databaseId: true, defaultCapabilities: true, defaultMeterCatalog: true, grantMeterCreditsFunction: true, id: true, ledgerTableId: true, ledgerTableName: true, meterCreditsTableId: true, meterCreditsTableName: true, meterDefaultsTableId: true, meterDefaultsTableName: true, meterSourcesTableId: true, meterSourcesTableName: true, metersTableId: true, metersTableName: true, planSubscriptionsTableId: true, planSubscriptionsTableName: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, recordUsageFunction: true, rollupUsageSummaryFunction: true, schemaId: true, sweepExpiredSubscriptionsFunction: true } }).execute();
// Get one by id
const item = await db.billingModule.findOne({ id: '', select: { apiName: true, balancesTableId: true, balancesTableName: true, creditPacksTableId: true, creditPacksTableName: true, databaseId: true, defaultCapabilities: true, defaultMeterCatalog: true, grantMeterCreditsFunction: true, id: true, ledgerTableId: true, ledgerTableName: true, meterCreditsTableId: true, meterCreditsTableName: true, meterDefaultsTableId: true, meterDefaultsTableName: true, meterSourcesTableId: true, meterSourcesTableName: true, metersTableId: true, metersTableName: true, planSubscriptionsTableId: true, planSubscriptionsTableName: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, publicSchemaName: true, recordUsageFunction: true, rollupUsageSummaryFunction: true, schemaId: true, sweepExpiredSubscriptionsFunction: true } }).execute();
// Create
const created = await db.billingModule.create({ data: { apiName: '', balancesTableId: '', balancesTableName: '', creditPacksTableId: '', creditPacksTableName: '', databaseId: '', defaultCapabilities: '', defaultMeterCatalog: '', grantMeterCreditsFunction: '', ledgerTableId: '', ledgerTableName: '', meterCreditsTableId: '', meterCreditsTableName: '', meterDefaultsTableId: '', meterDefaultsTableName: '', meterSourcesTableId: '', meterSourcesTableName: '', metersTableId: '', metersTableName: '', planSubscriptionsTableId: '', planSubscriptionsTableName: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', publicSchemaName: '', recordUsageFunction: '', rollupUsageSummaryFunction: '', schemaId: '', sweepExpiredSubscriptionsFunction: '' }, select: { id: true } }).execute();
// Update
const updated = await db.billingModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute();
// Delete
const deleted = await db.billingModule.delete({ where: { id: '' } }).execute();
```
### `db.billingProviderModule`
CRUD operations for BillingProviderModule records.
**Fields:**
| Field | Type | Editable |
|-------|------|----------|
| `activatePlanSubscriptionFunction` | String | Yes |
| `apiName` | String | Yes |
| `applyProviderObservationFunction` | String | Yes |
| `billingConnectionTableId` | UUID | Yes |
| `billingConnectionTableName` | String | Yes |
| `billingCustomersTableId` | UUID | Yes |
| `billingCustomersTableName` | String | Yes |
| `billingDisputesTableId` | UUID | Yes |
| `billingDisputesTableName` | String | Yes |
| `billingHealthTableId` | UUID | Yes |
| `billingHealthTableName` | String | Yes |
| `billingInvoicesTableId` | UUID | Yes |
| `billingInvoicesTableName` | String | Yes |
| `billingOperationsTableId` | UUID | Yes |
| `billingOperationsTableName` | String | Yes |
| `billingPricesTableId` | UUID | Yes |
| `billingPricesTableName` | String | Yes |
| `billingProductsTableId` | UUID | Yes |
| `billingProductsTableName` | String | Yes |
| `billingProviderConnectedFunction` | String | Yes |
| `billingProviderKeyFunction` | String | Yes |
| `billingProviderStateTableId` | UUID | Yes |
| `billingProviderStateTableName` | String | Yes |
| `billingRefundsTableId` | UUID | Yes |
| `billingRefundsTableName` | String | Yes |
| `billingSubscriptionsTableId` | UUID | Yes |
| `billingSubscriptionsTableName` | String | Yes |
| `billingWebhookEventsTableId` | UUID | Yes |
| `billingWebhookEventsTableName` | String | Yes |
| `bindCheckoutSessionFunction` | String | Yes |
| `clearScheduledChangeFunction` | String | Yes |
| `databaseId` | UUID | Yes |
| `finishBillingOperationFunction` | String | Yes |
| `getActivePlanPricingFunction` | String | Yes |
| `getActivePlanSubscriptionFunction` | String | Yes |
| `getBillingCustomerFunction` | String | Yes |
| `getBillingPriceFunction` | String | Yes |
| `getBillingProductFunction` | String | Yes |
| `getBillingProviderStateFunction` | String | Yes |
| `getBillingSubscriptionByEntityFunction` | String | Yes |
| `getBillingSubscriptionByExternalIdFunction` | String | Yes |
| `getBillingSubscriptionFunction` | String | Yes |
| `getFallbackFreePlanFunction` | String | Yes |
| `getPlanPricingByExternalPriceFunction` | String | Yes |
| `hasDueReconciliationsFunction` | String | Yes |
| `id` | UUID | No |
| `listDueReconciliationsFunction` | String | Yes |
| `listPendingUsageSyncFunction` | String | Yes |
| `markUsageSyncedFunction` | String | Yes |
| `prefix` | String | Yes |
| `prepareScheduledChangeFunction` | String | Yes |
| `pricesTableId` | UUID | Yes |
| `privateApiName` | String | Yes |
| `privateSchemaId` | UUID | Yes |
| `processBillingEventFunction` | String | Yes |
| `productsTableId` | UUID | Yes |
| `provider` | String | Yes |
| `recordBillingConnectionFunction` | String | Yes |
| `recordBillingHealthFunction` | String | Yes |
| `recordDisputeFunction` | String | Yes |
| `recordRefundFunction` | String | Yes |
| `reserveBillingOperationFunction` | String | Yes |
| `schemaId` | UUID | Yes |
| `subscriptionsTableId` | UUID | Yes |
| `sweepOverdueSubscriptionsFunction` | String | Yes |
| `upsertBillingCustomerFunction` | String | Yes |
| `upsertBillingPriceFunction` | String | Yes |
| `upsertBillingProductFunction` | String | Yes |
| `upsertBillingSubscriptionFunction` | String | Yes |
| `upsertInvoiceFunction` | String | Yes |
| `usageSyncShardCount` | Int | Yes |
**Operations:**
```typescript
// List all billingProviderModule records
const items = await db.billingProviderModule.findMany({ select: { activatePlanSubscriptionFunction: true, apiName: true, applyProviderObservationFunction: true, billingConnectionTableId: true, billingConnectionTableName: true, billingCustomersTableId: true, billingCustomersTableName: true, billingDisputesTableId: true, billingDisputesTableName: true, billingHealthTableId: true, billingHealthTableName: true, billingInvoicesTableId: true, billingInvoicesTableName: true, billingOperationsTableId: true, billingOperationsTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, billingProviderConnectedFunction: true, billingProviderKeyFunction: true, billingProviderStateTableId: true, billingProviderStateTableName: true, billingRefundsTableId: true, billingRefundsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, bindCheckoutSessionFunction: true, clearScheduledChangeFunction: true, databaseId: true, finishBillingOperationFunction: true, getActivePlanPricingFunction: true, getActivePlanSubscriptionFunction: true, getBillingCustomerFunction: true, getBillingPriceFunction: true, getBillingProductFunction: true, getBillingProviderStateFunction: true, getBillingSubscriptionByEntityFunction: true, getBillingSubscriptionByExternalIdFunction: true, getBillingSubscriptionFunction: true, getFallbackFreePlanFunction: true, getPlanPricingByExternalPriceFunction: true, hasDueReconciliationsFunction: true, id: true, listDueReconciliationsFunction: true, listPendingUsageSyncFunction: true, markUsageSyncedFunction: true, prefix: true, prepareScheduledChangeFunction: true, pricesTableId: true, privateApiName: true, privateSchemaId: true, processBillingEventFunction: true, productsTableId: true, provider: true, recordBillingConnectionFunction: true, recordBillingHealthFunction: true, recordDisputeFunction: true, recordRefundFunction: true, reserveBillingOperationFunction: true, schemaId: true, subscriptionsTableId: true, sweepOverdueSubscriptionsFunction: true, upsertBillingCustomerFunction: true, upsertBillingPriceFunction: true, upsertBillingProductFunction: true, upsertBillingSubscriptionFunction: true, upsertInvoiceFunction: true, usageSyncShardCount: true } }).execute();
// Get one by id
const item = await db.billingProviderModule.findOne({ id: '', select: { activatePlanSubscriptionFunction: true, apiName: true, applyProviderObservationFunction: true, billingConnectionTableId: true, billingConnectionTableName: true, billingCustomersTableId: true, billingCustomersTableName: true, billingDisputesTableId: true, billingDisputesTableName: true, billingHealthTableId: true, billingHealthTableName: true, billingInvoicesTableId: true, billingInvoicesTableName: true, billingOperationsTableId: true, billingOperationsTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, billingProviderConnectedFunction: true, billingProviderKeyFunction: true, billingProviderStateTableId: true, billingProviderStateTableName: true, billingRefundsTableId: true, billingRefundsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, bindCheckoutSessionFunction: true, clearScheduledChangeFunction: true, databaseId: true, finishBillingOperationFunction: true, getActivePlanPricingFunction: true, getActivePlanSubscriptionFunction: true, getBillingCustomerFunction: true, getBillingPriceFunction: true, getBillingProductFunction: true, getBillingProviderStateFunction: true, getBillingSubscriptionByEntityFunction: true, getBillingSubscriptionByExternalIdFunction: true, getBillingSubscriptionFunction: true, getFallbackFreePlanFunction: true, getPlanPricingByExternalPriceFunction: true, hasDueReconciliationsFunction: true, id: true, listDueReconciliationsFunction: true, listPendingUsageSyncFunction: true, markUsageSyncedFunction: true, prefix: true, prepareScheduledChangeFunction: true, pricesTableId: true, privateApiName: true, privateSchemaId: true, processBillingEventFunction: true, productsTableId: true, provider: true, recordBillingConnectionFunction: true, recordBillingHealthFunction: true, recordDisputeFunction: true, recordRefundFunction: true, reserveBillingOperationFunction: true, schemaId: true, subscriptionsTableId: true, sweepOverdueSubscriptionsFunction: true, upsertBillingCustomerFunction: true, upsertBillingPriceFunction: true, upsertBillingProductFunction: true, upsertBillingSubscriptionFunction: true, upsertInvoiceFunction: true, usageSyncShardCount: true } }).execute();
// Create
const created = await db.billingProviderModule.create({ data: { activatePlanSubscriptionFunction: '', apiName: '', applyProviderObservationFunction: '', billingConnectionTableId: '', billingConnectionTableName: '', billingCustomersTableId: '', billingCustomersTableName: '', billingDisputesTableId: '', billingDisputesTableName: '', billingHealthTableId: '', billingHealthTableName: '', billingInvoicesTableId: '', billingInvoicesTableName: '', billingOperationsTableId: '', billingOperationsTableName: '', billingPricesTableId: '', billingPricesTableName: '', billingProductsTableId: '', billingProductsTableName: '', billingProviderConnectedFunction: '', billingProviderKeyFunction: '', billingProviderStateTableId: '', billingProviderStateTableName: '', billingRefundsTableId: '', billingRefundsTableName: '', billingSubscriptionsTableId: '', billingSubscriptionsTableName: '', billingWebhookEventsTableId: '', billingWebhookEventsTableName: '', bindCheckoutSessionFunction: '', clearScheduledChangeFunction: '', databaseId: '', finishBillingOperationFunction: '', getActivePlanPricingFunction: '', getActivePlanSubscriptionFunction: '', getBillingCustomerFunction: '', getBillingPriceFunction: '', getBillingProductFunction: '', getBillingProviderStateFunction: '', getBillingSubscriptionByEntityFunction: '', getBillingSubscriptionByExternalIdFunction: '', getBillingSubscriptionFunction: '', getFallbackFreePlanFunction: '', getPlanPricingByExternalPriceFunction: '', hasDueReconciliationsFunction: '', listDueReconciliationsFunction: '', listPendingUsageSyncFunction: '', markUsageSyncedFunction: '', prefix: '', prepareScheduledChangeFunction: '', pricesTableId: '', privateApiName: '', privateSchemaId: '', processBillingEventFunction: '', productsTableId: '', provider: '', recordBillingConnectionFunction: '', recordBillingHealthFunction: '', recordDisputeFunction: '', recordRefundFunction: '', reserveBillingOperationFunction: '', schemaId: '', subscriptionsTableId: '', sweepOverdueSubscriptionsFunction: '', upsertBillingCustomerFunction: '', upsertBillingPriceFunction: '', upsertBillingProductFunction: '', upsertBillingSubscriptionFunction: '', upsertInvoiceFunction: '', usageSyncShardCount: '' }, select: { id: true } }).execute();
// Update
const updated = await db.billingProviderModule.update({ where: { id: '' }, data: { activatePlanSubscriptionFunction: '' }, select: { id: true } }).execute();
// Delete
const deleted = await db.billingProviderModule.delete({ where: { id: '' } }).execute();
```
### `db.blueprint`
CRUD operations for Blueprint records.
**Fields:**
| Field | Type | Editable |
|-------|------|----------|
| `createdAt` | Datetime | No |
| `databaseId` | UUID | Yes |
| `definition` | JSON | Yes |
| `definitionHash` | UUID | Yes |
| `description` | String | Yes |
| `displayName` | String | Yes |
| `id` | UUID | No |
| `name` | String | Yes |
| `ownerId` | UUID | Yes |
| `tableHashes` | JSON | Yes |
| `templateId` | UUID | Yes |
| `updatedAt` | Datetime | No |
**Operations:**
```typescript
// List all blueprint records
const items = await db.blueprint.findMany({ select: { createdAt: true, databaseId: true, definition: true, definitionHash: true, description: true, displayName: true, id: true, name: true, ownerId: true, tableHashes: true, templateId: true, updatedAt: true } }).execute();
// Get one by id
const item = await db.blueprint.findOne({ id: '', select: { createdAt: true, databaseId: true, definition: true, definitionHash: true, description: true, displayName: true, id: true, name: true, ownerId: true, tableHashes: true, templateId: true, updatedAt: true } }).execute();
// Create
const created = await db.blueprint.create({ data: { databaseId: '', definition: '', definitionHash: '', description: '', displayName: '', name: '', ownerId: '', tableHashes: '', templateId: '' }, select: { id: true } }).execute();
// Update
const updated = await db.blueprint.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute();
// Delete
const deleted = await db.blueprint.delete({ where: { id: '' } }).execute();
```
### `db.blueprintConstruction`
CRUD operations for BlueprintConstruction records.
**Fields:**
| Field | Type | Editable |
|-------|------|----------|
| `blueprintId` | UUID | Yes |
| `constructedAt` | Datetime | Yes |
| `constructedDefinition` | JSON | Yes |
| `createdAt` | Datetime | No |
| `databaseId` | UUID | Yes |
| `error` | JSON | Yes |
| `id` | UUID | No |
| `schemaId` | UUID | Yes |
| `status` | String | Yes |
| `tableMap` | JSON | Yes |
| `updatedAt` | Datetime | No |
**Operations:**
```typescript
// List all blueprintConstruction records
const items = await db.blueprintConstruction.findMany({ select: { blueprintId: true, constructedAt: true, constructedDefinition: true, createdAt: true, databaseId: true, error: true, id: true, schemaId: true, status: true, tableMap: true, updatedAt: true } }).execute();
// Get one by id
const item = await db.blueprintConstruction.findOne({ id: '', select: { blueprintId: true, constructedAt: true, constructedDefinition: true, createdAt: true, databaseId: true, error: true, id: true, schemaId: true, status: true, tableMap: true, updatedAt: true } }).execute();
// Create
const created = await db.blueprintConstruction.create({ data: { blueprintId: '', constructedAt: '', constructedDefinition: '', databaseId: '', error: '', schemaId: '', status: '', tableMap: '' }, select: { id: true } }).execute();
// Update
const updated = await db.blueprintConstruction.update({ where: { id: '' }, data: { blueprintId: '' }, select: { id: true } }).execute();
// Delete
const deleted = await db.blueprintConstruction.delete({ where: { id: '' } }).execute();
```
### `db.blueprintTemplate`
CRUD operations for BlueprintTemplate records.
**Fields:**
| Field | Type | Editable |
|-------|------|----------|
| `categories` | String | Yes |
| `complexity` | String | Yes |
| `copyCount` | Int | Yes |
| `createdAt` | Datetime | No |
| `definition` | JSON | Yes |
| `definitionHash` | UUID | Yes |
| `definitionSchemaVersion` | String | Yes |
| `description` | String | Yes |
| `displayName` | String | Yes |
| `forkCount` | Int | Yes |
| `forkedFromId` | UUID | Yes |
| `id` | UUID | No |
| `name` | String | Yes |
| `ownerId` | UUID | Yes |
| `source` | String | Yes |
| `tableHashes` | JSON | Yes |
| `tags` | String | Yes |
| `updatedAt` | Datetime | No |
| `version` | String | Yes |
| `visibility` | String | Yes |
**Operations:**
```typescript
// List all blueprintTemplate records
const items = await db.blueprintTemplate.findMany({ select: { categories: true, complexity: true, copyCount: true, createdAt: true, definition: true, definitionHash: true, definitionSchemaVersion: true, description: true, displayName: true, forkCount: true, forkedFromId: true, id: true, name: true, ownerId: true, source: true, tableHashes: true, tags: true, updatedAt: true, version: true, visibility: true } }).execute();
// Get one by id
const item = await db.blueprintTemplate.findOne({ id: '', select: { categories: true, complexity: true, copyCount: true, createdAt: true, definition: true, definitionHash: true, definitionSchemaVersion: true, description: true, displayName: true, forkCount: true, forkedFromId: true, id: true, name: true, ownerId: true, source: true, tableHashes: true, tags: true, updatedAt: true, version: true, visibility: true } }).execute();
// Create
const created = await db.blueprintTemplate.create({ data: { categories: '', complexity: '', copyCount: '', definition: '', definitionHash: '', definitionSchemaVersion: '', description: '', displayName: '', forkCount: '', forkedFromId: '', name: '', ownerId: '', source: '', tableHashes: '', tags: '', version: '', visibility: '' }, select: { id: true } }).execute();
// Update
const updated = await db.blueprintTemplate.update({ where: { id: '' }, data: { categories: '' }, select: { id: true } }).execute();
// Delete
const deleted = await db.blueprintTemplate.delete({ where: { id: '