
Orm Public
- 1 installs
- 52 repo stars
- Updated August 5, 2026
- constructive-io/constructive
ORM client for the public API providing typed CRUD operations for 129 tables and 71 custom operations.
About
ormpublic ORM client for the public API provides typed CRUD operations for 129 tables and 71 custom operations.. Comprehensive database access layer.
- Typed CRUD operations for public entities
- Full ORM support for public API
Orm Public by the numbers
- 1 all-time installs (skills.sh)
- Ranked #3,830 of 4,347 Backend & APIs skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/constructive-io/constructive --skill orm-publicAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 1 |
|---|---|
| repo stars | ★ 52 |
| Last updated | August 5, 2026 |
| Repository | constructive-io/constructive ↗ |
What it does
ORM client for the public API providing typed CRUD operations for 129 tables and 71 custom operations.
Files
orm-public
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
ORM client for the public API — provides typed CRUD operations for 129 tables and 71 custom operations
Usage
// Import the ORM client
import { db } from './orm';
// Available models: orgGetManagersRecord, orgGetSubordinatesRecord, getAllRecord, appPermission, orgPermission, object, appLevelRequirement, database, ...
db.<model>.findMany({ select: { id: true } }).execute()
db.<model>.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.<model>.create({ data: { ... }, select: { id: true } }).execute()
db.<model>.update({ where: { id: '<UUID>' }, data: { ... }, select: { id: true } }).execute()
db.<model>.delete({ where: { id: '<UUID>' } }).execute()Examples
Query records
const items = await db.orgGetManagersRecord.findMany({
select: { id: true }
}).execute();References
See the references/ directory for detailed per-entity API documentation:
- org-get-managers-record
- org-get-subordinates-record
- get-all-record
- app-permission
- org-permission
- object
- app-level-requirement
- database
- schema
- table
- check-constraint
- field
- spatial-relation
- foreign-key-constraint
- full-text-search
- index
- policy
- primary-key-constraint
- table-grant
- trigger
- unique-constraint
- view
- view-table
- view-grant
- view-rule
- embedding-chunk
- secure-table-provision
- relation-provision
- session-secrets-module
- identity-providers-module
- schema-grant
- default-privilege
- enum
- api-schema
- api-module
- domain
- site-metadatum
- site-module
- site-theme
- trigger-function
- database-transfer
- api
- site
- app
- connected-accounts-module
- crypto-addresses-module
- crypto-auth-module
- default-ids-module
- denormalized-table-field
- emails-module
- encrypted-secrets-module
- invites-module
- levels-module
- limits-module
- membership-types-module
- memberships-module
- permissions-module
- phone-numbers-module
- profiles-module
- secrets-module
- sessions-module
- user-auth-module
- users-module
- blueprint
- blueprint-template
- blueprint-construction
- storage-module
- entity-type-provision
- webauthn-credentials-module
- webauthn-auth-module
- notifications-module
- database-provision-module
- app-admin-grant
- app-owner-grant
- app-grant
- org-membership
- org-member
- org-admin-grant
- org-owner-grant
- org-member-profile
- org-grant
- org-chart-edge
- org-chart-edge-grant
- org-permission-default
- app-limit
- org-limit
- org-limit-aggregate
- app-step
- app-achievement
- app-level
- phone-number
- crypto-address
- webauthn-credential
- app-invite
- app-claimed-invite
- org-invite
- org-claimed-invite
- audit-log
- agent-thread
- agent-message
- agent-task
- role-type
- identity-provider
- ref
- store
- app-permission-default
- membership-type
- migrate-file
- devices-module
- node-type-registry
- app-limit-default
- org-limit-default
- user-connected-account
- commit
- rate-limits-module
- app-membership-default
- org-membership-default
- app-limit-event
- org-limit-event
- plans-module
- rls-module
- sql-action
- billing-module
- ast-migration
- user
- org-membership-setting
- app-membership
- hierarchy-module
- current-user-id
- current-user-agent
- current-ip-address
- require-step-up
- app-permissions-get-padded-mask
- org-permissions-get-padded-mask
- steps-achieved
- rev-parse
- resolve-blueprint-field
- org-is-manager-of
- app-permissions-get-mask
- org-permissions-get-mask
- resolve-blueprint-table
- app-permissions-get-mask-by-names
- org-permissions-get-mask-by-names
- app-permissions-get-by-mask
- org-permissions-get-by-mask
- get-all-objects-from-root
- get-path-objects-from-root
- get-object-at-path
- steps-required
- current-user
- send-account-deletion-email
- sign-out
- accept-database-transfer
- cancel-database-transfer
- reject-database-transfer
- disconnect-account
- revoke-api-key
- revoke-session
- verify-password
- verify-totp
- submit-app-invite-code
- submit-org-invite-code
- check-password
- confirm-delete-account
- set-password
- verify-email
- freeze-objects
- init-empty-repo
- construct-blueprint
- provision-new-user
- reset-password
- remove-node-at-path
- copy-template-to-blueprint
- provision-spatial-relation
- bootstrap-user
- set-field-order
- provision-unique-constraint
- provision-full-text-search
- provision-index
- set-data-at-path
- set-props-and-commit
- provision-database-with-user
- insert-node-at-path
- update-node-at-path
- set-and-commit
- provision-relation
- apply-rls
- sign-in-cross-origin
- create-user-database
- extend-token-expires
- create-api-key
- send-verification-email
- forgot-password
- sign-up
- request-cross-origin-token
- sign-in
- provision-table
- request-upload-url
- provision-bucket
acceptDatabaseTransfer
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Execute the acceptDatabaseTransfer mutation
Usage
db.mutation.acceptDatabaseTransfer({ input: { transferId: '<UUID>' } }).execute()Examples
Run acceptDatabaseTransfer
const result = await db.mutation.acceptDatabaseTransfer({ input: { transferId: '<UUID>' } }).execute();agentMessage
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
A single message in an agent_thread. The full client-rendered content (TextPart and ToolPart, including the ToolPart state machine and inline approval object) lives in the parts jsonb column — there is no separate agent_tool_call or agent_tool_approval table in v1. Cascade-deleted with the parent thread; RLS is owner-only.
Usage
db.agentMessage.findMany({ select: { id: true } }).execute()
db.agentMessage.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.agentMessage.create({ data: { threadId: '<UUID>', entityId: '<UUID>', authorRole: '<String>', ownerId: '<UUID>', parts: '<JSON>' }, select: { id: true } }).execute()
db.agentMessage.update({ where: { id: '<UUID>' }, data: { threadId: '<UUID>' }, select: { id: true } }).execute()
db.agentMessage.delete({ where: { id: '<UUID>' } }).execute()Examples
List all agentMessage records
const items = await db.agentMessage.findMany({
select: { id: true, threadId: true }
}).execute();Create a agentMessage
const item = await db.agentMessage.create({
data: { threadId: '<UUID>', entityId: '<UUID>', authorRole: '<String>', ownerId: '<UUID>', parts: '<JSON>' },
select: { id: true }
}).execute();agentTask
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
An agent- or user-authored todo item attached to an agent_thread. Captures the planning surface for agent-mode conversations: each row is a single discrete unit of work with a status lifecycle (pending → in-progress → done|failed). Cascade-deleted with the parent thread; RLS is owner-only.
Usage
db.agentTask.findMany({ select: { id: true } }).execute()
db.agentTask.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.agentTask.create({ data: { threadId: '<UUID>', entityId: '<UUID>', description: '<String>', source: '<String>', error: '<String>', ownerId: '<UUID>', status: '<String>' }, select: { id: true } }).execute()
db.agentTask.update({ where: { id: '<UUID>' }, data: { threadId: '<UUID>' }, select: { id: true } }).execute()
db.agentTask.delete({ where: { id: '<UUID>' } }).execute()Examples
List all agentTask records
const items = await db.agentTask.findMany({
select: { id: true, threadId: true }
}).execute();Create a agentTask
const item = await db.agentTask.create({
data: { threadId: '<UUID>', entityId: '<UUID>', description: '<String>', source: '<String>', error: '<String>', ownerId: '<UUID>', status: '<String>' },
select: { id: true }
}).execute();agentThread
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Top-level AI/LLM conversation. Owns the chat-mode + model + system-prompt snapshot for the lifetime of the conversation, and is the entity-scoping anchor — descendants (agent_message, agent_task) inherit entity_id from this row via DataInheritFromParent. RLS is owner-only (AuthzDirectOwner); entity_id is a grouping dimension, not a security dimension.
Usage
db.agentThread.findMany({ select: { id: true } }).execute()
db.agentThread.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.agentThread.create({ data: { title: '<String>', mode: '<String>', model: '<String>', systemPrompt: '<String>', ownerId: '<UUID>', entityId: '<UUID>', status: '<String>' }, select: { id: true } }).execute()
db.agentThread.update({ where: { id: '<UUID>' }, data: { title: '<String>' }, select: { id: true } }).execute()
db.agentThread.delete({ where: { id: '<UUID>' } }).execute()Examples
List all agentThread records
const items = await db.agentThread.findMany({
select: { id: true, title: true }
}).execute();Create a agentThread
const item = await db.agentThread.create({
data: { title: '<String>', mode: '<String>', model: '<String>', systemPrompt: '<String>', ownerId: '<UUID>', entityId: '<UUID>', status: '<String>' },
select: { id: true }
}).execute();apiModule
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Server-side module configuration for an API endpoint; stores module name and JSON settings used by the application server
Usage
db.apiModule.findMany({ select: { id: true } }).execute()
db.apiModule.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.apiModule.create({ data: { databaseId: '<UUID>', apiId: '<UUID>', name: '<String>', data: '<JSON>' }, select: { id: true } }).execute()
db.apiModule.update({ where: { id: '<UUID>' }, data: { databaseId: '<UUID>' }, select: { id: true } }).execute()
db.apiModule.delete({ where: { id: '<UUID>' } }).execute()Examples
List all apiModule records
const items = await db.apiModule.findMany({
select: { id: true, databaseId: true }
}).execute();Create a apiModule
const item = await db.apiModule.create({
data: { databaseId: '<UUID>', apiId: '<UUID>', name: '<String>', data: '<JSON>' },
select: { id: true }
}).execute();apiSchema
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Join table linking APIs to the database schemas they expose; controls which schemas are accessible through each API
Usage
db.apiSchema.findMany({ select: { id: true } }).execute()
db.apiSchema.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.apiSchema.create({ data: { databaseId: '<UUID>', schemaId: '<UUID>', apiId: '<UUID>' }, select: { id: true } }).execute()
db.apiSchema.update({ where: { id: '<UUID>' }, data: { databaseId: '<UUID>' }, select: { id: true } }).execute()
db.apiSchema.delete({ where: { id: '<UUID>' } }).execute()Examples
List all apiSchema records
const items = await db.apiSchema.findMany({
select: { id: true, databaseId: true }
}).execute();Create a apiSchema
const item = await db.apiSchema.create({
data: { databaseId: '<UUID>', schemaId: '<UUID>', apiId: '<UUID>' },
select: { id: true }
}).execute();api
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
API endpoint configurations: each record defines a PostGraphile/PostgREST API with its database role and public access settings
Usage
db.api.findMany({ select: { id: true } }).execute()
db.api.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.api.create({ data: { databaseId: '<UUID>', name: '<String>', dbname: '<String>', roleName: '<String>', anonRole: '<String>', isPublic: '<Boolean>' }, select: { id: true } }).execute()
db.api.update({ where: { id: '<UUID>' }, data: { databaseId: '<UUID>' }, select: { id: true } }).execute()
db.api.delete({ where: { id: '<UUID>' } }).execute()Examples
List all api records
const items = await db.api.findMany({
select: { id: true, databaseId: true }
}).execute();Create a api
const item = await db.api.create({
data: { databaseId: '<UUID>', name: '<String>', dbname: '<String>', roleName: '<String>', anonRole: '<String>', isPublic: '<Boolean>' },
select: { id: true }
}).execute();appAchievement
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Aggregated user progress for level requirements, tallying the total count; updated via triggers and should not be modified manually
Usage
db.appAchievement.findMany({ select: { id: true } }).execute()
db.appAchievement.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.appAchievement.create({ data: { actorId: '<UUID>', name: '<String>', count: '<Int>' }, select: { id: true } }).execute()
db.appAchievement.update({ where: { id: '<UUID>' }, data: { actorId: '<UUID>' }, select: { id: true } }).execute()
db.appAchievement.delete({ where: { id: '<UUID>' } }).execute()Examples
List all appAchievement records
const items = await db.appAchievement.findMany({
select: { id: true, actorId: true }
}).execute();Create a appAchievement
const item = await db.appAchievement.create({
data: { actorId: '<UUID>', name: '<String>', count: '<Int>' },
select: { id: true }
}).execute();appAdminGrant
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Records of admin role grants and revocations between members
Usage
db.appAdminGrant.findMany({ select: { id: true } }).execute()
db.appAdminGrant.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.appAdminGrant.create({ data: { isGrant: '<Boolean>', actorId: '<UUID>', grantorId: '<UUID>' }, select: { id: true } }).execute()
db.appAdminGrant.update({ where: { id: '<UUID>' }, data: { isGrant: '<Boolean>' }, select: { id: true } }).execute()
db.appAdminGrant.delete({ where: { id: '<UUID>' } }).execute()Examples
List all appAdminGrant records
const items = await db.appAdminGrant.findMany({
select: { id: true, isGrant: true }
}).execute();Create a appAdminGrant
const item = await db.appAdminGrant.create({
data: { isGrant: '<Boolean>', actorId: '<UUID>', grantorId: '<UUID>' },
select: { id: true }
}).execute();appClaimedInvite
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Records of successfully claimed invitations, linking senders to receivers
Usage
db.appClaimedInvite.findMany({ select: { id: true } }).execute()
db.appClaimedInvite.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.appClaimedInvite.create({ data: { data: '<JSON>', senderId: '<UUID>', receiverId: '<UUID>' }, select: { id: true } }).execute()
db.appClaimedInvite.update({ where: { id: '<UUID>' }, data: { data: '<JSON>' }, select: { id: true } }).execute()
db.appClaimedInvite.delete({ where: { id: '<UUID>' } }).execute()Examples
List all appClaimedInvite records
const items = await db.appClaimedInvite.findMany({
select: { id: true, data: true }
}).execute();Create a appClaimedInvite
const item = await db.appClaimedInvite.create({
data: { data: '<JSON>', senderId: '<UUID>', receiverId: '<UUID>' },
select: { id: true }
}).execute();appGrant
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Records of individual permission grants and revocations for members via bitmask
Usage
db.appGrant.findMany({ select: { id: true } }).execute()
db.appGrant.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.appGrant.create({ data: { permissions: '<BitString>', isGrant: '<Boolean>', actorId: '<UUID>', grantorId: '<UUID>' }, select: { id: true } }).execute()
db.appGrant.update({ where: { id: '<UUID>' }, data: { permissions: '<BitString>' }, select: { id: true } }).execute()
db.appGrant.delete({ where: { id: '<UUID>' } }).execute()Examples
List all appGrant records
const items = await db.appGrant.findMany({
select: { id: true, permissions: true }
}).execute();Create a appGrant
const item = await db.appGrant.create({
data: { permissions: '<BitString>', isGrant: '<Boolean>', actorId: '<UUID>', grantorId: '<UUID>' },
select: { id: true }
}).execute();appInvite
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Invitation records sent to prospective members via email, with token-based redemption and expiration
Usage
db.appInvite.findMany({ select: { id: true } }).execute()
db.appInvite.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.appInvite.create({ data: { email: '<Email>', senderId: '<UUID>', inviteToken: '<String>', inviteValid: '<Boolean>', inviteLimit: '<Int>', inviteCount: '<Int>', multiple: '<Boolean>', data: '<JSON>', profileId: '<UUID>', expiresAt: '<Datetime>' }, select: { id: true } }).execute()
db.appInvite.update({ where: { id: '<UUID>' }, data: { email: '<Email>' }, select: { id: true } }).execute()
db.appInvite.delete({ where: { id: '<UUID>' } }).execute()Examples
List all appInvite records
const items = await db.appInvite.findMany({
select: { id: true, email: true }
}).execute();Create a appInvite
const item = await db.appInvite.create({
data: { email: '<Email>', senderId: '<UUID>', inviteToken: '<String>', inviteValid: '<Boolean>', inviteLimit: '<Int>', inviteCount: '<Int>', multiple: '<Boolean>', data: '<JSON>', profileId: '<UUID>', expiresAt: '<Datetime>' },
select: { id: true }
}).execute();appLevelRequirement
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Defines the specific requirements that must be met to achieve a level
Usage
db.appLevelRequirement.findMany({ select: { id: true } }).execute()
db.appLevelRequirement.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.appLevelRequirement.create({ data: { name: '<String>', level: '<String>', description: '<String>', requiredCount: '<Int>', priority: '<Int>' }, select: { id: true } }).execute()
db.appLevelRequirement.update({ where: { id: '<UUID>' }, data: { name: '<String>' }, select: { id: true } }).execute()
db.appLevelRequirement.delete({ where: { id: '<UUID>' } }).execute()Examples
List all appLevelRequirement records
const items = await db.appLevelRequirement.findMany({
select: { id: true, name: true }
}).execute();Create a appLevelRequirement
const item = await db.appLevelRequirement.create({
data: { name: '<String>', level: '<String>', description: '<String>', requiredCount: '<Int>', priority: '<Int>' },
select: { id: true }
}).execute();appLevel
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Defines available levels that users can achieve by completing requirements
Usage
db.appLevel.findMany({ select: { id: true } }).execute()
db.appLevel.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.appLevel.create({ data: { name: '<String>', description: '<String>', image: '<Image>', ownerId: '<UUID>' }, select: { id: true } }).execute()
db.appLevel.update({ where: { id: '<UUID>' }, data: { name: '<String>' }, select: { id: true } }).execute()
db.appLevel.delete({ where: { id: '<UUID>' } }).execute()Examples
List all appLevel records
const items = await db.appLevel.findMany({
select: { id: true, name: true }
}).execute();Create a appLevel
const item = await db.appLevel.create({
data: { name: '<String>', description: '<String>', image: '<Image>', ownerId: '<UUID>' },
select: { id: true }
}).execute();appLimitDefault
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Default maximum values for each named limit, applied when no per-actor override exists
Usage
db.appLimitDefault.findMany({ select: { id: true } }).execute()
db.appLimitDefault.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.appLimitDefault.create({ data: { name: '<String>', max: '<BigInt>', softMax: '<BigInt>' }, select: { id: true } }).execute()
db.appLimitDefault.update({ where: { id: '<UUID>' }, data: { name: '<String>' }, select: { id: true } }).execute()
db.appLimitDefault.delete({ where: { id: '<UUID>' } }).execute()Examples
List all appLimitDefault records
const items = await db.appLimitDefault.findMany({
select: { id: true, name: true }
}).execute();Create a appLimitDefault
const item = await db.appLimitDefault.create({
data: { name: '<String>', max: '<BigInt>', softMax: '<BigInt>' },
select: { id: true }
}).execute();appLimitEvent
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Append-only log of limit events for historical reporting and audit
Usage
db.appLimitEvent.findMany({ select: { id: true } }).execute()
db.appLimitEvent.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.appLimitEvent.create({ data: { name: '<String>', actorId: '<UUID>', entityId: '<UUID>', eventType: '<String>', delta: '<BigInt>', numBefore: '<BigInt>', numAfter: '<BigInt>', maxAtEvent: '<BigInt>', reason: '<String>' }, select: { id: true } }).execute()
db.appLimitEvent.update({ where: { id: '<UUID>' }, data: { name: '<String>' }, select: { id: true } }).execute()
db.appLimitEvent.delete({ where: { id: '<UUID>' } }).execute()Examples
List all appLimitEvent records
const items = await db.appLimitEvent.findMany({
select: { id: true, name: true }
}).execute();Create a appLimitEvent
const item = await db.appLimitEvent.create({
data: { name: '<String>', actorId: '<UUID>', entityId: '<UUID>', eventType: '<String>', delta: '<BigInt>', numBefore: '<BigInt>', numAfter: '<BigInt>', maxAtEvent: '<BigInt>', reason: '<String>' },
select: { id: true }
}).execute();appLimit
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Tracks per-actor usage counts against configurable maximum limits
Usage
db.appLimit.findMany({ select: { id: true } }).execute()
db.appLimit.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.appLimit.create({ data: { name: '<String>', actorId: '<UUID>', num: '<BigInt>', max: '<BigInt>', softMax: '<BigInt>', windowStart: '<Datetime>', windowDuration: '<Interval>' }, select: { id: true } }).execute()
db.appLimit.update({ where: { id: '<UUID>' }, data: { name: '<String>' }, select: { id: true } }).execute()
db.appLimit.delete({ where: { id: '<UUID>' } }).execute()Examples
List all appLimit records
const items = await db.appLimit.findMany({
select: { id: true, name: true }
}).execute();Create a appLimit
const item = await db.appLimit.create({
data: { name: '<String>', actorId: '<UUID>', num: '<BigInt>', max: '<BigInt>', softMax: '<BigInt>', windowStart: '<Datetime>', windowDuration: '<Interval>' },
select: { id: true }
}).execute();appMembershipDefault
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Default membership settings per entity, controlling initial approval and verification state for new members
Usage
db.appMembershipDefault.findMany({ select: { id: true } }).execute()
db.appMembershipDefault.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.appMembershipDefault.create({ data: { createdBy: '<UUID>', updatedBy: '<UUID>', isApproved: '<Boolean>', isVerified: '<Boolean>' }, select: { id: true } }).execute()
db.appMembershipDefault.update({ where: { id: '<UUID>' }, data: { createdBy: '<UUID>' }, select: { id: true } }).execute()
db.appMembershipDefault.delete({ where: { id: '<UUID>' } }).execute()Examples
List all appMembershipDefault records
const items = await db.appMembershipDefault.findMany({
select: { id: true, createdBy: true }
}).execute();Create a appMembershipDefault
const item = await db.appMembershipDefault.create({
data: { createdBy: '<UUID>', updatedBy: '<UUID>', isApproved: '<Boolean>', isVerified: '<Boolean>' },
select: { id: true }
}).execute();appMembership
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Tracks membership records linking actors to entities with permission bitmasks, ownership, and admin status
Usage
db.appMembership.findMany({ select: { id: true } }).execute()
db.appMembership.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.appMembership.create({ data: { createdBy: '<UUID>', updatedBy: '<UUID>', isApproved: '<Boolean>', isBanned: '<Boolean>', isDisabled: '<Boolean>', isVerified: '<Boolean>', isActive: '<Boolean>', isOwner: '<Boolean>', isAdmin: '<Boolean>', permissions: '<BitString>', granted: '<BitString>', actorId: '<UUID>', profileId: '<UUID>' }, select: { id: true } }).execute()
db.appMembership.update({ where: { id: '<UUID>' }, data: { createdBy: '<UUID>' }, select: { id: true } }).execute()
db.appMembership.delete({ where: { id: '<UUID>' } }).execute()Examples
List all appMembership records
const items = await db.appMembership.findMany({
select: { id: true, createdBy: true }
}).execute();Create a appMembership
const item = await db.appMembership.create({
data: { createdBy: '<UUID>', updatedBy: '<UUID>', isApproved: '<Boolean>', isBanned: '<Boolean>', isDisabled: '<Boolean>', isVerified: '<Boolean>', isActive: '<Boolean>', isOwner: '<Boolean>', isAdmin: '<Boolean>', permissions: '<BitString>', granted: '<BitString>', actorId: '<UUID>', profileId: '<UUID>' },
select: { id: true }
}).execute();appOwnerGrant
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Records of ownership transfers and grants between members
Usage
db.appOwnerGrant.findMany({ select: { id: true } }).execute()
db.appOwnerGrant.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.appOwnerGrant.create({ data: { isGrant: '<Boolean>', actorId: '<UUID>', grantorId: '<UUID>' }, select: { id: true } }).execute()
db.appOwnerGrant.update({ where: { id: '<UUID>' }, data: { isGrant: '<Boolean>' }, select: { id: true } }).execute()
db.appOwnerGrant.delete({ where: { id: '<UUID>' } }).execute()Examples
List all appOwnerGrant records
const items = await db.appOwnerGrant.findMany({
select: { id: true, isGrant: true }
}).execute();Create a appOwnerGrant
const item = await db.appOwnerGrant.create({
data: { isGrant: '<Boolean>', actorId: '<UUID>', grantorId: '<UUID>' },
select: { id: true }
}).execute();appPermissionDefault
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Stores the default permission bitmask assigned to new members upon joining
Usage
db.appPermissionDefault.findMany({ select: { id: true } }).execute()
db.appPermissionDefault.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.appPermissionDefault.create({ data: { permissions: '<BitString>' }, select: { id: true } }).execute()
db.appPermissionDefault.update({ where: { id: '<UUID>' }, data: { permissions: '<BitString>' }, select: { id: true } }).execute()
db.appPermissionDefault.delete({ where: { id: '<UUID>' } }).execute()Examples
List all appPermissionDefault records
const items = await db.appPermissionDefault.findMany({
select: { id: true, permissions: true }
}).execute();Create a appPermissionDefault
const item = await db.appPermissionDefault.create({
data: { permissions: '<BitString>' },
select: { id: true }
}).execute();appPermission
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Defines available permissions as named bits within a bitmask, used by the RBAC system for access control
Usage
db.appPermission.findMany({ select: { id: true } }).execute()
db.appPermission.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.appPermission.create({ data: { name: '<String>', bitnum: '<Int>', bitstr: '<BitString>', description: '<String>' }, select: { id: true } }).execute()
db.appPermission.update({ where: { id: '<UUID>' }, data: { name: '<String>' }, select: { id: true } }).execute()
db.appPermission.delete({ where: { id: '<UUID>' } }).execute()Examples
List all appPermission records
const items = await db.appPermission.findMany({
select: { id: true, name: true }
}).execute();Create a appPermission
const item = await db.appPermission.create({
data: { name: '<String>', bitnum: '<Int>', bitstr: '<BitString>', description: '<String>' },
select: { id: true }
}).execute();appPermissionsGetByMask
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Reads and enables pagination through a set of AppPermission.
Usage
db.query.appPermissionsGetByMask({ mask: '<BitString>', first: '<Int>', offset: '<Int>', after: '<Cursor>' }).execute()Examples
Run appPermissionsGetByMask
const result = await db.query.appPermissionsGetByMask({ mask: '<BitString>', first: '<Int>', offset: '<Int>', after: '<Cursor>' }).execute();appPermissionsGetMaskByNames
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Execute the appPermissionsGetMaskByNames query
Usage
db.query.appPermissionsGetMaskByNames({ names: '<String>' }).execute()Examples
Run appPermissionsGetMaskByNames
const result = await db.query.appPermissionsGetMaskByNames({ names: '<String>' }).execute();appPermissionsGetMask
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Execute the appPermissionsGetMask query
Usage
db.query.appPermissionsGetMask({ ids: '<UUID>' }).execute()Examples
Run appPermissionsGetMask
const result = await db.query.appPermissionsGetMask({ ids: '<UUID>' }).execute();appPermissionsGetPaddedMask
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Execute the appPermissionsGetPaddedMask query
Usage
db.query.appPermissionsGetPaddedMask({ mask: '<BitString>' }).execute()Examples
Run appPermissionsGetPaddedMask
const result = await db.query.appPermissionsGetPaddedMask({ mask: '<BitString>' }).execute();appStep
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Log of individual user actions toward level requirements; every single step ever taken is recorded here
Usage
db.appStep.findMany({ select: { id: true } }).execute()
db.appStep.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.appStep.create({ data: { actorId: '<UUID>', name: '<String>', count: '<Int>' }, select: { id: true } }).execute()
db.appStep.update({ where: { id: '<UUID>' }, data: { actorId: '<UUID>' }, select: { id: true } }).execute()
db.appStep.delete({ where: { id: '<UUID>' } }).execute()Examples
List all appStep records
const items = await db.appStep.findMany({
select: { id: true, actorId: true }
}).execute();Create a appStep
const item = await db.appStep.create({
data: { actorId: '<UUID>', name: '<String>', count: '<Int>' },
select: { id: true }
}).execute();app
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Mobile and native app configuration linked to a site, including store links and identifiers
Usage
db.app.findMany({ select: { id: true } }).execute()
db.app.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.app.create({ data: { databaseId: '<UUID>', siteId: '<UUID>', name: '<String>', appImage: '<Image>', appStoreLink: '<Url>', appStoreId: '<String>', appIdPrefix: '<String>', playStoreLink: '<Url>' }, select: { id: true } }).execute()
db.app.update({ where: { id: '<UUID>' }, data: { databaseId: '<UUID>' }, select: { id: true } }).execute()
db.app.delete({ where: { id: '<UUID>' } }).execute()Examples
List all app records
const items = await db.app.findMany({
select: { id: true, databaseId: true }
}).execute();Create a app
const item = await db.app.create({
data: { databaseId: '<UUID>', siteId: '<UUID>', name: '<String>', appImage: '<Image>', appStoreLink: '<Url>', appStoreId: '<String>', appIdPrefix: '<String>', playStoreLink: '<Url>' },
select: { id: true }
}).execute();applyRls
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Execute the applyRls mutation
Usage
db.mutation.applyRls({ input: '<ApplyRlsInput>' }).execute()Examples
Run applyRls
const result = await db.mutation.applyRls({ input: '<ApplyRlsInput>' }).execute();astMigration
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
ORM operations for AstMigration records
Usage
db.astMigration.findMany({ select: { id: true } }).execute()
db.astMigration.findOne({ id: '<Int>', select: { id: true } }).execute()
db.astMigration.create({ data: { databaseId: '<UUID>', name: '<String>', requires: '<String>', payload: '<JSON>', deploys: '<String>', deploy: '<JSON>', revert: '<JSON>', verify: '<JSON>', action: '<String>', actionId: '<UUID>', actorId: '<UUID>' }, select: { id: true } }).execute()
db.astMigration.update({ where: { id: '<Int>' }, data: { databaseId: '<UUID>' }, select: { id: true } }).execute()
db.astMigration.delete({ where: { id: '<Int>' } }).execute()Examples
List all astMigration records
const items = await db.astMigration.findMany({
select: { id: true, databaseId: true }
}).execute();Create a astMigration
const item = await db.astMigration.create({
data: { databaseId: '<UUID>', name: '<String>', requires: '<String>', payload: '<JSON>', deploys: '<String>', deploy: '<JSON>', revert: '<JSON>', verify: '<JSON>', action: '<String>', actionId: '<UUID>', actorId: '<UUID>' },
select: { id: true }
}).execute();auditLog
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Append-only audit log of authentication events (sign-in, sign-up, password changes, etc.)
Usage
db.auditLog.findMany({ select: { id: true } }).execute()
db.auditLog.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.auditLog.create({ data: { event: '<String>', actorId: '<UUID>', origin: '<Origin>', userAgent: '<String>', ipAddress: '<InternetAddress>', success: '<Boolean>' }, select: { id: true } }).execute()
db.auditLog.update({ where: { id: '<UUID>' }, data: { event: '<String>' }, select: { id: true } }).execute()
db.auditLog.delete({ where: { id: '<UUID>' } }).execute()Examples
List all auditLog records
const items = await db.auditLog.findMany({
select: { id: true, event: true }
}).execute();Create a auditLog
const item = await db.auditLog.create({
data: { event: '<String>', actorId: '<UUID>', origin: '<Origin>', userAgent: '<String>', ipAddress: '<InternetAddress>', success: '<Boolean>' },
select: { id: true }
}).execute();billingModule
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
ORM operations for BillingModule records
Usage
db.billingModule.findMany({ select: { id: true } }).execute()
db.billingModule.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.billingModule.create({ data: { databaseId: '<UUID>', schemaId: '<UUID>', privateSchemaId: '<UUID>', metersTableId: '<UUID>', metersTableName: '<String>', planSubscriptionsTableId: '<UUID>', planSubscriptionsTableName: '<String>', ledgerTableId: '<UUID>', ledgerTableName: '<String>', balancesTableId: '<UUID>', balancesTableName: '<String>', recordUsageFunction: '<String>', prefix: '<String>' }, select: { id: true } }).execute()
db.billingModule.update({ where: { id: '<UUID>' }, data: { databaseId: '<UUID>' }, select: { id: true } }).execute()
db.billingModule.delete({ where: { id: '<UUID>' } }).execute()Examples
List all billingModule records
const items = await db.billingModule.findMany({
select: { id: true, databaseId: true }
}).execute();Create a billingModule
const item = await db.billingModule.create({
data: { databaseId: '<UUID>', schemaId: '<UUID>', privateSchemaId: '<UUID>', metersTableId: '<UUID>', metersTableName: '<String>', planSubscriptionsTableId: '<UUID>', planSubscriptionsTableName: '<String>', ledgerTableId: '<UUID>', ledgerTableName: '<String>', balancesTableId: '<UUID>', balancesTableName: '<String>', recordUsageFunction: '<String>', prefix: '<String>' },
select: { id: true }
}).execute();blueprintConstruction
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts.
Usage
db.blueprintConstruction.findMany({ select: { id: true } }).execute()
db.blueprintConstruction.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.blueprintConstruction.create({ data: { blueprintId: '<UUID>', databaseId: '<UUID>', schemaId: '<UUID>', status: '<String>', errorDetails: '<String>', tableMap: '<JSON>', constructedDefinition: '<JSON>', constructedAt: '<Datetime>' }, select: { id: true } }).execute()
db.blueprintConstruction.update({ where: { id: '<UUID>' }, data: { blueprintId: '<UUID>' }, select: { id: true } }).execute()
db.blueprintConstruction.delete({ where: { id: '<UUID>' } }).execute()Examples
List all blueprintConstruction records
const items = await db.blueprintConstruction.findMany({
select: { id: true, blueprintId: true }
}).execute();Create a blueprintConstruction
const item = await db.blueprintConstruction.create({
data: { blueprintId: '<UUID>', databaseId: '<UUID>', schemaId: '<UUID>', status: '<String>', errorDetails: '<String>', tableMap: '<JSON>', constructedDefinition: '<JSON>', constructedAt: '<Datetime>' },
select: { id: true }
}).execute();blueprintTemplate
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
A shareable, versioned schema recipe for the blueprint marketplace. Templates define arrays of secure_table_provision + relation_provision inputs that together describe a complete domain schema (e.g. e-commerce, telemedicine, habit tracker). Templates are never executed directly — they are copied into a blueprint first via copy_template_to_blueprint(). Can be private (owner-only) or public (marketplace-visible).
Usage
db.blueprintTemplate.findMany({ select: { id: true } }).execute()
db.blueprintTemplate.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.blueprintTemplate.create({ data: { name: '<String>', version: '<String>', displayName: '<String>', description: '<String>', ownerId: '<UUID>', visibility: '<String>', categories: '<String>', tags: '<String>', definition: '<JSON>', definitionSchemaVersion: '<String>', source: '<String>', complexity: '<String>', copyCount: '<Int>', forkCount: '<Int>', forkedFromId: '<UUID>', definitionHash: '<UUID>', tableHashes: '<JSON>' }, select: { id: true } }).execute()
db.blueprintTemplate.update({ where: { id: '<UUID>' }, data: { name: '<String>' }, select: { id: true } }).execute()
db.blueprintTemplate.delete({ where: { id: '<UUID>' } }).execute()Examples
List all blueprintTemplate records
const items = await db.blueprintTemplate.findMany({
select: { id: true, name: true }
}).execute();Create a blueprintTemplate
const item = await db.blueprintTemplate.create({
data: { name: '<String>', version: '<String>', displayName: '<String>', description: '<String>', ownerId: '<UUID>', visibility: '<String>', categories: '<String>', tags: '<String>', definition: '<JSON>', definitionSchemaVersion: '<String>', source: '<String>', complexity: '<String>', copyCount: '<Int>', forkCount: '<Int>', forkedFromId: '<UUID>', definitionHash: '<UUID>', tableHashes: '<JSON>' },
select: { id: true }
}).execute();blueprint
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
An owned, editable blueprint scoped to a specific database. Created by copying from a blueprint_template via copy_template_to_blueprint() or built from scratch. The owner can customize the definition at any time. Execute it with construct_blueprint() which creates a separate blueprint_construction record to track the build.
Usage
db.blueprint.findMany({ select: { id: true } }).execute()
db.blueprint.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.blueprint.create({ data: { ownerId: '<UUID>', databaseId: '<UUID>', name: '<String>', displayName: '<String>', description: '<String>', definition: '<JSON>', templateId: '<UUID>', definitionHash: '<UUID>', tableHashes: '<JSON>' }, select: { id: true } }).execute()
db.blueprint.update({ where: { id: '<UUID>' }, data: { ownerId: '<UUID>' }, select: { id: true } }).execute()
db.blueprint.delete({ where: { id: '<UUID>' } }).execute()Examples
List all blueprint records
const items = await db.blueprint.findMany({
select: { id: true, ownerId: true }
}).execute();Create a blueprint
const item = await db.blueprint.create({
data: { ownerId: '<UUID>', databaseId: '<UUID>', name: '<String>', displayName: '<String>', description: '<String>', definition: '<JSON>', templateId: '<UUID>', definitionHash: '<UUID>', tableHashes: '<JSON>' },
select: { id: true }
}).execute();bootstrapUser
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Execute the bootstrapUser mutation
Usage
db.mutation.bootstrapUser({ input: '<BootstrapUserInput>' }).execute()Examples
Run bootstrapUser
const result = await db.mutation.bootstrapUser({ input: '<BootstrapUserInput>' }).execute();cancelDatabaseTransfer
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Execute the cancelDatabaseTransfer mutation
Usage
db.mutation.cancelDatabaseTransfer({ input: { transferId: '<UUID>' } }).execute()Examples
Run cancelDatabaseTransfer
const result = await db.mutation.cancelDatabaseTransfer({ input: { transferId: '<UUID>' } }).execute();checkConstraint
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
ORM operations for CheckConstraint records
Usage
db.checkConstraint.findMany({ select: { id: true } }).execute()
db.checkConstraint.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.checkConstraint.create({ data: { databaseId: '<UUID>', tableId: '<UUID>', name: '<String>', type: '<String>', fieldIds: '<UUID>', expr: '<JSON>', smartTags: '<JSON>', category: '<ObjectCategory>', module: '<String>', scope: '<Int>', tags: '<String>' }, select: { id: true } }).execute()
db.checkConstraint.update({ where: { id: '<UUID>' }, data: { databaseId: '<UUID>' }, select: { id: true } }).execute()
db.checkConstraint.delete({ where: { id: '<UUID>' } }).execute()Examples
List all checkConstraint records
const items = await db.checkConstraint.findMany({
select: { id: true, databaseId: true }
}).execute();Create a checkConstraint
const item = await db.checkConstraint.create({
data: { databaseId: '<UUID>', tableId: '<UUID>', name: '<String>', type: '<String>', fieldIds: '<UUID>', expr: '<JSON>', smartTags: '<JSON>', category: '<ObjectCategory>', module: '<String>', scope: '<Int>', tags: '<String>' },
select: { id: true }
}).execute();checkPassword
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Execute the checkPassword mutation
Usage
db.mutation.checkPassword({ input: { password: '<String>' } }).execute()Examples
Run checkPassword
const result = await db.mutation.checkPassword({ input: { password: '<String>' } }).execute();claimedInvite
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Records of successfully claimed invitations, linking senders to receivers
Usage
db.claimedInvite.findMany({ select: { id: true } }).execute()
db.claimedInvite.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.claimedInvite.create({ data: { data: '<JSON>', senderId: '<UUID>', receiverId: '<UUID>' }, select: { id: true } }).execute()
db.claimedInvite.update({ where: { id: '<UUID>' }, data: { data: '<JSON>' }, select: { id: true } }).execute()
db.claimedInvite.delete({ where: { id: '<UUID>' } }).execute()Examples
List all claimedInvite records
const items = await db.claimedInvite.findMany({
select: { id: true, data: true }
}).execute();Create a claimedInvite
const item = await db.claimedInvite.create({
data: { data: '<JSON>', senderId: '<UUID>', receiverId: '<UUID>' },
select: { id: true }
}).execute();commit
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
A commit records changes to the repository.
Usage
db.commit.findMany({ select: { id: true } }).execute()
db.commit.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.commit.create({ data: { message: '<String>', databaseId: '<UUID>', storeId: '<UUID>', parentIds: '<UUID>', authorId: '<UUID>', committerId: '<UUID>', treeId: '<UUID>', date: '<Datetime>' }, select: { id: true } }).execute()
db.commit.update({ where: { id: '<UUID>' }, data: { message: '<String>' }, select: { id: true } }).execute()
db.commit.delete({ where: { id: '<UUID>' } }).execute()Examples
List all commit records
const items = await db.commit.findMany({
select: { id: true, message: true }
}).execute();Create a commit
const item = await db.commit.create({
data: { message: '<String>', databaseId: '<UUID>', storeId: '<UUID>', parentIds: '<UUID>', authorId: '<UUID>', committerId: '<UUID>', treeId: '<UUID>', date: '<Datetime>' },
select: { id: true }
}).execute();confirmDeleteAccount
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Execute the confirmDeleteAccount mutation
Usage
db.mutation.confirmDeleteAccount({ input: { userId: '<UUID>', token: '<String>' } }).execute()Examples
Run confirmDeleteAccount
const result = await db.mutation.confirmDeleteAccount({ input: { userId: '<UUID>', token: '<String>' } }).execute();confirmUpload
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Confirm that a file has been uploaded to S3. Verifies the object exists in S3, checks content-type, and transitions the file status from 'pending' to 'ready'.
Usage
db.mutation.confirmUpload({ input: { fileId: '<UUID>' } }).execute()Examples
Run confirmUpload
const result = await db.mutation.confirmUpload({ input: { fileId: '<UUID>' } }).execute();connectedAccount
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
OAuth and social login connections linking external service accounts to users
Usage
db.connectedAccount.findMany({ select: { id: true } }).execute()
db.connectedAccount.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.connectedAccount.create({ data: { ownerId: '<UUID>', service: '<String>', identifier: '<String>', details: '<JSON>', isVerified: '<Boolean>' }, select: { id: true } }).execute()
db.connectedAccount.update({ where: { id: '<UUID>' }, data: { ownerId: '<UUID>' }, select: { id: true } }).execute()
db.connectedAccount.delete({ where: { id: '<UUID>' } }).execute()Examples
List all connectedAccount records
const items = await db.connectedAccount.findMany({
select: { id: true, ownerId: true }
}).execute();Create a connectedAccount
const item = await db.connectedAccount.create({
data: { ownerId: '<UUID>', service: '<String>', identifier: '<String>', details: '<JSON>', isVerified: '<Boolean>' },
select: { id: true }
}).execute();connectedAccountsModule
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
ORM operations for ConnectedAccountsModule records
Usage
db.connectedAccountsModule.findMany({ select: { id: true } }).execute()
db.connectedAccountsModule.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.connectedAccountsModule.create({ data: { databaseId: '<UUID>', schemaId: '<UUID>', privateSchemaId: '<UUID>', tableId: '<UUID>', ownerTableId: '<UUID>', tableName: '<String>' }, select: { id: true } }).execute()
db.connectedAccountsModule.update({ where: { id: '<UUID>' }, data: { databaseId: '<UUID>' }, select: { id: true } }).execute()
db.connectedAccountsModule.delete({ where: { id: '<UUID>' } }).execute()Examples
List all connectedAccountsModule records
const items = await db.connectedAccountsModule.findMany({
select: { id: true, databaseId: true }
}).execute();Create a connectedAccountsModule
const item = await db.connectedAccountsModule.create({
data: { databaseId: '<UUID>', schemaId: '<UUID>', privateSchemaId: '<UUID>', tableId: '<UUID>', ownerTableId: '<UUID>', tableName: '<String>' },
select: { id: true }
}).execute();constructBlueprint
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Executes a blueprint definition by delegating to provision_* procedures. Creates a blueprint_construction record to track the attempt. Six phases: (0) entity_type_provision for each membership_type entry — provisions entity tables, membership modules, and security, (1) provision_table() for each table with nodes[], fields[], policies[], and grants (table-level indexes/fts/unique_constraints are deferred), (2) provision_relation() for each relation, (3) provision_index() for top-level + deferred indexes, (4) provision_full_text_search() for top-level + deferred FTS, (5) provision_unique_constraint() for top-level + deferred unique constraints. Phase 0 entity tables are added to the table_map so subsequent phases can reference them by name. Table-level indexes/fts/unique_constraints are deferred to phases 3-5 so they can reference columns created by relations in phase 2. Returns the construction record ID on success, NULL on failure.
Usage
db.mutation.constructBlueprint({ input: { blueprintId: '<UUID>', schemaId: '<UUID>' } }).execute()Examples
Run constructBlueprint
const result = await db.mutation.constructBlueprint({ input: { blueprintId: '<UUID>', schemaId: '<UUID>' } }).execute();copyTemplateToBlueprint
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Creates a new blueprint by copying a template definition. Checks visibility: owners can always copy their own templates, others require public visibility. Increments the template copy_count. Returns the new blueprint ID.
Usage
db.mutation.copyTemplateToBlueprint({ input: { templateId: '<UUID>', databaseId: '<UUID>', ownerId: '<UUID>', nameOverride: '<String>', displayNameOverride: '<String>' } }).execute()Examples
Run copyTemplateToBlueprint
const result = await db.mutation.copyTemplateToBlueprint({ input: { templateId: '<UUID>', databaseId: '<UUID>', ownerId: '<UUID>', nameOverride: '<String>', displayNameOverride: '<String>' } }).execute();createApiKey
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Execute the createApiKey mutation
Usage
db.mutation.createApiKey({ input: { keyName: '<String>', accessLevel: '<String>', mfaLevel: '<String>', expiresIn: '<IntervalInput>' } }).execute()Examples
Run createApiKey
const result = await db.mutation.createApiKey({ input: { keyName: '<String>', accessLevel: '<String>', mfaLevel: '<String>', expiresIn: '<IntervalInput>' } }).execute();createUserDatabase
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Creates a new user database with all required modules, permissions, and RLS policies.
Parameters:
- database_name: Name for the new database (required)
- owner_id: UUID of the owner user (required)
- include_invites: Include invite system (default: true)
- include_groups: Include group-level memberships (default: false)
- include_levels: Include levels/achievements (default: false)
- bitlen: Bit length for permission masks (default: 64)
- tokens_expiration: Token expiration interval (default: 30 days)
Returns the database_id UUID of the newly created database.
Example usage: SELECT metaschema_public.create_user_database('my_app', 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11'::uuid); SELECT metaschema_public.create_user_database('my_app', 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11'::uuid, true, true); -- with invites and groups
Usage
db.mutation.createUserDatabase({ input: '<CreateUserDatabaseInput>' }).execute()Examples
Run createUserDatabase
const result = await db.mutation.createUserDatabase({ input: '<CreateUserDatabaseInput>' }).execute();cryptoAddress
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Cryptocurrency wallet addresses owned by users, with network-specific validation and verification
Usage
db.cryptoAddress.findMany({ select: { id: true } }).execute()
db.cryptoAddress.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.cryptoAddress.create({ data: { ownerId: '<UUID>', address: '<String>', isVerified: '<Boolean>', isPrimary: '<Boolean>', name: '<String>' }, select: { id: true } }).execute()
db.cryptoAddress.update({ where: { id: '<UUID>' }, data: { ownerId: '<UUID>' }, select: { id: true } }).execute()
db.cryptoAddress.delete({ where: { id: '<UUID>' } }).execute()Examples
List all cryptoAddress records
const items = await db.cryptoAddress.findMany({
select: { id: true, ownerId: true }
}).execute();Create a cryptoAddress
const item = await db.cryptoAddress.create({
data: { ownerId: '<UUID>', address: '<String>', isVerified: '<Boolean>', isPrimary: '<Boolean>', name: '<String>' },
select: { id: true }
}).execute();cryptoAddressesModule
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
ORM operations for CryptoAddressesModule records
Usage
db.cryptoAddressesModule.findMany({ select: { id: true } }).execute()
db.cryptoAddressesModule.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.cryptoAddressesModule.create({ data: { databaseId: '<UUID>', schemaId: '<UUID>', privateSchemaId: '<UUID>', tableId: '<UUID>', ownerTableId: '<UUID>', tableName: '<String>', cryptoNetwork: '<String>' }, select: { id: true } }).execute()
db.cryptoAddressesModule.update({ where: { id: '<UUID>' }, data: { databaseId: '<UUID>' }, select: { id: true } }).execute()
db.cryptoAddressesModule.delete({ where: { id: '<UUID>' } }).execute()Examples
List all cryptoAddressesModule records
const items = await db.cryptoAddressesModule.findMany({
select: { id: true, databaseId: true }
}).execute();Create a cryptoAddressesModule
const item = await db.cryptoAddressesModule.create({
data: { databaseId: '<UUID>', schemaId: '<UUID>', privateSchemaId: '<UUID>', tableId: '<UUID>', ownerTableId: '<UUID>', tableName: '<String>', cryptoNetwork: '<String>' },
select: { id: true }
}).execute();cryptoAuthModule
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
ORM operations for CryptoAuthModule records
Usage
db.cryptoAuthModule.findMany({ select: { id: true } }).execute()
db.cryptoAuthModule.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.cryptoAuthModule.create({ data: { databaseId: '<UUID>', schemaId: '<UUID>', usersTableId: '<UUID>', secretsTableId: '<UUID>', sessionsTableId: '<UUID>', sessionCredentialsTableId: '<UUID>', addressesTableId: '<UUID>', userField: '<String>', cryptoNetwork: '<String>', signInRequestChallenge: '<String>', signInRecordFailure: '<String>', signUpWithKey: '<String>', signInWithChallenge: '<String>' }, select: { id: true } }).execute()
db.cryptoAuthModule.update({ where: { id: '<UUID>' }, data: { databaseId: '<UUID>' }, select: { id: true } }).execute()
db.cryptoAuthModule.delete({ where: { id: '<UUID>' } }).execute()Examples
List all cryptoAuthModule records
const items = await db.cryptoAuthModule.findMany({
select: { id: true, databaseId: true }
}).execute();Create a cryptoAuthModule
const item = await db.cryptoAuthModule.create({
data: { databaseId: '<UUID>', schemaId: '<UUID>', usersTableId: '<UUID>', secretsTableId: '<UUID>', sessionsTableId: '<UUID>', sessionCredentialsTableId: '<UUID>', addressesTableId: '<UUID>', userField: '<String>', cryptoNetwork: '<String>', signInRequestChallenge: '<String>', signInRecordFailure: '<String>', signUpWithKey: '<String>', signInWithChallenge: '<String>' },
select: { id: true }
}).execute();currentIpAddress
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Execute the currentIpAddress query
Usage
db.query.currentIpAddress().execute()Examples
Run currentIpAddress
const result = await db.query.currentIpAddress().execute();currentUserAgent
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Execute the currentUserAgent query
Usage
db.query.currentUserAgent().execute()Examples
Run currentUserAgent
const result = await db.query.currentUserAgent().execute();currentUserId
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Execute the currentUserId query
Usage
db.query.currentUserId().execute()Examples
Run currentUserId
const result = await db.query.currentUserId().execute();currentUser
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Execute the currentUser query
Usage
db.query.currentUser().execute()Examples
Run currentUser
const result = await db.query.currentUser().execute();databaseProvisionModule
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Tracks database provisioning requests and their status. The BEFORE INSERT trigger creates the database and sets database_id before RLS policies are evaluated.
Usage
db.databaseProvisionModule.findMany({ select: { id: true } }).execute()
db.databaseProvisionModule.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.databaseProvisionModule.create({ data: { databaseName: '<String>', ownerId: '<UUID>', subdomain: '<String>', domain: '<String>', modules: '<String>', options: '<JSON>', bootstrapUser: '<Boolean>', status: '<String>', errorMessage: '<String>', databaseId: '<UUID>', completedAt: '<Datetime>' }, select: { id: true } }).execute()
db.databaseProvisionModule.update({ where: { id: '<UUID>' }, data: { databaseName: '<String>' }, select: { id: true } }).execute()
db.databaseProvisionModule.delete({ where: { id: '<UUID>' } }).execute()Examples
List all databaseProvisionModule records
const items = await db.databaseProvisionModule.findMany({
select: { id: true, databaseName: true }
}).execute();Create a databaseProvisionModule
const item = await db.databaseProvisionModule.create({
data: { databaseName: '<String>', ownerId: '<UUID>', subdomain: '<String>', domain: '<String>', modules: '<String>', options: '<JSON>', bootstrapUser: '<Boolean>', status: '<String>', errorMessage: '<String>', databaseId: '<UUID>', completedAt: '<Datetime>' },
select: { id: true }
}).execute();databaseTransfer
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
ORM operations for DatabaseTransfer records
Usage
db.databaseTransfer.findMany({ select: { id: true } }).execute()
db.databaseTransfer.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.databaseTransfer.create({ data: { databaseId: '<UUID>', targetOwnerId: '<UUID>', sourceApproved: '<Boolean>', targetApproved: '<Boolean>', sourceApprovedAt: '<Datetime>', targetApprovedAt: '<Datetime>', status: '<String>', initiatedBy: '<UUID>', notes: '<String>', expiresAt: '<Datetime>', completedAt: '<Datetime>' }, select: { id: true } }).execute()
db.databaseTransfer.update({ where: { id: '<UUID>' }, data: { databaseId: '<UUID>' }, select: { id: true } }).execute()
db.databaseTransfer.delete({ where: { id: '<UUID>' } }).execute()Examples
List all databaseTransfer records
const items = await db.databaseTransfer.findMany({
select: { id: true, databaseId: true }
}).execute();Create a databaseTransfer
const item = await db.databaseTransfer.create({
data: { databaseId: '<UUID>', targetOwnerId: '<UUID>', sourceApproved: '<Boolean>', targetApproved: '<Boolean>', sourceApprovedAt: '<Datetime>', targetApprovedAt: '<Datetime>', status: '<String>', initiatedBy: '<UUID>', notes: '<String>', expiresAt: '<Datetime>', completedAt: '<Datetime>' },
select: { id: true }
}).execute();database
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
ORM operations for Database records
Usage
db.database.findMany({ select: { id: true } }).execute()
db.database.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.database.create({ data: { ownerId: '<UUID>', schemaHash: '<String>', name: '<String>', label: '<String>', hash: '<UUID>' }, select: { id: true } }).execute()
db.database.update({ where: { id: '<UUID>' }, data: { ownerId: '<UUID>' }, select: { id: true } }).execute()
db.database.delete({ where: { id: '<UUID>' } }).execute()Examples
List all database records
const items = await db.database.findMany({
select: { id: true, ownerId: true }
}).execute();Create a database
const item = await db.database.create({
data: { ownerId: '<UUID>', schemaHash: '<String>', name: '<String>', label: '<String>', hash: '<UUID>' },
select: { id: true }
}).execute();defaultIdsModule
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
ORM operations for DefaultIdsModule records
Usage
db.defaultIdsModule.findMany({ select: { id: true } }).execute()
db.defaultIdsModule.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.defaultIdsModule.create({ data: { databaseId: '<UUID>' }, select: { id: true } }).execute()
db.defaultIdsModule.update({ where: { id: '<UUID>' }, data: { databaseId: '<UUID>' }, select: { id: true } }).execute()
db.defaultIdsModule.delete({ where: { id: '<UUID>' } }).execute()Examples
List all defaultIdsModule records
const items = await db.defaultIdsModule.findMany({
select: { id: true, databaseId: true }
}).execute();Create a defaultIdsModule
const item = await db.defaultIdsModule.create({
data: { databaseId: '<UUID>' },
select: { id: true }
}).execute();defaultPrivilege
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
ORM operations for DefaultPrivilege records
Usage
db.defaultPrivilege.findMany({ select: { id: true } }).execute()
db.defaultPrivilege.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.defaultPrivilege.create({ data: { databaseId: '<UUID>', schemaId: '<UUID>', objectType: '<String>', privilege: '<String>', granteeName: '<String>', isGrant: '<Boolean>' }, select: { id: true } }).execute()
db.defaultPrivilege.update({ where: { id: '<UUID>' }, data: { databaseId: '<UUID>' }, select: { id: true } }).execute()
db.defaultPrivilege.delete({ where: { id: '<UUID>' } }).execute()Examples
List all defaultPrivilege records
const items = await db.defaultPrivilege.findMany({
select: { id: true, databaseId: true }
}).execute();Create a defaultPrivilege
const item = await db.defaultPrivilege.create({
data: { databaseId: '<UUID>', schemaId: '<UUID>', objectType: '<String>', privilege: '<String>', granteeName: '<String>', isGrant: '<Boolean>' },
select: { id: true }
}).execute();denormalizedTableField
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
ORM operations for DenormalizedTableField records
Usage
db.denormalizedTableField.findMany({ select: { id: true } }).execute()
db.denormalizedTableField.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.denormalizedTableField.create({ data: { databaseId: '<UUID>', tableId: '<UUID>', fieldId: '<UUID>', setIds: '<UUID>', refTableId: '<UUID>', refFieldId: '<UUID>', refIds: '<UUID>', useUpdates: '<Boolean>', updateDefaults: '<Boolean>', funcName: '<String>', funcOrder: '<Int>' }, select: { id: true } }).execute()
db.denormalizedTableField.update({ where: { id: '<UUID>' }, data: { databaseId: '<UUID>' }, select: { id: true } }).execute()
db.denormalizedTableField.delete({ where: { id: '<UUID>' } }).execute()Examples
List all denormalizedTableField records
const items = await db.denormalizedTableField.findMany({
select: { id: true, databaseId: true }
}).execute();Create a denormalizedTableField
const item = await db.denormalizedTableField.create({
data: { databaseId: '<UUID>', tableId: '<UUID>', fieldId: '<UUID>', setIds: '<UUID>', refTableId: '<UUID>', refFieldId: '<UUID>', refIds: '<UUID>', useUpdates: '<Boolean>', updateDefaults: '<Boolean>', funcName: '<String>', funcOrder: '<Int>' },
select: { id: true }
}).execute();devicesModule
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
ORM operations for DevicesModule records
Usage
db.devicesModule.findMany({ select: { id: true } }).execute()
db.devicesModule.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.devicesModule.create({ data: { databaseId: '<UUID>', schemaId: '<UUID>', userDevicesTableId: '<UUID>', deviceSettingsTableId: '<UUID>', userDevicesTable: '<String>', deviceSettingsTable: '<String>' }, select: { id: true } }).execute()
db.devicesModule.update({ where: { id: '<UUID>' }, data: { databaseId: '<UUID>' }, select: { id: true } }).execute()
db.devicesModule.delete({ where: { id: '<UUID>' } }).execute()Examples
List all devicesModule records
const items = await db.devicesModule.findMany({
select: { id: true, databaseId: true }
}).execute();Create a devicesModule
const item = await db.devicesModule.create({
data: { databaseId: '<UUID>', schemaId: '<UUID>', userDevicesTableId: '<UUID>', deviceSettingsTableId: '<UUID>', userDevicesTable: '<String>', deviceSettingsTable: '<String>' },
select: { id: true }
}).execute();disconnectAccount
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Execute the disconnectAccount mutation
Usage
db.mutation.disconnectAccount({ input: { accountId: '<UUID>' } }).execute()Examples
Run disconnectAccount
const result = await db.mutation.disconnectAccount({ input: { accountId: '<UUID>' } }).execute();domain
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
DNS domain and subdomain routing: maps hostnames to either an API endpoint or a site
Usage
db.domain.findMany({ select: { id: true } }).execute()
db.domain.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.domain.create({ data: { databaseId: '<UUID>', apiId: '<UUID>', siteId: '<UUID>', subdomain: '<Hostname>', domain: '<Hostname>' }, select: { id: true } }).execute()
db.domain.update({ where: { id: '<UUID>' }, data: { databaseId: '<UUID>' }, select: { id: true } }).execute()
db.domain.delete({ where: { id: '<UUID>' } }).execute()Examples
List all domain records
const items = await db.domain.findMany({
select: { id: true, databaseId: true }
}).execute();Create a domain
const item = await db.domain.create({
data: { databaseId: '<UUID>', apiId: '<UUID>', siteId: '<UUID>', subdomain: '<Hostname>', domain: '<Hostname>' },
select: { id: true }
}).execute();<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
User email addresses with verification and primary-email management
Usage
db.email.findMany({ select: { id: true } }).execute()
db.email.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.email.create({ data: { ownerId: '<UUID>', email: '<Email>', isVerified: '<Boolean>', isPrimary: '<Boolean>', name: '<String>' }, select: { id: true } }).execute()
db.email.update({ where: { id: '<UUID>' }, data: { ownerId: '<UUID>' }, select: { id: true } }).execute()
db.email.delete({ where: { id: '<UUID>' } }).execute()Examples
List all email records
const items = await db.email.findMany({
select: { id: true, ownerId: true }
}).execute();Create a email
const item = await db.email.create({
data: { ownerId: '<UUID>', email: '<Email>', isVerified: '<Boolean>', isPrimary: '<Boolean>', name: '<String>' },
select: { id: true }
}).execute();emailsModule
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
ORM operations for EmailsModule records
Usage
db.emailsModule.findMany({ select: { id: true } }).execute()
db.emailsModule.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.emailsModule.create({ data: { databaseId: '<UUID>', schemaId: '<UUID>', privateSchemaId: '<UUID>', tableId: '<UUID>', ownerTableId: '<UUID>', tableName: '<String>' }, select: { id: true } }).execute()
db.emailsModule.update({ where: { id: '<UUID>' }, data: { databaseId: '<UUID>' }, select: { id: true } }).execute()
db.emailsModule.delete({ where: { id: '<UUID>' } }).execute()Examples
List all emailsModule records
const items = await db.emailsModule.findMany({
select: { id: true, databaseId: true }
}).execute();Create a emailsModule
const item = await db.emailsModule.create({
data: { databaseId: '<UUID>', schemaId: '<UUID>', privateSchemaId: '<UUID>', tableId: '<UUID>', ownerTableId: '<UUID>', tableName: '<String>' },
select: { id: true }
}).execute();embeddingChunk
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
ORM operations for EmbeddingChunk records
Usage
db.embeddingChunk.findMany({ select: { id: true } }).execute()
db.embeddingChunk.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.embeddingChunk.create({ data: { databaseId: '<UUID>', tableId: '<UUID>', embeddingFieldId: '<UUID>', chunksTableId: '<UUID>', chunksTableName: '<String>', contentFieldName: '<String>', dimensions: '<Int>', metric: '<String>', chunkSize: '<Int>', chunkOverlap: '<Int>', chunkStrategy: '<String>', metadataFields: '<JSON>', enqueueChunkingJob: '<Boolean>', chunkingTaskName: '<String>', parentFkFieldId: '<UUID>' }, select: { id: true } }).execute()
db.embeddingChunk.update({ where: { id: '<UUID>' }, data: { databaseId: '<UUID>' }, select: { id: true } }).execute()
db.embeddingChunk.delete({ where: { id: '<UUID>' } }).execute()Examples
List all embeddingChunk records
const items = await db.embeddingChunk.findMany({
select: { id: true, databaseId: true }
}).execute();Create a embeddingChunk
const item = await db.embeddingChunk.create({
data: { databaseId: '<UUID>', tableId: '<UUID>', embeddingFieldId: '<UUID>', chunksTableId: '<UUID>', chunksTableName: '<String>', contentFieldName: '<String>', dimensions: '<Int>', metric: '<String>', chunkSize: '<Int>', chunkOverlap: '<Int>', chunkStrategy: '<String>', metadataFields: '<JSON>', enqueueChunkingJob: '<Boolean>', chunkingTaskName: '<String>', parentFkFieldId: '<UUID>' },
select: { id: true }
}).execute();encryptedSecretsModule
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
ORM operations for EncryptedSecretsModule records
Usage
db.encryptedSecretsModule.findMany({ select: { id: true } }).execute()
db.encryptedSecretsModule.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.encryptedSecretsModule.create({ data: { databaseId: '<UUID>', schemaId: '<UUID>', tableId: '<UUID>', tableName: '<String>' }, select: { id: true } }).execute()
db.encryptedSecretsModule.update({ where: { id: '<UUID>' }, data: { databaseId: '<UUID>' }, select: { id: true } }).execute()
db.encryptedSecretsModule.delete({ where: { id: '<UUID>' } }).execute()Examples
List all encryptedSecretsModule records
const items = await db.encryptedSecretsModule.findMany({
select: { id: true, databaseId: true }
}).execute();Create a encryptedSecretsModule
const item = await db.encryptedSecretsModule.create({
data: { databaseId: '<UUID>', schemaId: '<UUID>', tableId: '<UUID>', tableName: '<String>' },
select: { id: true }
}).execute();entityTypeProvision
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Provisions a new membership entity type. Each INSERT creates an entity table, registers a membership type, and installs the required modules (permissions, memberships, limits) plus optional modules (profiles, levels, invites). Uses provision_membership_table() internally. Graceful: duplicate (database_id, prefix) pairs are silently skipped via the unique constraint (use INSERT ... ON CONFLICT DO NOTHING). Policy behavior: by default the five entity-table RLS policies are applied (gated by is_visible). Set table_provision to a single jsonb object (using the same shape as provision_table() / blueprint tables[] entries) to replace the defaults with your own; set skip_entity_policies=true as an escape hatch to apply zero policies.
Usage
db.entityTypeProvision.findMany({ select: { id: true } }).execute()
db.entityTypeProvision.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.entityTypeProvision.create({ data: { databaseId: '<UUID>', name: '<String>', prefix: '<String>', description: '<String>', parentEntity: '<String>', tableName: '<String>', isVisible: '<Boolean>', hasLimits: '<Boolean>', hasProfiles: '<Boolean>', hasLevels: '<Boolean>', hasStorage: '<Boolean>', hasInvites: '<Boolean>', storageConfig: '<JSON>', skipEntityPolicies: '<Boolean>', tableProvision: '<JSON>', outMembershipType: '<Int>', outEntityTableId: '<UUID>', outEntityTableName: '<String>', outInstalledModules: '<String>', outStorageModuleId: '<UUID>', outBucketsTableId: '<UUID>', outFilesTableId: '<UUID>', outInvitesModuleId: '<UUID>' }, select: { id: true } }).execute()
db.entityTypeProvision.update({ where: { id: '<UUID>' }, data: { databaseId: '<UUID>' }, select: { id: true } }).execute()
db.entityTypeProvision.delete({ where: { id: '<UUID>' } }).execute()Examples
List all entityTypeProvision records
const items = await db.entityTypeProvision.findMany({
select: { id: true, databaseId: true }
}).execute();Create a entityTypeProvision
const item = await db.entityTypeProvision.create({
data: { databaseId: '<UUID>', name: '<String>', prefix: '<String>', description: '<String>', parentEntity: '<String>', tableName: '<String>', isVisible: '<Boolean>', hasLimits: '<Boolean>', hasProfiles: '<Boolean>', hasLevels: '<Boolean>', hasStorage: '<Boolean>', hasInvites: '<Boolean>', storageConfig: '<JSON>', skipEntityPolicies: '<Boolean>', tableProvision: '<JSON>', outMembershipType: '<Int>', outEntityTableId: '<UUID>', outEntityTableName: '<String>', outInstalledModules: '<String>', outStorageModuleId: '<UUID>', outBucketsTableId: '<UUID>', outFilesTableId: '<UUID>', outInvitesModuleId: '<UUID>' },
select: { id: true }
}).execute();enum
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
ORM operations for Enum records
Usage
db.enum.findMany({ select: { id: true } }).execute()
db.enum.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.enum.create({ data: { databaseId: '<UUID>', schemaId: '<UUID>', name: '<String>', label: '<String>', description: '<String>', values: '<String>', smartTags: '<JSON>', category: '<ObjectCategory>', module: '<String>', scope: '<Int>', tags: '<String>' }, select: { id: true } }).execute()
db.enum.update({ where: { id: '<UUID>' }, data: { databaseId: '<UUID>' }, select: { id: true } }).execute()
db.enum.delete({ where: { id: '<UUID>' } }).execute()Examples
List all enum records
const items = await db.enum.findMany({
select: { id: true, databaseId: true }
}).execute();Create a enum
const item = await db.enum.create({
data: { databaseId: '<UUID>', schemaId: '<UUID>', name: '<String>', label: '<String>', description: '<String>', values: '<String>', smartTags: '<JSON>', category: '<ObjectCategory>', module: '<String>', scope: '<Int>', tags: '<String>' },
select: { id: true }
}).execute();extendTokenExpires
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Execute the extendTokenExpires mutation
Usage
db.mutation.extendTokenExpires({ input: { amount: '<IntervalInput>' } }).execute()Examples
Run extendTokenExpires
const result = await db.mutation.extendTokenExpires({ input: { amount: '<IntervalInput>' } }).execute();fieldModule
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
ORM operations for FieldModule records
Usage
db.fieldModule.findMany({ select: { id: true } }).execute()
db.fieldModule.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.fieldModule.create({ data: { databaseId: '<UUID>', privateSchemaId: '<UUID>', tableId: '<UUID>', fieldId: '<UUID>', nodeType: '<String>', data: '<JSON>', triggers: '<String>', functions: '<String>' }, select: { id: true } }).execute()
db.fieldModule.update({ where: { id: '<UUID>' }, data: { databaseId: '<UUID>' }, select: { id: true } }).execute()
db.fieldModule.delete({ where: { id: '<UUID>' } }).execute()Examples
List all fieldModule records
const items = await db.fieldModule.findMany({
select: { id: true, databaseId: true }
}).execute();Create a fieldModule
const item = await db.fieldModule.create({
data: { databaseId: '<UUID>', privateSchemaId: '<UUID>', tableId: '<UUID>', fieldId: '<UUID>', nodeType: '<String>', data: '<JSON>', triggers: '<String>', functions: '<String>' },
select: { id: true }
}).execute();field
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
ORM operations for Field records
Usage
db.field.findMany({ select: { id: true } }).execute()
db.field.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.field.create({ data: { databaseId: '<UUID>', tableId: '<UUID>', name: '<String>', label: '<String>', description: '<String>', smartTags: '<JSON>', isRequired: '<Boolean>', apiRequired: '<Boolean>', defaultValue: '<String>', defaultValueAst: '<JSON>', type: '<String>', fieldOrder: '<Int>', regexp: '<String>', chk: '<JSON>', chkExpr: '<JSON>', min: '<Float>', max: '<Float>', tags: '<String>', category: '<ObjectCategory>', module: '<String>', scope: '<Int>' }, select: { id: true } }).execute()
db.field.update({ where: { id: '<UUID>' }, data: { databaseId: '<UUID>' }, select: { id: true } }).execute()
db.field.delete({ where: { id: '<UUID>' } }).execute()Examples
List all field records
const items = await db.field.findMany({
select: { id: true, databaseId: true }
}).execute();Create a field
const item = await db.field.create({
data: { databaseId: '<UUID>', tableId: '<UUID>', name: '<String>', label: '<String>', description: '<String>', smartTags: '<JSON>', isRequired: '<Boolean>', apiRequired: '<Boolean>', defaultValue: '<String>', defaultValueAst: '<JSON>', type: '<String>', fieldOrder: '<Int>', regexp: '<String>', chk: '<JSON>', chkExpr: '<JSON>', min: '<Float>', max: '<Float>', tags: '<String>', category: '<ObjectCategory>', module: '<String>', scope: '<Int>' },
select: { id: true }
}).execute();foreignKeyConstraint
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
ORM operations for ForeignKeyConstraint records
Usage
db.foreignKeyConstraint.findMany({ select: { id: true } }).execute()
db.foreignKeyConstraint.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.foreignKeyConstraint.create({ data: { databaseId: '<UUID>', tableId: '<UUID>', name: '<String>', description: '<String>', smartTags: '<JSON>', type: '<String>', fieldIds: '<UUID>', refTableId: '<UUID>', refFieldIds: '<UUID>', deleteAction: '<String>', updateAction: '<String>', category: '<ObjectCategory>', module: '<String>', scope: '<Int>', tags: '<String>' }, select: { id: true } }).execute()
db.foreignKeyConstraint.update({ where: { id: '<UUID>' }, data: { databaseId: '<UUID>' }, select: { id: true } }).execute()
db.foreignKeyConstraint.delete({ where: { id: '<UUID>' } }).execute()Examples
List all foreignKeyConstraint records
const items = await db.foreignKeyConstraint.findMany({
select: { id: true, databaseId: true }
}).execute();Create a foreignKeyConstraint
const item = await db.foreignKeyConstraint.create({
data: { databaseId: '<UUID>', tableId: '<UUID>', name: '<String>', description: '<String>', smartTags: '<JSON>', type: '<String>', fieldIds: '<UUID>', refTableId: '<UUID>', refFieldIds: '<UUID>', deleteAction: '<String>', updateAction: '<String>', category: '<ObjectCategory>', module: '<String>', scope: '<Int>', tags: '<String>' },
select: { id: true }
}).execute();forgotPassword
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Execute the forgotPassword mutation
Usage
db.mutation.forgotPassword({ input: { email: '<Email>' } }).execute()Examples
Run forgotPassword
const result = await db.mutation.forgotPassword({ input: { email: '<Email>' } }).execute();freezeObjects
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Execute the freezeObjects mutation
Usage
db.mutation.freezeObjects({ input: { databaseId: '<UUID>', id: '<UUID>' } }).execute()Examples
Run freezeObjects
const result = await db.mutation.freezeObjects({ input: { databaseId: '<UUID>', id: '<UUID>' } }).execute();fullTextSearch
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
ORM operations for FullTextSearch records
Usage
db.fullTextSearch.findMany({ select: { id: true } }).execute()
db.fullTextSearch.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.fullTextSearch.create({ data: { databaseId: '<UUID>', tableId: '<UUID>', fieldId: '<UUID>', fieldIds: '<UUID>', weights: '<String>', langs: '<String>' }, select: { id: true } }).execute()
db.fullTextSearch.update({ where: { id: '<UUID>' }, data: { databaseId: '<UUID>' }, select: { id: true } }).execute()
db.fullTextSearch.delete({ where: { id: '<UUID>' } }).execute()Examples
List all fullTextSearch records
const items = await db.fullTextSearch.findMany({
select: { id: true, databaseId: true }
}).execute();Create a fullTextSearch
const item = await db.fullTextSearch.create({
data: { databaseId: '<UUID>', tableId: '<UUID>', fieldId: '<UUID>', fieldIds: '<UUID>', weights: '<String>', langs: '<String>' },
select: { id: true }
}).execute();getAllObjectsFromRoot
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Reads and enables pagination through a set of Object.
Usage
db.query.getAllObjectsFromRoot({ databaseId: '<UUID>', id: '<UUID>', first: '<Int>', offset: '<Int>', after: '<Cursor>' }).execute()Examples
Run getAllObjectsFromRoot
const result = await db.query.getAllObjectsFromRoot({ databaseId: '<UUID>', id: '<UUID>', first: '<Int>', offset: '<Int>', after: '<Cursor>' }).execute();getAllRecord
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
ORM operations for GetAllRecord records
Usage
db.getAllRecord.findMany({ select: { id: true } }).execute()
db.getAllRecord.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.getAllRecord.create({ data: { path: '<String>', data: '<JSON>' }, select: { id: true } }).execute()
db.getAllRecord.update({ where: { id: '<UUID>' }, data: { path: '<String>' }, select: { id: true } }).execute()
db.getAllRecord.delete({ where: { id: '<UUID>' } }).execute()Examples
List all getAllRecord records
const items = await db.getAllRecord.findMany({
select: { id: true, path: true }
}).execute();Create a getAllRecord
const item = await db.getAllRecord.create({
data: { path: '<String>', data: '<JSON>' },
select: { id: true }
}).execute();getObjectAtPath
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Execute the getObjectAtPath query
Usage
db.query.getObjectAtPath({ dbId: '<UUID>', storeId: '<UUID>', path: '<String>', refname: '<String>' }).execute()Examples
Run getObjectAtPath
const result = await db.query.getObjectAtPath({ dbId: '<UUID>', storeId: '<UUID>', path: '<String>', refname: '<String>' }).execute();getPathObjectsFromRoot
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Reads and enables pagination through a set of Object.
Usage
db.query.getPathObjectsFromRoot({ databaseId: '<UUID>', id: '<UUID>', path: '<String>', first: '<Int>', offset: '<Int>', after: '<Cursor>' }).execute()Examples
Run getPathObjectsFromRoot
const result = await db.query.getPathObjectsFromRoot({ databaseId: '<UUID>', id: '<UUID>', path: '<String>', first: '<Int>', offset: '<Int>', after: '<Cursor>' }).execute();hierarchyModule
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
ORM operations for HierarchyModule records
Usage
db.hierarchyModule.findMany({ select: { id: true } }).execute()
db.hierarchyModule.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.hierarchyModule.create({ data: { databaseId: '<UUID>', schemaId: '<UUID>', privateSchemaId: '<UUID>', chartEdgesTableId: '<UUID>', chartEdgesTableName: '<String>', hierarchySprtTableId: '<UUID>', hierarchySprtTableName: '<String>', chartEdgeGrantsTableId: '<UUID>', chartEdgeGrantsTableName: '<String>', entityTableId: '<UUID>', usersTableId: '<UUID>', prefix: '<String>', privateSchemaName: '<String>', sprtTableName: '<String>', rebuildHierarchyFunction: '<String>', getSubordinatesFunction: '<String>', getManagersFunction: '<String>', isManagerOfFunction: '<String>' }, select: { id: true } }).execute()
db.hierarchyModule.update({ where: { id: '<UUID>' }, data: { databaseId: '<UUID>' }, select: { id: true } }).execute()
db.hierarchyModule.delete({ where: { id: '<UUID>' } }).execute()Examples
List all hierarchyModule records
const items = await db.hierarchyModule.findMany({
select: { id: true, databaseId: true }
}).execute();Create a hierarchyModule
const item = await db.hierarchyModule.create({
data: { databaseId: '<UUID>', schemaId: '<UUID>', privateSchemaId: '<UUID>', chartEdgesTableId: '<UUID>', chartEdgesTableName: '<String>', hierarchySprtTableId: '<UUID>', hierarchySprtTableName: '<String>', chartEdgeGrantsTableId: '<UUID>', chartEdgeGrantsTableName: '<String>', entityTableId: '<UUID>', usersTableId: '<UUID>', prefix: '<String>', privateSchemaName: '<String>', sprtTableName: '<String>', rebuildHierarchyFunction: '<String>', getSubordinatesFunction: '<String>', getManagersFunction: '<String>', isManagerOfFunction: '<String>' },
select: { id: true }
}).execute();identityProvider
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
ORM operations for IdentityProvider records
Usage
db.identityProvider.findMany({ select: { id: true } }).execute()
db.identityProvider.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.identityProvider.create({ data: { slug: '<String>', kind: '<String>', displayName: '<String>', enabled: '<Boolean>', isBuiltIn: '<Boolean>' }, select: { id: true } }).execute()
db.identityProvider.update({ where: { id: '<UUID>' }, data: { slug: '<String>' }, select: { id: true } }).execute()
db.identityProvider.delete({ where: { id: '<UUID>' } }).execute()Examples
List all identityProvider records
const items = await db.identityProvider.findMany({
select: { id: true, slug: true }
}).execute();Create a identityProvider
const item = await db.identityProvider.create({
data: { slug: '<String>', kind: '<String>', displayName: '<String>', enabled: '<Boolean>', isBuiltIn: '<Boolean>' },
select: { id: true }
}).execute();identityProvidersModule
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Config row for the identity_providers_module, which provisions a per-database identity_providers config table holding OAuth2 / OIDC (and future SAML) provider definitions: protocol kind, endpoint URLs, encrypted client secret, scopes, audience validation, PKCE, and email-handling flags. Built-in providers (google, github, apple, ...) are seeded as is_built_in=true rows; custom providers use slugs of the form custom:<slug>.
Usage
db.identityProvidersModule.findMany({ select: { id: true } }).execute()
db.identityProvidersModule.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.identityProvidersModule.create({ data: { databaseId: '<UUID>', schemaId: '<UUID>', privateSchemaId: '<UUID>', tableId: '<UUID>', tableName: '<String>' }, select: { id: true } }).execute()
db.identityProvidersModule.update({ where: { id: '<UUID>' }, data: { databaseId: '<UUID>' }, select: { id: true } }).execute()
db.identityProvidersModule.delete({ where: { id: '<UUID>' } }).execute()Examples
List all identityProvidersModule records
const items = await db.identityProvidersModule.findMany({
select: { id: true, databaseId: true }
}).execute();Create a identityProvidersModule
const item = await db.identityProvidersModule.create({
data: { databaseId: '<UUID>', schemaId: '<UUID>', privateSchemaId: '<UUID>', tableId: '<UUID>', tableName: '<String>' },
select: { id: true }
}).execute();index
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
ORM operations for Index records
Usage
db.index.findMany({ select: { id: true } }).execute()
db.index.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.index.create({ data: { databaseId: '<UUID>', tableId: '<UUID>', name: '<String>', fieldIds: '<UUID>', includeFieldIds: '<UUID>', accessMethod: '<String>', indexParams: '<JSON>', whereClause: '<JSON>', isUnique: '<Boolean>', options: '<JSON>', opClasses: '<String>', smartTags: '<JSON>', category: '<ObjectCategory>', module: '<String>', scope: '<Int>', tags: '<String>' }, select: { id: true } }).execute()
db.index.update({ where: { id: '<UUID>' }, data: { databaseId: '<UUID>' }, select: { id: true } }).execute()
db.index.delete({ where: { id: '<UUID>' } }).execute()Examples
List all index records
const items = await db.index.findMany({
select: { id: true, databaseId: true }
}).execute();Create a index
const item = await db.index.create({
data: { databaseId: '<UUID>', tableId: '<UUID>', name: '<String>', fieldIds: '<UUID>', includeFieldIds: '<UUID>', accessMethod: '<String>', indexParams: '<JSON>', whereClause: '<JSON>', isUnique: '<Boolean>', options: '<JSON>', opClasses: '<String>', smartTags: '<JSON>', category: '<ObjectCategory>', module: '<String>', scope: '<Int>', tags: '<String>' },
select: { id: true }
}).execute();initEmptyRepo
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Execute the initEmptyRepo mutation
Usage
db.mutation.initEmptyRepo({ input: { dbId: '<UUID>', storeId: '<UUID>' } }).execute()Examples
Run initEmptyRepo
const result = await db.mutation.initEmptyRepo({ input: { dbId: '<UUID>', storeId: '<UUID>' } }).execute();insertNodeAtPath
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Execute the insertNodeAtPath mutation
Usage
db.mutation.insertNodeAtPath({ input: '<InsertNodeAtPathInput>' }).execute()Examples
Run insertNodeAtPath
const result = await db.mutation.insertNodeAtPath({ input: '<InsertNodeAtPathInput>' }).execute();invite
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Invitation records sent to prospective members via email, with token-based redemption and expiration
Usage
db.invite.findMany({ select: { id: true } }).execute()
db.invite.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.invite.create({ data: { email: '<Email>', senderId: '<UUID>', inviteToken: '<String>', inviteValid: '<Boolean>', inviteLimit: '<Int>', inviteCount: '<Int>', multiple: '<Boolean>', data: '<JSON>', expiresAt: '<Datetime>' }, select: { id: true } }).execute()
db.invite.update({ where: { id: '<UUID>' }, data: { email: '<Email>' }, select: { id: true } }).execute()
db.invite.delete({ where: { id: '<UUID>' } }).execute()Examples
List all invite records
const items = await db.invite.findMany({
select: { id: true, email: true }
}).execute();Create a invite
const item = await db.invite.create({
data: { email: '<Email>', senderId: '<UUID>', inviteToken: '<String>', inviteValid: '<Boolean>', inviteLimit: '<Int>', inviteCount: '<Int>', multiple: '<Boolean>', data: '<JSON>', expiresAt: '<Datetime>' },
select: { id: true }
}).execute();invitesModule
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
ORM operations for InvitesModule records
Usage
db.invitesModule.findMany({ select: { id: true } }).execute()
db.invitesModule.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.invitesModule.create({ data: { databaseId: '<UUID>', schemaId: '<UUID>', privateSchemaId: '<UUID>', emailsTableId: '<UUID>', usersTableId: '<UUID>', invitesTableId: '<UUID>', claimedInvitesTableId: '<UUID>', invitesTableName: '<String>', claimedInvitesTableName: '<String>', submitInviteCodeFunction: '<String>', prefix: '<String>', membershipType: '<Int>', entityTableId: '<UUID>' }, select: { id: true } }).execute()
db.invitesModule.update({ where: { id: '<UUID>' }, data: { databaseId: '<UUID>' }, select: { id: true } }).execute()
db.invitesModule.delete({ where: { id: '<UUID>' } }).execute()Examples
List all invitesModule records
const items = await db.invitesModule.findMany({
select: { id: true, databaseId: true }
}).execute();Create a invitesModule
const item = await db.invitesModule.create({
data: { databaseId: '<UUID>', schemaId: '<UUID>', privateSchemaId: '<UUID>', emailsTableId: '<UUID>', usersTableId: '<UUID>', invitesTableId: '<UUID>', claimedInvitesTableId: '<UUID>', invitesTableName: '<String>', claimedInvitesTableName: '<String>', submitInviteCodeFunction: '<String>', prefix: '<String>', membershipType: '<Int>', entityTableId: '<UUID>' },
select: { id: true }
}).execute();levelsModule
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
ORM operations for LevelsModule records
Usage
db.levelsModule.findMany({ select: { id: true } }).execute()
db.levelsModule.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.levelsModule.create({ data: { databaseId: '<UUID>', schemaId: '<UUID>', privateSchemaId: '<UUID>', stepsTableId: '<UUID>', stepsTableName: '<String>', achievementsTableId: '<UUID>', achievementsTableName: '<String>', levelsTableId: '<UUID>', levelsTableName: '<String>', levelRequirementsTableId: '<UUID>', levelRequirementsTableName: '<String>', completedStep: '<String>', incompletedStep: '<String>', tgAchievement: '<String>', tgAchievementToggle: '<String>', tgAchievementToggleBoolean: '<String>', tgAchievementBoolean: '<String>', upsertAchievement: '<String>', tgUpdateAchievements: '<String>', stepsRequired: '<String>', levelAchieved: '<String>', prefix: '<String>', membershipType: '<Int>', entityTableId: '<UUID>', actorTableId: '<UUID>' }, select: { id: true } }).execute()
db.levelsModule.update({ where: { id: '<UUID>' }, data: { databaseId: '<UUID>' }, select: { id: true } }).execute()
db.levelsModule.delete({ where: { id: '<UUID>' } }).execute()Examples
List all levelsModule records
const items = await db.levelsModule.findMany({
select: { id: true, databaseId: true }
}).execute();Create a levelsModule
const item = await db.levelsModule.create({
data: { databaseId: '<UUID>', schemaId: '<UUID>', privateSchemaId: '<UUID>', stepsTableId: '<UUID>', stepsTableName: '<String>', achievementsTableId: '<UUID>', achievementsTableName: '<String>', levelsTableId: '<UUID>', levelsTableName: '<String>', levelRequirementsTableId: '<UUID>', levelRequirementsTableName: '<String>', completedStep: '<String>', incompletedStep: '<String>', tgAchievement: '<String>', tgAchievementToggle: '<String>', tgAchievementToggleBoolean: '<String>', tgAchievementBoolean: '<String>', upsertAchievement: '<String>', tgUpdateAchievements: '<String>', stepsRequired: '<String>', levelAchieved: '<String>', prefix: '<String>', membershipType: '<Int>', entityTableId: '<UUID>', actorTableId: '<UUID>' },
select: { id: true }
}).execute();limitsModule
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
ORM operations for LimitsModule records
Usage
db.limitsModule.findMany({ select: { id: true } }).execute()
db.limitsModule.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.limitsModule.create({ data: { databaseId: '<UUID>', schemaId: '<UUID>', privateSchemaId: '<UUID>', tableId: '<UUID>', tableName: '<String>', defaultTableId: '<UUID>', defaultTableName: '<String>', limitIncrementFunction: '<String>', limitDecrementFunction: '<String>', limitIncrementTrigger: '<String>', limitDecrementTrigger: '<String>', limitUpdateTrigger: '<String>', limitCheckFunction: '<String>', aggregateTableId: '<UUID>', prefix: '<String>', membershipType: '<Int>', entityTableId: '<UUID>', actorTableId: '<UUID>' }, select: { id: true } }).execute()
db.limitsModule.update({ where: { id: '<UUID>' }, data: { databaseId: '<UUID>' }, select: { id: true } }).execute()
db.limitsModule.delete({ where: { id: '<UUID>' } }).execute()Examples
List all limitsModule records
const items = await db.limitsModule.findMany({
select: { id: true, databaseId: true }
}).execute();Create a limitsModule
const item = await db.limitsModule.create({
data: { databaseId: '<UUID>', schemaId: '<UUID>', privateSchemaId: '<UUID>', tableId: '<UUID>', tableName: '<String>', defaultTableId: '<UUID>', defaultTableName: '<String>', limitIncrementFunction: '<String>', limitDecrementFunction: '<String>', limitIncrementTrigger: '<String>', limitDecrementTrigger: '<String>', limitUpdateTrigger: '<String>', limitCheckFunction: '<String>', aggregateTableId: '<UUID>', prefix: '<String>', membershipType: '<Int>', entityTableId: '<UUID>', actorTableId: '<UUID>' },
select: { id: true }
}).execute();membershipType
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Defines the different scopes of membership (e.g. App Member, Organization Member, Group Member)
Usage
db.membershipType.findMany({ select: { id: true } }).execute()
db.membershipType.findOne({ id: '<Int>', select: { id: true } }).execute()
db.membershipType.create({ data: { name: '<String>', description: '<String>', prefix: '<String>', parentMembershipType: '<Int>', hasUsersTableEntry: '<Boolean>' }, select: { id: true } }).execute()
db.membershipType.update({ where: { id: '<Int>' }, data: { name: '<String>' }, select: { id: true } }).execute()
db.membershipType.delete({ where: { id: '<Int>' } }).execute()Examples
List all membershipType records
const items = await db.membershipType.findMany({
select: { id: true, name: true }
}).execute();Create a membershipType
const item = await db.membershipType.create({
data: { name: '<String>', description: '<String>', prefix: '<String>', parentMembershipType: '<Int>', hasUsersTableEntry: '<Boolean>' },
select: { id: true }
}).execute();membershipTypesModule
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
ORM operations for MembershipTypesModule records
Usage
db.membershipTypesModule.findMany({ select: { id: true } }).execute()
db.membershipTypesModule.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.membershipTypesModule.create({ data: { databaseId: '<UUID>', schemaId: '<UUID>', tableId: '<UUID>', tableName: '<String>' }, select: { id: true } }).execute()
db.membershipTypesModule.update({ where: { id: '<UUID>' }, data: { databaseId: '<UUID>' }, select: { id: true } }).execute()
db.membershipTypesModule.delete({ where: { id: '<UUID>' } }).execute()Examples
List all membershipTypesModule records
const items = await db.membershipTypesModule.findMany({
select: { id: true, databaseId: true }
}).execute();Create a membershipTypesModule
const item = await db.membershipTypesModule.create({
data: { databaseId: '<UUID>', schemaId: '<UUID>', tableId: '<UUID>', tableName: '<String>' },
select: { id: true }
}).execute();membershipsModule
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
ORM operations for MembershipsModule records
Usage
db.membershipsModule.findMany({ select: { id: true } }).execute()
db.membershipsModule.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.membershipsModule.create({ data: { databaseId: '<UUID>', schemaId: '<UUID>', privateSchemaId: '<UUID>', membershipsTableId: '<UUID>', membershipsTableName: '<String>', membersTableId: '<UUID>', membersTableName: '<String>', membershipDefaultsTableId: '<UUID>', membershipDefaultsTableName: '<String>', membershipSettingsTableId: '<UUID>', membershipSettingsTableName: '<String>', grantsTableId: '<UUID>', grantsTableName: '<String>', actorTableId: '<UUID>', limitsTableId: '<UUID>', defaultLimitsTableId: '<UUID>', permissionsTableId: '<UUID>', defaultPermissionsTableId: '<UUID>', sprtTableId: '<UUID>', adminGrantsTableId: '<UUID>', adminGrantsTableName: '<String>', ownerGrantsTableId: '<UUID>', ownerGrantsTableName: '<String>', membershipType: '<Int>', entityTableId: '<UUID>', entityTableOwnerId: '<UUID>', prefix: '<String>', actorMaskCheck: '<String>', actorPermCheck: '<String>', entityIdsByMask: '<String>', entityIdsByPerm: '<String>', entityIdsFunction: '<String>', memberProfilesTableId: '<UUID>' }, select: { id: true } }).execute()
db.membershipsModule.update({ where: { id: '<UUID>' }, data: { databaseId: '<UUID>' }, select: { id: true } }).execute()
db.membershipsModule.delete({ where: { id: '<UUID>' } }).execute()Examples
List all membershipsModule records
const items = await db.membershipsModule.findMany({
select: { id: true, databaseId: true }
}).execute();Create a membershipsModule
const item = await db.membershipsModule.create({
data: { databaseId: '<UUID>', schemaId: '<UUID>', privateSchemaId: '<UUID>', membershipsTableId: '<UUID>', membershipsTableName: '<String>', membersTableId: '<UUID>', membersTableName: '<String>', membershipDefaultsTableId: '<UUID>', membershipDefaultsTableName: '<String>', membershipSettingsTableId: '<UUID>', membershipSettingsTableName: '<String>', grantsTableId: '<UUID>', grantsTableName: '<String>', actorTableId: '<UUID>', limitsTableId: '<UUID>', defaultLimitsTableId: '<UUID>', permissionsTableId: '<UUID>', defaultPermissionsTableId: '<UUID>', sprtTableId: '<UUID>', adminGrantsTableId: '<UUID>', adminGrantsTableName: '<String>', ownerGrantsTableId: '<UUID>', ownerGrantsTableName: '<String>', membershipType: '<Int>', entityTableId: '<UUID>', entityTableOwnerId: '<UUID>', prefix: '<String>', actorMaskCheck: '<String>', actorPermCheck: '<String>', entityIdsByMask: '<String>', entityIdsByPerm: '<String>', entityIdsFunction: '<String>', memberProfilesTableId: '<UUID>' },
select: { id: true }
}).execute();migrateFile
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
ORM operations for MigrateFile records
Usage
db.migrateFile.findMany({ select: { id: true } }).execute()
db.migrateFile.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.migrateFile.create({ data: { databaseId: '<UUID>', upload: '<Upload>' }, select: { id: true } }).execute()
db.migrateFile.update({ where: { id: '<UUID>' }, data: { databaseId: '<UUID>' }, select: { id: true } }).execute()
db.migrateFile.delete({ where: { id: '<UUID>' } }).execute()Examples
List all migrateFile records
const items = await db.migrateFile.findMany({
select: { id: true, databaseId: true }
}).execute();Create a migrateFile
const item = await db.migrateFile.create({
data: { databaseId: '<UUID>', upload: '<Upload>' },
select: { id: true }
}).execute();nodeTypeRegistry
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
ORM operations for NodeTypeRegistry records
Usage
db.nodeTypeRegistry.findMany({ select: { id: true } }).execute()
db.nodeTypeRegistry.findOne({ name: '<String>', select: { id: true } }).execute()
db.nodeTypeRegistry.create({ data: { slug: '<String>', category: '<String>', displayName: '<String>', description: '<String>', parameterSchema: '<JSON>', tags: '<String>' }, select: { id: true } }).execute()
db.nodeTypeRegistry.update({ where: { name: '<String>' }, data: { slug: '<String>' }, select: { id: true } }).execute()
db.nodeTypeRegistry.delete({ where: { name: '<String>' } }).execute()Examples
List all nodeTypeRegistry records
const items = await db.nodeTypeRegistry.findMany({
select: { name: true, slug: true }
}).execute();Create a nodeTypeRegistry
const item = await db.nodeTypeRegistry.create({
data: { slug: '<String>', category: '<String>', displayName: '<String>', description: '<String>', parameterSchema: '<JSON>', tags: '<String>' },
select: { name: true }
}).execute();notificationsModule
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
ORM operations for NotificationsModule records
Usage
db.notificationsModule.findMany({ select: { id: true } }).execute()
db.notificationsModule.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.notificationsModule.create({ data: { databaseId: '<UUID>', schemaId: '<UUID>', privateSchemaId: '<UUID>', notificationsTableId: '<UUID>', readStateTableId: '<UUID>', preferencesTableId: '<UUID>', channelsTableId: '<UUID>', deliveryLogTableId: '<UUID>', ownerTableId: '<UUID>', userSettingsTableId: '<UUID>', organizationSettingsTableId: '<UUID>', hasChannels: '<Boolean>', hasPreferences: '<Boolean>', hasSettingsExtension: '<Boolean>', hasDigestMetadata: '<Boolean>', hasSubscriptions: '<Boolean>' }, select: { id: true } }).execute()
db.notificationsModule.update({ where: { id: '<UUID>' }, data: { databaseId: '<UUID>' }, select: { id: true } }).execute()
db.notificationsModule.delete({ where: { id: '<UUID>' } }).execute()Examples
List all notificationsModule records
const items = await db.notificationsModule.findMany({
select: { id: true, databaseId: true }
}).execute();Create a notificationsModule
const item = await db.notificationsModule.create({
data: { databaseId: '<UUID>', schemaId: '<UUID>', privateSchemaId: '<UUID>', notificationsTableId: '<UUID>', readStateTableId: '<UUID>', preferencesTableId: '<UUID>', channelsTableId: '<UUID>', deliveryLogTableId: '<UUID>', ownerTableId: '<UUID>', userSettingsTableId: '<UUID>', organizationSettingsTableId: '<UUID>', hasChannels: '<Boolean>', hasPreferences: '<Boolean>', hasSettingsExtension: '<Boolean>', hasDigestMetadata: '<Boolean>', hasSubscriptions: '<Boolean>' },
select: { id: true }
}).execute();object
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
ORM operations for Object records
Usage
db.object.findMany({ select: { id: true } }).execute()
db.object.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.object.create({ data: { hashUuid: '<UUID>', databaseId: '<UUID>', kids: '<UUID>', ktree: '<String>', data: '<JSON>', frzn: '<Boolean>' }, select: { id: true } }).execute()
db.object.update({ where: { id: '<UUID>' }, data: { hashUuid: '<UUID>' }, select: { id: true } }).execute()
db.object.delete({ where: { id: '<UUID>' } }).execute()Examples
List all object records
const items = await db.object.findMany({
select: { id: true, hashUuid: true }
}).execute();Create a object
const item = await db.object.create({
data: { hashUuid: '<UUID>', databaseId: '<UUID>', kids: '<UUID>', ktree: '<String>', data: '<JSON>', frzn: '<Boolean>' },
select: { id: true }
}).execute();