
Orm Admin
- 1 installs
- 52 repo stars
- Updated August 5, 2026
- constructive-io/constructive
ORM client for the admin API providing typed CRUD operations for 37 tables and 15 custom operations.
About
ormadmin ORM client for the admin API provides typed CRUD operations for 37 tables and 15 custom operations.. Enables programmatic database access.
- Import and use the ORM client
- Typed CRUD operations for all admin entities
Orm Admin 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-adminAdd 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 admin API providing typed CRUD operations for 37 tables and 15 custom operations.
Files
orm-admin
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
ORM client for the admin API — provides typed CRUD operations for 37 tables and 15 custom operations
Usage
// Import the ORM client
import { db } from './orm';
// Available models: orgGetManagersRecord, orgGetSubordinatesRecord, appPermission, orgPermission, appLevelRequirement, orgMember, appPermissionDefault, orgPermissionDefault, ...
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
- app-permission
- org-permission
- app-level-requirement
- org-member
- app-permission-default
- org-permission-default
- app-admin-grant
- app-owner-grant
- app-achievement
- app-step
- org-admin-grant
- org-owner-grant
- membership-type
- app-limit-default
- org-limit-default
- org-chart-edge-grant
- app-claimed-invite
- app-grant
- app-membership-default
- org-membership-default
- org-claimed-invite
- app-limit-event
- org-limit-event
- org-grant
- org-chart-edge
- app-limit
- org-limit-aggregate
- org-member-profile
- org-limit
- app-level
- app-invite
- org-membership-setting
- org-invite
- app-membership
- org-membership
- app-permissions-get-padded-mask
- org-permissions-get-padded-mask
- org-is-manager-of
- app-permissions-get-mask
- org-permissions-get-mask
- steps-achieved
- app-permissions-get-mask-by-names
- org-permissions-get-mask-by-names
- app-permissions-get-by-mask
- org-permissions-get-by-mask
- steps-required
- submit-app-invite-code
- submit-org-invite-code
- request-upload-url
- provision-bucket
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();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();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();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();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();orgAdminGrant
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Records of admin role grants and revocations between members
Usage
db.orgAdminGrant.findMany({ select: { id: true } }).execute()
db.orgAdminGrant.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.orgAdminGrant.create({ data: { isGrant: '<Boolean>', actorId: '<UUID>', entityId: '<UUID>', grantorId: '<UUID>' }, select: { id: true } }).execute()
db.orgAdminGrant.update({ where: { id: '<UUID>' }, data: { isGrant: '<Boolean>' }, select: { id: true } }).execute()
db.orgAdminGrant.delete({ where: { id: '<UUID>' } }).execute()Examples
List all orgAdminGrant records
const items = await db.orgAdminGrant.findMany({
select: { id: true, isGrant: true }
}).execute();Create a orgAdminGrant
const item = await db.orgAdminGrant.create({
data: { isGrant: '<Boolean>', actorId: '<UUID>', entityId: '<UUID>', grantorId: '<UUID>' },
select: { id: true }
}).execute();orgChartEdgeGrant
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Append-only log of hierarchy edge grants and revocations; triggers apply changes to the edges table
Usage
db.orgChartEdgeGrant.findMany({ select: { id: true } }).execute()
db.orgChartEdgeGrant.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.orgChartEdgeGrant.create({ data: { entityId: '<UUID>', childId: '<UUID>', parentId: '<UUID>', grantorId: '<UUID>', isGrant: '<Boolean>', positionTitle: '<String>', positionLevel: '<Int>' }, select: { id: true } }).execute()
db.orgChartEdgeGrant.update({ where: { id: '<UUID>' }, data: { entityId: '<UUID>' }, select: { id: true } }).execute()
db.orgChartEdgeGrant.delete({ where: { id: '<UUID>' } }).execute()Examples
List all orgChartEdgeGrant records
const items = await db.orgChartEdgeGrant.findMany({
select: { id: true, entityId: true }
}).execute();Create a orgChartEdgeGrant
const item = await db.orgChartEdgeGrant.create({
data: { entityId: '<UUID>', childId: '<UUID>', parentId: '<UUID>', grantorId: '<UUID>', isGrant: '<Boolean>', positionTitle: '<String>', positionLevel: '<Int>' },
select: { id: true }
}).execute();orgChartEdge
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Organizational chart edges defining parent-child reporting relationships between members within an entity
Usage
db.orgChartEdge.findMany({ select: { id: true } }).execute()
db.orgChartEdge.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.orgChartEdge.create({ data: { entityId: '<UUID>', childId: '<UUID>', parentId: '<UUID>', positionTitle: '<String>', positionLevel: '<Int>' }, select: { id: true } }).execute()
db.orgChartEdge.update({ where: { id: '<UUID>' }, data: { entityId: '<UUID>' }, select: { id: true } }).execute()
db.orgChartEdge.delete({ where: { id: '<UUID>' } }).execute()Examples
List all orgChartEdge records
const items = await db.orgChartEdge.findMany({
select: { id: true, entityId: true }
}).execute();Create a orgChartEdge
const item = await db.orgChartEdge.create({
data: { entityId: '<UUID>', childId: '<UUID>', parentId: '<UUID>', positionTitle: '<String>', positionLevel: '<Int>' },
select: { id: true }
}).execute();orgClaimedInvite
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Records of successfully claimed invitations, linking senders to receivers
Usage
db.orgClaimedInvite.findMany({ select: { id: true } }).execute()
db.orgClaimedInvite.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.orgClaimedInvite.create({ data: { data: '<JSON>', senderId: '<UUID>', receiverId: '<UUID>', entityId: '<UUID>' }, select: { id: true } }).execute()
db.orgClaimedInvite.update({ where: { id: '<UUID>' }, data: { data: '<JSON>' }, select: { id: true } }).execute()
db.orgClaimedInvite.delete({ where: { id: '<UUID>' } }).execute()Examples
List all orgClaimedInvite records
const items = await db.orgClaimedInvite.findMany({
select: { id: true, data: true }
}).execute();Create a orgClaimedInvite
const item = await db.orgClaimedInvite.create({
data: { data: '<JSON>', senderId: '<UUID>', receiverId: '<UUID>', entityId: '<UUID>' },
select: { id: true }
}).execute();orgGetManagersRecord
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
ORM operations for OrgGetManagersRecord records
Usage
db.orgGetManagersRecord.findMany({ select: { id: true } }).execute()
db.orgGetManagersRecord.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.orgGetManagersRecord.create({ data: { userId: '<UUID>', depth: '<Int>' }, select: { id: true } }).execute()
db.orgGetManagersRecord.update({ where: { id: '<UUID>' }, data: { userId: '<UUID>' }, select: { id: true } }).execute()
db.orgGetManagersRecord.delete({ where: { id: '<UUID>' } }).execute()Examples
List all orgGetManagersRecord records
const items = await db.orgGetManagersRecord.findMany({
select: { id: true, userId: true }
}).execute();Create a orgGetManagersRecord
const item = await db.orgGetManagersRecord.create({
data: { userId: '<UUID>', depth: '<Int>' },
select: { id: true }
}).execute();orgGetSubordinatesRecord
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
ORM operations for OrgGetSubordinatesRecord records
Usage
db.orgGetSubordinatesRecord.findMany({ select: { id: true } }).execute()
db.orgGetSubordinatesRecord.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.orgGetSubordinatesRecord.create({ data: { userId: '<UUID>', depth: '<Int>' }, select: { id: true } }).execute()
db.orgGetSubordinatesRecord.update({ where: { id: '<UUID>' }, data: { userId: '<UUID>' }, select: { id: true } }).execute()
db.orgGetSubordinatesRecord.delete({ where: { id: '<UUID>' } }).execute()Examples
List all orgGetSubordinatesRecord records
const items = await db.orgGetSubordinatesRecord.findMany({
select: { id: true, userId: true }
}).execute();Create a orgGetSubordinatesRecord
const item = await db.orgGetSubordinatesRecord.create({
data: { userId: '<UUID>', depth: '<Int>' },
select: { id: true }
}).execute();orgGrant
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Records of individual permission grants and revocations for members via bitmask
Usage
db.orgGrant.findMany({ select: { id: true } }).execute()
db.orgGrant.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.orgGrant.create({ data: { permissions: '<BitString>', isGrant: '<Boolean>', actorId: '<UUID>', entityId: '<UUID>', grantorId: '<UUID>' }, select: { id: true } }).execute()
db.orgGrant.update({ where: { id: '<UUID>' }, data: { permissions: '<BitString>' }, select: { id: true } }).execute()
db.orgGrant.delete({ where: { id: '<UUID>' } }).execute()Examples
List all orgGrant records
const items = await db.orgGrant.findMany({
select: { id: true, permissions: true }
}).execute();Create a orgGrant
const item = await db.orgGrant.create({
data: { permissions: '<BitString>', isGrant: '<Boolean>', actorId: '<UUID>', entityId: '<UUID>', grantorId: '<UUID>' },
select: { id: true }
}).execute();orgInvite
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Invitation records sent to prospective members via email, with token-based redemption and expiration
Usage
db.orgInvite.findMany({ select: { id: true } }).execute()
db.orgInvite.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.orgInvite.create({ data: { email: '<Email>', senderId: '<UUID>', receiverId: '<UUID>', inviteToken: '<String>', inviteValid: '<Boolean>', inviteLimit: '<Int>', inviteCount: '<Int>', multiple: '<Boolean>', data: '<JSON>', profileId: '<UUID>', expiresAt: '<Datetime>', entityId: '<UUID>' }, select: { id: true } }).execute()
db.orgInvite.update({ where: { id: '<UUID>' }, data: { email: '<Email>' }, select: { id: true } }).execute()
db.orgInvite.delete({ where: { id: '<UUID>' } }).execute()Examples
List all orgInvite records
const items = await db.orgInvite.findMany({
select: { id: true, email: true }
}).execute();Create a orgInvite
const item = await db.orgInvite.create({
data: { email: '<Email>', senderId: '<UUID>', receiverId: '<UUID>', inviteToken: '<String>', inviteValid: '<Boolean>', inviteLimit: '<Int>', inviteCount: '<Int>', multiple: '<Boolean>', data: '<JSON>', profileId: '<UUID>', expiresAt: '<Datetime>', entityId: '<UUID>' },
select: { id: true }
}).execute();orgIsManagerOf
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Execute the orgIsManagerOf query
Usage
db.query.orgIsManagerOf({ pEntityId: '<UUID>', pManagerId: '<UUID>', pUserId: '<UUID>', pMaxDepth: '<Int>' }).execute()Examples
Run orgIsManagerOf
const result = await db.query.orgIsManagerOf({ pEntityId: '<UUID>', pManagerId: '<UUID>', pUserId: '<UUID>', pMaxDepth: '<Int>' }).execute();orgLimitAggregate
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Tracks aggregate entity-level usage counts (org-wide caps, no per-user breakdown)
Usage
db.orgLimitAggregate.findMany({ select: { id: true } }).execute()
db.orgLimitAggregate.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.orgLimitAggregate.create({ data: { name: '<String>', entityId: '<UUID>', num: '<BigInt>', max: '<BigInt>', softMax: '<BigInt>', windowStart: '<Datetime>', windowDuration: '<Interval>' }, select: { id: true } }).execute()
db.orgLimitAggregate.update({ where: { id: '<UUID>' }, data: { name: '<String>' }, select: { id: true } }).execute()
db.orgLimitAggregate.delete({ where: { id: '<UUID>' } }).execute()Examples
List all orgLimitAggregate records
const items = await db.orgLimitAggregate.findMany({
select: { id: true, name: true }
}).execute();Create a orgLimitAggregate
const item = await db.orgLimitAggregate.create({
data: { name: '<String>', entityId: '<UUID>', num: '<BigInt>', max: '<BigInt>', softMax: '<BigInt>', windowStart: '<Datetime>', windowDuration: '<Interval>' },
select: { id: true }
}).execute();orgLimitDefault
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Default maximum values for each named limit, applied when no per-actor override exists
Usage
db.orgLimitDefault.findMany({ select: { id: true } }).execute()
db.orgLimitDefault.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.orgLimitDefault.create({ data: { name: '<String>', max: '<BigInt>', softMax: '<BigInt>' }, select: { id: true } }).execute()
db.orgLimitDefault.update({ where: { id: '<UUID>' }, data: { name: '<String>' }, select: { id: true } }).execute()
db.orgLimitDefault.delete({ where: { id: '<UUID>' } }).execute()Examples
List all orgLimitDefault records
const items = await db.orgLimitDefault.findMany({
select: { id: true, name: true }
}).execute();Create a orgLimitDefault
const item = await db.orgLimitDefault.create({
data: { name: '<String>', max: '<BigInt>', softMax: '<BigInt>' },
select: { id: true }
}).execute();orgLimitEvent
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Append-only log of limit events for historical reporting and audit
Usage
db.orgLimitEvent.findMany({ select: { id: true } }).execute()
db.orgLimitEvent.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.orgLimitEvent.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.orgLimitEvent.update({ where: { id: '<UUID>' }, data: { name: '<String>' }, select: { id: true } }).execute()
db.orgLimitEvent.delete({ where: { id: '<UUID>' } }).execute()Examples
List all orgLimitEvent records
const items = await db.orgLimitEvent.findMany({
select: { id: true, name: true }
}).execute();Create a orgLimitEvent
const item = await db.orgLimitEvent.create({
data: { name: '<String>', actorId: '<UUID>', entityId: '<UUID>', eventType: '<String>', delta: '<BigInt>', numBefore: '<BigInt>', numAfter: '<BigInt>', maxAtEvent: '<BigInt>', reason: '<String>' },
select: { id: true }
}).execute();orgLimit
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Tracks per-actor usage counts against configurable maximum limits
Usage
db.orgLimit.findMany({ select: { id: true } }).execute()
db.orgLimit.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.orgLimit.create({ data: { name: '<String>', actorId: '<UUID>', num: '<BigInt>', max: '<BigInt>', softMax: '<BigInt>', windowStart: '<Datetime>', windowDuration: '<Interval>', entityId: '<UUID>' }, select: { id: true } }).execute()
db.orgLimit.update({ where: { id: '<UUID>' }, data: { name: '<String>' }, select: { id: true } }).execute()
db.orgLimit.delete({ where: { id: '<UUID>' } }).execute()Examples
List all orgLimit records
const items = await db.orgLimit.findMany({
select: { id: true, name: true }
}).execute();Create a orgLimit
const item = await db.orgLimit.create({
data: { name: '<String>', actorId: '<UUID>', num: '<BigInt>', max: '<BigInt>', softMax: '<BigInt>', windowStart: '<Datetime>', windowDuration: '<Interval>', entityId: '<UUID>' },
select: { id: true }
}).execute();orgMemberProfile
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Per-membership profile information visible to other entity members (display name, email, title, bio, avatar)
Usage
db.orgMemberProfile.findMany({ select: { id: true } }).execute()
db.orgMemberProfile.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.orgMemberProfile.create({ data: { membershipId: '<UUID>', entityId: '<UUID>', actorId: '<UUID>', displayName: '<String>', email: '<String>', title: '<String>', bio: '<String>', profilePicture: '<Image>' }, select: { id: true } }).execute()
db.orgMemberProfile.update({ where: { id: '<UUID>' }, data: { membershipId: '<UUID>' }, select: { id: true } }).execute()
db.orgMemberProfile.delete({ where: { id: '<UUID>' } }).execute()Examples
List all orgMemberProfile records
const items = await db.orgMemberProfile.findMany({
select: { id: true, membershipId: true }
}).execute();Create a orgMemberProfile
const item = await db.orgMemberProfile.create({
data: { membershipId: '<UUID>', entityId: '<UUID>', actorId: '<UUID>', displayName: '<String>', email: '<String>', title: '<String>', bio: '<String>', profilePicture: '<Image>' },
select: { id: true }
}).execute();orgMember
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Simplified view of active members in an entity, used for listing who belongs to an org or group
Usage
db.orgMember.findMany({ select: { id: true } }).execute()
db.orgMember.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.orgMember.create({ data: { isAdmin: '<Boolean>', actorId: '<UUID>', entityId: '<UUID>' }, select: { id: true } }).execute()
db.orgMember.update({ where: { id: '<UUID>' }, data: { isAdmin: '<Boolean>' }, select: { id: true } }).execute()
db.orgMember.delete({ where: { id: '<UUID>' } }).execute()Examples
List all orgMember records
const items = await db.orgMember.findMany({
select: { id: true, isAdmin: true }
}).execute();Create a orgMember
const item = await db.orgMember.create({
data: { isAdmin: '<Boolean>', actorId: '<UUID>', entityId: '<UUID>' },
select: { id: true }
}).execute();orgMembershipDefault
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Default membership settings per entity, controlling initial approval and verification state for new members
Usage
db.orgMembershipDefault.findMany({ select: { id: true } }).execute()
db.orgMembershipDefault.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.orgMembershipDefault.create({ data: { createdBy: '<UUID>', updatedBy: '<UUID>', isApproved: '<Boolean>', entityId: '<UUID>' }, select: { id: true } }).execute()
db.orgMembershipDefault.update({ where: { id: '<UUID>' }, data: { createdBy: '<UUID>' }, select: { id: true } }).execute()
db.orgMembershipDefault.delete({ where: { id: '<UUID>' } }).execute()Examples
List all orgMembershipDefault records
const items = await db.orgMembershipDefault.findMany({
select: { id: true, createdBy: true }
}).execute();Create a orgMembershipDefault
const item = await db.orgMembershipDefault.create({
data: { createdBy: '<UUID>', updatedBy: '<UUID>', isApproved: '<Boolean>', entityId: '<UUID>' },
select: { id: true }
}).execute();orgMembershipSetting
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Per-entity settings for the memberships module
Usage
db.orgMembershipSetting.findMany({ select: { id: true } }).execute()
db.orgMembershipSetting.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.orgMembershipSetting.create({ data: { createdBy: '<UUID>', updatedBy: '<UUID>', entityId: '<UUID>', deleteMemberCascadeChildren: '<Boolean>', createChildCascadeOwners: '<Boolean>', createChildCascadeAdmins: '<Boolean>', createChildCascadeMembers: '<Boolean>', allowExternalMembers: '<Boolean>', inviteProfileAssignmentMode: '<String>', populateMemberEmail: '<Boolean>', limitAllocationMode: '<String>' }, select: { id: true } }).execute()
db.orgMembershipSetting.update({ where: { id: '<UUID>' }, data: { createdBy: '<UUID>' }, select: { id: true } }).execute()
db.orgMembershipSetting.delete({ where: { id: '<UUID>' } }).execute()Examples
List all orgMembershipSetting records
const items = await db.orgMembershipSetting.findMany({
select: { id: true, createdBy: true }
}).execute();Create a orgMembershipSetting
const item = await db.orgMembershipSetting.create({
data: { createdBy: '<UUID>', updatedBy: '<UUID>', entityId: '<UUID>', deleteMemberCascadeChildren: '<Boolean>', createChildCascadeOwners: '<Boolean>', createChildCascadeAdmins: '<Boolean>', createChildCascadeMembers: '<Boolean>', allowExternalMembers: '<Boolean>', inviteProfileAssignmentMode: '<String>', populateMemberEmail: '<Boolean>', limitAllocationMode: '<String>' },
select: { id: true }
}).execute();orgMembership
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Tracks membership records linking actors to entities with permission bitmasks, ownership, and admin status
Usage
db.orgMembership.findMany({ select: { id: true } }).execute()
db.orgMembership.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.orgMembership.create({ data: { createdBy: '<UUID>', updatedBy: '<UUID>', isApproved: '<Boolean>', isBanned: '<Boolean>', isDisabled: '<Boolean>', isActive: '<Boolean>', isExternal: '<Boolean>', isOwner: '<Boolean>', isAdmin: '<Boolean>', permissions: '<BitString>', granted: '<BitString>', actorId: '<UUID>', entityId: '<UUID>', isReadOnly: '<Boolean>', profileId: '<UUID>' }, select: { id: true } }).execute()
db.orgMembership.update({ where: { id: '<UUID>' }, data: { createdBy: '<UUID>' }, select: { id: true } }).execute()
db.orgMembership.delete({ where: { id: '<UUID>' } }).execute()Examples
List all orgMembership records
const items = await db.orgMembership.findMany({
select: { id: true, createdBy: true }
}).execute();Create a orgMembership
const item = await db.orgMembership.create({
data: { createdBy: '<UUID>', updatedBy: '<UUID>', isApproved: '<Boolean>', isBanned: '<Boolean>', isDisabled: '<Boolean>', isActive: '<Boolean>', isExternal: '<Boolean>', isOwner: '<Boolean>', isAdmin: '<Boolean>', permissions: '<BitString>', granted: '<BitString>', actorId: '<UUID>', entityId: '<UUID>', isReadOnly: '<Boolean>', profileId: '<UUID>' },
select: { id: true }
}).execute();orgOwnerGrant
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Records of ownership transfers and grants between members
Usage
db.orgOwnerGrant.findMany({ select: { id: true } }).execute()
db.orgOwnerGrant.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.orgOwnerGrant.create({ data: { isGrant: '<Boolean>', actorId: '<UUID>', entityId: '<UUID>', grantorId: '<UUID>' }, select: { id: true } }).execute()
db.orgOwnerGrant.update({ where: { id: '<UUID>' }, data: { isGrant: '<Boolean>' }, select: { id: true } }).execute()
db.orgOwnerGrant.delete({ where: { id: '<UUID>' } }).execute()Examples
List all orgOwnerGrant records
const items = await db.orgOwnerGrant.findMany({
select: { id: true, isGrant: true }
}).execute();Create a orgOwnerGrant
const item = await db.orgOwnerGrant.create({
data: { isGrant: '<Boolean>', actorId: '<UUID>', entityId: '<UUID>', grantorId: '<UUID>' },
select: { id: true }
}).execute();orgPermissionDefault
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Stores the default permission bitmask assigned to new members upon joining
Usage
db.orgPermissionDefault.findMany({ select: { id: true } }).execute()
db.orgPermissionDefault.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.orgPermissionDefault.create({ data: { permissions: '<BitString>', entityId: '<UUID>' }, select: { id: true } }).execute()
db.orgPermissionDefault.update({ where: { id: '<UUID>' }, data: { permissions: '<BitString>' }, select: { id: true } }).execute()
db.orgPermissionDefault.delete({ where: { id: '<UUID>' } }).execute()Examples
List all orgPermissionDefault records
const items = await db.orgPermissionDefault.findMany({
select: { id: true, permissions: true }
}).execute();Create a orgPermissionDefault
const item = await db.orgPermissionDefault.create({
data: { permissions: '<BitString>', entityId: '<UUID>' },
select: { id: true }
}).execute();orgPermission
<!-- @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.orgPermission.findMany({ select: { id: true } }).execute()
db.orgPermission.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.orgPermission.create({ data: { name: '<String>', bitnum: '<Int>', bitstr: '<BitString>', description: '<String>' }, select: { id: true } }).execute()
db.orgPermission.update({ where: { id: '<UUID>' }, data: { name: '<String>' }, select: { id: true } }).execute()
db.orgPermission.delete({ where: { id: '<UUID>' } }).execute()Examples
List all orgPermission records
const items = await db.orgPermission.findMany({
select: { id: true, name: true }
}).execute();Create a orgPermission
const item = await db.orgPermission.create({
data: { name: '<String>', bitnum: '<Int>', bitstr: '<BitString>', description: '<String>' },
select: { id: true }
}).execute();orgPermissionsGetByMask
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Reads and enables pagination through a set of OrgPermission.
Usage
db.query.orgPermissionsGetByMask({ mask: '<BitString>', first: '<Int>', offset: '<Int>', after: '<Cursor>' }).execute()Examples
Run orgPermissionsGetByMask
const result = await db.query.orgPermissionsGetByMask({ mask: '<BitString>', first: '<Int>', offset: '<Int>', after: '<Cursor>' }).execute();orgPermissionsGetMaskByNames
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Execute the orgPermissionsGetMaskByNames query
Usage
db.query.orgPermissionsGetMaskByNames({ names: '<String>' }).execute()Examples
Run orgPermissionsGetMaskByNames
const result = await db.query.orgPermissionsGetMaskByNames({ names: '<String>' }).execute();orgPermissionsGetMask
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Execute the orgPermissionsGetMask query
Usage
db.query.orgPermissionsGetMask({ ids: '<UUID>' }).execute()Examples
Run orgPermissionsGetMask
const result = await db.query.orgPermissionsGetMask({ ids: '<UUID>' }).execute();orgPermissionsGetPaddedMask
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Execute the orgPermissionsGetPaddedMask query
Usage
db.query.orgPermissionsGetPaddedMask({ mask: '<BitString>' }).execute()Examples
Run orgPermissionsGetPaddedMask
const result = await db.query.orgPermissionsGetPaddedMask({ mask: '<BitString>' }).execute();provisionBucket
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Provision an S3 bucket for a logical bucket in the database. Reads the bucket config via RLS, then creates and configures the S3 bucket with the appropriate privacy policies, CORS rules, and lifecycle settings.
Usage
db.mutation.provisionBucket({ input: { bucketKey: '<String>', ownerId: '<UUID>' } }).execute()Examples
Run provisionBucket
const result = await db.mutation.provisionBucket({ input: { bucketKey: '<String>', ownerId: '<UUID>' } }).execute();requestUploadUrl
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Request a presigned URL for uploading a file directly to S3. Client computes SHA-256 of the file content and provides it here. If a file with the same hash already exists (dedup), returns the existing file ID and deduplicated=true with no uploadUrl.
Usage
db.mutation.requestUploadUrl({ input: '<RequestUploadUrlInput>' }).execute()Examples
Run requestUploadUrl
const result = await db.mutation.requestUploadUrl({ input: '<RequestUploadUrlInput>' }).execute();stepsAchieved
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Execute the stepsAchieved query
Usage
db.query.stepsAchieved({ level: '<String>', roleId: '<UUID>' }).execute()Examples
Run stepsAchieved
const result = await db.query.stepsAchieved({ level: '<String>', roleId: '<UUID>' }).execute();stepsRequired
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Reads and enables pagination through a set of AppLevelRequirement.
Usage
db.query.stepsRequired({ level: '<String>', roleId: '<UUID>', first: '<Int>', offset: '<Int>', after: '<Cursor>' }).execute()Examples
Run stepsRequired
const result = await db.query.stepsRequired({ level: '<String>', roleId: '<UUID>', first: '<Int>', offset: '<Int>', after: '<Cursor>' }).execute();submitAppInviteCode
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Execute the submitAppInviteCode mutation
Usage
db.mutation.submitAppInviteCode({ input: { token: '<String>' } }).execute()Examples
Run submitAppInviteCode
const result = await db.mutation.submitAppInviteCode({ input: { token: '<String>' } }).execute();submitInviteCode
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Execute the submitInviteCode mutation
Usage
db.mutation.submitInviteCode({ input: { token: '<String>' } }).execute()Examples
Run submitInviteCode
const result = await db.mutation.submitInviteCode({ input: { token: '<String>' } }).execute();submitOrgInviteCode
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Execute the submitOrgInviteCode mutation
Usage
db.mutation.submitOrgInviteCode({ input: { token: '<String>' } }).execute()Examples
Run submitOrgInviteCode
const result = await db.mutation.submitOrgInviteCode({ input: { token: '<String>' } }).execute();